(Python_functions): Skip spaces at beginning of lines.
[emacs.git] / configure
blobf9671372dfc04c9bbf81c17c2bab62a0937d8b05
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --without-gcc don't use GCC to compile Emacs if GCC is found"
16 ac_help="$ac_help
17 --without-pop don't support POP mail retrieval with movemail"
18 ac_help="$ac_help
19 --with-kerberos support Kerberos-authenticated POP"
20 ac_help="$ac_help
21 --with-kerberos5 support Kerberos version 5 authenticated POP"
22 ac_help="$ac_help
23 --with-hesiod support Hesiod to get the POP server host"
24 ac_help="$ac_help
25 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)"
26 ac_help="$ac_help
27 --with-xpm use -lXpm for displaying XPM images"
28 ac_help="$ac_help
29 --with-jpeg use -ljpeg for displaying JPEG images"
30 ac_help="$ac_help
31 --with-tiff use -ltiff for displaying TIFF images"
32 ac_help="$ac_help
33 --with-gif use -lungif for displaying GIF images"
34 ac_help="$ac_help
35 --with-png use -lpng for displaying PNG images"
36 ac_help="$ac_help
37 --without-toolkit-scroll-bars
38 don't use Motif or Xaw3d scroll bars"
39 ac_help="$ac_help
40 --without-xim don't use X11 XIM"
41 ac_help="$ac_help
42 --disable-largefile omit support for large files"
43 ac_help="$ac_help
44 --with-x use the X Window System"
46 # Initialize some variables set by options.
47 # The variables have the same names as the options, with
48 # dashes changed to underlines.
49 build=NONE
50 cache_file=./config.cache
51 exec_prefix=NONE
52 host=NONE
53 no_create=
54 nonopt=NONE
55 no_recursion=
56 prefix=NONE
57 program_prefix=NONE
58 program_suffix=NONE
59 program_transform_name=s,x,x,
60 silent=
61 site=
62 srcdir=
63 target=NONE
64 verbose=
65 x_includes=NONE
66 x_libraries=NONE
67 bindir='${exec_prefix}/bin'
68 sbindir='${exec_prefix}/sbin'
69 libexecdir='${exec_prefix}/libexec'
70 datadir='${prefix}/share'
71 sysconfdir='${prefix}/etc'
72 sharedstatedir='${prefix}/com'
73 localstatedir='${prefix}/var'
74 libdir='${exec_prefix}/lib'
75 includedir='${prefix}/include'
76 oldincludedir='/usr/include'
77 infodir='${prefix}/info'
78 mandir='${prefix}/man'
80 # Initialize some other variables.
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 # Maximum number of lines to put in a shell here document.
85 ac_max_here_lines=12
87 ac_prev=
88 for ac_option
91 # If the previous option needs an argument, assign it.
92 if test -n "$ac_prev"; then
93 eval "$ac_prev=\$ac_option"
94 ac_prev=
95 continue
98 case "$ac_option" in
99 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100 *) ac_optarg= ;;
101 esac
103 # Accept the important Cygnus configure options, so we can diagnose typos.
105 case "$ac_option" in
107 -bindir | --bindir | --bindi | --bind | --bin | --bi)
108 ac_prev=bindir ;;
109 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
110 bindir="$ac_optarg" ;;
112 -build | --build | --buil | --bui | --bu)
113 ac_prev=build ;;
114 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
115 build="$ac_optarg" ;;
117 -cache-file | --cache-file | --cache-fil | --cache-fi \
118 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
119 ac_prev=cache_file ;;
120 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
121 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
122 cache_file="$ac_optarg" ;;
124 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
125 ac_prev=datadir ;;
126 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
127 | --da=*)
128 datadir="$ac_optarg" ;;
130 -disable-* | --disable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 eval "enable_${ac_feature}=no" ;;
139 -enable-* | --enable-*)
140 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
141 # Reject names that are not valid shell variable names.
142 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
143 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146 case "$ac_option" in
147 *=*) ;;
148 *) ac_optarg=yes ;;
149 esac
150 eval "enable_${ac_feature}='$ac_optarg'" ;;
152 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
153 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
154 | --exec | --exe | --ex)
155 ac_prev=exec_prefix ;;
156 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
157 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
158 | --exec=* | --exe=* | --ex=*)
159 exec_prefix="$ac_optarg" ;;
161 -gas | --gas | --ga | --g)
162 # Obsolete; use --with-gas.
163 with_gas=yes ;;
165 -help | --help | --hel | --he)
166 # Omit some internal or obsolete options to make the list less imposing.
167 # This message is too long to be a string in the A/UX 3.1 sh.
168 cat << EOF
169 Usage: configure [options] [host]
170 Options: [defaults in brackets after descriptions]
171 Configuration:
172 --cache-file=FILE cache test results in FILE
173 --help print this message
174 --no-create do not create output files
175 --quiet, --silent do not print \`checking...' messages
176 --version print the version of autoconf that created configure
177 Directory and file names:
178 --prefix=PREFIX install architecture-independent files in PREFIX
179 [$ac_default_prefix]
180 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
181 [same as prefix]
182 --bindir=DIR user executables in DIR [EPREFIX/bin]
183 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
184 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
185 --datadir=DIR read-only architecture-independent data in DIR
186 [PREFIX/share]
187 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
188 --sharedstatedir=DIR modifiable architecture-independent data in DIR
189 [PREFIX/com]
190 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
191 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
192 --includedir=DIR C header files in DIR [PREFIX/include]
193 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
194 --infodir=DIR info documentation in DIR [PREFIX/info]
195 --mandir=DIR man documentation in DIR [PREFIX/man]
196 --srcdir=DIR find the sources in DIR [configure dir or ..]
197 --program-prefix=PREFIX prepend PREFIX to installed program names
198 --program-suffix=SUFFIX append SUFFIX to installed program names
199 --program-transform-name=PROGRAM
200 run sed PROGRAM on installed program names
202 cat << EOF
203 Host type:
204 --build=BUILD configure for building on BUILD [BUILD=HOST]
205 --host=HOST configure for HOST [guessed]
206 --target=TARGET configure for TARGET [TARGET=HOST]
207 Features and packages:
208 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
209 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
210 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
211 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
212 --x-includes=DIR X include files are in DIR
213 --x-libraries=DIR X library files are in DIR
215 if test -n "$ac_help"; then
216 echo "--enable and --with options recognized:$ac_help"
218 exit 0 ;;
220 -host | --host | --hos | --ho)
221 ac_prev=host ;;
222 -host=* | --host=* | --hos=* | --ho=*)
223 host="$ac_optarg" ;;
225 -includedir | --includedir | --includedi | --included | --include \
226 | --includ | --inclu | --incl | --inc)
227 ac_prev=includedir ;;
228 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
229 | --includ=* | --inclu=* | --incl=* | --inc=*)
230 includedir="$ac_optarg" ;;
232 -infodir | --infodir | --infodi | --infod | --info | --inf)
233 ac_prev=infodir ;;
234 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
235 infodir="$ac_optarg" ;;
237 -libdir | --libdir | --libdi | --libd)
238 ac_prev=libdir ;;
239 -libdir=* | --libdir=* | --libdi=* | --libd=*)
240 libdir="$ac_optarg" ;;
242 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
243 | --libexe | --libex | --libe)
244 ac_prev=libexecdir ;;
245 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
246 | --libexe=* | --libex=* | --libe=*)
247 libexecdir="$ac_optarg" ;;
249 -localstatedir | --localstatedir | --localstatedi | --localstated \
250 | --localstate | --localstat | --localsta | --localst \
251 | --locals | --local | --loca | --loc | --lo)
252 ac_prev=localstatedir ;;
253 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
254 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
255 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
256 localstatedir="$ac_optarg" ;;
258 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
259 ac_prev=mandir ;;
260 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
261 mandir="$ac_optarg" ;;
263 -nfp | --nfp | --nf)
264 # Obsolete; use --without-fp.
265 with_fp=no ;;
267 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268 | --no-cr | --no-c)
269 no_create=yes ;;
271 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
272 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
273 no_recursion=yes ;;
275 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
276 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
277 | --oldin | --oldi | --old | --ol | --o)
278 ac_prev=oldincludedir ;;
279 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
280 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
281 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
282 oldincludedir="$ac_optarg" ;;
284 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
285 ac_prev=prefix ;;
286 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
287 prefix="$ac_optarg" ;;
289 -program-prefix | --program-prefix | --program-prefi | --program-pref \
290 | --program-pre | --program-pr | --program-p)
291 ac_prev=program_prefix ;;
292 -program-prefix=* | --program-prefix=* | --program-prefi=* \
293 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
294 program_prefix="$ac_optarg" ;;
296 -program-suffix | --program-suffix | --program-suffi | --program-suff \
297 | --program-suf | --program-su | --program-s)
298 ac_prev=program_suffix ;;
299 -program-suffix=* | --program-suffix=* | --program-suffi=* \
300 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
301 program_suffix="$ac_optarg" ;;
303 -program-transform-name | --program-transform-name \
304 | --program-transform-nam | --program-transform-na \
305 | --program-transform-n | --program-transform- \
306 | --program-transform | --program-transfor \
307 | --program-transfo | --program-transf \
308 | --program-trans | --program-tran \
309 | --progr-tra | --program-tr | --program-t)
310 ac_prev=program_transform_name ;;
311 -program-transform-name=* | --program-transform-name=* \
312 | --program-transform-nam=* | --program-transform-na=* \
313 | --program-transform-n=* | --program-transform-=* \
314 | --program-transform=* | --program-transfor=* \
315 | --program-transfo=* | --program-transf=* \
316 | --program-trans=* | --program-tran=* \
317 | --progr-tra=* | --program-tr=* | --program-t=*)
318 program_transform_name="$ac_optarg" ;;
320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
321 | -silent | --silent | --silen | --sile | --sil)
322 silent=yes ;;
324 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
325 ac_prev=sbindir ;;
326 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
327 | --sbi=* | --sb=*)
328 sbindir="$ac_optarg" ;;
330 -sharedstatedir | --sharedstatedir | --sharedstatedi \
331 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
332 | --sharedst | --shareds | --shared | --share | --shar \
333 | --sha | --sh)
334 ac_prev=sharedstatedir ;;
335 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
336 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
337 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
338 | --sha=* | --sh=*)
339 sharedstatedir="$ac_optarg" ;;
341 -site | --site | --sit)
342 ac_prev=site ;;
343 -site=* | --site=* | --sit=*)
344 site="$ac_optarg" ;;
346 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
347 ac_prev=srcdir ;;
348 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
349 srcdir="$ac_optarg" ;;
351 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
352 | --syscon | --sysco | --sysc | --sys | --sy)
353 ac_prev=sysconfdir ;;
354 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
355 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
356 sysconfdir="$ac_optarg" ;;
358 -target | --target | --targe | --targ | --tar | --ta | --t)
359 ac_prev=target ;;
360 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
361 target="$ac_optarg" ;;
363 -v | -verbose | --verbose | --verbos | --verbo | --verb)
364 verbose=yes ;;
366 -version | --version | --versio | --versi | --vers)
367 echo "configure generated by autoconf version 2.13"
368 exit 0 ;;
370 -with-* | --with-*)
371 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
372 # Reject names that are not valid shell variable names.
373 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 case "$ac_option" in
378 *=*) ;;
379 *) ac_optarg=yes ;;
380 esac
381 eval "with_${ac_package}='$ac_optarg'" ;;
383 -without-* | --without-*)
384 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
385 # Reject names that are not valid shell variable names.
386 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 eval "with_${ac_package}=no" ;;
392 --x)
393 # Obsolete; use --with-x.
394 with_x=yes ;;
396 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
397 | --x-incl | --x-inc | --x-in | --x-i)
398 ac_prev=x_includes ;;
399 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
400 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
401 x_includes="$ac_optarg" ;;
403 -x-libraries | --x-libraries | --x-librarie | --x-librari \
404 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
405 ac_prev=x_libraries ;;
406 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
407 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
408 x_libraries="$ac_optarg" ;;
410 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
414 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
415 echo "configure: warning: $ac_option: invalid host type" 1>&2
417 if test "x$nonopt" != xNONE; then
418 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420 nonopt="$ac_option"
423 esac
424 done
426 if test -n "$ac_prev"; then
427 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
430 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432 # File descriptor usage:
433 # 0 standard input
434 # 1 file creation
435 # 2 errors and warnings
436 # 3 some systems may open it to /dev/tty
437 # 4 used on the Kubota Titan
438 # 6 checking for... messages and results
439 # 5 compiler messages saved in config.log
440 if test "$silent" = yes; then
441 exec 6>/dev/null
442 else
443 exec 6>&1
445 exec 5>./config.log
447 echo "\
448 This file contains any messages produced by compilers while
449 running configure, to aid debugging if configure makes a mistake.
450 " 1>&5
452 # Strip out --no-create and --no-recursion so they do not pile up.
453 # Also quote any args containing shell metacharacters.
454 ac_configure_args=
455 for ac_arg
457 case "$ac_arg" in
458 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
459 | --no-cr | --no-c) ;;
460 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
461 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
462 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
463 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
464 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
465 esac
466 done
468 # NLS nuisances.
469 # Only set these to C if already set. These must not be set unconditionally
470 # because not all systems understand e.g. LANG=C (notably SCO).
471 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
472 # Non-C LC_CTYPE values break the ctype check.
473 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
474 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
475 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
476 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
478 # confdefs.h avoids OS command line length limits that DEFS can exceed.
479 rm -rf conftest* confdefs.h
480 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
481 echo > confdefs.h
483 # A filename unique to this package, relative to the directory that
484 # configure is in, which we can look for to find out if srcdir is correct.
485 ac_unique_file=src/lisp.h
487 # Find the source files, if location was not specified.
488 if test -z "$srcdir"; then
489 ac_srcdir_defaulted=yes
490 # Try the directory containing this script, then its parent.
491 ac_prog=$0
492 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
493 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
494 srcdir=$ac_confdir
495 if test ! -r $srcdir/$ac_unique_file; then
496 srcdir=..
498 else
499 ac_srcdir_defaulted=no
501 if test ! -r $srcdir/$ac_unique_file; then
502 if test "$ac_srcdir_defaulted" = yes; then
503 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
504 else
505 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
508 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510 # Prefer explicitly selected file to automatically selected ones.
511 if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518 for ac_site_file in $CONFIG_SITE; do
519 if test -r "$ac_site_file"; then
520 echo "loading site script $ac_site_file"
521 . "$ac_site_file"
523 done
525 if test -r "$cache_file"; then
526 echo "loading cache $cache_file"
527 . $cache_file
528 else
529 echo "creating cache $cache_file"
530 > $cache_file
533 ac_ext=c
534 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
535 ac_cpp='$CPP $CPPFLAGS'
536 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
537 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
538 cross_compiling=$ac_cv_prog_cc_cross
540 ac_exeext=
541 ac_objext=o
542 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
543 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
544 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
545 ac_n= ac_c='
546 ' ac_t=' '
547 else
548 ac_n=-n ac_c= ac_t=
550 else
551 ac_n= ac_c='\c' ac_t=
557 lispdir='${datadir}/emacs/${version}/lisp'
558 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
559 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
560 lisppath='${locallisppath}:${lispdir}'
561 etcdir='${datadir}/emacs/${version}/etc'
562 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
563 docdir='${datadir}/emacs/${version}/etc'
565 # Check whether --with-gcc or --without-gcc was given.
566 if test "${with_gcc+set}" = set; then
567 withval="$with_gcc"
571 # Check whether --with-pop or --without-pop was given.
572 if test "${with_pop+set}" = set; then
573 withval="$with_pop"
574 if test "$withval" = yes; then
575 cat >> confdefs.h <<\EOF
576 #define MAIL_USE_POP 1
579 else :
581 else
582 cat >> confdefs.h <<\EOF
583 #define MAIL_USE_POP 1
588 # Check whether --with-kerberos or --without-kerberos was given.
589 if test "${with_kerberos+set}" = set; then
590 withval="$with_kerberos"
591 cat >> confdefs.h <<\EOF
592 #define KERBEROS 1
597 # Check whether --with-kerberos5 or --without-kerberos5 was given.
598 if test "${with_kerberos5+set}" = set; then
599 withval="$with_kerberos5"
600 if test "${with_kerberos5+set}" = set; then
601 if test "${with_kerberos+set}" != set; then
602 with_kerberos=yes
603 cat >> confdefs.h <<\EOF
604 #define KERBEROS 1
609 cat >> confdefs.h <<\EOF
610 #define KERBEROS5 1
615 # Check whether --with-hesiod or --without-hesiod was given.
616 if test "${with_hesiod+set}" = set; then
617 withval="$with_hesiod"
618 cat >> confdefs.h <<\EOF
619 #define HESIOD 1
624 # Check whether --with-x-toolkit or --without-x-toolkit was given.
625 if test "${with_x_toolkit+set}" = set; then
626 withval="$with_x_toolkit"
627 case "${withval}" in
628 y | ye | yes ) val=athena ;;
629 n | no ) val=no ;;
630 l | lu | luc | luci | lucid ) val=lucid ;;
631 a | at | ath | athe | athen | athena ) val=athena ;;
632 m | mo | mot | moti | motif ) val=motif ;;
634 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
635 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
636 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
638 esac
639 with_x_toolkit=$val
643 # Check whether --with-xpm or --without-xpm was given.
644 if test "${with_xpm+set}" = set; then
645 withval="$with_xpm"
649 # Check whether --with-jpeg or --without-jpeg was given.
650 if test "${with_jpeg+set}" = set; then
651 withval="$with_jpeg"
655 # Check whether --with-tiff or --without-tiff was given.
656 if test "${with_tiff+set}" = set; then
657 withval="$with_tiff"
661 # Check whether --with-gif or --without-gif was given.
662 if test "${with_gif+set}" = set; then
663 withval="$with_gif"
667 # Check whether --with-png or --without-png was given.
668 if test "${with_png+set}" = set; then
669 withval="$with_png"
673 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
674 if test "${with_toolkit_scroll_bars+set}" = set; then
675 withval="$with_toolkit_scroll_bars"
679 # Check whether --with-xim or --without-xim was given.
680 if test "${with_xim+set}" = set; then
681 withval="$with_xim"
686 #### Make srcdir absolute, if it isn't already. It's important to
687 #### avoid running the path through pwd unnecessarily, since pwd can
688 #### give you automounter prefixes, which can go away. We do all this
689 #### so Emacs can find its files when run uninstalled.
690 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
691 unset CDPATH
692 case "${srcdir}" in
693 /* ) ;;
695 ## We may be able to use the $PWD environment variable to make this
696 ## absolute. But sometimes PWD is inaccurate.
697 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
698 then
699 srcdir="$PWD"
700 else
701 srcdir="`(cd ${srcdir}; pwd)`"
704 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
705 esac
707 #### Check if the source directory already has a configured system in it.
708 if test `pwd` != `(cd ${srcdir} && pwd)` \
709 && test -f "${srcdir}/src/config.h" ; then
710 echo "configure: warning: The directory tree \`${srcdir}' is being used
711 as a build directory right now; it has been configured in its own
712 right. To configure in another directory as well, you MUST
713 use GNU make. If you do not have GNU make, then you must
714 now do \`make distclean' in ${srcdir},
715 and then run $0 again." 1>&2
717 extrasub='/^VPATH[ ]*=/c\
718 vpath %.c $(srcdir)\
719 vpath %.h $(srcdir)\
720 vpath %.y $(srcdir)\
721 vpath %.l $(srcdir)\
722 vpath %.s $(srcdir)\
723 vpath %.in $(srcdir)\
724 vpath %.texi $(srcdir)'
727 #### Given the configuration name, set machfile and opsysfile to the
728 #### names of the m/*.h and s/*.h files we should use.
730 ### Canonicalize the configuration name.
732 ac_aux_dir=
733 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
734 if test -f $ac_dir/install-sh; then
735 ac_aux_dir=$ac_dir
736 ac_install_sh="$ac_aux_dir/install-sh -c"
737 break
738 elif test -f $ac_dir/install.sh; then
739 ac_aux_dir=$ac_dir
740 ac_install_sh="$ac_aux_dir/install.sh -c"
741 break
743 done
744 if test -z "$ac_aux_dir"; then
745 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
747 ac_config_guess=$ac_aux_dir/config.guess
748 ac_config_sub=$ac_aux_dir/config.sub
749 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
752 # Make sure we can run config.sub.
753 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
754 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
757 echo $ac_n "checking host system type""... $ac_c" 1>&6
758 echo "configure:759: checking host system type" >&5
760 host_alias=$host
761 case "$host_alias" in
762 NONE)
763 case $nonopt in
764 NONE)
765 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
766 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
767 fi ;;
768 *) host_alias=$nonopt ;;
769 esac ;;
770 esac
772 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
773 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
774 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
775 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
776 echo "$ac_t""$host" 1>&6
778 canonical=$host
779 configuration=$host_alias
782 ### If you add support for a new configuration, add code to this
783 ### switch statement to recognize your configuration name and select
784 ### the appropriate operating system and machine description files.
786 ### You would hope that you could choose an m/*.h file pretty much
787 ### based on the machine portion of the configuration name, and an s-
788 ### file based on the operating system portion. However, it turns out
789 ### that each m/*.h file is pretty manufacturer-specific - for
790 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
791 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
792 ### machines. So we basically have to have a special case for each
793 ### configuration name.
795 ### As far as handling version numbers on operating systems is
796 ### concerned, make sure things will fail in a fixable way. If
797 ### /etc/MACHINES doesn't say anything about version numbers, be
798 ### prepared to handle anything reasonably. If version numbers
799 ### matter, be sure /etc/MACHINES says something about it.
801 ### Eric Raymond says we should accept strings like "sysvr4" to mean
802 ### "System V Release 4"; he writes, "The old convention encouraged
803 ### confusion between `system' and `release' levels'."
805 machine='' opsys='' unported=no
806 case "${canonical}" in
808 ## NetBSD ports
809 *-*-netbsd* )
810 opsys=netbsd
811 case "${canonical}" in
812 alpha*-*-netbsd*) machine=alpha ;;
813 i[3456]86-*-netbsd*) machine=intel386 ;;
814 m68k-*-netbsd*)
815 # This is somewhat bogus.
816 machine=hp9000s300 ;;
817 powerpc-apple-netbsd*) machine=macppc ;;
818 mips-*-netbsd*) machine=pmax ;;
819 mipsel-*-netbsd*) machine=pmax ;;
820 ns32k-*-netbsd*) machine=ns32000 ;;
821 powerpc-*-netbsd*) machine=macppc ;;
822 sparc*-*-netbsd*) machine=sparc ;;
823 vax-*-netbsd*) machine=vax ;;
824 arm-*-netbsd*) machine=arm ;;
825 esac
828 ## OpenBSD ports
829 *-*-openbsd* )
830 opsys=openbsd
831 case "${canonical}" in
832 alpha*-*-openbsd*) machine=alpha ;;
833 i386-*-openbsd*) machine=intel386 ;;
834 m68k-*-openbsd*) machine=hp9000s300 ;;
835 mipsel-*-openbsd*) machine=pmax ;;
836 ns32k-*-openbsd*) machine=ns32000 ;;
837 sparc-*-openbsd*) machine=sparc ;;
838 vax-*-openbsd*) machine=vax ;;
839 esac
842 ## Acorn RISCiX:
843 arm-acorn-riscix1.1* )
844 machine=acorn opsys=riscix1-1
846 arm-acorn-riscix1.2* | arm-acorn-riscix )
847 ## This name is riscix12 instead of riscix1.2
848 ## to avoid a file name conflict on MSDOS.
849 machine=acorn opsys=riscix12
852 ## BSDI ports
853 *-*-bsdi* )
854 opsys=bsdi
855 case "${canonical}" in
856 i[345]86-*-bsdi*) machine=intel386 ;;
857 sparc-*-bsdi*) machine=sparc ;;
858 powerpc-*-bsdi*) machine=macppc ;;
859 esac
860 case "${canonical}" in
861 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
862 *-*-bsdi2.0* ) opsys=bsdos2 ;;
863 *-*-bsdi2* ) opsys=bsdos2-1 ;;
864 *-*-bsdi3* ) opsys=bsdos3 ;;
865 *-*-bsdi[45]* ) opsys=bsdos4 ;;
866 esac
869 ## Alliant machines
870 ## Strictly speaking, we need the version of the alliant operating
871 ## system to choose the right machine file, but currently the
872 ## configuration name doesn't tell us enough to choose the right
873 ## one; we need to give alliants their own operating system name to
874 ## do this right. When someone cares, they can help us.
875 fx80-alliant-* )
876 machine=alliant4 opsys=bsd4-2
878 i860-alliant-* )
879 machine=alliant-2800 opsys=bsd4-3
882 ## Alpha (DEC) machines.
883 alpha*-dec-osf* )
884 machine=alpha opsys=osf1
885 # This is needed to find X11R6.1 libraries for certain tests.
886 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
887 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
888 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
889 # due to non-traditional preprocessing with the current compiler
890 # defaults. OSF 4 can also have that compiler version, and there
891 # seems always to have been a usable /usr/bin/cpp.
892 NON_GNU_CPP=/usr/bin/cpp
893 case "${canonical}" in
894 alpha*-dec-osf[5-9]*)
895 opsys=osf5-0 ;;
896 esac
899 alpha*-*-linux-gnu* )
900 machine=alpha opsys=gnu-linux
903 arm*-*-linux-gnu* )
904 machine=arm opsys=gnu-linux
907 ppc-*-linux | \
908 powerpc-*-linux* )
909 machine=macppc opsys=gnu-linux
912 ## Altos 3068
913 m68*-altos-sysv* )
914 machine=altos opsys=usg5-2
917 ## Amdahl UTS
918 580-amdahl-sysv* )
919 machine=amdahl opsys=usg5-2-2
922 ## Apollo, Domain/OS
923 m68*-apollo-* )
924 machine=apollo opsys=bsd4-3
927 ## AT&T 3b2, 3b5, 3b15, 3b20
928 we32k-att-sysv* )
929 machine=att3b opsys=usg5-2-2
932 ## AT&T 3b1 - The Mighty Unix PC!
933 m68*-att-sysv* )
934 machine=7300 opsys=usg5-2-2
937 ## Bull dpx20
938 rs6000-bull-bosx* )
939 machine=ibmrs6000 opsys=aix3-2
942 ## Bull dpx2
943 m68*-bull-sysv3* )
944 machine=dpx2 opsys=usg5-3
947 ## Bull sps7
948 m68*-bull-sysv2* )
949 machine=sps7 opsys=usg5-2
952 ## CCI 5/32, 6/32 -- see "Tahoe".
954 ## Celerity
955 ## I don't know what configuration name to use for this; config.sub
956 ## doesn't seem to know anything about it. Hey, Celerity users, get
957 ## in touch with us!
958 celerity-celerity-bsd* )
959 machine=celerity opsys=bsd4-2
962 ## Clipper
963 ## What operating systems does this chip run that Emacs has been
964 ## tested on?
965 clipper-* )
966 machine=clipper
967 ## We'll use the catch-all code at the bottom to guess the
968 ## operating system.
971 ## Convex
972 *-convex-bsd* | *-convex-convexos* )
973 machine=convex opsys=bsd4-3
974 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
975 NON_GNU_CPP="cc -E -P"
978 ## Cubix QBx/386
979 i[3456]86-cubix-sysv* )
980 machine=intel386 opsys=usg5-3
983 ## Cydra 5
984 cydra*-cydrome-sysv* )
985 machine=cydra5 opsys=usg5-3
988 ## Data General AViiON Machines
989 ## DG changed naming conventions with the release of 5.4.4.10, they
990 ## dropped the initial 5.4 but left the intervening R. Because of the
991 ## R this shouldn't conflict with older versions of the OS (which I
992 ## think were named like dgux4.*). In addition, DG new AViiONs series
993 ## uses either Motorola M88k or Intel Pentium CPUs.
994 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
995 machine=aviion opsys=dgux4
997 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
998 ## This name is dgux5-4-3 instead of dgux5-4r3
999 ## to avoid a file name conflict on MSDOS.
1000 machine=aviion opsys=dgux5-4-3
1002 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1003 machine=aviion opsys=dgux5-4r2
1005 m88k-dg-dgux* )
1006 machine=aviion opsys=dgux
1009 ## Data General AViiON Intel (x86) Machines
1010 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1011 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1012 i[345]86-dg-dguxR4* )
1013 machine=aviion-intel opsys=dgux4
1016 ## DECstations
1017 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1018 machine=pmax opsys=bsd4-2
1020 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1021 machine=pmax opsys=bsd4-3
1023 mips-dec-ultrix* )
1024 machine=pmax opsys=ultrix4-3
1026 mips-dec-osf* )
1027 machine=pmax opsys=osf1
1029 mips-dec-mach_bsd4.3* )
1030 machine=pmax opsys=mach-bsd4-3
1033 ## Motorola Delta machines
1034 m68k-motorola-sysv* | m68000-motorola-sysv* )
1035 machine=delta opsys=usg5-3
1036 if test -z "`type gnucc | grep 'not found'`"
1037 then
1038 if test -s /etc/167config
1039 then CC="gnucc -m68040"
1040 else CC="gnucc -m68881"
1042 else
1043 if test -z "`type gcc | grep 'not found'`"
1044 then CC=gcc
1045 else CC=cc
1049 m88k-motorola-sysv4* )
1050 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1051 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1052 # I hope there are not other 4.0 versions for this machine
1053 # which really need usg5-4 instead.
1054 machine=delta88k opsys=usg5-4-2
1056 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1057 machine=delta88k opsys=usg5-3
1060 ## Dual machines
1061 m68*-dual-sysv* )
1062 machine=dual opsys=usg5-2
1064 m68*-dual-uniplus* )
1065 machine=dual opsys=unipl5-2
1068 ## Elxsi 6400
1069 elxsi-elxsi-sysv* )
1070 machine=elxsi opsys=usg5-2
1073 ## Encore machines
1074 ns16k-encore-bsd* )
1075 machine=ns16000 opsys=umax
1078 ## The GEC 63 - apparently, this port isn't really finished yet.
1079 # I'm sure we finished off the last of the machines, though. -- fx
1081 ## Gould Power Node and NP1
1082 pn-gould-bsd4.2* )
1083 machine=gould opsys=bsd4-2
1085 pn-gould-bsd4.3* )
1086 machine=gould opsys=bsd4-3
1088 np1-gould-bsd* )
1089 machine=gould-np1 opsys=bsd4-3
1092 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1093 ## as far as Emacs is concerned).
1094 m88k-harris-cxux* )
1095 # Build needs to be different on 7.0 and later releases
1096 case "`uname -r`" in
1097 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1098 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1099 esac
1100 NON_GNU_CPP="/lib/cpp"
1102 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1103 m68k-harris-cxux* )
1104 machine=nh3000 opsys=cxux
1106 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1107 powerpc-harris-powerunix )
1108 machine=nh6000 opsys=powerunix
1109 NON_GNU_CPP="cc -Xo -E -P"
1111 ## SR2001/SR2201 running HI-UX/MPP
1112 hppa1.1-hitachi-hiuxmpp* )
1113 machine=sr2k opsys=hiuxmpp
1115 hppa1.1-hitachi-hiuxwe2* )
1116 machine=sr2k opsys=hiuxwe2
1118 ## Honeywell XPS100
1119 xps*-honeywell-sysv* )
1120 machine=xps100 opsys=usg5-2
1123 ## HP 9000 series 200 or 300
1124 m68*-hp-bsd* )
1125 machine=hp9000s300 opsys=bsd4-3
1127 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1128 m68*-hp-hpux* )
1129 case "`uname -r`" in
1130 ## Someone's system reports A.B8.05 for this.
1131 ## I wonder what other possibilities there are.
1132 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1133 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1134 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1135 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1136 *) machine=hp9000s300 opsys=hpux ;;
1137 esac
1140 ## HP 9000 series 700 and 800, running HP/UX
1141 hppa*-hp-hpux7* )
1142 machine=hp800 opsys=hpux
1144 hppa*-hp-hpux8* )
1145 machine=hp800 opsys=hpux8
1147 hppa*-hp-hpux9shr* )
1148 machine=hp800 opsys=hpux9shr
1150 hppa*-hp-hpux9* )
1151 machine=hp800 opsys=hpux9
1154 hppa*-hp-hpux10* )
1155 machine=hp800 opsys=hpux10
1157 hppa*-hp-hpux1[1-9]* )
1158 machine=hp800 opsys=hpux11
1161 ## HP 9000 series 700 and 800, running HP/UX
1162 hppa*-hp-hpux* )
1163 ## Cross-compilation? Nah!
1164 case "`uname -r`" in
1165 ## Someone's system reports A.B8.05 for this.
1166 ## I wonder what other possibilities there are.
1167 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1168 *.08.* ) machine=hp800 opsys=hpux8 ;;
1169 *.09.* ) machine=hp800 opsys=hpux9 ;;
1170 *) machine=hp800 opsys=hpux10 ;;
1171 esac
1173 hppa*-*-nextstep* )
1174 machine=hp800 opsys=nextstep
1177 ## Orion machines
1178 orion-orion-bsd* )
1179 machine=orion opsys=bsd4-2
1181 clipper-orion-bsd* )
1182 machine=orion105 opsys=bsd4-2
1185 ## IBM machines
1186 i[3456]86-ibm-aix1.1* )
1187 machine=ibmps2-aix opsys=usg5-2-2
1189 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1190 machine=ibmps2-aix opsys=usg5-3
1192 i370-ibm-aix*)
1193 machine=ibm370aix opsys=usg5-3
1195 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1196 machine=ibmrs6000 opsys=aix3-1
1198 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1199 machine=ibmrs6000 opsys=aix3-2-5
1201 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1202 machine=ibmrs6000 opsys=aix4-1
1204 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1205 machine=ibmrs6000 opsys=aix4-2
1207 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1208 machine=ibmrs6000 opsys=aix4
1210 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1211 machine=ibmrs6000 opsys=aix4-1
1213 rs6000-ibm-aix* | powerpc-ibm-aix* )
1214 machine=ibmrs6000 opsys=aix3-2
1216 romp-ibm-bsd4.3* )
1217 machine=ibmrt opsys=bsd4-3
1219 romp-ibm-bsd4.2* )
1220 machine=ibmrt opsys=bsd4-2
1222 romp-ibm-aos4.3* )
1223 machine=ibmrt opsys=bsd4-3
1225 romp-ibm-aos4.2* )
1226 machine=ibmrt opsys=bsd4-2
1228 romp-ibm-aos* )
1229 machine=ibmrt opsys=bsd4-3
1231 romp-ibm-bsd* )
1232 machine=ibmrt opsys=bsd4-3
1234 romp-ibm-aix* )
1235 machine=ibmrt-aix opsys=usg5-2-2
1238 ## Integrated Solutions `Optimum V'
1239 m68*-isi-bsd4.2* )
1240 machine=isi-ov opsys=bsd4-2
1242 m68*-isi-bsd4.3* )
1243 machine=isi-ov opsys=bsd4-3
1246 ## Intel 386 machines where we do care about the manufacturer
1247 i[3456]86-intsys-sysv* )
1248 machine=is386 opsys=usg5-2-2
1251 ## Prime EXL
1252 i[3456]86-prime-sysv* )
1253 machine=i386 opsys=usg5-3
1256 ## Sequent Symmetry running Dynix
1257 i[3456]86-sequent-bsd* )
1258 machine=symmetry opsys=bsd4-3
1261 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1262 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1263 machine=sequent-ptx opsys=ptx4
1264 NON_GNU_CPP=/lib/cpp
1267 ## Sequent Symmetry running DYNIX/ptx
1268 ## Use the old cpp rather than the newer ANSI one.
1269 i[3456]86-sequent-ptx* )
1270 machine=sequent-ptx opsys=ptx
1271 NON_GNU_CPP="/lib/cpp"
1274 ## ncr machine running svr4.3.
1275 i[3456]86-ncr-sysv4.3 )
1276 machine=ncr386 opsys=usg5-4-3
1279 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1280 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1281 i[3456]86-ncr-sysv* )
1282 machine=ncr386 opsys=usg5-4-2
1285 ## Intel Paragon OSF/1
1286 i860-intel-osf1* )
1287 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1290 ## Intel 860
1291 i860-*-sysv4* )
1292 machine=i860 opsys=usg5-4
1293 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1294 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1297 ## Macintosh PowerPC
1298 powerpc*-*-linux-gnu* )
1299 machine=macppc opsys=gnu-linux
1302 ## Masscomp machines
1303 m68*-masscomp-rtu* )
1304 machine=masscomp opsys=rtu
1307 ## Megatest machines
1308 m68*-megatest-bsd* )
1309 machine=mega68 opsys=bsd4-2
1312 ## Workstations sold by MIPS
1313 ## This is not necessarily all workstations using the MIPS processor -
1314 ## Irises are produced by SGI, and DECstations by DEC.
1316 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1317 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1318 ## it gives for choosing between the alternatives seems to be "Use
1319 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1320 ## the BSD world." I'll assume that these are instructions for
1321 ## handling two odd situations, and that every other situation
1322 ## should use mips.h and usg5-2-2, they being listed first.
1323 mips-mips-usg* )
1324 machine=mips4
1325 ## Fall through to the general code at the bottom to decide on the OS.
1327 mips-mips-riscos4* )
1328 machine=mips4 opsys=bsd4-3
1329 NON_GNU_CC="cc -systype bsd43"
1330 NON_GNU_CPP="cc -systype bsd43 -E"
1332 mips-mips-riscos5* )
1333 machine=mips4 opsys=riscos5
1334 NON_GNU_CC="cc -systype bsd43"
1335 NON_GNU_CPP="cc -systype bsd43 -E"
1337 mips-mips-bsd* )
1338 machine=mips opsys=bsd4-3
1340 mips-mips-* )
1341 machine=mips opsys=usg5-2-2
1344 ## NeXT
1345 m68*-next-* | m68k-*-nextstep* )
1346 machine=m68k opsys=nextstep
1349 ## The complete machine from National Semiconductor
1350 ns32k-ns-genix* )
1351 machine=ns32000 opsys=usg5-2
1354 ## NCR machines
1355 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1356 machine=tower32 opsys=usg5-2-2
1358 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1359 machine=tower32v3 opsys=usg5-3
1362 ## NEC EWS4800
1363 mips-nec-sysv4*)
1364 machine=ews4800 opsys=ux4800
1367 ## Nixdorf Targon 31
1368 m68*-nixdorf-sysv* )
1369 machine=targon31 opsys=usg5-2-2
1372 ## Nu (TI or LMI)
1373 m68*-nu-sysv* )
1374 machine=nu opsys=usg5-2
1377 ## Plexus
1378 m68*-plexus-sysv* )
1379 machine=plexus opsys=usg5-2
1382 ## PowerPC reference platform
1383 powerpcle-*-solaris2* )
1384 machine=prep
1385 opsys=sol2-5
1388 ## Pyramid machines
1389 ## I don't really have any idea what sort of processor the Pyramid has,
1390 ## so I'm assuming it is its own architecture.
1391 pyramid-pyramid-bsd* )
1392 machine=pyramid opsys=bsd4-2
1395 ## Sequent Balance
1396 ns32k-sequent-bsd4.2* )
1397 machine=sequent opsys=bsd4-2
1399 ns32k-sequent-bsd4.3* )
1400 machine=sequent opsys=bsd4-3
1403 ## Siemens Nixdorf
1404 mips-siemens-sysv* | mips-sni-sysv*)
1405 machine=mips-siemens opsys=usg5-4
1406 NON_GNU_CC=/usr/ccs/bin/cc
1407 NON_GNU_CPP=/usr/ccs/lib/cpp
1410 ## Silicon Graphics machines
1411 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1412 m68*-sgi-iris3.5* )
1413 machine=irist opsys=iris3-5
1415 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1416 machine=irist opsys=iris3-6
1418 ## Iris 4D
1419 mips-sgi-irix3* )
1420 machine=iris4d opsys=irix3-3
1422 mips-sgi-irix4* )
1423 machine=iris4d opsys=irix4-0
1425 mips-sgi-irix6.5 )
1426 machine=iris4d opsys=irix6-5
1427 # Without defining _LANGUAGE_C, things get masked out in the headers
1428 # so that, for instance, grepping for `free' in stdlib.h fails and
1429 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1430 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1431 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1433 mips-sgi-irix6* )
1434 machine=iris4d opsys=irix6-0
1435 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1436 # but presumably it does no harm.
1437 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1438 # -32 probably isn't necessary in later v.6s -- anyone know which?
1439 NON_GCC_TEST_OPTIONS=-32
1441 mips-sgi-irix5.[01]* )
1442 machine=iris4d opsys=irix5-0
1444 mips-sgi-irix5* | mips-sgi-irix* )
1445 machine=iris4d opsys=irix5-2
1448 ## SONY machines
1449 m68*-sony-bsd4.2* )
1450 machine=news opsys=bsd4-2
1452 m68*-sony-bsd4.3* )
1453 machine=news opsys=bsd4-3
1455 m68*-sony-newsos3* | m68*-sony-news3*)
1456 machine=news opsys=bsd4-3
1458 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1459 machine=news-risc opsys=bsd4-3
1461 mips-sony-newsos6* )
1462 machine=news-r6 opsys=newsos6
1464 mips-sony-news* )
1465 machine=news-risc opsys=newsos5
1468 ## Stride
1469 m68*-stride-sysv* )
1470 machine=stride opsys=usg5-2
1473 ## Suns
1474 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1475 machine=sparc opsys=gnu-linux
1478 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1479 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1480 | rs6000-*-solaris2*)
1481 case "${canonical}" in
1482 m68*-sunos1* ) machine=sun1 ;;
1483 m68*-sunos2* ) machine=sun2 ;;
1484 m68* ) machine=sun3 ;;
1485 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1486 i[3456]86-*-* ) machine=intel386 ;;
1487 powerpcle* ) machine=powerpcle ;;
1488 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1489 sparc* ) machine=sparc ;;
1490 * ) unported=yes ;;
1491 esac
1492 case "${canonical}" in
1493 ## The Sun386 didn't get past 4.0.
1494 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1495 *-sunos4.0* ) opsys=sunos4-0 ;;
1496 *-sunos4.1.[3-9]*noshare )
1497 ## This name is sunos413 instead of sunos4-1-3
1498 ## to avoid a file name conflict on MSDOS.
1499 opsys=sunos413
1500 NON_GNU_CPP=/usr/lib/cpp
1501 NON_GCC_TEST_OPTIONS=-Bstatic
1502 GCC_TEST_OPTIONS=-static
1504 *-sunos4.1.[3-9]* | *-sunos4shr*)
1505 opsys=sunos4shr
1506 NON_GNU_CPP=/usr/lib/cpp
1508 *-sunos4* | *-sunos )
1509 opsys=sunos4-1
1510 NON_GCC_TEST_OPTIONS=-Bstatic
1511 GCC_TEST_OPTIONS=-static
1513 *-sunos5.3* | *-solaris2.3* )
1514 opsys=sol2-3
1515 NON_GNU_CPP=/usr/ccs/lib/cpp
1517 *-sunos5.4* | *-solaris2.4* )
1518 opsys=sol2-4
1519 NON_GNU_CPP=/usr/ccs/lib/cpp
1520 RANLIB="ar -ts"
1522 *-sunos5.5* | *-solaris2.5* )
1523 opsys=sol2-5
1524 NON_GNU_CPP=/usr/ccs/lib/cpp
1525 RANLIB="ar -ts"
1527 *-sunos5* | *-solaris* )
1528 opsys=sol2-5
1529 NON_GNU_CPP=/usr/ccs/lib/cpp
1531 * ) opsys=bsd4-2 ;;
1532 esac
1533 ## Watch out for a compiler that we know will not work.
1534 case "${canonical}" in
1535 *-solaris* | *-sunos5* )
1536 if [ "x$CC" = x/usr/ucb/cc ]; then
1537 ## /usr/ucb/cc doesn't work;
1538 ## we should find some other compiler that does work.
1539 unset CC
1542 *) ;;
1543 esac
1545 sparc-*-nextstep* )
1546 machine=sparc opsys=nextstep
1549 ## Tadpole 68k
1550 m68*-tadpole-sysv* )
1551 machine=tad68k opsys=usg5-3
1554 ## Tahoe machines
1555 tahoe-tahoe-bsd4.2* )
1556 machine=tahoe opsys=bsd4-2
1558 tahoe-tahoe-bsd4.3* )
1559 machine=tahoe opsys=bsd4-3
1562 ## Tandem Integrity S2
1563 mips-tandem-sysv* )
1564 machine=tandem-s2 opsys=usg5-3
1567 ## Tektronix XD88
1568 m88k-tektronix-sysv3* )
1569 machine=tekxd88 opsys=usg5-3
1572 ## Tektronix 16000 box (6130?)
1573 ns16k-tektronix-bsd* )
1574 machine=ns16000 opsys=bsd4-2
1576 ## Tektronix 4300
1577 ## src/m/tek4300.h hints that this is a m68k machine.
1578 m68*-tektronix-bsd* )
1579 machine=tek4300 opsys=bsd4-3
1582 ## Titan P2 or P3
1583 ## We seem to have lost the machine-description file titan.h!
1584 titan-titan-sysv* )
1585 machine=titan opsys=usg5-3
1588 ## Ustation E30 (SS5E)
1589 m68*-unisys-uniplus* )
1590 machine=ustation opsystem=unipl5-2
1593 ## Vaxen.
1594 vax-dec-* )
1595 machine=vax
1596 case "${canonical}" in
1597 *-bsd4.1* ) opsys=bsd4-1 ;;
1598 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1599 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1600 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1601 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1602 *-vms* ) opsys=vms ;;
1603 * ) unported=yes
1604 esac
1607 ## Whitechapel MG1
1608 ns16k-whitechapel-* )
1609 machine=mg1
1610 ## We don't know what sort of OS runs on these; we'll let the
1611 ## operating system guessing code below try.
1614 ## Wicat
1615 m68*-wicat-sysv* )
1616 machine=wicat opsys=usg5-2
1619 ## IA-64
1620 ia64*-*-linux* )
1621 machine=ia64 opsys=gnu-linux
1624 ## Intel 386 machines where we don't care about the manufacturer
1625 i[3456]86-*-* )
1626 machine=intel386
1627 case "${canonical}" in
1628 *-lynxos* ) opsys=lynxos ;;
1629 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1630 *-isc2.2* ) opsys=isc2-2 ;;
1631 *-isc4.0* ) opsys=isc4-0 ;;
1632 *-isc4.* ) opsys=isc4-1
1633 GCC_TEST_OPTIONS=-posix
1634 NON_GCC_TEST_OPTIONS=-Xp
1636 *-isc* ) opsys=isc3-0 ;;
1637 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1638 *-esix* ) opsys=esix ;;
1639 *-xenix* ) opsys=xenix ;;
1640 *-linux-gnu* ) opsys=gnu-linux ;;
1641 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1642 *-sco3.2v5* ) opsys=sco5
1643 NON_GNU_CPP=/lib/cpp
1644 # Prevent -belf from being passed to $CPP.
1645 # /lib/cpp does not accept it.
1646 OVERRIDE_CPPFLAGS=" "
1648 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1649 *-386bsd* ) opsys=386bsd ;;
1650 *-freebsd* ) opsys=freebsd ;;
1651 *-nextstep* ) opsys=nextstep ;;
1652 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1653 esac
1656 ## m68k Linux-based GNU system
1657 m68k-*-linux-gnu* )
1658 machine=m68k opsys=gnu-linux
1661 ## Mips Linux-based GNU system
1662 mips-*-linux-gnu* )
1663 machine=mips opsys=gnu-linux
1666 ## UXP/DS
1667 sparc-fujitsu-sysv4* )
1668 machine=sparc opsys=uxpds
1669 NON_GNU_CPP=/usr/ccs/lib/cpp
1670 RANLIB="ar -ts"
1673 ## UXP/V
1674 f301-fujitsu-uxpv4.1)
1675 machine=f301 opsys=uxpv
1679 unported=yes
1681 esac
1683 ### If the code above didn't choose an operating system, just choose
1684 ### an operating system based on the configuration name. You really
1685 ### only want to use this when you have no idea what the right
1686 ### operating system is; if you know what operating systems a machine
1687 ### runs, it's cleaner to make it explicit in the case statement
1688 ### above.
1689 if test x"${opsys}" = x; then
1690 case "${canonical}" in
1691 *-gnu* ) opsys=gnu ;;
1692 *-bsd4.[01] ) opsys=bsd4-1 ;;
1693 *-bsd4.2 ) opsys=bsd4-2 ;;
1694 *-bsd4.3 ) opsys=bsd4-3 ;;
1695 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1696 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1697 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1698 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1699 *-sysv4.2uw* ) opsys=unixware ;;
1700 *-sysv4.1* | *-sysvr4.1* )
1701 NON_GNU_CPP=/usr/lib/cpp
1702 opsys=usg5-4 ;;
1703 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1704 if [ x$NON_GNU_CPP = x ]; then
1705 if [ -f /usr/ccs/lib/cpp ]; then
1706 NON_GNU_CPP=/usr/ccs/lib/cpp
1707 else
1708 NON_GNU_CPP=/lib/cpp
1711 opsys=usg5-4-2 ;;
1712 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1714 unported=yes
1716 esac
1720 if test $unported = yes; then
1721 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1722 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1725 machfile="m/${machine}.h"
1726 opsysfile="s/${opsys}.h"
1729 #### Choose a compiler.
1730 test -n "$CC" && cc_specified=yes
1732 # Save the value of CFLAGS that the user specified.
1733 SPECIFIED_CFLAGS="$CFLAGS"
1735 case ${with_gcc} in
1736 "yes" ) CC="gcc" GCC=yes ;;
1737 "no" ) : ${CC=cc} ;;
1738 * ) # Extract the first word of "gcc", so it can be a program name with args.
1739 set dummy gcc; ac_word=$2
1740 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1741 echo "configure:1742: checking for $ac_word" >&5
1742 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1743 echo $ac_n "(cached) $ac_c" 1>&6
1744 else
1745 if test -n "$CC"; then
1746 ac_cv_prog_CC="$CC" # Let the user override the test.
1747 else
1748 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1749 ac_dummy="$PATH"
1750 for ac_dir in $ac_dummy; do
1751 test -z "$ac_dir" && ac_dir=.
1752 if test -f $ac_dir/$ac_word; then
1753 ac_cv_prog_CC="gcc"
1754 break
1756 done
1757 IFS="$ac_save_ifs"
1760 CC="$ac_cv_prog_CC"
1761 if test -n "$CC"; then
1762 echo "$ac_t""$CC" 1>&6
1763 else
1764 echo "$ac_t""no" 1>&6
1767 if test -z "$CC"; then
1768 # Extract the first word of "cc", so it can be a program name with args.
1769 set dummy cc; ac_word=$2
1770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1771 echo "configure:1772: checking for $ac_word" >&5
1772 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1773 echo $ac_n "(cached) $ac_c" 1>&6
1774 else
1775 if test -n "$CC"; then
1776 ac_cv_prog_CC="$CC" # Let the user override the test.
1777 else
1778 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1779 ac_prog_rejected=no
1780 ac_dummy="$PATH"
1781 for ac_dir in $ac_dummy; do
1782 test -z "$ac_dir" && ac_dir=.
1783 if test -f $ac_dir/$ac_word; then
1784 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1785 ac_prog_rejected=yes
1786 continue
1788 ac_cv_prog_CC="cc"
1789 break
1791 done
1792 IFS="$ac_save_ifs"
1793 if test $ac_prog_rejected = yes; then
1794 # We found a bogon in the path, so make sure we never use it.
1795 set dummy $ac_cv_prog_CC
1796 shift
1797 if test $# -gt 0; then
1798 # We chose a different compiler from the bogus one.
1799 # However, it has the same basename, so the bogon will be chosen
1800 # first if we set CC to just the basename; use the full file name.
1801 shift
1802 set dummy "$ac_dir/$ac_word" "$@"
1803 shift
1804 ac_cv_prog_CC="$@"
1809 CC="$ac_cv_prog_CC"
1810 if test -n "$CC"; then
1811 echo "$ac_t""$CC" 1>&6
1812 else
1813 echo "$ac_t""no" 1>&6
1816 if test -z "$CC"; then
1817 case "`uname -s`" in
1818 *win32* | *WIN32*)
1819 # Extract the first word of "cl", so it can be a program name with args.
1820 set dummy cl; ac_word=$2
1821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1822 echo "configure:1823: checking for $ac_word" >&5
1823 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825 else
1826 if test -n "$CC"; then
1827 ac_cv_prog_CC="$CC" # Let the user override the test.
1828 else
1829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1830 ac_dummy="$PATH"
1831 for ac_dir in $ac_dummy; do
1832 test -z "$ac_dir" && ac_dir=.
1833 if test -f $ac_dir/$ac_word; then
1834 ac_cv_prog_CC="cl"
1835 break
1837 done
1838 IFS="$ac_save_ifs"
1841 CC="$ac_cv_prog_CC"
1842 if test -n "$CC"; then
1843 echo "$ac_t""$CC" 1>&6
1844 else
1845 echo "$ac_t""no" 1>&6
1848 esac
1850 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1853 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1854 echo "configure:1855: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1856 ac_ext=c
1857 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1858 ac_cpp='$CPP $CPPFLAGS'
1859 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1860 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1861 cross_compiling=$ac_cv_prog_cc_cross
1863 cat > conftest.$ac_ext << EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1868 main(){return(0);}
1870 if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1871 ac_cv_prog_cc_works=yes
1872 # If we can't run a trivial program, we are probably using a cross compiler.
1873 if (./conftest; exit) 2>/dev/null; then
1874 ac_cv_prog_cc_cross=no
1875 else
1876 ac_cv_prog_cc_cross=yes
1878 else
1879 echo "configure: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 ac_cv_prog_cc_works=no
1883 rm -fr conftest*
1884 ac_ext=c
1885 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1886 ac_cpp='$CPP $CPPFLAGS'
1887 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1888 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1889 cross_compiling=$ac_cv_prog_cc_cross
1891 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1892 if test $ac_cv_prog_cc_works = no; then
1893 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1895 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1896 echo "configure:1897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1897 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1898 cross_compiling=$ac_cv_prog_cc_cross
1900 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1901 echo "configure:1902: checking whether we are using GNU C" >&5
1902 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
1904 else
1905 cat > conftest.c <<EOF
1906 #ifdef __GNUC__
1907 yes;
1908 #endif
1910 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1911 ac_cv_prog_gcc=yes
1912 else
1913 ac_cv_prog_gcc=no
1917 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1919 if test $ac_cv_prog_gcc = yes; then
1920 GCC=yes
1921 else
1922 GCC=
1925 ac_test_CFLAGS="${CFLAGS+set}"
1926 ac_save_CFLAGS="$CFLAGS"
1927 CFLAGS=
1928 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1929 echo "configure:1930: checking whether ${CC-cc} accepts -g" >&5
1930 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932 else
1933 echo 'void f(){}' > conftest.c
1934 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1935 ac_cv_prog_cc_g=yes
1936 else
1937 ac_cv_prog_cc_g=no
1939 rm -f conftest*
1943 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1944 if test "$ac_test_CFLAGS" = set; then
1945 CFLAGS="$ac_save_CFLAGS"
1946 elif test $ac_cv_prog_cc_g = yes; then
1947 if test "$GCC" = yes; then
1948 CFLAGS="-g -O2"
1949 else
1950 CFLAGS="-g"
1952 else
1953 if test "$GCC" = yes; then
1954 CFLAGS="-O2"
1955 else
1956 CFLAGS=
1960 esac
1962 # On Suns, sometimes $CPP names a directory.
1963 if test -n "$CPP" && test -d "$CPP"; then
1964 CPP=
1967 #### Some systems specify a CPP to use unless we are using GCC.
1968 #### Now that we know whether we are using GCC, we can decide whether
1969 #### to use that one.
1970 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1971 then
1972 CPP="$NON_GNU_CPP"
1975 #### Some systems specify a CC to use unless we are using GCC.
1976 #### Now that we know whether we are using GCC, we can decide whether
1977 #### to use that one.
1978 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1979 test x$cc_specified != xyes
1980 then
1981 CC="$NON_GNU_CC"
1984 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1985 then
1986 CC="$CC $GCC_TEST_OPTIONS"
1989 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1990 then
1991 CC="$CC $NON_GCC_TEST_OPTIONS"
1994 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1995 then
1996 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1999 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
2000 then
2001 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
2004 #### Some other nice autoconf tests. If you add a test here which
2005 #### should make an entry in src/config.h, don't forget to add an
2006 #### #undef clause to src/config.h.in for autoconf to modify.
2008 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether ln -s works" >&5
2010 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2011 echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013 rm -f conftestdata
2014 if ln -s X conftestdata 2>/dev/null
2015 then
2016 rm -f conftestdata
2017 ac_cv_prog_LN_S="ln -s"
2018 else
2019 ac_cv_prog_LN_S=ln
2022 LN_S="$ac_cv_prog_LN_S"
2023 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2024 echo "$ac_t""yes" 1>&6
2025 else
2026 echo "$ac_t""no" 1>&6
2029 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2030 echo "configure:2031: checking how to run the C preprocessor" >&5
2031 # On Suns, sometimes $CPP names a directory.
2032 if test -n "$CPP" && test -d "$CPP"; then
2033 CPP=
2035 if test -z "$CPP"; then
2036 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2037 echo $ac_n "(cached) $ac_c" 1>&6
2038 else
2039 # This must be in double quotes, not single quotes, because CPP may get
2040 # substituted into the Makefile and "${CC-cc}" will confuse make.
2041 CPP="${CC-cc} -E"
2042 # On the NeXT, cc -E runs the code through the compiler's parser,
2043 # not just through cpp.
2044 cat > conftest.$ac_ext <<EOF
2045 #line 2046 "configure"
2046 #include "confdefs.h"
2047 #include <assert.h>
2048 Syntax Error
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2055 else
2056 echo "$ac_err" >&5
2057 echo "configure: failed program was:" >&5
2058 cat conftest.$ac_ext >&5
2059 rm -rf conftest*
2060 CPP="${CC-cc} -E -traditional-cpp"
2061 cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2064 #include <assert.h>
2065 Syntax Error
2067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2068 { (eval echo configure:2069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2070 if test -z "$ac_err"; then
2072 else
2073 echo "$ac_err" >&5
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 rm -rf conftest*
2077 CPP="${CC-cc} -nologo -E"
2078 cat > conftest.$ac_ext <<EOF
2079 #line 2080 "configure"
2080 #include "confdefs.h"
2081 #include <assert.h>
2082 Syntax Error
2084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2085 { (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2087 if test -z "$ac_err"; then
2089 else
2090 echo "$ac_err" >&5
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 rm -rf conftest*
2094 CPP=/lib/cpp
2096 rm -f conftest*
2098 rm -f conftest*
2100 rm -f conftest*
2101 ac_cv_prog_CPP="$CPP"
2103 CPP="$ac_cv_prog_CPP"
2104 else
2105 ac_cv_prog_CPP="$CPP"
2107 echo "$ac_t""$CPP" 1>&6
2109 # Find a good install program. We prefer a C program (faster),
2110 # so one script is as good as another. But avoid the broken or
2111 # incompatible versions:
2112 # SysV /etc/install, /usr/sbin/install
2113 # SunOS /usr/etc/install
2114 # IRIX /sbin/install
2115 # AIX /bin/install
2116 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2117 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2118 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2119 # ./install, which can be erroneously created by make from ./install.sh.
2120 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2121 echo "configure:2122: checking for a BSD compatible install" >&5
2122 if test -z "$INSTALL"; then
2123 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2127 for ac_dir in $PATH; do
2128 # Account for people who put trailing slashes in PATH elements.
2129 case "$ac_dir/" in
2130 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2132 # OSF1 and SCO ODT 3.0 have their own names for install.
2133 # Don't use installbsd from OSF since it installs stuff as root
2134 # by default.
2135 for ac_prog in ginstall scoinst install; do
2136 if test -f $ac_dir/$ac_prog; then
2137 if test $ac_prog = install &&
2138 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2139 # AIX install. It has an incompatible calling convention.
2141 else
2142 ac_cv_path_install="$ac_dir/$ac_prog -c"
2143 break 2
2146 done
2148 esac
2149 done
2150 IFS="$ac_save_IFS"
2153 if test "${ac_cv_path_install+set}" = set; then
2154 INSTALL="$ac_cv_path_install"
2155 else
2156 # As a last resort, use the slow shell script. We don't cache a
2157 # path for INSTALL within a source directory, because that will
2158 # break other packages using the cache if that directory is
2159 # removed, or if the path is relative.
2160 INSTALL="$ac_install_sh"
2163 echo "$ac_t""$INSTALL" 1>&6
2165 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2166 # It thinks the first close brace ends the variable substitution.
2167 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2169 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2171 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2173 for ac_prog in 'bison -y' byacc
2175 # Extract the first word of "$ac_prog", so it can be a program name with args.
2176 set dummy $ac_prog; ac_word=$2
2177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2178 echo "configure:2179: checking for $ac_word" >&5
2179 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182 if test -n "$YACC"; then
2183 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2184 else
2185 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2186 ac_dummy="$PATH"
2187 for ac_dir in $ac_dummy; do
2188 test -z "$ac_dir" && ac_dir=.
2189 if test -f $ac_dir/$ac_word; then
2190 ac_cv_prog_YACC="$ac_prog"
2191 break
2193 done
2194 IFS="$ac_save_ifs"
2197 YACC="$ac_cv_prog_YACC"
2198 if test -n "$YACC"; then
2199 echo "$ac_t""$YACC" 1>&6
2200 else
2201 echo "$ac_t""no" 1>&6
2204 test -n "$YACC" && break
2205 done
2206 test -n "$YACC" || YACC="yacc"
2208 if test "x$RANLIB" = x; then
2209 # Extract the first word of "ranlib", so it can be a program name with args.
2210 set dummy ranlib; ac_word=$2
2211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2212 echo "configure:2213: checking for $ac_word" >&5
2213 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2214 echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216 if test -n "$RANLIB"; then
2217 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2218 else
2219 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2220 ac_dummy="$PATH"
2221 for ac_dir in $ac_dummy; do
2222 test -z "$ac_dir" && ac_dir=.
2223 if test -f $ac_dir/$ac_word; then
2224 ac_cv_prog_RANLIB="ranlib"
2225 break
2227 done
2228 IFS="$ac_save_ifs"
2229 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2232 RANLIB="$ac_cv_prog_RANLIB"
2233 if test -n "$RANLIB"; then
2234 echo "$ac_t""$RANLIB" 1>&6
2235 else
2236 echo "$ac_t""no" 1>&6
2241 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2242 echo "configure:2243: checking for AIX" >&5
2243 cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #ifdef _AIX
2248 #endif
2251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2252 egrep "yes" >/dev/null 2>&1; then
2253 rm -rf conftest*
2254 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2255 #define _ALL_SOURCE 1
2258 else
2259 rm -rf conftest*
2260 echo "$ac_t""no" 1>&6
2262 rm -f conftest*
2266 #### Extract some information from the operating system and machine files.
2268 echo "checking the machine- and system-dependent files to find out
2269 - which libraries the lib-src programs will want, and
2270 - whether the GNU malloc routines are usable" 1>&6
2271 echo "configure:2272: checking the machine- and system-dependent files to find out
2272 - which libraries the lib-src programs will want, and
2273 - whether the GNU malloc routines are usable" >&5
2275 ### First figure out CFLAGS (which we use for running the compiler here)
2276 ### and REAL_CFLAGS (which we use for real compilation).
2277 ### The two are the same except on a few systems, where they are made
2278 ### different to work around various lossages. For example,
2279 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
2280 ### as implying static linking.
2282 ### If the CFLAGS env var is specified, we use that value
2283 ### instead of the default.
2285 ### It's not important that this name contain the PID; you can't run
2286 ### two configures in the same directory and have anything work
2287 ### anyway.
2288 tempcname="conftest.c"
2290 echo '
2291 #include "'${srcdir}'/src/'${opsysfile}'"
2292 #include "'${srcdir}'/src/'${machfile}'"
2293 #ifndef LIBS_MACHINE
2294 #define LIBS_MACHINE
2295 #endif
2296 #ifndef LIBS_SYSTEM
2297 #define LIBS_SYSTEM
2298 #endif
2299 #ifndef C_SWITCH_SYSTEM
2300 #define C_SWITCH_SYSTEM
2301 #endif
2302 #ifndef C_SWITCH_MACHINE
2303 #define C_SWITCH_MACHINE
2304 #endif
2305 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
2306 configure___ c_switch_system=C_SWITCH_SYSTEM
2307 configure___ c_switch_machine=C_SWITCH_MACHINE
2309 #ifndef LIB_X11_LIB
2310 #define LIB_X11_LIB -lX11
2311 #endif
2313 #ifndef LIBX11_MACHINE
2314 #define LIBX11_MACHINE
2315 #endif
2317 #ifndef LIBX11_SYSTEM
2318 #define LIBX11_SYSTEM
2319 #endif
2320 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
2322 #ifdef UNEXEC
2323 configure___ unexec=UNEXEC
2324 #else
2325 configure___ unexec=unexec.o
2326 #endif
2328 #ifdef SYSTEM_MALLOC
2329 configure___ system_malloc=yes
2330 #else
2331 configure___ system_malloc=no
2332 #endif
2334 #ifdef USE_MMAP_FOR_BUFFERS
2335 configure___ use_mmap_for_buffers=yes
2336 #else
2337 configure___ use_mmap_for_buffers=no
2338 #endif
2340 #ifndef C_DEBUG_SWITCH
2341 #define C_DEBUG_SWITCH -g
2342 #endif
2344 #ifndef C_OPTIMIZE_SWITCH
2345 #ifdef __GNUC__
2346 #define C_OPTIMIZE_SWITCH -O2
2347 #else
2348 #define C_OPTIMIZE_SWITCH -O
2349 #endif
2350 #endif
2352 #ifndef LD_SWITCH_MACHINE
2353 #define LD_SWITCH_MACHINE
2354 #endif
2356 #ifndef LD_SWITCH_SYSTEM
2357 #define LD_SWITCH_SYSTEM
2358 #endif
2360 #ifndef LD_SWITCH_X_SITE_AUX
2361 #define LD_SWITCH_X_SITE_AUX
2362 #endif
2364 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2365 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2367 #ifdef THIS_IS_CONFIGURE
2369 /* Get the CFLAGS for tests in configure. */
2370 #ifdef __GNUC__
2371 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2372 #else
2373 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2374 #endif
2376 #else /* not THIS_IS_CONFIGURE */
2378 /* Get the CFLAGS for real compilation. */
2379 #ifdef __GNUC__
2380 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
2381 #else
2382 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
2383 #endif
2385 #endif /* not THIS_IS_CONFIGURE */
2386 ' > ${tempcname}
2388 # The value of CPP is a quoted variable reference, so we need to do this
2389 # to get its actual value...
2390 CPP=`eval "echo $CPP"`
2391 eval `${CPP} -Isrc ${tempcname} \
2392 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2393 if test "x$SPECIFIED_CFLAGS" = x; then
2394 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
2395 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
2396 else
2397 REAL_CFLAGS="$CFLAGS"
2399 rm ${tempcname}
2401 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
2403 ### Make sure subsequent tests use flags consistent with the build flags.
2405 if test x"${OVERRIDE_CPPFLAGS}" != x; then
2406 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
2407 else
2408 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
2412 # Check whether --enable-largefile or --disable-largefile was given.
2413 if test "${enable_largefile+set}" = set; then
2414 enableval="$enable_largefile"
2418 if test "$enable_largefile" != no; then
2420 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
2421 echo "configure:2422: checking for special C compiler options needed for large files" >&5
2422 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425 ac_cv_sys_largefile_CC=no
2426 if test "$GCC" != yes; then
2427 # IRIX 6.2 and later do not support large files by default,
2428 # so use the C compiler's -n32 option if that helps.
2429 cat > conftest.$ac_ext <<EOF
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <sys/types.h>
2433 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2435 int main() {
2437 ; return 0; }
2439 if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2441 else
2442 echo "configure: failed program was:" >&5
2443 cat conftest.$ac_ext >&5
2444 rm -rf conftest*
2445 ac_save_CC="$CC"
2446 CC="$CC -n32"
2447 cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450 #include <sys/types.h>
2451 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2453 int main() {
2455 ; return 0; }
2457 if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2458 rm -rf conftest*
2459 ac_cv_sys_largefile_CC=' -n32'
2460 else
2461 echo "configure: failed program was:" >&5
2462 cat conftest.$ac_ext >&5
2464 rm -f conftest*
2465 CC="$ac_save_CC"
2467 rm -f conftest*
2471 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
2472 if test "$ac_cv_sys_largefile_CC" != no; then
2473 CC="$CC$ac_cv_sys_largefile_CC"
2476 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
2477 echo "configure:2478: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2478 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
2479 echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481 ac_cv_sys_file_offset_bits=no
2482 cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485 #include <sys/types.h>
2486 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2488 int main() {
2490 ; return 0; }
2492 if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2494 else
2495 echo "configure: failed program was:" >&5
2496 cat conftest.$ac_ext >&5
2497 rm -rf conftest*
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 #define _FILE_OFFSET_BITS 64
2502 #include <sys/types.h>
2503 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
2506 int main() {
2508 ; return 0; }
2510 if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2511 rm -rf conftest*
2512 ac_cv_sys_file_offset_bits=64
2513 else
2514 echo "configure: failed program was:" >&5
2515 cat conftest.$ac_ext >&5
2517 rm -f conftest*
2519 rm -f conftest*
2522 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
2523 if test "$ac_cv_sys_file_offset_bits" != no; then
2524 cat >> confdefs.h <<EOF
2525 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2529 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
2530 echo "configure:2531: checking for _LARGE_FILES value needed for large files" >&5
2531 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534 ac_cv_sys_large_files=no
2535 cat > conftest.$ac_ext <<EOF
2536 #line 2537 "configure"
2537 #include "confdefs.h"
2539 int main() {
2541 ; return 0; }
2543 if { (eval echo configure:2544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2545 else
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2548 rm -rf conftest*
2549 cat > conftest.$ac_ext <<EOF
2550 #line 2551 "configure"
2551 #include "confdefs.h"
2552 #define _LARGE_FILES 1
2555 int main() {
2557 ; return 0; }
2559 if { (eval echo configure:2560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2560 rm -rf conftest*
2561 ac_cv_sys_large_files=1
2562 else
2563 echo "configure: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2566 rm -f conftest*
2568 rm -f conftest*
2571 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
2572 if test "$ac_cv_sys_large_files" != no; then
2573 cat >> confdefs.h <<EOF
2574 #define _LARGE_FILES $ac_cv_sys_large_files
2581 # Sound support for GNU/Linux and the free BSDs.
2582 for ac_hdr in machine/soundcard.h sys/soundcard.h soundcard.h
2584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2586 echo "configure:2587: checking for $ac_hdr" >&5
2587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2588 echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590 cat > conftest.$ac_ext <<EOF
2591 #line 2592 "configure"
2592 #include "confdefs.h"
2593 #include <$ac_hdr>
2595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2596 { (eval echo configure:2597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2598 if test -z "$ac_err"; then
2599 rm -rf conftest*
2600 eval "ac_cv_header_$ac_safe=yes"
2601 else
2602 echo "$ac_err" >&5
2603 echo "configure: failed program was:" >&5
2604 cat conftest.$ac_ext >&5
2605 rm -rf conftest*
2606 eval "ac_cv_header_$ac_safe=no"
2608 rm -f conftest*
2610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2611 echo "$ac_t""yes" 1>&6
2612 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2613 cat >> confdefs.h <<EOF
2614 #define $ac_tr_hdr 1
2617 else
2618 echo "$ac_t""no" 1>&6
2620 done
2622 # Emulation library used on NetBSD.
2623 echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
2624 echo "configure:2625: checking for _oss_ioctl in -lossaudio" >&5
2625 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
2626 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2627 echo $ac_n "(cached) $ac_c" 1>&6
2628 else
2629 ac_save_LIBS="$LIBS"
2630 LIBS="-lossaudio $LIBS"
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 /* Override any gcc2 internal prototype to avoid an error. */
2635 /* We use char because int might match the return type of a gcc2
2636 builtin and then its argument prototype would still apply. */
2637 char _oss_ioctl();
2639 int main() {
2640 _oss_ioctl()
2641 ; return 0; }
2643 if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2644 rm -rf conftest*
2645 eval "ac_cv_lib_$ac_lib_var=yes"
2646 else
2647 echo "configure: failed program was:" >&5
2648 cat conftest.$ac_ext >&5
2649 rm -rf conftest*
2650 eval "ac_cv_lib_$ac_lib_var=no"
2652 rm -f conftest*
2653 LIBS="$ac_save_LIBS"
2656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2657 echo "$ac_t""yes" 1>&6
2658 LIBSOUND=-lossaudio
2659 else
2660 echo "$ac_t""no" 1>&6
2661 LIBSOUND=
2666 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2667 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2668 termcap.h stdio_ext.h fcntl.h term.h strings.h
2670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2672 echo "configure:2673: checking for $ac_hdr" >&5
2673 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2674 echo $ac_n "(cached) $ac_c" 1>&6
2675 else
2676 cat > conftest.$ac_ext <<EOF
2677 #line 2678 "configure"
2678 #include "confdefs.h"
2679 #include <$ac_hdr>
2681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2682 { (eval echo configure:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2684 if test -z "$ac_err"; then
2685 rm -rf conftest*
2686 eval "ac_cv_header_$ac_safe=yes"
2687 else
2688 echo "$ac_err" >&5
2689 echo "configure: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 rm -rf conftest*
2692 eval "ac_cv_header_$ac_safe=no"
2694 rm -f conftest*
2696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2697 echo "$ac_t""yes" 1>&6
2698 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2699 cat >> confdefs.h <<EOF
2700 #define $ac_tr_hdr 1
2703 else
2704 echo "$ac_t""no" 1>&6
2706 done
2708 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2709 echo "configure:2710: checking for ANSI C header files" >&5
2710 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2711 echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713 cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716 #include <stdlib.h>
2717 #include <stdarg.h>
2718 #include <string.h>
2719 #include <float.h>
2721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2722 { (eval echo configure:2723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2724 if test -z "$ac_err"; then
2725 rm -rf conftest*
2726 ac_cv_header_stdc=yes
2727 else
2728 echo "$ac_err" >&5
2729 echo "configure: failed program was:" >&5
2730 cat conftest.$ac_ext >&5
2731 rm -rf conftest*
2732 ac_cv_header_stdc=no
2734 rm -f conftest*
2736 if test $ac_cv_header_stdc = yes; then
2737 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2738 cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741 #include <string.h>
2743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "memchr" >/dev/null 2>&1; then
2746 else
2747 rm -rf conftest*
2748 ac_cv_header_stdc=no
2750 rm -f conftest*
2754 if test $ac_cv_header_stdc = yes; then
2755 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2756 cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759 #include <stdlib.h>
2761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2762 egrep "free" >/dev/null 2>&1; then
2764 else
2765 rm -rf conftest*
2766 ac_cv_header_stdc=no
2768 rm -f conftest*
2772 if test $ac_cv_header_stdc = yes; then
2773 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2774 if test "$cross_compiling" = yes; then
2776 else
2777 cat > conftest.$ac_ext <<EOF
2778 #line 2779 "configure"
2779 #include "confdefs.h"
2780 #include <ctype.h>
2781 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2782 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2783 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2784 int main () { int i; for (i = 0; i < 256; i++)
2785 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2786 exit (0); }
2789 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2790 then
2792 else
2793 echo "configure: failed program was:" >&5
2794 cat conftest.$ac_ext >&5
2795 rm -fr conftest*
2796 ac_cv_header_stdc=no
2798 rm -fr conftest*
2804 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2805 if test $ac_cv_header_stdc = yes; then
2806 cat >> confdefs.h <<\EOF
2807 #define STDC_HEADERS 1
2812 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2813 echo "configure:2814: checking whether time.h and sys/time.h may both be included" >&5
2814 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2815 echo $ac_n "(cached) $ac_c" 1>&6
2816 else
2817 cat > conftest.$ac_ext <<EOF
2818 #line 2819 "configure"
2819 #include "confdefs.h"
2820 #include <sys/types.h>
2821 #include <sys/time.h>
2822 #include <time.h>
2823 int main() {
2824 struct tm *tp;
2825 ; return 0; }
2827 if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2828 rm -rf conftest*
2829 ac_cv_header_time=yes
2830 else
2831 echo "configure: failed program was:" >&5
2832 cat conftest.$ac_ext >&5
2833 rm -rf conftest*
2834 ac_cv_header_time=no
2836 rm -f conftest*
2839 echo "$ac_t""$ac_cv_header_time" 1>&6
2840 if test $ac_cv_header_time = yes; then
2841 cat >> confdefs.h <<\EOF
2842 #define TIME_WITH_SYS_TIME 1
2847 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2848 echo "configure:2849: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2849 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2850 echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852 cat > conftest.$ac_ext <<EOF
2853 #line 2854 "configure"
2854 #include "confdefs.h"
2855 #include <sys/types.h>
2856 #include <signal.h>
2857 /* NetBSD declares sys_siglist in unistd.h. */
2858 #ifdef HAVE_UNISTD_H
2859 #include <unistd.h>
2860 #endif
2861 int main() {
2862 char *msg = *(sys_siglist + 1);
2863 ; return 0; }
2865 if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2866 rm -rf conftest*
2867 ac_cv_decl_sys_siglist=yes
2868 else
2869 echo "configure: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2871 rm -rf conftest*
2872 ac_cv_decl_sys_siglist=no
2874 rm -f conftest*
2877 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2878 if test $ac_cv_decl_sys_siglist = yes; then
2879 cat >> confdefs.h <<\EOF
2880 #define SYS_SIGLIST_DECLARED 1
2885 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2886 echo "configure:2887: checking for sys/wait.h that is POSIX.1 compatible" >&5
2887 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 #include <sys/types.h>
2894 #include <sys/wait.h>
2895 #ifndef WEXITSTATUS
2896 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2897 #endif
2898 #ifndef WIFEXITED
2899 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2900 #endif
2901 int main() {
2902 int s;
2903 wait (&s);
2904 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2905 ; return 0; }
2907 if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2908 rm -rf conftest*
2909 ac_cv_header_sys_wait_h=yes
2910 else
2911 echo "configure: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2913 rm -rf conftest*
2914 ac_cv_header_sys_wait_h=no
2916 rm -f conftest*
2919 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2920 if test $ac_cv_header_sys_wait_h = yes; then
2921 cat >> confdefs.h <<\EOF
2922 #define HAVE_SYS_WAIT_H 1
2928 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2929 echo "configure:2930: checking for struct utimbuf" >&5
2930 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2931 echo $ac_n "(cached) $ac_c" 1>&6
2932 else
2933 cat > conftest.$ac_ext <<EOF
2934 #line 2935 "configure"
2935 #include "confdefs.h"
2936 #ifdef TIME_WITH_SYS_TIME
2937 #include <sys/time.h>
2938 #include <time.h>
2939 #else
2940 #ifdef HAVE_SYS_TIME_H
2941 #include <sys/time.h>
2942 #else
2943 #include <time.h>
2944 #endif
2945 #endif
2946 #ifdef HAVE_UTIME_H
2947 #include <utime.h>
2948 #endif
2949 int main() {
2950 static struct utimbuf x; x.actime = x.modtime;
2951 ; return 0; }
2953 if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2954 rm -rf conftest*
2955 emacs_cv_struct_utimbuf=yes
2956 else
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 emacs_cv_struct_utimbuf=no
2962 rm -f conftest*
2965 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2966 if test $emacs_cv_struct_utimbuf = yes; then
2967 cat >> confdefs.h <<\EOF
2968 #define HAVE_STRUCT_UTIMBUF 1
2973 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2974 echo "configure:2975: checking return type of signal handlers" >&5
2975 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978 cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2981 #include <sys/types.h>
2982 #include <signal.h>
2983 #ifdef signal
2984 #undef signal
2985 #endif
2986 #ifdef __cplusplus
2987 extern "C" void (*signal (int, void (*)(int)))(int);
2988 #else
2989 void (*signal ()) ();
2990 #endif
2992 int main() {
2993 int i;
2994 ; return 0; }
2996 if { (eval echo configure:2997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2997 rm -rf conftest*
2998 ac_cv_type_signal=void
2999 else
3000 echo "configure: failed program was:" >&5
3001 cat conftest.$ac_ext >&5
3002 rm -rf conftest*
3003 ac_cv_type_signal=int
3005 rm -f conftest*
3008 echo "$ac_t""$ac_cv_type_signal" 1>&6
3009 cat >> confdefs.h <<EOF
3010 #define RETSIGTYPE $ac_cv_type_signal
3015 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
3016 echo "configure:3017: checking for speed_t" >&5
3017 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
3018 echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <termios.h>
3024 int main() {
3025 speed_t x = 1;
3026 ; return 0; }
3028 if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3029 rm -rf conftest*
3030 emacs_cv_speed_t=yes
3031 else
3032 echo "configure: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3035 rm -f conftest*
3038 echo "$ac_t""$emacs_cv_speed_t" 1>&6
3039 if test $emacs_cv_speed_t = yes; then
3040 cat >> confdefs.h <<\EOF
3041 #define HAVE_SPEED_T 1
3046 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3047 echo "configure:3048: checking for struct timeval" >&5
3048 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
3049 echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051 cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 #ifdef TIME_WITH_SYS_TIME
3055 #include <sys/time.h>
3056 #include <time.h>
3057 #else
3058 #ifdef HAVE_SYS_TIME_H
3059 #include <sys/time.h>
3060 #else
3061 #include <time.h>
3062 #endif
3063 #endif
3064 int main() {
3065 static struct timeval x; x.tv_sec = x.tv_usec;
3066 ; return 0; }
3068 if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3069 rm -rf conftest*
3070 emacs_cv_struct_timeval=yes
3071 else
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3074 rm -rf conftest*
3075 emacs_cv_struct_timeval=no
3077 rm -f conftest*
3080 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
3081 HAVE_TIMEVAL=$emacs_cv_struct_timeval
3082 if test $emacs_cv_struct_timeval = yes; then
3083 cat >> confdefs.h <<\EOF
3084 #define HAVE_TIMEVAL 1
3089 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
3090 echo "configure:3091: checking for struct exception" >&5
3091 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
3092 echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094 cat > conftest.$ac_ext <<EOF
3095 #line 3096 "configure"
3096 #include "confdefs.h"
3097 #include <math.h>
3098 int main() {
3099 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
3100 ; return 0; }
3102 if { (eval echo configure:3103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3103 rm -rf conftest*
3104 emacs_cv_struct_exception=yes
3105 else
3106 echo "configure: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
3108 rm -rf conftest*
3109 emacs_cv_struct_exception=no
3111 rm -f conftest*
3114 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
3115 HAVE_EXCEPTION=$emacs_cv_struct_exception
3116 if test $emacs_cv_struct_exception != yes; then
3117 cat >> confdefs.h <<\EOF
3118 #define NO_MATHERR 1
3123 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3124 echo "configure:3125: checking whether struct tm is in sys/time.h or time.h" >&5
3125 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3126 echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128 cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131 #include <sys/types.h>
3132 #include <time.h>
3133 int main() {
3134 struct tm *tp; tp->tm_sec;
3135 ; return 0; }
3137 if { (eval echo configure:3138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3138 rm -rf conftest*
3139 ac_cv_struct_tm=time.h
3140 else
3141 echo "configure: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3143 rm -rf conftest*
3144 ac_cv_struct_tm=sys/time.h
3146 rm -f conftest*
3149 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3150 if test $ac_cv_struct_tm = sys/time.h; then
3151 cat >> confdefs.h <<\EOF
3152 #define TM_IN_SYS_TIME 1
3157 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3158 echo "configure:3159: checking for tm_zone in struct tm" >&5
3159 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3160 echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 #include <sys/types.h>
3166 #include <$ac_cv_struct_tm>
3167 int main() {
3168 struct tm tm; tm.tm_zone;
3169 ; return 0; }
3171 if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3172 rm -rf conftest*
3173 ac_cv_struct_tm_zone=yes
3174 else
3175 echo "configure: failed program was:" >&5
3176 cat conftest.$ac_ext >&5
3177 rm -rf conftest*
3178 ac_cv_struct_tm_zone=no
3180 rm -f conftest*
3183 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3184 if test "$ac_cv_struct_tm_zone" = yes; then
3185 cat >> confdefs.h <<\EOF
3186 #define HAVE_TM_ZONE 1
3189 else
3190 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3191 echo "configure:3192: checking for tzname" >&5
3192 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3193 echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195 cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <time.h>
3199 #ifndef tzname /* For SGI. */
3200 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3201 #endif
3202 int main() {
3203 atoi(*tzname);
3204 ; return 0; }
3206 if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3207 rm -rf conftest*
3208 ac_cv_var_tzname=yes
3209 else
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 rm -rf conftest*
3213 ac_cv_var_tzname=no
3215 rm -f conftest*
3218 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3219 if test $ac_cv_var_tzname = yes; then
3220 cat >> confdefs.h <<\EOF
3221 #define HAVE_TZNAME 1
3227 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3228 echo "configure:3229: checking for tm_gmtoff in struct tm" >&5
3229 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
3230 echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232 cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <time.h>
3236 int main() {
3237 struct tm t; t.tm_gmtoff = 0
3238 ; return 0; }
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3241 rm -rf conftest*
3242 emacs_cv_tm_gmtoff=yes
3243 else
3244 echo "configure: failed program was:" >&5
3245 cat conftest.$ac_ext >&5
3246 rm -rf conftest*
3247 emacs_cv_tm_gmtoff=no
3249 rm -f conftest*
3252 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
3253 if test $emacs_cv_tm_gmtoff = yes; then
3254 cat >> confdefs.h <<\EOF
3255 #define HAVE_TM_GMTOFF 1
3261 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3262 echo "configure:3263: checking for ${CC-cc} option to accept ANSI C" >&5
3263 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
3264 echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266 ac_cv_prog_cc_stdc=no
3267 ac_save_CC="$CC"
3268 # Don't try gcc -ansi; that turns off useful extensions and
3269 # breaks some systems' header files.
3270 # AIX -qlanglvl=ansi
3271 # Ultrix and OSF/1 -std1
3272 # HP-UX 10.20 and later -Ae
3273 # HP-UX older versions -Aa -D_HPUX_SOURCE
3274 # SVR4 -Xc -D__EXTENSIONS__
3275 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3277 CC="$ac_save_CC $ac_arg"
3278 cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 #include <stdarg.h>
3282 #include <stdio.h>
3283 #include <sys/types.h>
3284 #include <sys/stat.h>
3285 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3286 struct buf { int x; };
3287 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3288 static char *e (p, i)
3289 char **p;
3290 int i;
3292 return p[i];
3294 static char *f (char * (*g) (char **, int), char **p, ...)
3296 char *s;
3297 va_list v;
3298 va_start (v,p);
3299 s = g (p, va_arg (v,int));
3300 va_end (v);
3301 return s;
3303 int test (int i, double x);
3304 struct s1 {int (*f) (int a);};
3305 struct s2 {int (*f) (double a);};
3306 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3307 int argc;
3308 char **argv;
3309 int main() {
3310 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3311 ; return 0; }
3313 if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3314 rm -rf conftest*
3315 ac_cv_prog_cc_stdc="$ac_arg"; break
3316 else
3317 echo "configure: failed program was:" >&5
3318 cat conftest.$ac_ext >&5
3320 rm -f conftest*
3321 done
3322 CC="$ac_save_CC"
3326 case "x$ac_cv_prog_cc_stdc" in
3327 x|xno)
3328 echo "$ac_t""none needed" 1>&6 ;;
3330 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
3331 CC="$CC $ac_cv_prog_cc_stdc" ;;
3332 esac
3334 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
3335 echo "configure:3336: checking for function prototypes" >&5
3336 if test "$ac_cv_prog_cc_stdc" != no; then
3337 echo "$ac_t""yes" 1>&6
3338 cat >> confdefs.h <<\EOF
3339 #define PROTOTYPES 1
3342 else
3343 echo "$ac_t""no" 1>&6
3346 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
3347 echo "configure:3348: checking for working volatile" >&5
3348 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
3349 echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351 cat > conftest.$ac_ext <<EOF
3352 #line 3353 "configure"
3353 #include "confdefs.h"
3355 int main() {
3357 volatile int x;
3358 int * volatile y;
3359 ; return 0; }
3361 if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3362 rm -rf conftest*
3363 ac_cv_c_volatile=yes
3364 else
3365 echo "configure: failed program was:" >&5
3366 cat conftest.$ac_ext >&5
3367 rm -rf conftest*
3368 ac_cv_c_volatile=no
3370 rm -f conftest*
3373 echo "$ac_t""$ac_cv_c_volatile" 1>&6
3374 if test $ac_cv_c_volatile = no; then
3375 cat >> confdefs.h <<\EOF
3376 #define volatile
3381 echo $ac_n "checking for working const""... $ac_c" 1>&6
3382 echo "configure:3383: checking for working const" >&5
3383 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3384 echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3390 int main() {
3392 /* Ultrix mips cc rejects this. */
3393 typedef int charset[2]; const charset x;
3394 /* SunOS 4.1.1 cc rejects this. */
3395 char const *const *ccp;
3396 char **p;
3397 /* NEC SVR4.0.2 mips cc rejects this. */
3398 struct point {int x, y;};
3399 static struct point const zero = {0,0};
3400 /* AIX XL C 1.02.0.0 rejects this.
3401 It does not let you subtract one const X* pointer from another in an arm
3402 of an if-expression whose if-part is not a constant expression */
3403 const char *g = "string";
3404 ccp = &g + (g ? g-g : 0);
3405 /* HPUX 7.0 cc rejects these. */
3406 ++ccp;
3407 p = (char**) ccp;
3408 ccp = (char const *const *) p;
3409 { /* SCO 3.2v4 cc rejects this. */
3410 char *t;
3411 char const *s = 0 ? (char *) 0 : (char const *) 0;
3413 *t++ = 0;
3415 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3416 int x[] = {25, 17};
3417 const int *foo = &x[0];
3418 ++foo;
3420 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3421 typedef const int *iptr;
3422 iptr p = 0;
3423 ++p;
3425 { /* AIX XL C 1.02.0.0 rejects this saying
3426 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3427 struct s { int j; const int *ap[3]; };
3428 struct s *b; b->j = 5;
3430 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3431 const int foo = 10;
3434 ; return 0; }
3436 if { (eval echo configure:3437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3437 rm -rf conftest*
3438 ac_cv_c_const=yes
3439 else
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3442 rm -rf conftest*
3443 ac_cv_c_const=no
3445 rm -f conftest*
3448 echo "$ac_t""$ac_cv_c_const" 1>&6
3449 if test $ac_cv_c_const = no; then
3450 cat >> confdefs.h <<\EOF
3451 #define const
3456 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3457 echo "configure:3458: checking for void * support" >&5
3458 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461 cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3465 int main() {
3466 void * foo;
3467 ; return 0; }
3469 if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3470 rm -rf conftest*
3471 emacs_cv_void_star=yes
3472 else
3473 echo "configure: failed program was:" >&5
3474 cat conftest.$ac_ext >&5
3475 rm -rf conftest*
3476 emacs_cv_void_star=no
3478 rm -f conftest*
3481 echo "$ac_t""$emacs_cv_void_star" 1>&6
3482 if test $emacs_cv_void_star = yes; then
3483 cat >> confdefs.h <<\EOF
3484 #define POINTER_TYPE void
3487 else
3488 cat >> confdefs.h <<\EOF
3489 #define POINTER_TYPE char
3494 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3495 echo "configure:3496: checking whether ${MAKE-make} sets \${MAKE}" >&5
3496 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3497 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3498 echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500 cat > conftestmake <<\EOF
3501 all:
3502 @echo 'ac_maketemp="${MAKE}"'
3504 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3505 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3506 if test -n "$ac_maketemp"; then
3507 eval ac_cv_prog_make_${ac_make}_set=yes
3508 else
3509 eval ac_cv_prog_make_${ac_make}_set=no
3511 rm -f conftestmake
3513 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3514 echo "$ac_t""yes" 1>&6
3515 SET_MAKE=
3516 else
3517 echo "$ac_t""no" 1>&6
3518 SET_MAKE="MAKE=${MAKE-make}"
3522 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3523 echo "configure:3524: checking for long file names" >&5
3524 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526 else
3527 ac_cv_sys_long_file_names=yes
3528 # Test for long file names in all the places we know might matter:
3529 # . the current directory, where building will happen
3530 # $prefix/lib where we will be installing things
3531 # $exec_prefix/lib likewise
3532 # eval it to expand exec_prefix.
3533 # $TMPDIR if set, where it might want to write temporary files
3534 # if $TMPDIR is not set:
3535 # /tmp where it might want to write temporary files
3536 # /var/tmp likewise
3537 # /usr/tmp likewise
3538 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3539 ac_tmpdirs="$TMPDIR"
3540 else
3541 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3543 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3544 test -d $ac_dir || continue
3545 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3546 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3547 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3548 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3549 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3550 ac_cv_sys_long_file_names=no
3551 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3552 break
3554 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3555 done
3558 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3559 if test $ac_cv_sys_long_file_names = yes; then
3560 cat >> confdefs.h <<\EOF
3561 #define HAVE_LONG_FILE_NAMES 1
3567 #### Choose a window system.
3569 # If we find X, set shell vars x_includes and x_libraries to the
3570 # paths, otherwise set no_x=yes.
3571 # Uses ac_ vars as temps to allow command line to override cache and checks.
3572 # --without-x overrides everything else, but does not touch the cache.
3573 echo $ac_n "checking for X""... $ac_c" 1>&6
3574 echo "configure:3575: checking for X" >&5
3576 # Check whether --with-x or --without-x was given.
3577 if test "${with_x+set}" = set; then
3578 withval="$with_x"
3582 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3583 if test "x$with_x" = xno; then
3584 # The user explicitly disabled X.
3585 have_x=disabled
3586 else
3587 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3588 # Both variables are already set.
3589 have_x=yes
3590 else
3591 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3592 echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594 # One or both of the vars are not set, and there is no cached value.
3595 ac_x_includes=NO ac_x_libraries=NO
3596 rm -fr conftestdir
3597 if mkdir conftestdir; then
3598 cd conftestdir
3599 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3600 cat > Imakefile <<'EOF'
3601 acfindx:
3602 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3604 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3605 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3606 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3607 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3608 for ac_extension in a so sl; do
3609 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3610 test -f $ac_im_libdir/libX11.$ac_extension; then
3611 ac_im_usrlibdir=$ac_im_libdir; break
3613 done
3614 # Screen out bogus values from the imake configuration. They are
3615 # bogus both because they are the default anyway, and because
3616 # using them would break gcc on systems where it needs fixed includes.
3617 case "$ac_im_incroot" in
3618 /usr/include) ;;
3619 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3620 esac
3621 case "$ac_im_usrlibdir" in
3622 /usr/lib | /lib) ;;
3623 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3624 esac
3626 cd ..
3627 rm -fr conftestdir
3630 if test "$ac_x_includes" = NO; then
3631 # Guess where to find include files, by looking for this one X11 .h file.
3632 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3634 # First, try using that file with no special directory specified.
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3638 #include <$x_direct_test_include>
3640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3641 { (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3643 if test -z "$ac_err"; then
3644 rm -rf conftest*
3645 # We can compile using X headers with no special include directory.
3646 ac_x_includes=
3647 else
3648 echo "$ac_err" >&5
3649 echo "configure: failed program was:" >&5
3650 cat conftest.$ac_ext >&5
3651 rm -rf conftest*
3652 # Look for the header file in a standard set of common directories.
3653 # Check X11 before X11Rn because it is often a symlink to the current release.
3654 for ac_dir in \
3655 /usr/X11/include \
3656 /usr/X11R6/include \
3657 /usr/X11R5/include \
3658 /usr/X11R4/include \
3660 /usr/include/X11 \
3661 /usr/include/X11R6 \
3662 /usr/include/X11R5 \
3663 /usr/include/X11R4 \
3665 /usr/local/X11/include \
3666 /usr/local/X11R6/include \
3667 /usr/local/X11R5/include \
3668 /usr/local/X11R4/include \
3670 /usr/local/include/X11 \
3671 /usr/local/include/X11R6 \
3672 /usr/local/include/X11R5 \
3673 /usr/local/include/X11R4 \
3675 /usr/X386/include \
3676 /usr/x386/include \
3677 /usr/XFree86/include/X11 \
3679 /usr/include \
3680 /usr/local/include \
3681 /usr/unsupported/include \
3682 /usr/athena/include \
3683 /usr/local/x11r5/include \
3684 /usr/lpp/Xamples/include \
3686 /usr/openwin/include \
3687 /usr/openwin/share/include \
3690 if test -r "$ac_dir/$x_direct_test_include"; then
3691 ac_x_includes=$ac_dir
3692 break
3694 done
3696 rm -f conftest*
3697 fi # $ac_x_includes = NO
3699 if test "$ac_x_libraries" = NO; then
3700 # Check for the libraries.
3702 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3703 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3705 # See if we find them without any special options.
3706 # Don't add to $LIBS permanently.
3707 ac_save_LIBS="$LIBS"
3708 LIBS="-l$x_direct_test_library $LIBS"
3709 cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3713 int main() {
3714 ${x_direct_test_function}()
3715 ; return 0; }
3717 if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3718 rm -rf conftest*
3719 LIBS="$ac_save_LIBS"
3720 # We can link X programs with no special library path.
3721 ac_x_libraries=
3722 else
3723 echo "configure: failed program was:" >&5
3724 cat conftest.$ac_ext >&5
3725 rm -rf conftest*
3726 LIBS="$ac_save_LIBS"
3727 # First see if replacing the include by lib works.
3728 # Check X11 before X11Rn because it is often a symlink to the current release.
3729 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3730 /usr/X11/lib \
3731 /usr/X11R6/lib \
3732 /usr/X11R5/lib \
3733 /usr/X11R4/lib \
3735 /usr/lib/X11 \
3736 /usr/lib/X11R6 \
3737 /usr/lib/X11R5 \
3738 /usr/lib/X11R4 \
3740 /usr/local/X11/lib \
3741 /usr/local/X11R6/lib \
3742 /usr/local/X11R5/lib \
3743 /usr/local/X11R4/lib \
3745 /usr/local/lib/X11 \
3746 /usr/local/lib/X11R6 \
3747 /usr/local/lib/X11R5 \
3748 /usr/local/lib/X11R4 \
3750 /usr/X386/lib \
3751 /usr/x386/lib \
3752 /usr/XFree86/lib/X11 \
3754 /usr/lib \
3755 /usr/local/lib \
3756 /usr/unsupported/lib \
3757 /usr/athena/lib \
3758 /usr/local/x11r5/lib \
3759 /usr/lpp/Xamples/lib \
3760 /lib/usr/lib/X11 \
3762 /usr/openwin/lib \
3763 /usr/openwin/share/lib \
3766 for ac_extension in a so sl; do
3767 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3768 ac_x_libraries=$ac_dir
3769 break 2
3771 done
3772 done
3774 rm -f conftest*
3775 fi # $ac_x_libraries = NO
3777 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3778 # Didn't find X anywhere. Cache the known absence of X.
3779 ac_cv_have_x="have_x=no"
3780 else
3781 # Record where we found X for the cache.
3782 ac_cv_have_x="have_x=yes \
3783 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3787 eval "$ac_cv_have_x"
3788 fi # $with_x != no
3790 if test "$have_x" != yes; then
3791 echo "$ac_t""$have_x" 1>&6
3792 no_x=yes
3793 else
3794 # If each of the values was on the command line, it overrides each guess.
3795 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3796 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3797 # Update the cache value to reflect the command line values.
3798 ac_cv_have_x="have_x=yes \
3799 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3800 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3803 if test "$no_x" = yes; then
3804 window_system=none
3805 else
3806 window_system=x11
3809 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3810 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3811 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3812 x_default_search_path=""
3813 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3814 x_search_path="\
3815 ${x_library}/X11/%L/%T/%N%C%S:\
3816 ${x_library}/X11/%l/%T/%N%C%S:\
3817 ${x_library}/X11/%T/%N%C%S:\
3818 ${x_library}/X11/%L/%T/%N%S:\
3819 ${x_library}/X11/%l/%T/%N%S:\
3820 ${x_library}/X11/%T/%N%S"
3821 if test x"${x_default_search_path}" = x; then
3822 x_default_search_path=${x_search_path}
3823 else
3824 x_default_search_path="${x_search_path}:${x_default_search_path}"
3826 done
3828 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3829 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3832 if test x"${x_includes}" = x; then
3833 bitmapdir=/usr/include/X11/bitmaps
3834 else
3835 # accumulate include directories that have X11 bitmap subdirectories
3836 bmd_acc="dummyval"
3837 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3838 if test -d "${bmd}/X11/bitmaps"; then
3839 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3841 if test -d "${bmd}/bitmaps"; then
3842 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3844 done
3845 if test ${bmd_acc} != "dummyval"; then
3846 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3850 case "${window_system}" in
3851 x11 )
3852 HAVE_X_WINDOWS=yes
3853 HAVE_X11=yes
3854 case "${with_x_toolkit}" in
3855 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3856 motif ) USE_X_TOOLKIT=MOTIF ;;
3857 no ) USE_X_TOOLKIT=none ;;
3858 * ) USE_X_TOOLKIT=maybe ;;
3859 esac
3861 none )
3862 HAVE_X_WINDOWS=no
3863 HAVE_X11=no
3864 USE_X_TOOLKIT=none
3866 esac
3868 ### If we're using X11, we should use the X menu package.
3869 HAVE_MENUS=no
3870 case ${HAVE_X11} in
3871 yes ) HAVE_MENUS=yes ;;
3872 esac
3874 if test "${opsys}" = "hpux9"; then
3875 case "${x_libraries}" in
3876 *X11R4* )
3877 opsysfile="s/hpux9-x11r4.h"
3879 esac
3882 if test "${opsys}" = "hpux9shr"; then
3883 case "${x_libraries}" in
3884 *X11R4* )
3885 opsysfile="s/hpux9shxr4.h"
3887 esac
3890 ### Compute the unexec source name from the object name.
3891 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3893 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3894 # Assume not, until told otherwise.
3895 GNU_MALLOC=yes
3896 doug_lea_malloc=yes
3897 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3898 echo "configure:3899: checking for malloc_get_state" >&5
3899 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3900 echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902 cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 /* System header to define __stub macros and hopefully few prototypes,
3906 which can conflict with char malloc_get_state(); below. */
3907 #include <assert.h>
3908 /* Override any gcc2 internal prototype to avoid an error. */
3909 /* We use char because int might match the return type of a gcc2
3910 builtin and then its argument prototype would still apply. */
3911 char malloc_get_state();
3913 int main() {
3915 /* The GNU C library defines this for functions which it implements
3916 to always fail with ENOSYS. Some functions are actually named
3917 something starting with __ and the normal name is an alias. */
3918 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3919 choke me
3920 #else
3921 malloc_get_state();
3922 #endif
3924 ; return 0; }
3926 if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3927 rm -rf conftest*
3928 eval "ac_cv_func_malloc_get_state=yes"
3929 else
3930 echo "configure: failed program was:" >&5
3931 cat conftest.$ac_ext >&5
3932 rm -rf conftest*
3933 eval "ac_cv_func_malloc_get_state=no"
3935 rm -f conftest*
3938 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3939 echo "$ac_t""yes" 1>&6
3941 else
3942 echo "$ac_t""no" 1>&6
3943 doug_lea_malloc=no
3946 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3947 echo "configure:3948: checking for malloc_set_state" >&5
3948 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3949 echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 /* System header to define __stub macros and hopefully few prototypes,
3955 which can conflict with char malloc_set_state(); below. */
3956 #include <assert.h>
3957 /* Override any gcc2 internal prototype to avoid an error. */
3958 /* We use char because int might match the return type of a gcc2
3959 builtin and then its argument prototype would still apply. */
3960 char malloc_set_state();
3962 int main() {
3964 /* The GNU C library defines this for functions which it implements
3965 to always fail with ENOSYS. Some functions are actually named
3966 something starting with __ and the normal name is an alias. */
3967 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3968 choke me
3969 #else
3970 malloc_set_state();
3971 #endif
3973 ; return 0; }
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976 rm -rf conftest*
3977 eval "ac_cv_func_malloc_set_state=yes"
3978 else
3979 echo "configure: failed program was:" >&5
3980 cat conftest.$ac_ext >&5
3981 rm -rf conftest*
3982 eval "ac_cv_func_malloc_set_state=no"
3984 rm -f conftest*
3987 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3988 echo "$ac_t""yes" 1>&6
3990 else
3991 echo "$ac_t""no" 1>&6
3992 doug_lea_malloc=no
3995 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3996 echo "configure:3997: checking whether __after_morecore_hook exists" >&5
3997 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3998 echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000 cat > conftest.$ac_ext <<EOF
4001 #line 4002 "configure"
4002 #include "confdefs.h"
4003 extern void (* __after_morecore_hook)();
4004 int main() {
4005 __after_morecore_hook = 0
4006 ; return 0; }
4008 if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4009 rm -rf conftest*
4010 emacs_cv_var___after_morecore_hook=yes
4011 else
4012 echo "configure: failed program was:" >&5
4013 cat conftest.$ac_ext >&5
4014 rm -rf conftest*
4015 emacs_cv_var___after_morecore_hook=no
4017 rm -f conftest*
4020 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
4021 if test $emacs_cv_var___after_morecore_hook = no; then
4022 doug_lea_malloc=no
4024 if test "${system_malloc}" = "yes"; then
4025 GNU_MALLOC=no
4026 GNU_MALLOC_reason="
4027 (The GNU allocators don't work with this system configuration.)"
4029 if test "$doug_lea_malloc" = "yes" ; then
4030 if test "$GNU_MALLOC" = yes ; then
4031 GNU_MALLOC_reason="
4032 (Using Doug Lea's new malloc from the GNU C Library.)"
4034 cat >> confdefs.h <<\EOF
4035 #define DOUG_LEA_MALLOC 1
4040 if test x"${REL_ALLOC}" = x; then
4041 REL_ALLOC=${GNU_MALLOC}
4045 for ac_hdr in stdlib.h unistd.h sys/stat.h
4047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4049 echo "configure:4050: checking for $ac_hdr" >&5
4050 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4051 echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <$ac_hdr>
4058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4059 { (eval echo configure:4060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4061 if test -z "$ac_err"; then
4062 rm -rf conftest*
4063 eval "ac_cv_header_$ac_safe=yes"
4064 else
4065 echo "$ac_err" >&5
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4068 rm -rf conftest*
4069 eval "ac_cv_header_$ac_safe=no"
4071 rm -f conftest*
4073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4074 echo "$ac_t""yes" 1>&6
4075 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4076 cat >> confdefs.h <<EOF
4077 #define $ac_tr_hdr 1
4080 else
4081 echo "$ac_t""no" 1>&6
4083 done
4085 for ac_func in getpagesize
4087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4088 echo "configure:4089: checking for $ac_func" >&5
4089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095 /* System header to define __stub macros and hopefully few prototypes,
4096 which can conflict with char $ac_func(); below. */
4097 #include <assert.h>
4098 /* Override any gcc2 internal prototype to avoid an error. */
4099 /* We use char because int might match the return type of a gcc2
4100 builtin and then its argument prototype would still apply. */
4101 char $ac_func();
4103 int main() {
4105 /* The GNU C library defines this for functions which it implements
4106 to always fail with ENOSYS. Some functions are actually named
4107 something starting with __ and the normal name is an alias. */
4108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4109 choke me
4110 #else
4111 $ac_func();
4112 #endif
4114 ; return 0; }
4116 if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117 rm -rf conftest*
4118 eval "ac_cv_func_$ac_func=yes"
4119 else
4120 echo "configure: failed program was:" >&5
4121 cat conftest.$ac_ext >&5
4122 rm -rf conftest*
4123 eval "ac_cv_func_$ac_func=no"
4125 rm -f conftest*
4128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4129 echo "$ac_t""yes" 1>&6
4130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4131 cat >> confdefs.h <<EOF
4132 #define $ac_tr_func 1
4135 else
4136 echo "$ac_t""no" 1>&6
4138 done
4140 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4141 echo "configure:4142: checking for working mmap" >&5
4142 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4143 echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145 if test "$cross_compiling" = yes; then
4146 ac_cv_func_mmap_fixed_mapped=no
4147 else
4148 cat > conftest.$ac_ext <<EOF
4149 #line 4150 "configure"
4150 #include "confdefs.h"
4151 /* Thanks to Mike Haertel and Jim Avera for this test.
4152 Here is a matrix of mmap possibilities:
4153 mmap private not fixed
4154 mmap private fixed at somewhere currently unmapped
4155 mmap private fixed at somewhere already mapped
4156 mmap shared not fixed
4157 mmap shared fixed at somewhere currently unmapped
4158 mmap shared fixed at somewhere already mapped
4159 For private mappings, we should verify that changes cannot be read()
4160 back from the file, nor mmap's back from the file at a different
4161 address. (There have been systems where private was not correctly
4162 implemented like the infamous i386 svr4.0, and systems where the
4163 VM page cache was not coherent with the file system buffer cache
4164 like early versions of FreeBSD and possibly contemporary NetBSD.)
4165 For shared mappings, we should conversely verify that changes get
4166 propogated back to all the places they're supposed to be.
4168 Grep wants private fixed already mapped.
4169 The main things grep needs to know about mmap are:
4170 * does it exist and is it safe to write into the mmap'd area
4171 * how to use it (BSD variants) */
4172 #include <sys/types.h>
4173 #include <fcntl.h>
4174 #include <sys/mman.h>
4176 #if STDC_HEADERS || HAVE_STDLIB_H
4177 # include <stdlib.h>
4178 #else
4179 char *malloc ();
4180 #endif
4181 #if HAVE_UNISTD_H
4182 # include <unistd.h>
4183 #endif
4184 #if HAVE_SYS_STAT_H
4185 # include <sys/stat.h>
4186 #endif
4188 /* This mess was copied from the GNU getpagesize.h. */
4189 #if !HAVE_GETPAGESIZE
4190 /* Assume that all systems that can run configure have sys/param.h. */
4191 # if !HAVE_SYS_PARAM_H
4192 # define HAVE_SYS_PARAM_H 1
4193 # endif
4195 # ifdef _SC_PAGESIZE
4196 # define getpagesize() sysconf(_SC_PAGESIZE)
4197 # else /* no _SC_PAGESIZE */
4198 # if HAVE_SYS_PARAM_H
4199 # include <sys/param.h>
4200 # ifdef EXEC_PAGESIZE
4201 # define getpagesize() EXEC_PAGESIZE
4202 # else /* no EXEC_PAGESIZE */
4203 # ifdef NBPG
4204 # define getpagesize() NBPG * CLSIZE
4205 # ifndef CLSIZE
4206 # define CLSIZE 1
4207 # endif /* no CLSIZE */
4208 # else /* no NBPG */
4209 # ifdef NBPC
4210 # define getpagesize() NBPC
4211 # else /* no NBPC */
4212 # ifdef PAGESIZE
4213 # define getpagesize() PAGESIZE
4214 # endif /* PAGESIZE */
4215 # endif /* no NBPC */
4216 # endif /* no NBPG */
4217 # endif /* no EXEC_PAGESIZE */
4218 # else /* no HAVE_SYS_PARAM_H */
4219 # define getpagesize() 8192 /* punt totally */
4220 # endif /* no HAVE_SYS_PARAM_H */
4221 # endif /* no _SC_PAGESIZE */
4223 #endif /* no HAVE_GETPAGESIZE */
4226 main ()
4228 char *data, *data2, *data3;
4229 int i, pagesize;
4230 int fd;
4232 pagesize = getpagesize ();
4234 /* First, make a file with some known garbage in it. */
4235 data = (char *) malloc (pagesize);
4236 if (!data)
4237 exit (1);
4238 for (i = 0; i < pagesize; ++i)
4239 *(data + i) = rand ();
4240 umask (0);
4241 fd = creat ("conftestmmap", 0600);
4242 if (fd < 0)
4243 exit (1);
4244 if (write (fd, data, pagesize) != pagesize)
4245 exit (1);
4246 close (fd);
4248 /* Next, try to mmap the file at a fixed address which already has
4249 something else allocated at it. If we can, also make sure that
4250 we see the same garbage. */
4251 fd = open ("conftestmmap", O_RDWR);
4252 if (fd < 0)
4253 exit (1);
4254 data2 = (char *) malloc (2 * pagesize);
4255 if (!data2)
4256 exit (1);
4257 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4258 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4259 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4260 exit (1);
4261 for (i = 0; i < pagesize; ++i)
4262 if (*(data + i) != *(data2 + i))
4263 exit (1);
4265 /* Finally, make sure that changes to the mapped area do not
4266 percolate back to the file as seen by read(). (This is a bug on
4267 some variants of i386 svr4.0.) */
4268 for (i = 0; i < pagesize; ++i)
4269 *(data2 + i) = *(data2 + i) + 1;
4270 data3 = (char *) malloc (pagesize);
4271 if (!data3)
4272 exit (1);
4273 if (read (fd, data3, pagesize) != pagesize)
4274 exit (1);
4275 for (i = 0; i < pagesize; ++i)
4276 if (*(data + i) != *(data3 + i))
4277 exit (1);
4278 close (fd);
4279 unlink ("conftestmmap");
4280 exit (0);
4283 if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4284 then
4285 ac_cv_func_mmap_fixed_mapped=yes
4286 else
4287 echo "configure: failed program was:" >&5
4288 cat conftest.$ac_ext >&5
4289 rm -fr conftest*
4290 ac_cv_func_mmap_fixed_mapped=no
4292 rm -fr conftest*
4297 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4298 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4299 cat >> confdefs.h <<\EOF
4300 #define HAVE_MMAP 1
4305 if test $use_mmap_for_buffers = yes; then
4306 REL_ALLOC=no
4309 LIBS="$libsrc_libs $LIBS"
4311 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4312 echo "configure:4313: checking for dnet_ntoa in -ldnet" >&5
4313 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4315 echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317 ac_save_LIBS="$LIBS"
4318 LIBS="-ldnet $LIBS"
4319 cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322 /* Override any gcc2 internal prototype to avoid an error. */
4323 /* We use char because int might match the return type of a gcc2
4324 builtin and then its argument prototype would still apply. */
4325 char dnet_ntoa();
4327 int main() {
4328 dnet_ntoa()
4329 ; return 0; }
4331 if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4332 rm -rf conftest*
4333 eval "ac_cv_lib_$ac_lib_var=yes"
4334 else
4335 echo "configure: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 rm -rf conftest*
4338 eval "ac_cv_lib_$ac_lib_var=no"
4340 rm -f conftest*
4341 LIBS="$ac_save_LIBS"
4344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4345 echo "$ac_t""yes" 1>&6
4346 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4347 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4348 cat >> confdefs.h <<EOF
4349 #define $ac_tr_lib 1
4352 LIBS="-ldnet $LIBS"
4354 else
4355 echo "$ac_t""no" 1>&6
4359 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4360 echo "configure:4361: checking for main in -lXbsd" >&5
4361 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4363 echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365 ac_save_LIBS="$LIBS"
4366 LIBS="-lXbsd $LIBS"
4367 cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4371 int main() {
4372 main()
4373 ; return 0; }
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376 rm -rf conftest*
4377 eval "ac_cv_lib_$ac_lib_var=yes"
4378 else
4379 echo "configure: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 rm -rf conftest*
4382 eval "ac_cv_lib_$ac_lib_var=no"
4384 rm -f conftest*
4385 LIBS="$ac_save_LIBS"
4388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4389 echo "$ac_t""yes" 1>&6
4390 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
4391 else
4392 echo "$ac_t""no" 1>&6
4396 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4397 echo "configure:4398: checking for cma_open in -lpthreads" >&5
4398 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4400 echo $ac_n "(cached) $ac_c" 1>&6
4401 else
4402 ac_save_LIBS="$LIBS"
4403 LIBS="-lpthreads $LIBS"
4404 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 /* Override any gcc2 internal prototype to avoid an error. */
4408 /* We use char because int might match the return type of a gcc2
4409 builtin and then its argument prototype would still apply. */
4410 char cma_open();
4412 int main() {
4413 cma_open()
4414 ; return 0; }
4416 if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4417 rm -rf conftest*
4418 eval "ac_cv_lib_$ac_lib_var=yes"
4419 else
4420 echo "configure: failed program was:" >&5
4421 cat conftest.$ac_ext >&5
4422 rm -rf conftest*
4423 eval "ac_cv_lib_$ac_lib_var=no"
4425 rm -f conftest*
4426 LIBS="$ac_save_LIBS"
4429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4430 echo "$ac_t""yes" 1>&6
4431 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4432 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4433 cat >> confdefs.h <<EOF
4434 #define $ac_tr_lib 1
4437 LIBS="-lpthreads $LIBS"
4439 else
4440 echo "$ac_t""no" 1>&6
4444 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
4445 echo "configure:4446: checking for XFree86 in /usr/X386" >&5
4446 if test -d /usr/X386/include; then
4447 HAVE_XFREE386=yes
4448 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
4449 else
4450 HAVE_XFREE386=no
4452 echo "$ac_t""$HAVE_XFREE386" 1>&6
4454 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
4455 # for the tests that follow. We set it back to REAL_CFLAGS later on.
4457 REAL_CPPFLAGS="$CPPFLAGS"
4459 if test "${HAVE_X11}" = "yes"; then
4460 DEFS="$C_SWITCH_X_SITE $DEFS"
4461 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
4462 LIBS="$LIBX $LIBS"
4463 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
4464 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
4466 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
4467 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
4468 # but it's more convenient here to set LD_RUN_PATH
4469 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
4470 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
4471 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
4472 export LD_RUN_PATH
4475 if test "${opsys}" = "gnu-linux"; then
4476 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
4477 echo "configure:4478: checking whether X on GNU/Linux needs -b to link" >&5
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4482 int main() {
4483 XOpenDisplay ("foo");
4484 ; return 0; }
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487 rm -rf conftest*
4488 xlinux_first_failure=no
4489 else
4490 echo "configure: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 rm -rf conftest*
4493 xlinux_first_failure=yes
4495 rm -f conftest*
4496 if test "${xlinux_first_failure}" = "yes"; then
4497 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
4498 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
4499 OLD_CPPFLAGS="$CPPFLAGS"
4500 OLD_LIBS="$LIBS"
4501 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
4502 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
4503 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
4504 LIBS="$LIBS -b i486-linuxaout"
4505 cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4509 int main() {
4510 XOpenDisplay ("foo");
4511 ; return 0; }
4513 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4514 rm -rf conftest*
4515 xlinux_second_failure=no
4516 else
4517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4519 rm -rf conftest*
4520 xlinux_second_failure=yes
4522 rm -f conftest*
4523 if test "${xlinux_second_failure}" = "yes"; then
4524 # If we get the same failure with -b, there is no use adding -b.
4525 # So take it out. This plays safe.
4526 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
4527 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
4528 CPPFLAGS="$OLD_CPPFLAGS"
4529 LIBS="$OLD_LIBS"
4530 echo "$ac_t""no" 1>&6
4531 else
4532 echo "$ac_t""yes" 1>&6
4534 else
4535 echo "$ac_t""no" 1>&6
4539 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
4540 # header files included from there.
4541 echo $ac_n "checking for Xkb""... $ac_c" 1>&6
4542 echo "configure:4543: checking for Xkb" >&5
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 #include <X11/Xlib.h>
4547 #include <X11/XKBlib.h>
4548 int main() {
4549 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
4550 ; return 0; }
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553 rm -rf conftest*
4554 emacs_xkb=yes
4555 else
4556 echo "configure: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 rm -rf conftest*
4559 emacs_xkb=no
4561 rm -f conftest*
4562 echo "$ac_t""$emacs_xkb" 1>&6
4563 if test $emacs_xkb = yes; then
4564 cat >> confdefs.h <<\EOF
4565 #define HAVE_XKBGETKEYBOARD 1
4570 for ac_func in XrmSetDatabase XScreenResourceString \
4571 XScreenNumberOfScreen XSetWMProtocols
4573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4574 echo "configure:4575: checking for $ac_func" >&5
4575 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4576 echo $ac_n "(cached) $ac_c" 1>&6
4577 else
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4581 /* System header to define __stub macros and hopefully few prototypes,
4582 which can conflict with char $ac_func(); below. */
4583 #include <assert.h>
4584 /* Override any gcc2 internal prototype to avoid an error. */
4585 /* We use char because int might match the return type of a gcc2
4586 builtin and then its argument prototype would still apply. */
4587 char $ac_func();
4589 int main() {
4591 /* The GNU C library defines this for functions which it implements
4592 to always fail with ENOSYS. Some functions are actually named
4593 something starting with __ and the normal name is an alias. */
4594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4595 choke me
4596 #else
4597 $ac_func();
4598 #endif
4600 ; return 0; }
4602 if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4603 rm -rf conftest*
4604 eval "ac_cv_func_$ac_func=yes"
4605 else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 eval "ac_cv_func_$ac_func=no"
4611 rm -f conftest*
4614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4615 echo "$ac_t""yes" 1>&6
4616 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4617 cat >> confdefs.h <<EOF
4618 #define $ac_tr_func 1
4621 else
4622 echo "$ac_t""no" 1>&6
4624 done
4628 if test "${window_system}" = "x11"; then
4629 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4630 echo "configure:4631: checking X11 version 6" >&5
4631 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4632 echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 #include <X11/Xlib.h>
4638 int main() {
4639 #if XlibSpecificationRelease < 6
4640 fail;
4641 #endif
4643 ; return 0; }
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646 rm -rf conftest*
4647 emacs_cv_x11_version_6=yes
4648 else
4649 echo "configure: failed program was:" >&5
4650 cat conftest.$ac_ext >&5
4651 rm -rf conftest*
4652 emacs_cv_x11_version_6=no
4654 rm -f conftest*
4657 if test $emacs_cv_x11_version_6 = yes; then
4658 echo "$ac_t""6 or newer" 1>&6
4659 cat >> confdefs.h <<\EOF
4660 #define HAVE_X11R6 1
4663 else
4664 echo "$ac_t""before 6" 1>&6
4668 if test "${window_system}" = "x11"; then
4669 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4670 echo "configure:4671: checking X11 version 5" >&5
4671 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4672 echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <X11/Xlib.h>
4678 int main() {
4679 #if XlibSpecificationRelease < 5
4680 fail;
4681 #endif
4683 ; return 0; }
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686 rm -rf conftest*
4687 emacs_cv_x11_version_5=yes
4688 else
4689 echo "configure: failed program was:" >&5
4690 cat conftest.$ac_ext >&5
4691 rm -rf conftest*
4692 emacs_cv_x11_version_5=no
4694 rm -f conftest*
4697 if test $emacs_cv_x11_version_5 = yes; then
4698 echo "$ac_t""5 or newer" 1>&6
4699 HAVE_X11R5=yes
4700 cat >> confdefs.h <<\EOF
4701 #define HAVE_X11R5 1
4704 else
4705 HAVE_X11R5=no
4706 echo "$ac_t""before 5" 1>&6
4710 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4711 if test x"${HAVE_X11R5}" = xyes; then
4712 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4713 echo "configure:4714: checking X11 version 5 with Xaw" >&5
4714 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4721 #include <X11/Intrinsic.h>
4722 #include <X11/Xaw/Simple.h>
4723 int main() {
4725 ; return 0; }
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728 rm -rf conftest*
4729 emacs_cv_x11_version_5_with_xaw=yes
4730 else
4731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
4733 rm -rf conftest*
4734 emacs_cv_x11_version_5_with_xaw=no
4736 rm -f conftest*
4739 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4740 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4741 USE_X_TOOLKIT=LUCID
4742 else
4743 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4744 USE_X_TOOLKIT=none
4746 else
4747 USE_X_TOOLKIT=none
4751 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4753 if test "${USE_X_TOOLKIT}" != "none"; then
4754 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4755 echo "configure:4756: checking X11 toolkit version" >&5
4756 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 #include <X11/Intrinsic.h>
4763 int main() {
4764 #if XtSpecificationRelease < 6
4765 fail;
4766 #endif
4768 ; return 0; }
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4771 rm -rf conftest*
4772 emacs_cv_x11_toolkit_version_6=yes
4773 else
4774 echo "configure: failed program was:" >&5
4775 cat conftest.$ac_ext >&5
4776 rm -rf conftest*
4777 emacs_cv_x11_toolkit_version_6=no
4779 rm -f conftest*
4782 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4783 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4784 echo "$ac_t""6 or newer" 1>&6
4785 cat >> confdefs.h <<\EOF
4786 #define HAVE_X11XTR6 1
4789 else
4790 echo "$ac_t""before 6" 1>&6
4793 OLDLIBS="$LIBS"
4794 if test x$HAVE_X11XTR6 = xyes; then
4795 LIBS="-lXt -lSM -lICE $LIBS"
4796 else
4797 LIBS="-lXt $LIBS"
4799 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4800 echo "configure:4801: checking for XmuConvertStandardSelection in -lXmu" >&5
4801 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805 ac_save_LIBS="$LIBS"
4806 LIBS="-lXmu $LIBS"
4807 cat > conftest.$ac_ext <<EOF
4808 #line 4809 "configure"
4809 #include "confdefs.h"
4810 /* Override any gcc2 internal prototype to avoid an error. */
4811 /* We use char because int might match the return type of a gcc2
4812 builtin and then its argument prototype would still apply. */
4813 char XmuConvertStandardSelection();
4815 int main() {
4816 XmuConvertStandardSelection()
4817 ; return 0; }
4819 if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820 rm -rf conftest*
4821 eval "ac_cv_lib_$ac_lib_var=yes"
4822 else
4823 echo "configure: failed program was:" >&5
4824 cat conftest.$ac_ext >&5
4825 rm -rf conftest*
4826 eval "ac_cv_lib_$ac_lib_var=no"
4828 rm -f conftest*
4829 LIBS="$ac_save_LIBS"
4832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4833 echo "$ac_t""yes" 1>&6
4834 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4835 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4836 cat >> confdefs.h <<EOF
4837 #define $ac_tr_lib 1
4840 LIBS="-lXmu $LIBS"
4842 else
4843 echo "$ac_t""no" 1>&6
4846 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
4849 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
4850 if test "${HAVE_X11}" = "yes"; then
4851 if test "${USE_X_TOOLKIT}" != "none"; then
4852 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
4853 echo "configure:4854: checking for XShapeQueryExtension in -lXext" >&5
4854 ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
4855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858 ac_save_LIBS="$LIBS"
4859 LIBS="-lXext $LIBS"
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error. */
4864 /* We use char because int might match the return type of a gcc2
4865 builtin and then its argument prototype would still apply. */
4866 char XShapeQueryExtension();
4868 int main() {
4869 XShapeQueryExtension()
4870 ; return 0; }
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873 rm -rf conftest*
4874 eval "ac_cv_lib_$ac_lib_var=yes"
4875 else
4876 echo "configure: failed program was:" >&5
4877 cat conftest.$ac_ext >&5
4878 rm -rf conftest*
4879 eval "ac_cv_lib_$ac_lib_var=no"
4881 rm -f conftest*
4882 LIBS="$ac_save_LIBS"
4885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4886 echo "$ac_t""yes" 1>&6
4887 ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4888 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4889 cat >> confdefs.h <<EOF
4890 #define $ac_tr_lib 1
4893 LIBS="-lXext $LIBS"
4895 else
4896 echo "$ac_t""no" 1>&6
4902 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4903 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4904 echo "configure:4905: checking for Motif version 2.1" >&5
4905 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4906 echo $ac_n "(cached) $ac_c" 1>&6
4907 else
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 #include <Xm/Xm.h>
4912 int main() {
4913 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4914 int x = 5;
4915 #else
4916 Motif version prior to 2.1.
4917 #endif
4918 ; return 0; }
4920 if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4921 rm -rf conftest*
4922 emacs_cv_motif_version_2_1=yes
4923 else
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926 rm -rf conftest*
4927 emacs_cv_motif_version_2_1=no
4929 rm -f conftest*
4932 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4933 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4934 if test $emacs_cv_motif_version_2_1 = yes; then
4935 HAVE_LIBXP=no
4936 cat >> confdefs.h <<\EOF
4937 #define HAVE_MOTIF_2_1 1
4940 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4941 echo "configure:4942: checking for XpCreateContext in -lXp" >&5
4942 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4944 echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946 ac_save_LIBS="$LIBS"
4947 LIBS="-lXp $LIBS"
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 /* Override any gcc2 internal prototype to avoid an error. */
4952 /* We use char because int might match the return type of a gcc2
4953 builtin and then its argument prototype would still apply. */
4954 char XpCreateContext();
4956 int main() {
4957 XpCreateContext()
4958 ; return 0; }
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961 rm -rf conftest*
4962 eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964 echo "configure: failed program was:" >&5
4965 cat conftest.$ac_ext >&5
4966 rm -rf conftest*
4967 eval "ac_cv_lib_$ac_lib_var=no"
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974 echo "$ac_t""yes" 1>&6
4975 HAVE_LIBXP=yes
4976 else
4977 echo "$ac_t""no" 1>&6
4980 if test ${HAVE_LIBXP} = yes; then
4981 cat >> confdefs.h <<\EOF
4982 #define HAVE_LIBXP 1
4989 ### Is -lXaw3d available?
4990 HAVE_XAW3D=no
4991 if test "${HAVE_X11}" = "yes"; then
4992 if test "${USE_X_TOOLKIT}" != "none"; then
4993 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4994 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4995 echo "configure:4996: checking for X11/Xaw3d/Scrollbar.h" >&5
4996 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4997 echo $ac_n "(cached) $ac_c" 1>&6
4998 else
4999 cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5002 #include <X11/Xaw3d/Scrollbar.h>
5004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5005 { (eval echo configure:5006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5007 if test -z "$ac_err"; then
5008 rm -rf conftest*
5009 eval "ac_cv_header_$ac_safe=yes"
5010 else
5011 echo "$ac_err" >&5
5012 echo "configure: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5014 rm -rf conftest*
5015 eval "ac_cv_header_$ac_safe=no"
5017 rm -f conftest*
5019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5020 echo "$ac_t""yes" 1>&6
5021 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
5022 echo "configure:5023: checking for XawScrollbarSetThumb in -lXaw3d" >&5
5023 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
5024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5025 echo $ac_n "(cached) $ac_c" 1>&6
5026 else
5027 ac_save_LIBS="$LIBS"
5028 LIBS="-lXaw3d $LIBS"
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032 /* Override any gcc2 internal prototype to avoid an error. */
5033 /* We use char because int might match the return type of a gcc2
5034 builtin and then its argument prototype would still apply. */
5035 char XawScrollbarSetThumb();
5037 int main() {
5038 XawScrollbarSetThumb()
5039 ; return 0; }
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042 rm -rf conftest*
5043 eval "ac_cv_lib_$ac_lib_var=yes"
5044 else
5045 echo "configure: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5047 rm -rf conftest*
5048 eval "ac_cv_lib_$ac_lib_var=no"
5050 rm -f conftest*
5051 LIBS="$ac_save_LIBS"
5054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5055 echo "$ac_t""yes" 1>&6
5056 HAVE_XAW3D=yes
5057 else
5058 echo "$ac_t""no" 1>&6
5061 else
5062 echo "$ac_t""no" 1>&6
5065 if test "${HAVE_XAW3D}" = "yes"; then
5066 cat >> confdefs.h <<\EOF
5067 #define HAVE_XAW3D 1
5075 USE_TOOLKIT_SCROLL_BARS=no
5076 if test "${with_toolkit_scroll_bars}" != "no"; then
5077 if test "${USE_X_TOOLKIT}" != "none"; then
5078 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
5079 cat >> confdefs.h <<\EOF
5080 #define USE_TOOLKIT_SCROLL_BARS 1
5083 HAVE_XAW3D=no
5084 USE_TOOLKIT_SCROLL_BARS=yes
5085 elif test "${HAVE_XAW3D}" = "yes"; then
5086 cat >> confdefs.h <<\EOF
5087 #define USE_TOOLKIT_SCROLL_BARS 1
5090 USE_TOOLKIT_SCROLL_BARS=yes
5096 if test "${with_xim}" != "no"; then
5097 cat >> confdefs.h <<\EOF
5098 #define USE_XIM 1
5103 ### Use -lXpm if available, unless `--with-xpm=no'.
5104 HAVE_XPM=no
5105 if test "${HAVE_X11}" = "yes"; then
5106 if test "${with_xpm}" != "no"; then
5107 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
5108 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
5109 echo "configure:5110: checking for X11/xpm.h" >&5
5110 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5111 echo $ac_n "(cached) $ac_c" 1>&6
5112 else
5113 cat > conftest.$ac_ext <<EOF
5114 #line 5115 "configure"
5115 #include "confdefs.h"
5116 #include <X11/xpm.h>
5118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5119 { (eval echo configure:5120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5121 if test -z "$ac_err"; then
5122 rm -rf conftest*
5123 eval "ac_cv_header_$ac_safe=yes"
5124 else
5125 echo "$ac_err" >&5
5126 echo "configure: failed program was:" >&5
5127 cat conftest.$ac_ext >&5
5128 rm -rf conftest*
5129 eval "ac_cv_header_$ac_safe=no"
5131 rm -f conftest*
5133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5134 echo "$ac_t""yes" 1>&6
5135 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
5136 echo "configure:5137: checking for XpmReadFileToPixmap in -lXpm" >&5
5137 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
5138 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5139 echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141 ac_save_LIBS="$LIBS"
5142 LIBS="-lXpm -lX11 $LIBS"
5143 cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146 /* Override any gcc2 internal prototype to avoid an error. */
5147 /* We use char because int might match the return type of a gcc2
5148 builtin and then its argument prototype would still apply. */
5149 char XpmReadFileToPixmap();
5151 int main() {
5152 XpmReadFileToPixmap()
5153 ; return 0; }
5155 if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5156 rm -rf conftest*
5157 eval "ac_cv_lib_$ac_lib_var=yes"
5158 else
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 eval "ac_cv_lib_$ac_lib_var=no"
5164 rm -f conftest*
5165 LIBS="$ac_save_LIBS"
5168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5169 echo "$ac_t""yes" 1>&6
5170 HAVE_XPM=yes
5171 else
5172 echo "$ac_t""no" 1>&6
5175 else
5176 echo "$ac_t""no" 1>&6
5179 if test "${HAVE_XPM}" = "yes"; then
5180 echo $ac_n "checking for XpmReturnAllocPixels preprocessor define""... $ac_c" 1>&6
5181 echo "configure:5182: checking for XpmReturnAllocPixels preprocessor define" >&5
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 #include "X11/xpm.h"
5186 #ifndef XpmReturnAllocPixels
5187 no_return_alloc_pixels
5188 #endif
5191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5192 egrep "no_return_alloc_pixels" >/dev/null 2>&1; then
5193 rm -rf conftest*
5194 HAVE_XPM=no
5195 else
5196 rm -rf conftest*
5197 HAVE_XPM=yes
5199 rm -f conftest*
5202 if test "${HAVE_XPM}" = "yes"; then
5203 echo "$ac_t""yes" 1>&6
5204 else
5205 echo "$ac_t""no" 1>&6
5210 if test "${HAVE_XPM}" = "yes"; then
5211 cat >> confdefs.h <<\EOF
5212 #define HAVE_XPM 1
5218 ### Use -ljpeg if available, unless `--with-jpeg=no'.
5219 HAVE_JPEG=no
5220 if test "${HAVE_X11}" = "yes"; then
5221 if test "${with_jpeg}" != "no"; then
5222 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
5223 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
5224 echo "configure:5225: checking for jerror.h" >&5
5225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5226 echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 #include <jerror.h>
5233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5234 { (eval echo configure:5235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5236 if test -z "$ac_err"; then
5237 rm -rf conftest*
5238 eval "ac_cv_header_$ac_safe=yes"
5239 else
5240 echo "$ac_err" >&5
5241 echo "configure: failed program was:" >&5
5242 cat conftest.$ac_ext >&5
5243 rm -rf conftest*
5244 eval "ac_cv_header_$ac_safe=no"
5246 rm -f conftest*
5248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5249 echo "$ac_t""yes" 1>&6
5250 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
5251 echo "configure:5252: checking for jpeg_destroy_compress in -ljpeg" >&5
5252 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
5253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5254 echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256 ac_save_LIBS="$LIBS"
5257 LIBS="-ljpeg $LIBS"
5258 cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261 /* Override any gcc2 internal prototype to avoid an error. */
5262 /* We use char because int might match the return type of a gcc2
5263 builtin and then its argument prototype would still apply. */
5264 char jpeg_destroy_compress();
5266 int main() {
5267 jpeg_destroy_compress()
5268 ; return 0; }
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271 rm -rf conftest*
5272 eval "ac_cv_lib_$ac_lib_var=yes"
5273 else
5274 echo "configure: failed program was:" >&5
5275 cat conftest.$ac_ext >&5
5276 rm -rf conftest*
5277 eval "ac_cv_lib_$ac_lib_var=no"
5279 rm -f conftest*
5280 LIBS="$ac_save_LIBS"
5283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5284 echo "$ac_t""yes" 1>&6
5285 HAVE_JPEG=yes
5286 else
5287 echo "$ac_t""no" 1>&6
5290 else
5291 echo "$ac_t""no" 1>&6
5296 if test "${HAVE_JPEG}" = "yes"; then
5297 cat >> confdefs.h <<\EOF
5298 #define HAVE_JPEG 1
5304 ### Use -lpng if available, unless `--with-png=no'.
5305 HAVE_PNG=no
5306 if test "${HAVE_X11}" = "yes"; then
5307 if test "${with_png}" != "no"; then
5308 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
5309 echo $ac_n "checking for png.h""... $ac_c" 1>&6
5310 echo "configure:5311: checking for png.h" >&5
5311 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5312 echo $ac_n "(cached) $ac_c" 1>&6
5313 else
5314 cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317 #include <png.h>
5319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5320 { (eval echo configure:5321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5322 if test -z "$ac_err"; then
5323 rm -rf conftest*
5324 eval "ac_cv_header_$ac_safe=yes"
5325 else
5326 echo "$ac_err" >&5
5327 echo "configure: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
5329 rm -rf conftest*
5330 eval "ac_cv_header_$ac_safe=no"
5332 rm -f conftest*
5334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5335 echo "$ac_t""yes" 1>&6
5336 echo $ac_n "checking for png_get_channels in -lpng""... $ac_c" 1>&6
5337 echo "configure:5338: checking for png_get_channels in -lpng" >&5
5338 ac_lib_var=`echo png'_'png_get_channels | sed 'y%./+-%__p_%'`
5339 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342 ac_save_LIBS="$LIBS"
5343 LIBS="-lpng -lz -lm $LIBS"
5344 cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 /* Override any gcc2 internal prototype to avoid an error. */
5348 /* We use char because int might match the return type of a gcc2
5349 builtin and then its argument prototype would still apply. */
5350 char png_get_channels();
5352 int main() {
5353 png_get_channels()
5354 ; return 0; }
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5357 rm -rf conftest*
5358 eval "ac_cv_lib_$ac_lib_var=yes"
5359 else
5360 echo "configure: failed program was:" >&5
5361 cat conftest.$ac_ext >&5
5362 rm -rf conftest*
5363 eval "ac_cv_lib_$ac_lib_var=no"
5365 rm -f conftest*
5366 LIBS="$ac_save_LIBS"
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5370 echo "$ac_t""yes" 1>&6
5371 HAVE_PNG=yes
5372 else
5373 echo "$ac_t""no" 1>&6
5376 else
5377 echo "$ac_t""no" 1>&6
5382 if test "${HAVE_PNG}" = "yes"; then
5383 cat >> confdefs.h <<\EOF
5384 #define HAVE_PNG 1
5390 ### Use -ltiff if available, unless `--with-tiff=no'.
5391 HAVE_TIFF=no
5392 if test "${HAVE_X11}" = "yes"; then
5393 if test "${with_tiff}" != "no"; then
5394 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
5395 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
5396 echo "configure:5397: checking for tiffio.h" >&5
5397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5398 echo $ac_n "(cached) $ac_c" 1>&6
5399 else
5400 cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 #include <tiffio.h>
5405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5406 { (eval echo configure:5407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5408 if test -z "$ac_err"; then
5409 rm -rf conftest*
5410 eval "ac_cv_header_$ac_safe=yes"
5411 else
5412 echo "$ac_err" >&5
5413 echo "configure: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5415 rm -rf conftest*
5416 eval "ac_cv_header_$ac_safe=no"
5418 rm -f conftest*
5420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5421 echo "$ac_t""yes" 1>&6
5422 tifflibs="-lz -lm"
5423 # At least one tiff package requires the jpeg library.
5424 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
5425 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
5426 echo "configure:5427: checking for TIFFGetVersion in -ltiff" >&5
5427 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
5428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5429 echo $ac_n "(cached) $ac_c" 1>&6
5430 else
5431 ac_save_LIBS="$LIBS"
5432 LIBS="-ltiff $tifflibs $LIBS"
5433 cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* Override any gcc2 internal prototype to avoid an error. */
5437 /* We use char because int might match the return type of a gcc2
5438 builtin and then its argument prototype would still apply. */
5439 char TIFFGetVersion();
5441 int main() {
5442 TIFFGetVersion()
5443 ; return 0; }
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446 rm -rf conftest*
5447 eval "ac_cv_lib_$ac_lib_var=yes"
5448 else
5449 echo "configure: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451 rm -rf conftest*
5452 eval "ac_cv_lib_$ac_lib_var=no"
5454 rm -f conftest*
5455 LIBS="$ac_save_LIBS"
5458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5459 echo "$ac_t""yes" 1>&6
5460 HAVE_TIFF=yes
5461 else
5462 echo "$ac_t""no" 1>&6
5465 else
5466 echo "$ac_t""no" 1>&6
5471 if test "${HAVE_TIFF}" = "yes"; then
5472 cat >> confdefs.h <<\EOF
5473 #define HAVE_TIFF 1
5479 ### Use -lgif if available, unless `--with-gif=no'.
5480 HAVE_GIF=no
5481 if test "${HAVE_X11}" = "yes"; then
5482 if test "${with_gif}" != "no"; then
5483 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
5484 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
5485 echo "configure:5486: checking for gif_lib.h" >&5
5486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5487 echo $ac_n "(cached) $ac_c" 1>&6
5488 else
5489 cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 #include <gif_lib.h>
5494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5495 { (eval echo configure:5496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5497 if test -z "$ac_err"; then
5498 rm -rf conftest*
5499 eval "ac_cv_header_$ac_safe=yes"
5500 else
5501 echo "$ac_err" >&5
5502 echo "configure: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 rm -rf conftest*
5505 eval "ac_cv_header_$ac_safe=no"
5507 rm -f conftest*
5509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5510 echo "$ac_t""yes" 1>&6
5511 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
5512 echo "configure:5513: checking for DGifOpen in -lungif" >&5
5513 ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
5514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 ac_save_LIBS="$LIBS"
5518 LIBS="-lungif $LIBS"
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 /* Override any gcc2 internal prototype to avoid an error. */
5523 /* We use char because int might match the return type of a gcc2
5524 builtin and then its argument prototype would still apply. */
5525 char DGifOpen();
5527 int main() {
5528 DGifOpen()
5529 ; return 0; }
5531 if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532 rm -rf conftest*
5533 eval "ac_cv_lib_$ac_lib_var=yes"
5534 else
5535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5537 rm -rf conftest*
5538 eval "ac_cv_lib_$ac_lib_var=no"
5540 rm -f conftest*
5541 LIBS="$ac_save_LIBS"
5544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5545 echo "$ac_t""yes" 1>&6
5546 HAVE_GIF=yes
5547 else
5548 echo "$ac_t""no" 1>&6
5551 else
5552 echo "$ac_t""no" 1>&6
5557 if test "${HAVE_GIF}" = "yes"; then
5558 cat >> confdefs.h <<\EOF
5559 #define HAVE_GIF 1
5565 # If netdb.h doesn't declare h_errno, we must declare it by hand.
5566 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
5567 echo "configure:5568: checking whether netdb declares h_errno" >&5
5568 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
5569 echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571 cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 #include <netdb.h>
5575 int main() {
5576 return h_errno;
5577 ; return 0; }
5579 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5580 rm -rf conftest*
5581 emacs_cv_netdb_declares_h_errno=yes
5582 else
5583 echo "configure: failed program was:" >&5
5584 cat conftest.$ac_ext >&5
5585 rm -rf conftest*
5586 emacs_cv_netdb_declares_h_errno=no
5588 rm -f conftest*
5591 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
5592 if test $emacs_cv_netdb_declares_h_errno = yes; then
5593 cat >> confdefs.h <<\EOF
5594 #define HAVE_H_ERRNO 1
5599 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5600 # for constant arguments. Useless!
5601 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5602 echo "configure:5603: checking for working alloca.h" >&5
5603 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5604 echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 #include <alloca.h>
5610 int main() {
5611 char *p = alloca(2 * sizeof(int));
5612 ; return 0; }
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615 rm -rf conftest*
5616 ac_cv_header_alloca_h=yes
5617 else
5618 echo "configure: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 rm -rf conftest*
5621 ac_cv_header_alloca_h=no
5623 rm -f conftest*
5626 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5627 if test $ac_cv_header_alloca_h = yes; then
5628 cat >> confdefs.h <<\EOF
5629 #define HAVE_ALLOCA_H 1
5634 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5635 echo "configure:5636: checking for alloca" >&5
5636 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5637 echo $ac_n "(cached) $ac_c" 1>&6
5638 else
5639 cat > conftest.$ac_ext <<EOF
5640 #line 5641 "configure"
5641 #include "confdefs.h"
5643 #ifdef __GNUC__
5644 # define alloca __builtin_alloca
5645 #else
5646 # ifdef _MSC_VER
5647 # include <malloc.h>
5648 # define alloca _alloca
5649 # else
5650 # if HAVE_ALLOCA_H
5651 # include <alloca.h>
5652 # else
5653 # ifdef _AIX
5654 #pragma alloca
5655 # else
5656 # ifndef alloca /* predefined by HP cc +Olibcalls */
5657 char *alloca ();
5658 # endif
5659 # endif
5660 # endif
5661 # endif
5662 #endif
5664 int main() {
5665 char *p = (char *) alloca(1);
5666 ; return 0; }
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669 rm -rf conftest*
5670 ac_cv_func_alloca_works=yes
5671 else
5672 echo "configure: failed program was:" >&5
5673 cat conftest.$ac_ext >&5
5674 rm -rf conftest*
5675 ac_cv_func_alloca_works=no
5677 rm -f conftest*
5680 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5681 if test $ac_cv_func_alloca_works = yes; then
5682 cat >> confdefs.h <<\EOF
5683 #define HAVE_ALLOCA 1
5688 if test $ac_cv_func_alloca_works = no; then
5689 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5690 # that cause trouble. Some versions do not even contain alloca or
5691 # contain a buggy version. If you still want to use their alloca,
5692 # use ar to extract alloca.o from them instead of compiling alloca.c.
5693 ALLOCA=alloca.${ac_objext}
5694 cat >> confdefs.h <<\EOF
5695 #define C_ALLOCA 1
5699 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5700 echo "configure:5701: checking whether alloca needs Cray hooks" >&5
5701 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5702 echo $ac_n "(cached) $ac_c" 1>&6
5703 else
5704 cat > conftest.$ac_ext <<EOF
5705 #line 5706 "configure"
5706 #include "confdefs.h"
5707 #if defined(CRAY) && ! defined(CRAY2)
5708 webecray
5709 #else
5710 wenotbecray
5711 #endif
5714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5715 egrep "webecray" >/dev/null 2>&1; then
5716 rm -rf conftest*
5717 ac_cv_os_cray=yes
5718 else
5719 rm -rf conftest*
5720 ac_cv_os_cray=no
5722 rm -f conftest*
5726 echo "$ac_t""$ac_cv_os_cray" 1>&6
5727 if test $ac_cv_os_cray = yes; then
5728 for ac_func in _getb67 GETB67 getb67; do
5729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5730 echo "configure:5731: checking for $ac_func" >&5
5731 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5732 echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734 cat > conftest.$ac_ext <<EOF
5735 #line 5736 "configure"
5736 #include "confdefs.h"
5737 /* System header to define __stub macros and hopefully few prototypes,
5738 which can conflict with char $ac_func(); below. */
5739 #include <assert.h>
5740 /* Override any gcc2 internal prototype to avoid an error. */
5741 /* We use char because int might match the return type of a gcc2
5742 builtin and then its argument prototype would still apply. */
5743 char $ac_func();
5745 int main() {
5747 /* The GNU C library defines this for functions which it implements
5748 to always fail with ENOSYS. Some functions are actually named
5749 something starting with __ and the normal name is an alias. */
5750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5751 choke me
5752 #else
5753 $ac_func();
5754 #endif
5756 ; return 0; }
5758 if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5759 rm -rf conftest*
5760 eval "ac_cv_func_$ac_func=yes"
5761 else
5762 echo "configure: failed program was:" >&5
5763 cat conftest.$ac_ext >&5
5764 rm -rf conftest*
5765 eval "ac_cv_func_$ac_func=no"
5767 rm -f conftest*
5770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5771 echo "$ac_t""yes" 1>&6
5772 cat >> confdefs.h <<EOF
5773 #define CRAY_STACKSEG_END $ac_func
5776 break
5777 else
5778 echo "$ac_t""no" 1>&6
5781 done
5784 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5785 echo "configure:5786: checking stack direction for C alloca" >&5
5786 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5787 echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789 if test "$cross_compiling" = yes; then
5790 ac_cv_c_stack_direction=0
5791 else
5792 cat > conftest.$ac_ext <<EOF
5793 #line 5794 "configure"
5794 #include "confdefs.h"
5795 find_stack_direction ()
5797 static char *addr = 0;
5798 auto char dummy;
5799 if (addr == 0)
5801 addr = &dummy;
5802 return find_stack_direction ();
5804 else
5805 return (&dummy > addr) ? 1 : -1;
5807 main ()
5809 exit (find_stack_direction() < 0);
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5813 then
5814 ac_cv_c_stack_direction=1
5815 else
5816 echo "configure: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 rm -fr conftest*
5819 ac_cv_c_stack_direction=-1
5821 rm -fr conftest*
5826 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5827 cat >> confdefs.h <<EOF
5828 #define STACK_DIRECTION $ac_cv_c_stack_direction
5834 # fmod, logb, and frexp are found in -lm on most systems.
5835 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5836 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5837 echo "configure:5838: checking for sqrt in -lm" >&5
5838 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5839 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5840 echo $ac_n "(cached) $ac_c" 1>&6
5841 else
5842 ac_save_LIBS="$LIBS"
5843 LIBS="-lm $LIBS"
5844 cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 /* Override any gcc2 internal prototype to avoid an error. */
5848 /* We use char because int might match the return type of a gcc2
5849 builtin and then its argument prototype would still apply. */
5850 char sqrt();
5852 int main() {
5853 sqrt()
5854 ; return 0; }
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857 rm -rf conftest*
5858 eval "ac_cv_lib_$ac_lib_var=yes"
5859 else
5860 echo "configure: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 rm -rf conftest*
5863 eval "ac_cv_lib_$ac_lib_var=no"
5865 rm -f conftest*
5866 LIBS="$ac_save_LIBS"
5869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5870 echo "$ac_t""yes" 1>&6
5871 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5872 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5873 cat >> confdefs.h <<EOF
5874 #define $ac_tr_lib 1
5877 LIBS="-lm $LIBS"
5879 else
5880 echo "$ac_t""no" 1>&6
5884 # Check for mail-locking functions in a "mail" library
5885 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5886 echo "configure:5887: checking for maillock in -lmail" >&5
5887 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5889 echo $ac_n "(cached) $ac_c" 1>&6
5890 else
5891 ac_save_LIBS="$LIBS"
5892 LIBS="-lmail $LIBS"
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5896 /* Override any gcc2 internal prototype to avoid an error. */
5897 /* We use char because int might match the return type of a gcc2
5898 builtin and then its argument prototype would still apply. */
5899 char maillock();
5901 int main() {
5902 maillock()
5903 ; return 0; }
5905 if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5906 rm -rf conftest*
5907 eval "ac_cv_lib_$ac_lib_var=yes"
5908 else
5909 echo "configure: failed program was:" >&5
5910 cat conftest.$ac_ext >&5
5911 rm -rf conftest*
5912 eval "ac_cv_lib_$ac_lib_var=no"
5914 rm -f conftest*
5915 LIBS="$ac_save_LIBS"
5918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5919 echo "$ac_t""yes" 1>&6
5920 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5921 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5922 cat >> confdefs.h <<EOF
5923 #define $ac_tr_lib 1
5926 LIBS="-lmail $LIBS"
5928 else
5929 echo "$ac_t""no" 1>&6
5932 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5933 echo "configure:5934: checking for maillock in -llockfile" >&5
5934 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5936 echo $ac_n "(cached) $ac_c" 1>&6
5937 else
5938 ac_save_LIBS="$LIBS"
5939 LIBS="-llockfile $LIBS"
5940 cat > conftest.$ac_ext <<EOF
5941 #line 5942 "configure"
5942 #include "confdefs.h"
5943 /* Override any gcc2 internal prototype to avoid an error. */
5944 /* We use char because int might match the return type of a gcc2
5945 builtin and then its argument prototype would still apply. */
5946 char maillock();
5948 int main() {
5949 maillock()
5950 ; return 0; }
5952 if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953 rm -rf conftest*
5954 eval "ac_cv_lib_$ac_lib_var=yes"
5955 else
5956 echo "configure: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
5958 rm -rf conftest*
5959 eval "ac_cv_lib_$ac_lib_var=no"
5961 rm -f conftest*
5962 LIBS="$ac_save_LIBS"
5965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5966 echo "$ac_t""yes" 1>&6
5967 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5968 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5969 cat >> confdefs.h <<EOF
5970 #define $ac_tr_lib 1
5973 LIBS="-llockfile $LIBS"
5975 else
5976 echo "$ac_t""no" 1>&6
5979 # If we have the shared liblockfile, assume we must use it for mail
5980 # locking (e.g. Debian). If we couldn't link against liblockfile
5981 # (no liblockfile.a installed), ensure that we don't need to.
5982 if test "$ac_cv_lib_lockfile_maillock" = no; then
5983 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5984 set dummy liblockfile.so; ac_word=$2
5985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5986 echo "configure:5987: checking for $ac_word" >&5
5987 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5988 echo $ac_n "(cached) $ac_c" 1>&6
5989 else
5990 if test -n "$liblockfile"; then
5991 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5992 else
5993 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5994 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5995 for ac_dir in $ac_dummy; do
5996 test -z "$ac_dir" && ac_dir=.
5997 if test -f $ac_dir/$ac_word; then
5998 ac_cv_prog_liblockfile="yes"
5999 break
6001 done
6002 IFS="$ac_save_ifs"
6003 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
6006 liblockfile="$ac_cv_prog_liblockfile"
6007 if test -n "$liblockfile"; then
6008 echo "$ac_t""$liblockfile" 1>&6
6009 else
6010 echo "$ac_t""no" 1>&6
6013 if test $ac_cv_prog_liblockfile = yes; then
6014 { echo "configure: error: Shared liblockfile found but can't link against it.
6015 This probably means that movemail could lose mail.
6016 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
6017 else cat >> confdefs.h <<\EOF
6018 #define LIBMAIL -llockfile
6022 else :
6024 for ac_func in touchlock
6026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6027 echo "configure:6028: checking for $ac_func" >&5
6028 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 /* System header to define __stub macros and hopefully few prototypes,
6035 which can conflict with char $ac_func(); below. */
6036 #include <assert.h>
6037 /* Override any gcc2 internal prototype to avoid an error. */
6038 /* We use char because int might match the return type of a gcc2
6039 builtin and then its argument prototype would still apply. */
6040 char $ac_func();
6042 int main() {
6044 /* The GNU C library defines this for functions which it implements
6045 to always fail with ENOSYS. Some functions are actually named
6046 something starting with __ and the normal name is an alias. */
6047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6048 choke me
6049 #else
6050 $ac_func();
6051 #endif
6053 ; return 0; }
6055 if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6056 rm -rf conftest*
6057 eval "ac_cv_func_$ac_func=yes"
6058 else
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 rm -rf conftest*
6062 eval "ac_cv_func_$ac_func=no"
6064 rm -f conftest*
6067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6068 echo "$ac_t""yes" 1>&6
6069 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6070 cat >> confdefs.h <<EOF
6071 #define $ac_tr_func 1
6074 else
6075 echo "$ac_t""no" 1>&6
6077 done
6079 for ac_hdr in maillock.h
6081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6083 echo "configure:6084: checking for $ac_hdr" >&5
6084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6086 else
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 #include <$ac_hdr>
6092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6093 { (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6095 if test -z "$ac_err"; then
6096 rm -rf conftest*
6097 eval "ac_cv_header_$ac_safe=yes"
6098 else
6099 echo "$ac_err" >&5
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
6103 eval "ac_cv_header_$ac_safe=no"
6105 rm -f conftest*
6107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6108 echo "$ac_t""yes" 1>&6
6109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6110 cat >> confdefs.h <<EOF
6111 #define $ac_tr_hdr 1
6114 else
6115 echo "$ac_t""no" 1>&6
6117 done
6120 for ac_func in gethostname getdomainname dup2 \
6121 rename closedir mkdir rmdir sysinfo \
6122 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
6123 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
6124 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
6125 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
6126 gai_strerror mkstemp
6128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6129 echo "configure:6130: checking for $ac_func" >&5
6130 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6131 echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 /* System header to define __stub macros and hopefully few prototypes,
6137 which can conflict with char $ac_func(); below. */
6138 #include <assert.h>
6139 /* Override any gcc2 internal prototype to avoid an error. */
6140 /* We use char because int might match the return type of a gcc2
6141 builtin and then its argument prototype would still apply. */
6142 char $ac_func();
6144 int main() {
6146 /* The GNU C library defines this for functions which it implements
6147 to always fail with ENOSYS. Some functions are actually named
6148 something starting with __ and the normal name is an alias. */
6149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6150 choke me
6151 #else
6152 $ac_func();
6153 #endif
6155 ; return 0; }
6157 if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6158 rm -rf conftest*
6159 eval "ac_cv_func_$ac_func=yes"
6160 else
6161 echo "configure: failed program was:" >&5
6162 cat conftest.$ac_ext >&5
6163 rm -rf conftest*
6164 eval "ac_cv_func_$ac_func=no"
6166 rm -f conftest*
6169 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6170 echo "$ac_t""yes" 1>&6
6171 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6172 cat >> confdefs.h <<EOF
6173 #define $ac_tr_func 1
6176 else
6177 echo "$ac_t""no" 1>&6
6179 done
6182 for ac_hdr in sys/time.h unistd.h
6184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6186 echo "configure:6187: checking for $ac_hdr" >&5
6187 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 #include <$ac_hdr>
6195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6196 { (eval echo configure:6197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6198 if test -z "$ac_err"; then
6199 rm -rf conftest*
6200 eval "ac_cv_header_$ac_safe=yes"
6201 else
6202 echo "$ac_err" >&5
6203 echo "configure: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 rm -rf conftest*
6206 eval "ac_cv_header_$ac_safe=no"
6208 rm -f conftest*
6210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6211 echo "$ac_t""yes" 1>&6
6212 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6213 cat >> confdefs.h <<EOF
6214 #define $ac_tr_hdr 1
6217 else
6218 echo "$ac_t""no" 1>&6
6220 done
6222 for ac_func in alarm
6224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6225 echo "configure:6226: checking for $ac_func" >&5
6226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6227 echo $ac_n "(cached) $ac_c" 1>&6
6228 else
6229 cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6232 /* System header to define __stub macros and hopefully few prototypes,
6233 which can conflict with char $ac_func(); below. */
6234 #include <assert.h>
6235 /* Override any gcc2 internal prototype to avoid an error. */
6236 /* We use char because int might match the return type of a gcc2
6237 builtin and then its argument prototype would still apply. */
6238 char $ac_func();
6240 int main() {
6242 /* The GNU C library defines this for functions which it implements
6243 to always fail with ENOSYS. Some functions are actually named
6244 something starting with __ and the normal name is an alias. */
6245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6246 choke me
6247 #else
6248 $ac_func();
6249 #endif
6251 ; return 0; }
6253 if { (eval echo configure:6254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6254 rm -rf conftest*
6255 eval "ac_cv_func_$ac_func=yes"
6256 else
6257 echo "configure: failed program was:" >&5
6258 cat conftest.$ac_ext >&5
6259 rm -rf conftest*
6260 eval "ac_cv_func_$ac_func=no"
6262 rm -f conftest*
6265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6266 echo "$ac_t""yes" 1>&6
6267 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6268 cat >> confdefs.h <<EOF
6269 #define $ac_tr_func 1
6272 else
6273 echo "$ac_t""no" 1>&6
6275 done
6277 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
6278 echo "configure:6279: checking for working mktime" >&5
6279 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
6280 echo $ac_n "(cached) $ac_c" 1>&6
6281 else
6282 if test "$cross_compiling" = yes; then
6283 ac_cv_func_working_mktime=no
6284 else
6285 cat > conftest.$ac_ext <<EOF
6286 #line 6287 "configure"
6287 #include "confdefs.h"
6288 /* Test program from Paul Eggert (eggert@twinsun.com)
6289 and Tony Leneis (tony@plaza.ds.adp.com). */
6290 #if TIME_WITH_SYS_TIME
6291 # include <sys/time.h>
6292 # include <time.h>
6293 #else
6294 # if HAVE_SYS_TIME_H
6295 # include <sys/time.h>
6296 # else
6297 # include <time.h>
6298 # endif
6299 #endif
6301 #if HAVE_UNISTD_H
6302 # include <unistd.h>
6303 #endif
6305 #if !HAVE_ALARM
6306 # define alarm(X) /* empty */
6307 #endif
6309 /* Work around redefinition to rpl_putenv by other config tests. */
6310 #undef putenv
6312 static time_t time_t_max;
6314 /* Values we'll use to set the TZ environment variable. */
6315 static const char *const tz_strings[] = {
6316 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
6317 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
6319 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
6321 /* Fail if mktime fails to convert a date in the spring-forward gap.
6322 Based on a problem report from Andreas Jaeger. */
6323 static void
6324 spring_forward_gap ()
6326 /* glibc (up to about 1998-10-07) failed this test) */
6327 struct tm tm;
6329 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
6330 instead of "TZ=America/Vancouver" in order to detect the bug even
6331 on systems that don't support the Olson extension, or don't have the
6332 full zoneinfo tables installed. */
6333 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
6335 tm.tm_year = 98;
6336 tm.tm_mon = 3;
6337 tm.tm_mday = 5;
6338 tm.tm_hour = 2;
6339 tm.tm_min = 0;
6340 tm.tm_sec = 0;
6341 tm.tm_isdst = -1;
6342 if (mktime (&tm) == (time_t)-1)
6343 exit (1);
6346 static void
6347 mktime_test (now)
6348 time_t now;
6350 struct tm *lt;
6351 if ((lt = localtime (&now)) && mktime (lt) != now)
6352 exit (1);
6353 now = time_t_max - now;
6354 if ((lt = localtime (&now)) && mktime (lt) != now)
6355 exit (1);
6358 static void
6359 irix_6_4_bug ()
6361 /* Based on code from Ariel Faigon. */
6362 struct tm tm;
6363 tm.tm_year = 96;
6364 tm.tm_mon = 3;
6365 tm.tm_mday = 0;
6366 tm.tm_hour = 0;
6367 tm.tm_min = 0;
6368 tm.tm_sec = 0;
6369 tm.tm_isdst = -1;
6370 mktime (&tm);
6371 if (tm.tm_mon != 2 || tm.tm_mday != 31)
6372 exit (1);
6375 static void
6376 bigtime_test (j)
6377 int j;
6379 struct tm tm;
6380 time_t now;
6381 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
6382 now = mktime (&tm);
6383 if (now != (time_t) -1)
6385 struct tm *lt = localtime (&now);
6386 if (! (lt
6387 && lt->tm_year == tm.tm_year
6388 && lt->tm_mon == tm.tm_mon
6389 && lt->tm_mday == tm.tm_mday
6390 && lt->tm_hour == tm.tm_hour
6391 && lt->tm_min == tm.tm_min
6392 && lt->tm_sec == tm.tm_sec
6393 && lt->tm_yday == tm.tm_yday
6394 && lt->tm_wday == tm.tm_wday
6395 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
6396 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
6397 exit (1);
6402 main ()
6404 time_t t, delta;
6405 int i, j;
6407 /* This test makes some buggy mktime implementations loop.
6408 Give up after 60 seconds; a mktime slower than that
6409 isn't worth using anyway. */
6410 alarm (60);
6412 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
6413 continue;
6414 time_t_max--;
6415 delta = time_t_max / 997; /* a suitable prime number */
6416 for (i = 0; i < N_STRINGS; i++)
6418 if (tz_strings[i])
6419 putenv (tz_strings[i]);
6421 for (t = 0; t <= time_t_max - delta; t += delta)
6422 mktime_test (t);
6423 mktime_test ((time_t) 60 * 60);
6424 mktime_test ((time_t) 60 * 60 * 24);
6426 for (j = 1; 0 < j; j *= 2)
6427 bigtime_test (j);
6428 bigtime_test (j - 1);
6430 irix_6_4_bug ();
6431 spring_forward_gap ();
6432 exit (0);
6435 if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6436 then
6437 ac_cv_func_working_mktime=yes
6438 else
6439 echo "configure: failed program was:" >&5
6440 cat conftest.$ac_ext >&5
6441 rm -fr conftest*
6442 ac_cv_func_working_mktime=no
6444 rm -fr conftest*
6449 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
6450 if test $ac_cv_func_working_mktime = no; then
6451 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
6454 if test "$ac_cv_func_working_mktime" = no; then
6455 cat >> confdefs.h <<\EOF
6456 #define BROKEN_MKTIME 1
6461 ac_have_func=no # yes means we've found a way to get the load average.
6463 # Some systems have getloadavg without any extra libraries.
6464 echo $ac_n "checking for getloadavg""... $ac_c" 1>&6
6465 echo "configure:6466: checking for getloadavg" >&5
6466 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then
6467 echo $ac_n "(cached) $ac_c" 1>&6
6468 else
6469 cat > conftest.$ac_ext <<EOF
6470 #line 6471 "configure"
6471 #include "confdefs.h"
6472 /* System header to define __stub macros and hopefully few prototypes,
6473 which can conflict with char getloadavg(); below. */
6474 #include <assert.h>
6475 /* Override any gcc2 internal prototype to avoid an error. */
6476 /* We use char because int might match the return type of a gcc2
6477 builtin and then its argument prototype would still apply. */
6478 char getloadavg();
6480 int main() {
6482 /* The GNU C library defines this for functions which it implements
6483 to always fail with ENOSYS. Some functions are actually named
6484 something starting with __ and the normal name is an alias. */
6485 #if defined (__stub_getloadavg) || defined (__stub___getloadavg)
6486 choke me
6487 #else
6488 getloadavg();
6489 #endif
6491 ; return 0; }
6493 if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6494 rm -rf conftest*
6495 eval "ac_cv_func_getloadavg=yes"
6496 else
6497 echo "configure: failed program was:" >&5
6498 cat conftest.$ac_ext >&5
6499 rm -rf conftest*
6500 eval "ac_cv_func_getloadavg=no"
6502 rm -f conftest*
6505 if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then
6506 echo "$ac_t""yes" 1>&6
6507 ac_have_func=yes
6508 else
6509 echo "$ac_t""no" 1>&6
6513 if test $ac_have_func = no; then
6514 # Some systems with -lutil have (and need) -lkvm as well, some do not.
6515 # On Solaris, -lkvm requires nlist from -lelf, so check that first
6516 # to get the right answer into the cache.
6517 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
6518 echo "configure:6519: checking for elf_begin in -lelf" >&5
6519 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
6520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6521 echo $ac_n "(cached) $ac_c" 1>&6
6522 else
6523 ac_save_LIBS="$LIBS"
6524 LIBS="-lelf $LIBS"
6525 cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528 /* Override any gcc2 internal prototype to avoid an error. */
6529 /* We use char because int might match the return type of a gcc2
6530 builtin and then its argument prototype would still apply. */
6531 char elf_begin();
6533 int main() {
6534 elf_begin()
6535 ; return 0; }
6537 if { (eval echo configure:6538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6538 rm -rf conftest*
6539 eval "ac_cv_lib_$ac_lib_var=yes"
6540 else
6541 echo "configure: failed program was:" >&5
6542 cat conftest.$ac_ext >&5
6543 rm -rf conftest*
6544 eval "ac_cv_lib_$ac_lib_var=no"
6546 rm -f conftest*
6547 LIBS="$ac_save_LIBS"
6550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6551 echo "$ac_t""yes" 1>&6
6552 LIBS="-lelf $LIBS"
6553 else
6554 echo "$ac_t""no" 1>&6
6557 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
6558 echo "configure:6559: checking for kvm_open in -lkvm" >&5
6559 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
6560 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6561 echo $ac_n "(cached) $ac_c" 1>&6
6562 else
6563 ac_save_LIBS="$LIBS"
6564 LIBS="-lkvm $LIBS"
6565 cat > conftest.$ac_ext <<EOF
6566 #line 6567 "configure"
6567 #include "confdefs.h"
6568 /* Override any gcc2 internal prototype to avoid an error. */
6569 /* We use char because int might match the return type of a gcc2
6570 builtin and then its argument prototype would still apply. */
6571 char kvm_open();
6573 int main() {
6574 kvm_open()
6575 ; return 0; }
6577 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6578 rm -rf conftest*
6579 eval "ac_cv_lib_$ac_lib_var=yes"
6580 else
6581 echo "configure: failed program was:" >&5
6582 cat conftest.$ac_ext >&5
6583 rm -rf conftest*
6584 eval "ac_cv_lib_$ac_lib_var=no"
6586 rm -f conftest*
6587 LIBS="$ac_save_LIBS"
6590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6591 echo "$ac_t""yes" 1>&6
6592 LIBS="-lkvm $LIBS"
6593 else
6594 echo "$ac_t""no" 1>&6
6597 # Check for the 4.4BSD definition of getloadavg.
6598 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
6599 echo "configure:6600: checking for getloadavg in -lutil" >&5
6600 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
6601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6602 echo $ac_n "(cached) $ac_c" 1>&6
6603 else
6604 ac_save_LIBS="$LIBS"
6605 LIBS="-lutil $LIBS"
6606 cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* Override any gcc2 internal prototype to avoid an error. */
6610 /* We use char because int might match the return type of a gcc2
6611 builtin and then its argument prototype would still apply. */
6612 char getloadavg();
6614 int main() {
6615 getloadavg()
6616 ; return 0; }
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619 rm -rf conftest*
6620 eval "ac_cv_lib_$ac_lib_var=yes"
6621 else
6622 echo "configure: failed program was:" >&5
6623 cat conftest.$ac_ext >&5
6624 rm -rf conftest*
6625 eval "ac_cv_lib_$ac_lib_var=no"
6627 rm -f conftest*
6628 LIBS="$ac_save_LIBS"
6631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6632 echo "$ac_t""yes" 1>&6
6633 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6634 else
6635 echo "$ac_t""no" 1>&6
6640 if test $ac_have_func = no; then
6641 # There is a commonly available library for RS/6000 AIX.
6642 # Since it is not a standard part of AIX, it might be installed locally.
6643 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
6644 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
6645 echo "configure:6646: checking for getloadavg in -lgetloadavg" >&5
6646 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
6647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6648 echo $ac_n "(cached) $ac_c" 1>&6
6649 else
6650 ac_save_LIBS="$LIBS"
6651 LIBS="-lgetloadavg $LIBS"
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error. */
6656 /* We use char because int might match the return type of a gcc2
6657 builtin and then its argument prototype would still apply. */
6658 char getloadavg();
6660 int main() {
6661 getloadavg()
6662 ; return 0; }
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665 rm -rf conftest*
6666 eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668 echo "configure: failed program was:" >&5
6669 cat conftest.$ac_ext >&5
6670 rm -rf conftest*
6671 eval "ac_cv_lib_$ac_lib_var=no"
6673 rm -f conftest*
6674 LIBS="$ac_save_LIBS"
6677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6678 echo "$ac_t""yes" 1>&6
6679 LIBS="-lgetloadavg $LIBS"
6680 else
6681 echo "$ac_t""no" 1>&6
6682 LIBS="$ac_getloadavg_LIBS"
6687 # Make sure it is really in the library, if we think we found it.
6688 for ac_func in getloadavg
6690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6691 echo "configure:6692: checking for $ac_func" >&5
6692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6693 echo $ac_n "(cached) $ac_c" 1>&6
6694 else
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* System header to define __stub macros and hopefully few prototypes,
6699 which can conflict with char $ac_func(); below. */
6700 #include <assert.h>
6701 /* Override any gcc2 internal prototype to avoid an error. */
6702 /* We use char because int might match the return type of a gcc2
6703 builtin and then its argument prototype would still apply. */
6704 char $ac_func();
6706 int main() {
6708 /* The GNU C library defines this for functions which it implements
6709 to always fail with ENOSYS. Some functions are actually named
6710 something starting with __ and the normal name is an alias. */
6711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6712 choke me
6713 #else
6714 $ac_func();
6715 #endif
6717 ; return 0; }
6719 if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6720 rm -rf conftest*
6721 eval "ac_cv_func_$ac_func=yes"
6722 else
6723 echo "configure: failed program was:" >&5
6724 cat conftest.$ac_ext >&5
6725 rm -rf conftest*
6726 eval "ac_cv_func_$ac_func=no"
6728 rm -f conftest*
6731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6732 echo "$ac_t""yes" 1>&6
6733 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6734 cat >> confdefs.h <<EOF
6735 #define $ac_tr_func 1
6738 else
6739 echo "$ac_t""no" 1>&6
6740 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6742 done
6746 if test $ac_cv_func_getloadavg = yes; then
6747 cat >> confdefs.h <<\EOF
6748 #define HAVE_GETLOADAVG 1
6751 ac_have_func=yes
6752 else
6753 # Figure out what our getloadavg.c needs.
6754 ac_have_func=no
6755 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6756 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6757 echo "configure:6758: checking for sys/dg_sys_info.h" >&5
6758 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6759 echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 #include <sys/dg_sys_info.h>
6766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6767 { (eval echo configure:6768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6769 if test -z "$ac_err"; then
6770 rm -rf conftest*
6771 eval "ac_cv_header_$ac_safe=yes"
6772 else
6773 echo "$ac_err" >&5
6774 echo "configure: failed program was:" >&5
6775 cat conftest.$ac_ext >&5
6776 rm -rf conftest*
6777 eval "ac_cv_header_$ac_safe=no"
6779 rm -f conftest*
6781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6782 echo "$ac_t""yes" 1>&6
6783 ac_have_func=yes; cat >> confdefs.h <<\EOF
6784 #define DGUX 1
6787 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6788 echo "configure:6789: checking for dg_sys_info in -ldgc" >&5
6789 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6791 echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793 ac_save_LIBS="$LIBS"
6794 LIBS="-ldgc $LIBS"
6795 cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* Override any gcc2 internal prototype to avoid an error. */
6799 /* We use char because int might match the return type of a gcc2
6800 builtin and then its argument prototype would still apply. */
6801 char dg_sys_info();
6803 int main() {
6804 dg_sys_info()
6805 ; return 0; }
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808 rm -rf conftest*
6809 eval "ac_cv_lib_$ac_lib_var=yes"
6810 else
6811 echo "configure: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 rm -rf conftest*
6814 eval "ac_cv_lib_$ac_lib_var=no"
6816 rm -f conftest*
6817 LIBS="$ac_save_LIBS"
6820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6821 echo "$ac_t""yes" 1>&6
6822 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6823 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6824 cat >> confdefs.h <<EOF
6825 #define $ac_tr_lib 1
6828 LIBS="-ldgc $LIBS"
6830 else
6831 echo "$ac_t""no" 1>&6
6834 else
6835 echo "$ac_t""no" 1>&6
6839 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6840 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6841 # Irix 4.0.5F has the header but not the library.
6842 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6843 ac_have_func=yes; cat >> confdefs.h <<\EOF
6844 #define SVR4 1
6849 if test $ac_have_func = no; then
6850 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6851 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6852 echo "configure:6853: checking for inq_stats/cpustats.h" >&5
6853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6854 echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856 cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 #include <inq_stats/cpustats.h>
6861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6862 { (eval echo configure:6863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6864 if test -z "$ac_err"; then
6865 rm -rf conftest*
6866 eval "ac_cv_header_$ac_safe=yes"
6867 else
6868 echo "$ac_err" >&5
6869 echo "configure: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871 rm -rf conftest*
6872 eval "ac_cv_header_$ac_safe=no"
6874 rm -f conftest*
6876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6877 echo "$ac_t""yes" 1>&6
6878 ac_have_func=yes; cat >> confdefs.h <<\EOF
6879 #define UMAX 1
6882 cat >> confdefs.h <<\EOF
6883 #define UMAX4_3 1
6886 else
6887 echo "$ac_t""no" 1>&6
6892 if test $ac_have_func = no; then
6893 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6894 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6895 echo "configure:6896: checking for sys/cpustats.h" >&5
6896 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6897 echo $ac_n "(cached) $ac_c" 1>&6
6898 else
6899 cat > conftest.$ac_ext <<EOF
6900 #line 6901 "configure"
6901 #include "confdefs.h"
6902 #include <sys/cpustats.h>
6904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6905 { (eval echo configure:6906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6907 if test -z "$ac_err"; then
6908 rm -rf conftest*
6909 eval "ac_cv_header_$ac_safe=yes"
6910 else
6911 echo "$ac_err" >&5
6912 echo "configure: failed program was:" >&5
6913 cat conftest.$ac_ext >&5
6914 rm -rf conftest*
6915 eval "ac_cv_header_$ac_safe=no"
6917 rm -f conftest*
6919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6920 echo "$ac_t""yes" 1>&6
6921 ac_have_func=yes; cat >> confdefs.h <<\EOF
6922 #define UMAX 1
6925 else
6926 echo "$ac_t""no" 1>&6
6931 if test $ac_have_func = no; then
6932 for ac_hdr in mach/mach.h
6934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6936 echo "configure:6937: checking for $ac_hdr" >&5
6937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6938 echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940 cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 #include <$ac_hdr>
6945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6946 { (eval echo configure:6947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6948 if test -z "$ac_err"; then
6949 rm -rf conftest*
6950 eval "ac_cv_header_$ac_safe=yes"
6951 else
6952 echo "$ac_err" >&5
6953 echo "configure: failed program was:" >&5
6954 cat conftest.$ac_ext >&5
6955 rm -rf conftest*
6956 eval "ac_cv_header_$ac_safe=no"
6958 rm -f conftest*
6960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6961 echo "$ac_t""yes" 1>&6
6962 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6963 cat >> confdefs.h <<EOF
6964 #define $ac_tr_hdr 1
6967 else
6968 echo "$ac_t""no" 1>&6
6970 done
6974 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
6975 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
6976 echo "configure:6977: checking for nlist.h" >&5
6977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6978 echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980 cat > conftest.$ac_ext <<EOF
6981 #line 6982 "configure"
6982 #include "confdefs.h"
6983 #include <nlist.h>
6985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6986 { (eval echo configure:6987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6988 if test -z "$ac_err"; then
6989 rm -rf conftest*
6990 eval "ac_cv_header_$ac_safe=yes"
6991 else
6992 echo "$ac_err" >&5
6993 echo "configure: failed program was:" >&5
6994 cat conftest.$ac_ext >&5
6995 rm -rf conftest*
6996 eval "ac_cv_header_$ac_safe=no"
6998 rm -f conftest*
7000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7001 echo "$ac_t""yes" 1>&6
7002 cat >> confdefs.h <<\EOF
7003 #define NLIST_STRUCT 1
7006 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
7007 echo "configure:7008: checking for n_un in struct nlist" >&5
7008 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
7009 echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011 cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 #include <nlist.h>
7015 int main() {
7016 struct nlist n; n.n_un.n_name = 0;
7017 ; return 0; }
7019 if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7020 rm -rf conftest*
7021 ac_cv_struct_nlist_n_un=yes
7022 else
7023 echo "configure: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 rm -rf conftest*
7026 ac_cv_struct_nlist_n_un=no
7028 rm -f conftest*
7031 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
7032 if test $ac_cv_struct_nlist_n_un = yes; then
7033 cat >> confdefs.h <<\EOF
7034 #define NLIST_NAME_UNION 1
7039 else
7040 echo "$ac_t""no" 1>&6
7042 fi # Do not have getloadavg in system libraries.
7044 # Some definitions of getloadavg require that the program be installed setgid.
7045 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
7046 echo "configure:7047: checking whether getloadavg requires setgid" >&5
7047 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
7048 echo $ac_n "(cached) $ac_c" 1>&6
7049 else
7050 cat > conftest.$ac_ext <<EOF
7051 #line 7052 "configure"
7052 #include "confdefs.h"
7053 #include "$srcdir/getloadavg.c"
7054 #ifdef LDAV_PRIVILEGED
7055 Yowza Am I SETGID yet
7056 #endif
7058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7059 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
7060 rm -rf conftest*
7061 ac_cv_func_getloadavg_setgid=yes
7062 else
7063 rm -rf conftest*
7064 ac_cv_func_getloadavg_setgid=no
7066 rm -f conftest*
7070 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
7071 if test $ac_cv_func_getloadavg_setgid = yes; then
7072 NEED_SETGID=true; cat >> confdefs.h <<\EOF
7073 #define GETLOADAVG_PRIVILEGED 1
7076 else
7077 NEED_SETGID=false
7080 if test $ac_cv_func_getloadavg_setgid = yes; then
7081 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
7082 echo "configure:7083: checking group of /dev/kmem" >&5
7083 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
7084 echo $ac_n "(cached) $ac_c" 1>&6
7085 else
7086 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
7087 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
7088 # If we got an error (system does not support symlinks), try without -L.
7089 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
7090 ac_cv_group_kmem=`echo $ac_ls_output \
7091 | sed -ne 's/[ ][ ]*/ /g;
7092 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
7093 / /s/.* //;p;'`
7097 echo "$ac_t""$ac_cv_group_kmem" 1>&6
7098 KMEM_GROUP=$ac_cv_group_kmem
7102 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
7103 echo "configure:7104: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7104 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
7105 echo $ac_n "(cached) $ac_c" 1>&6
7106 else
7107 ac_cv_sys_largefile_source=no
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 #include <stdio.h>
7112 int main() {
7113 return !fseeko;
7114 ; return 0; }
7116 if { (eval echo configure:7117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7118 else
7119 echo "configure: failed program was:" >&5
7120 cat conftest.$ac_ext >&5
7121 rm -rf conftest*
7122 cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 #define _LARGEFILE_SOURCE 1
7126 #include <stdio.h>
7128 int main() {
7129 return !fseeko;
7130 ; return 0; }
7132 if { (eval echo configure:7133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7133 rm -rf conftest*
7134 ac_cv_sys_largefile_source=1
7135 else
7136 echo "configure: failed program was:" >&5
7137 cat conftest.$ac_ext >&5
7139 rm -f conftest*
7141 rm -f conftest*
7144 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
7145 if test "$ac_cv_sys_largefile_source" != no; then
7146 cat >> confdefs.h <<EOF
7147 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7151 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7152 # in glibc 2.1.3, but that breaks too many other things.
7153 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7155 echo $ac_n "checking for fseeko""... $ac_c" 1>&6
7156 echo "configure:7157: checking for fseeko" >&5
7157 if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
7158 echo $ac_n "(cached) $ac_c" 1>&6
7159 else
7160 ac_cv_func_fseeko=no
7161 cat > conftest.$ac_ext <<EOF
7162 #line 7163 "configure"
7163 #include "confdefs.h"
7164 #include <stdio.h>
7165 int main() {
7166 return fseeko && fseeko (stdin, 0, 0);
7167 ; return 0; }
7169 if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7170 rm -rf conftest*
7171 ac_cv_func_fseeko=yes
7172 else
7173 echo "configure: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7176 rm -f conftest*
7179 echo "$ac_t""$ac_cv_func_fseeko" 1>&6
7180 if test $ac_cv_func_fseeko != no; then
7181 cat >> confdefs.h <<\EOF
7182 #define HAVE_FSEEKO 1
7187 # UNIX98 PTYs.
7188 for ac_func in grantpt
7190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7191 echo "configure:7192: checking for $ac_func" >&5
7192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7193 echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195 cat > conftest.$ac_ext <<EOF
7196 #line 7197 "configure"
7197 #include "confdefs.h"
7198 /* System header to define __stub macros and hopefully few prototypes,
7199 which can conflict with char $ac_func(); below. */
7200 #include <assert.h>
7201 /* Override any gcc2 internal prototype to avoid an error. */
7202 /* We use char because int might match the return type of a gcc2
7203 builtin and then its argument prototype would still apply. */
7204 char $ac_func();
7206 int main() {
7208 /* The GNU C library defines this for functions which it implements
7209 to always fail with ENOSYS. Some functions are actually named
7210 something starting with __ and the normal name is an alias. */
7211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7212 choke me
7213 #else
7214 $ac_func();
7215 #endif
7217 ; return 0; }
7219 if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7220 rm -rf conftest*
7221 eval "ac_cv_func_$ac_func=yes"
7222 else
7223 echo "configure: failed program was:" >&5
7224 cat conftest.$ac_ext >&5
7225 rm -rf conftest*
7226 eval "ac_cv_func_$ac_func=no"
7228 rm -f conftest*
7231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7232 echo "$ac_t""yes" 1>&6
7233 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7234 cat >> confdefs.h <<EOF
7235 #define $ac_tr_func 1
7238 else
7239 echo "$ac_t""no" 1>&6
7241 done
7244 # PTY-related GNU extensions.
7245 for ac_func in getpt
7247 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7248 echo "configure:7249: checking for $ac_func" >&5
7249 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7250 echo $ac_n "(cached) $ac_c" 1>&6
7251 else
7252 cat > conftest.$ac_ext <<EOF
7253 #line 7254 "configure"
7254 #include "confdefs.h"
7255 /* System header to define __stub macros and hopefully few prototypes,
7256 which can conflict with char $ac_func(); below. */
7257 #include <assert.h>
7258 /* Override any gcc2 internal prototype to avoid an error. */
7259 /* We use char because int might match the return type of a gcc2
7260 builtin and then its argument prototype would still apply. */
7261 char $ac_func();
7263 int main() {
7265 /* The GNU C library defines this for functions which it implements
7266 to always fail with ENOSYS. Some functions are actually named
7267 something starting with __ and the normal name is an alias. */
7268 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7269 choke me
7270 #else
7271 $ac_func();
7272 #endif
7274 ; return 0; }
7276 if { (eval echo configure:7277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7277 rm -rf conftest*
7278 eval "ac_cv_func_$ac_func=yes"
7279 else
7280 echo "configure: failed program was:" >&5
7281 cat conftest.$ac_ext >&5
7282 rm -rf conftest*
7283 eval "ac_cv_func_$ac_func=no"
7285 rm -f conftest*
7288 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7289 echo "$ac_t""yes" 1>&6
7290 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7291 cat >> confdefs.h <<EOF
7292 #define $ac_tr_func 1
7295 else
7296 echo "$ac_t""no" 1>&6
7298 done
7301 # Check this now, so that we will NOT find the above functions in ncurses.
7302 # That is because we have not set up to link ncurses in lib-src.
7303 # It's better to believe a function is not available
7304 # than to expect to find it in ncurses.
7305 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7306 echo "configure:7307: checking for tparm in -lncurses" >&5
7307 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
7308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7309 echo $ac_n "(cached) $ac_c" 1>&6
7310 else
7311 ac_save_LIBS="$LIBS"
7312 LIBS="-lncurses $LIBS"
7313 cat > conftest.$ac_ext <<EOF
7314 #line 7315 "configure"
7315 #include "confdefs.h"
7316 /* Override any gcc2 internal prototype to avoid an error. */
7317 /* We use char because int might match the return type of a gcc2
7318 builtin and then its argument prototype would still apply. */
7319 char tparm();
7321 int main() {
7322 tparm()
7323 ; return 0; }
7325 if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7326 rm -rf conftest*
7327 eval "ac_cv_lib_$ac_lib_var=yes"
7328 else
7329 echo "configure: failed program was:" >&5
7330 cat conftest.$ac_ext >&5
7331 rm -rf conftest*
7332 eval "ac_cv_lib_$ac_lib_var=no"
7334 rm -f conftest*
7335 LIBS="$ac_save_LIBS"
7338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7339 echo "$ac_t""yes" 1>&6
7340 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7341 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7342 cat >> confdefs.h <<EOF
7343 #define $ac_tr_lib 1
7346 LIBS="-lncurses $LIBS"
7348 else
7349 echo "$ac_t""no" 1>&6
7353 # Do we need the Hesiod library to provide the support routines?
7354 if test "$with_hesiod" = yes ; then
7355 # Don't set $LIBS here -- see comments above.
7356 resolv=no
7357 echo $ac_n "checking for res_send""... $ac_c" 1>&6
7358 echo "configure:7359: checking for res_send" >&5
7359 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
7360 echo $ac_n "(cached) $ac_c" 1>&6
7361 else
7362 cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* System header to define __stub macros and hopefully few prototypes,
7366 which can conflict with char res_send(); below. */
7367 #include <assert.h>
7368 /* Override any gcc2 internal prototype to avoid an error. */
7369 /* We use char because int might match the return type of a gcc2
7370 builtin and then its argument prototype would still apply. */
7371 char res_send();
7373 int main() {
7375 /* The GNU C library defines this for functions which it implements
7376 to always fail with ENOSYS. Some functions are actually named
7377 something starting with __ and the normal name is an alias. */
7378 #if defined (__stub_res_send) || defined (__stub___res_send)
7379 choke me
7380 #else
7381 res_send();
7382 #endif
7384 ; return 0; }
7386 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7387 rm -rf conftest*
7388 eval "ac_cv_func_res_send=yes"
7389 else
7390 echo "configure: failed program was:" >&5
7391 cat conftest.$ac_ext >&5
7392 rm -rf conftest*
7393 eval "ac_cv_func_res_send=no"
7395 rm -f conftest*
7398 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
7399 echo "$ac_t""yes" 1>&6
7401 else
7402 echo "$ac_t""no" 1>&6
7403 echo $ac_n "checking for __res_send""... $ac_c" 1>&6
7404 echo "configure:7405: checking for __res_send" >&5
7405 if eval "test \"`echo '$''{'ac_cv_func___res_send'+set}'`\" = set"; then
7406 echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408 cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* System header to define __stub macros and hopefully few prototypes,
7412 which can conflict with char __res_send(); below. */
7413 #include <assert.h>
7414 /* Override any gcc2 internal prototype to avoid an error. */
7415 /* We use char because int might match the return type of a gcc2
7416 builtin and then its argument prototype would still apply. */
7417 char __res_send();
7419 int main() {
7421 /* The GNU C library defines this for functions which it implements
7422 to always fail with ENOSYS. Some functions are actually named
7423 something starting with __ and the normal name is an alias. */
7424 #if defined (__stub___res_send) || defined (__stub_____res_send)
7425 choke me
7426 #else
7427 __res_send();
7428 #endif
7430 ; return 0; }
7432 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7433 rm -rf conftest*
7434 eval "ac_cv_func___res_send=yes"
7435 else
7436 echo "configure: failed program was:" >&5
7437 cat conftest.$ac_ext >&5
7438 rm -rf conftest*
7439 eval "ac_cv_func___res_send=no"
7441 rm -f conftest*
7444 if eval "test \"`echo '$ac_cv_func_'__res_send`\" = yes"; then
7445 echo "$ac_t""yes" 1>&6
7447 else
7448 echo "$ac_t""no" 1>&6
7449 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
7450 echo "configure:7451: checking for res_send in -lresolv" >&5
7451 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
7452 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7453 echo $ac_n "(cached) $ac_c" 1>&6
7454 else
7455 ac_save_LIBS="$LIBS"
7456 LIBS="-lresolv $LIBS"
7457 cat > conftest.$ac_ext <<EOF
7458 #line 7459 "configure"
7459 #include "confdefs.h"
7460 /* Override any gcc2 internal prototype to avoid an error. */
7461 /* We use char because int might match the return type of a gcc2
7462 builtin and then its argument prototype would still apply. */
7463 char res_send();
7465 int main() {
7466 res_send()
7467 ; return 0; }
7469 if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7470 rm -rf conftest*
7471 eval "ac_cv_lib_$ac_lib_var=yes"
7472 else
7473 echo "configure: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475 rm -rf conftest*
7476 eval "ac_cv_lib_$ac_lib_var=no"
7478 rm -f conftest*
7479 LIBS="$ac_save_LIBS"
7482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7483 echo "$ac_t""yes" 1>&6
7484 resolv=yes
7485 else
7486 echo "$ac_t""no" 1>&6
7487 echo $ac_n "checking for __res_send in -lresolv""... $ac_c" 1>&6
7488 echo "configure:7489: checking for __res_send in -lresolv" >&5
7489 ac_lib_var=`echo resolv'_'__res_send | sed 'y%./+-%__p_%'`
7490 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7491 echo $ac_n "(cached) $ac_c" 1>&6
7492 else
7493 ac_save_LIBS="$LIBS"
7494 LIBS="-lresolv $LIBS"
7495 cat > conftest.$ac_ext <<EOF
7496 #line 7497 "configure"
7497 #include "confdefs.h"
7498 /* Override any gcc2 internal prototype to avoid an error. */
7499 /* We use char because int might match the return type of a gcc2
7500 builtin and then its argument prototype would still apply. */
7501 char __res_send();
7503 int main() {
7504 __res_send()
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_lib_$ac_lib_var=yes"
7510 else
7511 echo "configure: failed program was:" >&5
7512 cat conftest.$ac_ext >&5
7513 rm -rf conftest*
7514 eval "ac_cv_lib_$ac_lib_var=no"
7516 rm -f conftest*
7517 LIBS="$ac_save_LIBS"
7520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7521 echo "$ac_t""yes" 1>&6
7522 resolv=yes
7523 else
7524 echo "$ac_t""no" 1>&6
7533 if test "$resolv" = yes ; then
7534 RESOLVLIB=-lresolv
7535 cat >> confdefs.h <<\EOF
7536 #define HAVE_LIBRESOLV 1
7539 else
7540 RESOLVLIB=
7542 echo $ac_n "checking for hes_getmailhost""... $ac_c" 1>&6
7543 echo "configure:7544: checking for hes_getmailhost" >&5
7544 if eval "test \"`echo '$''{'ac_cv_func_hes_getmailhost'+set}'`\" = set"; then
7545 echo $ac_n "(cached) $ac_c" 1>&6
7546 else
7547 cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7550 /* System header to define __stub macros and hopefully few prototypes,
7551 which can conflict with char hes_getmailhost(); below. */
7552 #include <assert.h>
7553 /* Override any gcc2 internal prototype to avoid an error. */
7554 /* We use char because int might match the return type of a gcc2
7555 builtin and then its argument prototype would still apply. */
7556 char hes_getmailhost();
7558 int main() {
7560 /* The GNU C library defines this for functions which it implements
7561 to always fail with ENOSYS. Some functions are actually named
7562 something starting with __ and the normal name is an alias. */
7563 #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
7564 choke me
7565 #else
7566 hes_getmailhost();
7567 #endif
7569 ; return 0; }
7571 if { (eval echo configure:7572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7572 rm -rf conftest*
7573 eval "ac_cv_func_hes_getmailhost=yes"
7574 else
7575 echo "configure: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7577 rm -rf conftest*
7578 eval "ac_cv_func_hes_getmailhost=no"
7580 rm -f conftest*
7583 if eval "test \"`echo '$ac_cv_func_'hes_getmailhost`\" = yes"; then
7584 echo "$ac_t""yes" 1>&6
7586 else
7587 echo "$ac_t""no" 1>&6
7588 echo $ac_n "checking for hes_getmailhost in -lhesiod""... $ac_c" 1>&6
7589 echo "configure:7590: checking for hes_getmailhost in -lhesiod" >&5
7590 ac_lib_var=`echo hesiod'_'hes_getmailhost | sed 'y%./+-%__p_%'`
7591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7592 echo $ac_n "(cached) $ac_c" 1>&6
7593 else
7594 ac_save_LIBS="$LIBS"
7595 LIBS="-lhesiod $RESOLVLIB $LIBS"
7596 cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599 /* Override any gcc2 internal prototype to avoid an error. */
7600 /* We use char because int might match the return type of a gcc2
7601 builtin and then its argument prototype would still apply. */
7602 char hes_getmailhost();
7604 int main() {
7605 hes_getmailhost()
7606 ; return 0; }
7608 if { (eval echo configure:7609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7609 rm -rf conftest*
7610 eval "ac_cv_lib_$ac_lib_var=yes"
7611 else
7612 echo "configure: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 rm -rf conftest*
7615 eval "ac_cv_lib_$ac_lib_var=no"
7617 rm -f conftest*
7618 LIBS="$ac_save_LIBS"
7621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7622 echo "$ac_t""yes" 1>&6
7623 cat >> confdefs.h <<\EOF
7624 #define HAVE_LIBHESIOD 1
7627 else
7628 echo "$ac_t""no" 1>&6
7636 # These tell us which Kerberos-related libraries to use.
7637 if test "${with_kerberos+set}" = set; then
7638 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7639 echo "configure:7640: checking for com_err in -lcom_err" >&5
7640 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
7641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7642 echo $ac_n "(cached) $ac_c" 1>&6
7643 else
7644 ac_save_LIBS="$LIBS"
7645 LIBS="-lcom_err $LIBS"
7646 cat > conftest.$ac_ext <<EOF
7647 #line 7648 "configure"
7648 #include "confdefs.h"
7649 /* Override any gcc2 internal prototype to avoid an error. */
7650 /* We use char because int might match the return type of a gcc2
7651 builtin and then its argument prototype would still apply. */
7652 char com_err();
7654 int main() {
7655 com_err()
7656 ; return 0; }
7658 if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7659 rm -rf conftest*
7660 eval "ac_cv_lib_$ac_lib_var=yes"
7661 else
7662 echo "configure: failed program was:" >&5
7663 cat conftest.$ac_ext >&5
7664 rm -rf conftest*
7665 eval "ac_cv_lib_$ac_lib_var=no"
7667 rm -f conftest*
7668 LIBS="$ac_save_LIBS"
7671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7672 echo "$ac_t""yes" 1>&6
7673 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7674 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7675 cat >> confdefs.h <<EOF
7676 #define $ac_tr_lib 1
7679 LIBS="-lcom_err $LIBS"
7681 else
7682 echo "$ac_t""no" 1>&6
7685 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7686 echo "configure:7687: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
7687 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7689 echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691 ac_save_LIBS="$LIBS"
7692 LIBS="-lk5crypto $LIBS"
7693 cat > conftest.$ac_ext <<EOF
7694 #line 7695 "configure"
7695 #include "confdefs.h"
7696 /* Override any gcc2 internal prototype to avoid an error. */
7697 /* We use char because int might match the return type of a gcc2
7698 builtin and then its argument prototype would still apply. */
7699 char mit_des_cbc_encrypt();
7701 int main() {
7702 mit_des_cbc_encrypt()
7703 ; return 0; }
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7706 rm -rf conftest*
7707 eval "ac_cv_lib_$ac_lib_var=yes"
7708 else
7709 echo "configure: failed program was:" >&5
7710 cat conftest.$ac_ext >&5
7711 rm -rf conftest*
7712 eval "ac_cv_lib_$ac_lib_var=no"
7714 rm -f conftest*
7715 LIBS="$ac_save_LIBS"
7718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7719 echo "$ac_t""yes" 1>&6
7720 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7721 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7722 cat >> confdefs.h <<EOF
7723 #define $ac_tr_lib 1
7726 LIBS="-lk5crypto $LIBS"
7728 else
7729 echo "$ac_t""no" 1>&6
7732 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7733 echo "configure:7734: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7734 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7735 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7736 echo $ac_n "(cached) $ac_c" 1>&6
7737 else
7738 ac_save_LIBS="$LIBS"
7739 LIBS="-lcrypto $LIBS"
7740 cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 /* Override any gcc2 internal prototype to avoid an error. */
7744 /* We use char because int might match the return type of a gcc2
7745 builtin and then its argument prototype would still apply. */
7746 char mit_des_cbc_encrypt();
7748 int main() {
7749 mit_des_cbc_encrypt()
7750 ; return 0; }
7752 if { (eval echo configure:7753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7753 rm -rf conftest*
7754 eval "ac_cv_lib_$ac_lib_var=yes"
7755 else
7756 echo "configure: failed program was:" >&5
7757 cat conftest.$ac_ext >&5
7758 rm -rf conftest*
7759 eval "ac_cv_lib_$ac_lib_var=no"
7761 rm -f conftest*
7762 LIBS="$ac_save_LIBS"
7765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7766 echo "$ac_t""yes" 1>&6
7767 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7768 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7769 cat >> confdefs.h <<EOF
7770 #define $ac_tr_lib 1
7773 LIBS="-lcrypto $LIBS"
7775 else
7776 echo "$ac_t""no" 1>&6
7779 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7780 echo "configure:7781: checking for krb5_init_context in -lkrb5" >&5
7781 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7783 echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785 ac_save_LIBS="$LIBS"
7786 LIBS="-lkrb5 $LIBS"
7787 cat > conftest.$ac_ext <<EOF
7788 #line 7789 "configure"
7789 #include "confdefs.h"
7790 /* Override any gcc2 internal prototype to avoid an error. */
7791 /* We use char because int might match the return type of a gcc2
7792 builtin and then its argument prototype would still apply. */
7793 char krb5_init_context();
7795 int main() {
7796 krb5_init_context()
7797 ; return 0; }
7799 if { (eval echo configure:7800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7800 rm -rf conftest*
7801 eval "ac_cv_lib_$ac_lib_var=yes"
7802 else
7803 echo "configure: failed program was:" >&5
7804 cat conftest.$ac_ext >&5
7805 rm -rf conftest*
7806 eval "ac_cv_lib_$ac_lib_var=no"
7808 rm -f conftest*
7809 LIBS="$ac_save_LIBS"
7812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7813 echo "$ac_t""yes" 1>&6
7814 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7815 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7816 cat >> confdefs.h <<EOF
7817 #define $ac_tr_lib 1
7820 LIBS="-lkrb5 $LIBS"
7822 else
7823 echo "$ac_t""no" 1>&6
7826 if test "${with_kerberos5+set}" != set; then
7827 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7828 echo "configure:7829: checking for des_cbc_encrypt in -ldes425" >&5
7829 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7831 echo $ac_n "(cached) $ac_c" 1>&6
7832 else
7833 ac_save_LIBS="$LIBS"
7834 LIBS="-ldes425 $LIBS"
7835 cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 /* Override any gcc2 internal prototype to avoid an error. */
7839 /* We use char because int might match the return type of a gcc2
7840 builtin and then its argument prototype would still apply. */
7841 char des_cbc_encrypt();
7843 int main() {
7844 des_cbc_encrypt()
7845 ; return 0; }
7847 if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7848 rm -rf conftest*
7849 eval "ac_cv_lib_$ac_lib_var=yes"
7850 else
7851 echo "configure: failed program was:" >&5
7852 cat conftest.$ac_ext >&5
7853 rm -rf conftest*
7854 eval "ac_cv_lib_$ac_lib_var=no"
7856 rm -f conftest*
7857 LIBS="$ac_save_LIBS"
7860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7861 echo "$ac_t""yes" 1>&6
7862 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7863 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7864 cat >> confdefs.h <<EOF
7865 #define $ac_tr_lib 1
7868 LIBS="-ldes425 $LIBS"
7870 else
7871 echo "$ac_t""no" 1>&6
7872 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7873 echo "configure:7874: checking for des_cbc_encrypt in -ldes" >&5
7874 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7876 echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878 ac_save_LIBS="$LIBS"
7879 LIBS="-ldes $LIBS"
7880 cat > conftest.$ac_ext <<EOF
7881 #line 7882 "configure"
7882 #include "confdefs.h"
7883 /* Override any gcc2 internal prototype to avoid an error. */
7884 /* We use char because int might match the return type of a gcc2
7885 builtin and then its argument prototype would still apply. */
7886 char des_cbc_encrypt();
7888 int main() {
7889 des_cbc_encrypt()
7890 ; return 0; }
7892 if { (eval echo configure:7893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7893 rm -rf conftest*
7894 eval "ac_cv_lib_$ac_lib_var=yes"
7895 else
7896 echo "configure: failed program was:" >&5
7897 cat conftest.$ac_ext >&5
7898 rm -rf conftest*
7899 eval "ac_cv_lib_$ac_lib_var=no"
7901 rm -f conftest*
7902 LIBS="$ac_save_LIBS"
7905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7906 echo "$ac_t""yes" 1>&6
7907 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7908 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7909 cat >> confdefs.h <<EOF
7910 #define $ac_tr_lib 1
7913 LIBS="-ldes $LIBS"
7915 else
7916 echo "$ac_t""no" 1>&6
7921 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7922 echo "configure:7923: checking for krb_get_cred in -lkrb4" >&5
7923 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7925 echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927 ac_save_LIBS="$LIBS"
7928 LIBS="-lkrb4 $LIBS"
7929 cat > conftest.$ac_ext <<EOF
7930 #line 7931 "configure"
7931 #include "confdefs.h"
7932 /* Override any gcc2 internal prototype to avoid an error. */
7933 /* We use char because int might match the return type of a gcc2
7934 builtin and then its argument prototype would still apply. */
7935 char krb_get_cred();
7937 int main() {
7938 krb_get_cred()
7939 ; return 0; }
7941 if { (eval echo configure:7942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7942 rm -rf conftest*
7943 eval "ac_cv_lib_$ac_lib_var=yes"
7944 else
7945 echo "configure: failed program was:" >&5
7946 cat conftest.$ac_ext >&5
7947 rm -rf conftest*
7948 eval "ac_cv_lib_$ac_lib_var=no"
7950 rm -f conftest*
7951 LIBS="$ac_save_LIBS"
7954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7955 echo "$ac_t""yes" 1>&6
7956 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7957 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7958 cat >> confdefs.h <<EOF
7959 #define $ac_tr_lib 1
7962 LIBS="-lkrb4 $LIBS"
7964 else
7965 echo "$ac_t""no" 1>&6
7966 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7967 echo "configure:7968: checking for krb_get_cred in -lkrb" >&5
7968 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
7969 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7970 echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972 ac_save_LIBS="$LIBS"
7973 LIBS="-lkrb $LIBS"
7974 cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977 /* Override any gcc2 internal prototype to avoid an error. */
7978 /* We use char because int might match the return type of a gcc2
7979 builtin and then its argument prototype would still apply. */
7980 char krb_get_cred();
7982 int main() {
7983 krb_get_cred()
7984 ; return 0; }
7986 if { (eval echo configure:7987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7987 rm -rf conftest*
7988 eval "ac_cv_lib_$ac_lib_var=yes"
7989 else
7990 echo "configure: failed program was:" >&5
7991 cat conftest.$ac_ext >&5
7992 rm -rf conftest*
7993 eval "ac_cv_lib_$ac_lib_var=no"
7995 rm -f conftest*
7996 LIBS="$ac_save_LIBS"
7999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8000 echo "$ac_t""yes" 1>&6
8001 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
8002 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8003 cat >> confdefs.h <<EOF
8004 #define $ac_tr_lib 1
8007 LIBS="-lkrb $LIBS"
8009 else
8010 echo "$ac_t""no" 1>&6
8017 if test "${with_kerberos5+set}" = set; then
8018 for ac_hdr in krb5.h
8020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8022 echo "configure:8023: checking for $ac_hdr" >&5
8023 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8024 echo $ac_n "(cached) $ac_c" 1>&6
8025 else
8026 cat > conftest.$ac_ext <<EOF
8027 #line 8028 "configure"
8028 #include "confdefs.h"
8029 #include <$ac_hdr>
8031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8032 { (eval echo configure:8033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8034 if test -z "$ac_err"; then
8035 rm -rf conftest*
8036 eval "ac_cv_header_$ac_safe=yes"
8037 else
8038 echo "$ac_err" >&5
8039 echo "configure: failed program was:" >&5
8040 cat conftest.$ac_ext >&5
8041 rm -rf conftest*
8042 eval "ac_cv_header_$ac_safe=no"
8044 rm -f conftest*
8046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8047 echo "$ac_t""yes" 1>&6
8048 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8049 cat >> confdefs.h <<EOF
8050 #define $ac_tr_hdr 1
8053 else
8054 echo "$ac_t""no" 1>&6
8056 done
8058 else
8059 for ac_hdr in des.h
8061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8063 echo "configure:8064: checking for $ac_hdr" >&5
8064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8065 echo $ac_n "(cached) $ac_c" 1>&6
8066 else
8067 cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070 #include <$ac_hdr>
8072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8073 { (eval echo configure:8074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8075 if test -z "$ac_err"; then
8076 rm -rf conftest*
8077 eval "ac_cv_header_$ac_safe=yes"
8078 else
8079 echo "$ac_err" >&5
8080 echo "configure: failed program was:" >&5
8081 cat conftest.$ac_ext >&5
8082 rm -rf conftest*
8083 eval "ac_cv_header_$ac_safe=no"
8085 rm -f conftest*
8087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8088 echo "$ac_t""yes" 1>&6
8089 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8090 cat >> confdefs.h <<EOF
8091 #define $ac_tr_hdr 1
8094 else
8095 echo "$ac_t""no" 1>&6
8096 for ac_hdr in kerberosIV/des.h
8098 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8099 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8100 echo "configure:8101: checking for $ac_hdr" >&5
8101 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8102 echo $ac_n "(cached) $ac_c" 1>&6
8103 else
8104 cat > conftest.$ac_ext <<EOF
8105 #line 8106 "configure"
8106 #include "confdefs.h"
8107 #include <$ac_hdr>
8109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8110 { (eval echo configure:8111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8112 if test -z "$ac_err"; then
8113 rm -rf conftest*
8114 eval "ac_cv_header_$ac_safe=yes"
8115 else
8116 echo "$ac_err" >&5
8117 echo "configure: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8119 rm -rf conftest*
8120 eval "ac_cv_header_$ac_safe=no"
8122 rm -f conftest*
8124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8125 echo "$ac_t""yes" 1>&6
8126 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8127 cat >> confdefs.h <<EOF
8128 #define $ac_tr_hdr 1
8131 else
8132 echo "$ac_t""no" 1>&6
8133 for ac_hdr in kerberos/des.h
8135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8137 echo "configure:8138: checking for $ac_hdr" >&5
8138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8139 echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141 cat > conftest.$ac_ext <<EOF
8142 #line 8143 "configure"
8143 #include "confdefs.h"
8144 #include <$ac_hdr>
8146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8147 { (eval echo configure:8148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8149 if test -z "$ac_err"; then
8150 rm -rf conftest*
8151 eval "ac_cv_header_$ac_safe=yes"
8152 else
8153 echo "$ac_err" >&5
8154 echo "configure: failed program was:" >&5
8155 cat conftest.$ac_ext >&5
8156 rm -rf conftest*
8157 eval "ac_cv_header_$ac_safe=no"
8159 rm -f conftest*
8161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8162 echo "$ac_t""yes" 1>&6
8163 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8164 cat >> confdefs.h <<EOF
8165 #define $ac_tr_hdr 1
8168 else
8169 echo "$ac_t""no" 1>&6
8171 done
8174 done
8177 done
8179 for ac_hdr in krb.h
8181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8183 echo "configure:8184: checking for $ac_hdr" >&5
8184 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8185 echo $ac_n "(cached) $ac_c" 1>&6
8186 else
8187 cat > conftest.$ac_ext <<EOF
8188 #line 8189 "configure"
8189 #include "confdefs.h"
8190 #include <$ac_hdr>
8192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8193 { (eval echo configure:8194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8195 if test -z "$ac_err"; then
8196 rm -rf conftest*
8197 eval "ac_cv_header_$ac_safe=yes"
8198 else
8199 echo "$ac_err" >&5
8200 echo "configure: failed program was:" >&5
8201 cat conftest.$ac_ext >&5
8202 rm -rf conftest*
8203 eval "ac_cv_header_$ac_safe=no"
8205 rm -f conftest*
8207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8208 echo "$ac_t""yes" 1>&6
8209 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8210 cat >> confdefs.h <<EOF
8211 #define $ac_tr_hdr 1
8214 else
8215 echo "$ac_t""no" 1>&6
8216 for ac_hdr in kerberosIV/krb.h
8218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8220 echo "configure:8221: checking for $ac_hdr" >&5
8221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8222 echo $ac_n "(cached) $ac_c" 1>&6
8223 else
8224 cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 #include <$ac_hdr>
8229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8230 { (eval echo configure:8231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8232 if test -z "$ac_err"; then
8233 rm -rf conftest*
8234 eval "ac_cv_header_$ac_safe=yes"
8235 else
8236 echo "$ac_err" >&5
8237 echo "configure: failed program was:" >&5
8238 cat conftest.$ac_ext >&5
8239 rm -rf conftest*
8240 eval "ac_cv_header_$ac_safe=no"
8242 rm -f conftest*
8244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8245 echo "$ac_t""yes" 1>&6
8246 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8247 cat >> confdefs.h <<EOF
8248 #define $ac_tr_hdr 1
8251 else
8252 echo "$ac_t""no" 1>&6
8253 for ac_hdr in kerberos/krb.h
8255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8257 echo "configure:8258: checking for $ac_hdr" >&5
8258 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8259 echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261 cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 #include <$ac_hdr>
8266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8267 { (eval echo configure:8268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8269 if test -z "$ac_err"; then
8270 rm -rf conftest*
8271 eval "ac_cv_header_$ac_safe=yes"
8272 else
8273 echo "$ac_err" >&5
8274 echo "configure: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 rm -rf conftest*
8277 eval "ac_cv_header_$ac_safe=no"
8279 rm -f conftest*
8281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8282 echo "$ac_t""yes" 1>&6
8283 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8284 cat >> confdefs.h <<EOF
8285 #define $ac_tr_hdr 1
8288 else
8289 echo "$ac_t""no" 1>&6
8291 done
8294 done
8297 done
8300 for ac_hdr in com_err.h
8302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8304 echo "configure:8305: checking for $ac_hdr" >&5
8305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8306 echo $ac_n "(cached) $ac_c" 1>&6
8307 else
8308 cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <$ac_hdr>
8313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8314 { (eval echo configure:8315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8316 if test -z "$ac_err"; then
8317 rm -rf conftest*
8318 eval "ac_cv_header_$ac_safe=yes"
8319 else
8320 echo "$ac_err" >&5
8321 echo "configure: failed program was:" >&5
8322 cat conftest.$ac_ext >&5
8323 rm -rf conftest*
8324 eval "ac_cv_header_$ac_safe=no"
8326 rm -f conftest*
8328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8329 echo "$ac_t""yes" 1>&6
8330 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8331 cat >> confdefs.h <<EOF
8332 #define $ac_tr_hdr 1
8335 else
8336 echo "$ac_t""no" 1>&6
8338 done
8342 # Solaris requires -lintl if you want strerror (which calls dgettext)
8343 # to return localized messages.
8344 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
8345 echo "configure:8346: checking for dgettext in -lintl" >&5
8346 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
8347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8348 echo $ac_n "(cached) $ac_c" 1>&6
8349 else
8350 ac_save_LIBS="$LIBS"
8351 LIBS="-lintl $LIBS"
8352 cat > conftest.$ac_ext <<EOF
8353 #line 8354 "configure"
8354 #include "confdefs.h"
8355 /* Override any gcc2 internal prototype to avoid an error. */
8356 /* We use char because int might match the return type of a gcc2
8357 builtin and then its argument prototype would still apply. */
8358 char dgettext();
8360 int main() {
8361 dgettext()
8362 ; return 0; }
8364 if { (eval echo configure:8365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8365 rm -rf conftest*
8366 eval "ac_cv_lib_$ac_lib_var=yes"
8367 else
8368 echo "configure: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 rm -rf conftest*
8371 eval "ac_cv_lib_$ac_lib_var=no"
8373 rm -f conftest*
8374 LIBS="$ac_save_LIBS"
8377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8378 echo "$ac_t""yes" 1>&6
8379 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8380 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8381 cat >> confdefs.h <<EOF
8382 #define $ac_tr_lib 1
8385 LIBS="-lintl $LIBS"
8387 else
8388 echo "$ac_t""no" 1>&6
8392 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8393 echo "configure:8394: checking whether localtime caches TZ" >&5
8394 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
8395 echo $ac_n "(cached) $ac_c" 1>&6
8396 else
8397 if test x$ac_cv_func_tzset = xyes; then
8398 if test "$cross_compiling" = yes; then
8399 # If we have tzset, assume the worst when cross-compiling.
8400 emacs_cv_localtime_cache=yes
8401 else
8402 cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 #include <time.h>
8406 extern char **environ;
8407 unset_TZ ()
8409 char **from, **to;
8410 for (to = from = environ; (*to = *from); from++)
8411 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8412 to++;
8414 char TZ_GMT0[] = "TZ=GMT0";
8415 char TZ_PST8[] = "TZ=PST8";
8416 main()
8418 time_t now = time ((time_t *) 0);
8419 int hour_GMT0, hour_unset;
8420 if (putenv (TZ_GMT0) != 0)
8421 exit (1);
8422 hour_GMT0 = localtime (&now)->tm_hour;
8423 unset_TZ ();
8424 hour_unset = localtime (&now)->tm_hour;
8425 if (putenv (TZ_PST8) != 0)
8426 exit (1);
8427 if (localtime (&now)->tm_hour == hour_GMT0)
8428 exit (1);
8429 unset_TZ ();
8430 if (localtime (&now)->tm_hour != hour_unset)
8431 exit (1);
8432 exit (0);
8435 if { (eval echo configure:8436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8436 then
8437 emacs_cv_localtime_cache=no
8438 else
8439 echo "configure: failed program was:" >&5
8440 cat conftest.$ac_ext >&5
8441 rm -fr conftest*
8442 emacs_cv_localtime_cache=yes
8444 rm -fr conftest*
8447 else
8448 # If we lack tzset, report that localtime does not cache TZ,
8449 # since we can't invalidate the cache if we don't have tzset.
8450 emacs_cv_localtime_cache=no
8453 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8454 if test $emacs_cv_localtime_cache = yes; then
8455 cat >> confdefs.h <<\EOF
8456 #define LOCALTIME_CACHE 1
8461 if test "x$HAVE_TIMEVAL" = xyes; then
8462 for ac_func in gettimeofday
8464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8465 echo "configure:8466: checking for $ac_func" >&5
8466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8467 echo $ac_n "(cached) $ac_c" 1>&6
8468 else
8469 cat > conftest.$ac_ext <<EOF
8470 #line 8471 "configure"
8471 #include "confdefs.h"
8472 /* System header to define __stub macros and hopefully few prototypes,
8473 which can conflict with char $ac_func(); below. */
8474 #include <assert.h>
8475 /* Override any gcc2 internal prototype to avoid an error. */
8476 /* We use char because int might match the return type of a gcc2
8477 builtin and then its argument prototype would still apply. */
8478 char $ac_func();
8480 int main() {
8482 /* The GNU C library defines this for functions which it implements
8483 to always fail with ENOSYS. Some functions are actually named
8484 something starting with __ and the normal name is an alias. */
8485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8486 choke me
8487 #else
8488 $ac_func();
8489 #endif
8491 ; return 0; }
8493 if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8494 rm -rf conftest*
8495 eval "ac_cv_func_$ac_func=yes"
8496 else
8497 echo "configure: failed program was:" >&5
8498 cat conftest.$ac_ext >&5
8499 rm -rf conftest*
8500 eval "ac_cv_func_$ac_func=no"
8502 rm -f conftest*
8505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8506 echo "$ac_t""yes" 1>&6
8507 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8508 cat >> confdefs.h <<EOF
8509 #define $ac_tr_func 1
8512 else
8513 echo "$ac_t""no" 1>&6
8515 done
8517 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
8518 echo "configure:8519: checking whether gettimeofday can accept two arguments" >&5
8519 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
8520 echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522 cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8526 #ifdef TIME_WITH_SYS_TIME
8527 #include <sys/time.h>
8528 #include <time.h>
8529 #else
8530 #ifdef HAVE_SYS_TIME_H
8531 #include <sys/time.h>
8532 #else
8533 #include <time.h>
8534 #endif
8535 #endif
8536 int main() {
8537 struct timeval time;
8538 gettimeofday (&time, 0);
8539 ; return 0; }
8541 if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8542 rm -rf conftest*
8543 emacs_cv_gettimeofday_two_arguments=yes
8544 else
8545 echo "configure: failed program was:" >&5
8546 cat conftest.$ac_ext >&5
8547 rm -rf conftest*
8548 emacs_cv_gettimeofday_two_arguments=no
8550 rm -f conftest*
8553 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
8554 if test $emacs_cv_gettimeofday_two_arguments = no; then
8555 cat >> confdefs.h <<\EOF
8556 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8562 if test "$ac_cv_func_gettimeofday" = yes; then
8563 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
8564 echo "configure:8565: checking for struct timezone" >&5
8565 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
8566 echo $ac_n "(cached) $ac_c" 1>&6
8567 else
8568 cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 #include <sys/time.h>
8572 int main() {
8573 struct timezone tz;
8574 ; return 0; }
8576 if { (eval echo configure:8577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8577 rm -rf conftest*
8578 if test "$cross_compiling" = yes; then
8579 emacs_cv_struct_timezone=yes
8580 else
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8583 "configure"
8583 #include "confdefs.h"
8585 #ifdef TIME_WITH_SYS_TIME
8586 #include <sys/time.h>
8587 #include <time.h>
8588 #else
8589 #ifdef HAVE_SYS_TIME_H
8590 #include <sys/time.h>
8591 #else
8592 #include <time.h>
8593 #endif
8594 #endif
8595 main () {
8596 struct timeval time;
8597 struct timezone dummy;
8598 exit (gettimeofday (&time, &dummy));
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8602 then
8603 emacs_cv_struct_timezone=yes
8604 else
8605 echo "configure: failed program was:" >&5
8606 cat conftest.$ac_ext >&5
8607 rm -fr conftest*
8608 emacs_cv_struct_timezone=no
8610 rm -fr conftest*
8613 else
8614 echo "configure: failed program was:" >&5
8615 cat conftest.$ac_ext >&5
8616 rm -rf conftest*
8617 emacs_cv_struct_timezone=no
8619 rm -f conftest*
8622 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
8625 ok_so_far=yes
8626 echo $ac_n "checking for socket""... $ac_c" 1>&6
8627 echo "configure:8628: checking for socket" >&5
8628 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
8629 echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 /* System header to define __stub macros and hopefully few prototypes,
8635 which can conflict with char socket(); below. */
8636 #include <assert.h>
8637 /* Override any gcc2 internal prototype to avoid an error. */
8638 /* We use char because int might match the return type of a gcc2
8639 builtin and then its argument prototype would still apply. */
8640 char socket();
8642 int main() {
8644 /* The GNU C library defines this for functions which it implements
8645 to always fail with ENOSYS. Some functions are actually named
8646 something starting with __ and the normal name is an alias. */
8647 #if defined (__stub_socket) || defined (__stub___socket)
8648 choke me
8649 #else
8650 socket();
8651 #endif
8653 ; return 0; }
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8656 rm -rf conftest*
8657 eval "ac_cv_func_socket=yes"
8658 else
8659 echo "configure: failed program was:" >&5
8660 cat conftest.$ac_ext >&5
8661 rm -rf conftest*
8662 eval "ac_cv_func_socket=no"
8664 rm -f conftest*
8667 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8668 echo "$ac_t""yes" 1>&6
8670 else
8671 echo "$ac_t""no" 1>&6
8672 ok_so_far=no
8675 if test $ok_so_far = yes; then
8676 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
8677 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
8678 echo "configure:8679: checking for netinet/in.h" >&5
8679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8680 echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682 cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 #include <netinet/in.h>
8687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8688 { (eval echo configure:8689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8690 if test -z "$ac_err"; then
8691 rm -rf conftest*
8692 eval "ac_cv_header_$ac_safe=yes"
8693 else
8694 echo "$ac_err" >&5
8695 echo "configure: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 rm -rf conftest*
8698 eval "ac_cv_header_$ac_safe=no"
8700 rm -f conftest*
8702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8703 echo "$ac_t""yes" 1>&6
8705 else
8706 echo "$ac_t""no" 1>&6
8707 ok_so_far=no
8711 if test $ok_so_far = yes; then
8712 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
8713 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
8714 echo "configure:8715: checking for arpa/inet.h" >&5
8715 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8716 echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718 cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 #include <arpa/inet.h>
8723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8724 { (eval echo configure:8725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8726 if test -z "$ac_err"; then
8727 rm -rf conftest*
8728 eval "ac_cv_header_$ac_safe=yes"
8729 else
8730 echo "$ac_err" >&5
8731 echo "configure: failed program was:" >&5
8732 cat conftest.$ac_ext >&5
8733 rm -rf conftest*
8734 eval "ac_cv_header_$ac_safe=no"
8736 rm -f conftest*
8738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8739 echo "$ac_t""yes" 1>&6
8741 else
8742 echo "$ac_t""no" 1>&6
8743 ok_so_far=no
8747 if test $ok_so_far = yes; then
8748 cat >> confdefs.h <<\EOF
8749 #define HAVE_INET_SOCKETS 1
8754 if test -f /usr/lpp/X11/bin/smt.exp; then
8755 cat >> confdefs.h <<\EOF
8756 #define HAVE_AIX_SMT_EXP 1
8761 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8762 echo "configure:8763: checking whether system supports dynamic ptys" >&5
8763 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8764 echo "$ac_t""yes" 1>&6
8765 cat >> confdefs.h <<\EOF
8766 #define HAVE_DEV_PTMX 1
8769 else
8770 echo "$ac_t""no" 1>&6
8773 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8774 echo "configure:8775: checking for pid_t" >&5
8775 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8776 echo $ac_n "(cached) $ac_c" 1>&6
8777 else
8778 cat > conftest.$ac_ext <<EOF
8779 #line 8780 "configure"
8780 #include "confdefs.h"
8781 #include <sys/types.h>
8782 #if STDC_HEADERS
8783 #include <stdlib.h>
8784 #include <stddef.h>
8785 #endif
8787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8788 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8789 rm -rf conftest*
8790 ac_cv_type_pid_t=yes
8791 else
8792 rm -rf conftest*
8793 ac_cv_type_pid_t=no
8795 rm -f conftest*
8798 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8799 if test $ac_cv_type_pid_t = no; then
8800 cat >> confdefs.h <<\EOF
8801 #define pid_t int
8806 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8807 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8808 echo "configure:8809: checking for vfork.h" >&5
8809 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8810 echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812 cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <vfork.h>
8817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8818 { (eval echo configure:8819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8820 if test -z "$ac_err"; then
8821 rm -rf conftest*
8822 eval "ac_cv_header_$ac_safe=yes"
8823 else
8824 echo "$ac_err" >&5
8825 echo "configure: failed program was:" >&5
8826 cat conftest.$ac_ext >&5
8827 rm -rf conftest*
8828 eval "ac_cv_header_$ac_safe=no"
8830 rm -f conftest*
8832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8833 echo "$ac_t""yes" 1>&6
8834 cat >> confdefs.h <<\EOF
8835 #define HAVE_VFORK_H 1
8838 else
8839 echo "$ac_t""no" 1>&6
8842 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8843 echo "configure:8844: checking for working vfork" >&5
8844 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8845 echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847 if test "$cross_compiling" = yes; then
8848 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8849 echo "configure:8850: checking for vfork" >&5
8850 if eval "test \"`echo '$''{'ac_cv_func_vfork'+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 /* System header to define __stub macros and hopefully few prototypes,
8857 which can conflict with char vfork(); below. */
8858 #include <assert.h>
8859 /* Override any gcc2 internal prototype to avoid an error. */
8860 /* We use char because int might match the return type of a gcc2
8861 builtin and then its argument prototype would still apply. */
8862 char vfork();
8864 int main() {
8866 /* The GNU C library defines this for functions which it implements
8867 to always fail with ENOSYS. Some functions are actually named
8868 something starting with __ and the normal name is an alias. */
8869 #if defined (__stub_vfork) || defined (__stub___vfork)
8870 choke me
8871 #else
8872 vfork();
8873 #endif
8875 ; return 0; }
8877 if { (eval echo configure:8878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8878 rm -rf conftest*
8879 eval "ac_cv_func_vfork=yes"
8880 else
8881 echo "configure: failed program was:" >&5
8882 cat conftest.$ac_ext >&5
8883 rm -rf conftest*
8884 eval "ac_cv_func_vfork=no"
8886 rm -f conftest*
8889 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8890 echo "$ac_t""yes" 1>&6
8892 else
8893 echo "$ac_t""no" 1>&6
8896 ac_cv_func_vfork_works=$ac_cv_func_vfork
8897 else
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* Thanks to Paul Eggert for this test. */
8902 #include <stdio.h>
8903 #include <sys/types.h>
8904 #include <sys/stat.h>
8905 #ifdef HAVE_UNISTD_H
8906 #include <unistd.h>
8907 #endif
8908 #ifdef HAVE_VFORK_H
8909 #include <vfork.h>
8910 #endif
8911 /* On some sparc systems, changes by the child to local and incoming
8912 argument registers are propagated back to the parent.
8913 The compiler is told about this with #include <vfork.h>,
8914 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8915 Test for this by using a static variable whose address
8916 is put into a register that is clobbered by the vfork. */
8917 static
8918 #ifdef __cplusplus
8919 sparc_address_test (int arg)
8920 #else
8921 sparc_address_test (arg) int arg;
8922 #endif
8924 static pid_t child;
8925 if (!child) {
8926 child = vfork ();
8927 if (child < 0) {
8928 perror ("vfork");
8929 _exit(2);
8931 if (!child) {
8932 arg = getpid();
8933 write(-1, "", 0);
8934 _exit (arg);
8938 main() {
8939 pid_t parent = getpid ();
8940 pid_t child;
8942 sparc_address_test ();
8944 child = vfork ();
8946 if (child == 0) {
8947 /* Here is another test for sparc vfork register problems.
8948 This test uses lots of local variables, at least
8949 as many local variables as main has allocated so far
8950 including compiler temporaries. 4 locals are enough for
8951 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8952 A buggy compiler should reuse the register of parent
8953 for one of the local variables, since it will think that
8954 parent can't possibly be used any more in this routine.
8955 Assigning to the local variable will thus munge parent
8956 in the parent process. */
8957 pid_t
8958 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8959 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8960 /* Convince the compiler that p..p7 are live; otherwise, it might
8961 use the same hardware register for all 8 local variables. */
8962 if (p != p1 || p != p2 || p != p3 || p != p4
8963 || p != p5 || p != p6 || p != p7)
8964 _exit(1);
8966 /* On some systems (e.g. IRIX 3.3),
8967 vfork doesn't separate parent from child file descriptors.
8968 If the child closes a descriptor before it execs or exits,
8969 this munges the parent's descriptor as well.
8970 Test for this by closing stdout in the child. */
8971 _exit(close(fileno(stdout)) != 0);
8972 } else {
8973 int status;
8974 struct stat st;
8976 while (wait(&status) != child)
8978 exit(
8979 /* Was there some problem with vforking? */
8980 child < 0
8982 /* Did the child fail? (This shouldn't happen.) */
8983 || status
8985 /* Did the vfork/compiler bug occur? */
8986 || parent != getpid()
8988 /* Did the file descriptor bug occur? */
8989 || fstat(fileno(stdout), &st) != 0
8994 if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8995 then
8996 ac_cv_func_vfork_works=yes
8997 else
8998 echo "configure: failed program was:" >&5
8999 cat conftest.$ac_ext >&5
9000 rm -fr conftest*
9001 ac_cv_func_vfork_works=no
9003 rm -fr conftest*
9008 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9009 if test $ac_cv_func_vfork_works = no; then
9010 cat >> confdefs.h <<\EOF
9011 #define vfork fork
9017 # Fixme: This should be replaced when we have autoconf 2.14.
9018 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9019 echo "configure:9020: checking for size_t" >&5
9020 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9021 echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023 cat > conftest.$ac_ext <<EOF
9024 #line 9025 "configure"
9025 #include "confdefs.h"
9026 #include <sys/types.h>
9027 #if STDC_HEADERS
9028 #include <stdlib.h>
9029 #include <stddef.h>
9030 #endif
9032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9033 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9034 rm -rf conftest*
9035 ac_cv_type_size_t=yes
9036 else
9037 rm -rf conftest*
9038 ac_cv_type_size_t=no
9040 rm -f conftest*
9043 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9044 if test $ac_cv_type_size_t = no; then
9045 cat >> confdefs.h <<\EOF
9046 #define size_t unsigned
9052 # Set up the CFLAGS for real compilation, so we can substitute it.
9053 CFLAGS="$REAL_CFLAGS"
9054 CPPFLAGS="$REAL_CPPFLAGS"
9056 #### Find out which version of Emacs this is.
9057 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
9058 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
9059 if test x"${version}" = x; then
9060 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
9063 ### Specify what sort of things we'll be editing into Makefile and config.h.
9064 ### Use configuration here uncanonicalized to avoid exceeding size limits.
9096 cat >> confdefs.h <<EOF
9097 #define EMACS_CONFIGURATION "${canonical}"
9100 cat >> confdefs.h <<EOF
9101 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
9104 cat >> confdefs.h <<EOF
9105 #define config_machfile "${machfile}"
9108 cat >> confdefs.h <<EOF
9109 #define config_opsysfile "${opsysfile}"
9112 cat >> confdefs.h <<EOF
9113 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
9116 cat >> confdefs.h <<EOF
9117 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
9120 cat >> confdefs.h <<EOF
9121 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
9124 cat >> confdefs.h <<EOF
9125 #define UNEXEC_SRC ${UNEXEC_SRC}
9129 if test "${HAVE_X_WINDOWS}" = "yes" ; then
9130 cat >> confdefs.h <<\EOF
9131 #define HAVE_X_WINDOWS 1
9135 if test "${USE_X_TOOLKIT}" != "none" ; then
9136 cat >> confdefs.h <<\EOF
9137 #define USE_X_TOOLKIT 1
9141 if test "${HAVE_X11}" = "yes" ; then
9142 cat >> confdefs.h <<\EOF
9143 #define HAVE_X11 1
9147 if test "${HAVE_XFREE386}" = "yes" ; then
9148 cat >> confdefs.h <<\EOF
9149 #define HAVE_XFREE386 1
9153 if test "${HAVE_MENUS}" = "yes" ; then
9154 cat >> confdefs.h <<\EOF
9155 #define HAVE_MENUS 1
9159 if test "${GNU_MALLOC}" = "yes" ; then
9160 cat >> confdefs.h <<\EOF
9161 #define GNU_MALLOC 1
9165 if test "${REL_ALLOC}" = "yes" ; then
9166 cat >> confdefs.h <<\EOF
9167 #define REL_ALLOC 1
9172 #### Report on what we decided to do.
9173 echo "
9174 Configured for \`${canonical}'.
9176 Where should the build process find the source code? ${srcdir}
9177 What operating system and machine description files should Emacs use?
9178 \`${opsysfile}' and \`${machfile}'
9179 What compiler should emacs be built with? ${CC} ${CFLAGS}
9180 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
9181 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
9182 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
9183 What window system should Emacs use? ${window_system}
9184 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
9186 if test -n "${x_includes}"; then
9187 echo " Where do we find X Windows header files? ${x_includes}"
9188 else
9189 echo " Where do we find X Windows header files? Standard dirs"
9191 if test -n "${x_libraries}"; then
9192 echo " Where do we find X Windows libraries? ${x_libraries}"
9193 else
9194 echo " Where do we find X Windows libraries? Standard dirs"
9197 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
9198 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
9199 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
9200 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9201 echo " Does Emacs use -lungif? ${HAVE_GIF}"
9202 echo " Does Emacs use -lpng? ${HAVE_PNG}"
9203 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
9204 echo
9206 # Remove any trailing slashes in these variables.
9207 test "${prefix}" != NONE &&
9208 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
9209 test "${exec_prefix}" != NONE &&
9210 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
9212 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
9213 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
9214 ## from Makefile.c can correctly provide the arg `-traditional' to the
9215 ## C preprocessor.
9217 cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 yes..yes
9222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9223 egrep "yes..yes" >/dev/null 2>&1; then
9224 rm -rf conftest*
9225 CPP_NEED_TRADITIONAL=no
9226 else
9227 rm -rf conftest*
9228 CPP_NEED_TRADITIONAL=yes
9230 rm -f conftest*
9233 trap '' 1 2 15
9234 cat > confcache <<\EOF
9235 # This file is a shell script that caches the results of configure
9236 # tests run on this system so they can be shared between configure
9237 # scripts and configure runs. It is not useful on other systems.
9238 # If it contains results you don't want to keep, you may remove or edit it.
9240 # By default, configure uses ./config.cache as the cache file,
9241 # creating it if it does not exist already. You can give configure
9242 # the --cache-file=FILE option to use a different cache file; that is
9243 # what configure does when it calls configure scripts in
9244 # subdirectories, so they share the cache.
9245 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9246 # config.status only pays attention to the cache file if you give it the
9247 # --recheck option to rerun configure.
9250 # The following way of writing the cache mishandles newlines in values,
9251 # but we know of no workaround that is simple, portable, and efficient.
9252 # So, don't put newlines in cache variables' values.
9253 # Ultrix sh set writes to stderr and can't be redirected directly,
9254 # and sets the high bit in the cache file unless we assign to the vars.
9255 (set) 2>&1 |
9256 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9257 *ac_space=\ *)
9258 # `set' does not quote correctly, so add quotes (double-quote substitution
9259 # turns \\\\ into \\, and sed turns \\ into \).
9260 sed -n \
9261 -e "s/'/'\\\\''/g" \
9262 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9265 # `set' quotes correctly as required by POSIX, so do not add quotes.
9266 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9268 esac >> confcache
9269 if cmp -s $cache_file confcache; then
9271 else
9272 if test -w $cache_file; then
9273 echo "updating cache $cache_file"
9274 cat confcache > $cache_file
9275 else
9276 echo "not updating unwritable cache $cache_file"
9279 rm -f confcache
9281 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9283 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9284 # Let make expand exec_prefix.
9285 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9287 # Any assignment to VPATH causes Sun make to only execute
9288 # the first set of double-colon rules, so remove it if not needed.
9289 # If there is a colon in the path, we need to keep it.
9290 if test "x$srcdir" = x.; then
9291 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9294 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9296 DEFS=-DHAVE_CONFIG_H
9298 # Without the "./", some shells look in PATH for config.status.
9299 : ${CONFIG_STATUS=./config.status}
9301 echo creating $CONFIG_STATUS
9302 rm -f $CONFIG_STATUS
9303 cat > $CONFIG_STATUS <<EOF
9304 #! /bin/sh
9305 # Generated automatically by configure.
9306 # Run this file to recreate the current configuration.
9307 # This directory was configured as follows,
9308 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9310 # $0 $ac_configure_args
9312 # Compiler output produced by configure, useful for debugging
9313 # configure, is in ./config.log if it exists.
9315 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9316 for ac_option
9318 case "\$ac_option" in
9319 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9320 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9321 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9322 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9323 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9324 exit 0 ;;
9325 -help | --help | --hel | --he | --h)
9326 echo "\$ac_cs_usage"; exit 0 ;;
9327 *) echo "\$ac_cs_usage"; exit 1 ;;
9328 esac
9329 done
9331 ac_given_srcdir=$srcdir
9332 ac_given_INSTALL="$INSTALL"
9334 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9335 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9336 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9338 cat >> $CONFIG_STATUS <<EOF
9340 # Protect against being on the right side of a sed subst in config.status.
9341 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9342 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9343 $ac_vpsub
9344 $extrasub
9345 s%@SHELL@%$SHELL%g
9346 s%@CFLAGS@%$CFLAGS%g
9347 s%@CPPFLAGS@%$CPPFLAGS%g
9348 s%@CXXFLAGS@%$CXXFLAGS%g
9349 s%@FFLAGS@%$FFLAGS%g
9350 s%@DEFS@%$DEFS%g
9351 s%@LDFLAGS@%$LDFLAGS%g
9352 s%@LIBS@%$LIBS%g
9353 s%@exec_prefix@%$exec_prefix%g
9354 s%@prefix@%$prefix%g
9355 s%@program_transform_name@%$program_transform_name%g
9356 s%@bindir@%$bindir%g
9357 s%@sbindir@%$sbindir%g
9358 s%@libexecdir@%$libexecdir%g
9359 s%@datadir@%$datadir%g
9360 s%@sysconfdir@%$sysconfdir%g
9361 s%@sharedstatedir@%$sharedstatedir%g
9362 s%@localstatedir@%$localstatedir%g
9363 s%@libdir@%$libdir%g
9364 s%@includedir@%$includedir%g
9365 s%@oldincludedir@%$oldincludedir%g
9366 s%@infodir@%$infodir%g
9367 s%@mandir@%$mandir%g
9368 s%@host@%$host%g
9369 s%@host_alias@%$host_alias%g
9370 s%@host_cpu@%$host_cpu%g
9371 s%@host_vendor@%$host_vendor%g
9372 s%@host_os@%$host_os%g
9373 s%@CC@%$CC%g
9374 s%@LN_S@%$LN_S%g
9375 s%@CPP@%$CPP%g
9376 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9377 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9378 s%@INSTALL_DATA@%$INSTALL_DATA%g
9379 s%@YACC@%$YACC%g
9380 s%@RANLIB@%$RANLIB%g
9381 s%@LIBSOUND@%$LIBSOUND%g
9382 s%@SET_MAKE@%$SET_MAKE%g
9383 s%@ALLOCA@%$ALLOCA%g
9384 s%@liblockfile@%$liblockfile%g
9385 s%@LIBOBJS@%$LIBOBJS%g
9386 s%@NEED_SETGID@%$NEED_SETGID%g
9387 s%@KMEM_GROUP@%$KMEM_GROUP%g
9388 s%@version@%$version%g
9389 s%@configuration@%$configuration%g
9390 s%@canonical@%$canonical%g
9391 s%@srcdir@%$srcdir%g
9392 s%@lispdir@%$lispdir%g
9393 s%@locallisppath@%$locallisppath%g
9394 s%@lisppath@%$lisppath%g
9395 s%@x_default_search_path@%$x_default_search_path%g
9396 s%@etcdir@%$etcdir%g
9397 s%@archlibdir@%$archlibdir%g
9398 s%@docdir@%$docdir%g
9399 s%@bitmapdir@%$bitmapdir%g
9400 s%@c_switch_system@%$c_switch_system%g
9401 s%@c_switch_machine@%$c_switch_machine%g
9402 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
9403 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
9404 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
9405 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
9406 s%@machfile@%$machfile%g
9407 s%@opsysfile@%$opsysfile%g
9408 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
9410 CEOF
9413 cat >> $CONFIG_STATUS <<\EOF
9415 # Split the substitutions into bite-sized pieces for seds with
9416 # small command number limits, like on Digital OSF/1 and HP-UX.
9417 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9418 ac_file=1 # Number of current file.
9419 ac_beg=1 # First line for current file.
9420 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9421 ac_more_lines=:
9422 ac_sed_cmds=""
9423 while $ac_more_lines; do
9424 if test $ac_beg -gt 1; then
9425 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9426 else
9427 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9429 if test ! -s conftest.s$ac_file; then
9430 ac_more_lines=false
9431 rm -f conftest.s$ac_file
9432 else
9433 if test -z "$ac_sed_cmds"; then
9434 ac_sed_cmds="sed -f conftest.s$ac_file"
9435 else
9436 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9438 ac_file=`expr $ac_file + 1`
9439 ac_beg=$ac_end
9440 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9442 done
9443 if test -z "$ac_sed_cmds"; then
9444 ac_sed_cmds=cat
9448 cat >> $CONFIG_STATUS <<EOF
9450 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
9451 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
9452 lisp/Makefile leim/Makefile"}
9454 cat >> $CONFIG_STATUS <<\EOF
9455 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9456 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9457 case "$ac_file" in
9458 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9459 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9460 *) ac_file_in="${ac_file}.in" ;;
9461 esac
9463 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9465 # Remove last slash and all that follows it. Not all systems have dirname.
9466 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9467 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9468 # The file is in a subdirectory.
9469 test ! -d "$ac_dir" && mkdir "$ac_dir"
9470 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9471 # A "../" for each directory in $ac_dir_suffix.
9472 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9473 else
9474 ac_dir_suffix= ac_dots=
9477 case "$ac_given_srcdir" in
9478 .) srcdir=.
9479 if test -z "$ac_dots"; then top_srcdir=.
9480 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9481 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9482 *) # Relative path.
9483 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9484 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9485 esac
9487 case "$ac_given_INSTALL" in
9488 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9489 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9490 esac
9492 echo creating "$ac_file"
9493 rm -f "$ac_file"
9494 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9495 case "$ac_file" in
9496 *Makefile*) ac_comsub="1i\\
9497 # $configure_input" ;;
9498 *) ac_comsub= ;;
9499 esac
9501 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9502 sed -e "$ac_comsub
9503 s%@configure_input@%$configure_input%g
9504 s%@srcdir@%$srcdir%g
9505 s%@top_srcdir@%$top_srcdir%g
9506 s%@INSTALL@%$INSTALL%g
9507 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9508 fi; done
9509 rm -f conftest.s*
9511 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9512 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9514 # ac_d sets the value in "#define NAME VALUE" lines.
9515 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9516 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9517 ac_dC='\3'
9518 ac_dD='%g'
9519 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9520 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9521 ac_uB='\([ ]\)%\1#\2define\3'
9522 ac_uC=' '
9523 ac_uD='\4%g'
9524 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9525 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9526 ac_eB='$%\1#\2define\3'
9527 ac_eC=' '
9528 ac_eD='%g'
9530 if test "${CONFIG_HEADERS+set}" != set; then
9532 cat >> $CONFIG_STATUS <<EOF
9533 CONFIG_HEADERS="src/config.h:src/config.in"
9535 cat >> $CONFIG_STATUS <<\EOF
9537 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9538 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9539 case "$ac_file" in
9540 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9541 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9542 *) ac_file_in="${ac_file}.in" ;;
9543 esac
9545 echo creating $ac_file
9547 rm -f conftest.frag conftest.in conftest.out
9548 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9549 cat $ac_file_inputs > conftest.in
9553 # Transform confdefs.h into a sed script conftest.vals that substitutes
9554 # the proper values into config.h.in to produce config.h. And first:
9555 # Protect against being on the right side of a sed subst in config.status.
9556 # Protect against being in an unquoted here document in config.status.
9557 rm -f conftest.vals
9558 cat > conftest.hdr <<\EOF
9559 s/[\\&%]/\\&/g
9560 s%[\\$`]%\\&%g
9561 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9562 s%ac_d%ac_u%gp
9563 s%ac_u%ac_e%gp
9565 sed -n -f conftest.hdr confdefs.h > conftest.vals
9566 rm -f conftest.hdr
9568 # This sed command replaces #undef with comments. This is necessary, for
9569 # example, in the case of _POSIX_SOURCE, which is predefined and required
9570 # on some systems where configure will not decide to define it.
9571 cat >> conftest.vals <<\EOF
9572 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9575 # Break up conftest.vals because some shells have a limit on
9576 # the size of here documents, and old seds have small limits too.
9578 rm -f conftest.tail
9579 while :
9581 ac_lines=`grep -c . conftest.vals`
9582 # grep -c gives empty output for an empty file on some AIX systems.
9583 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9584 # Write a limited-size here document to conftest.frag.
9585 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9586 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9587 echo 'CEOF
9588 sed -f conftest.frag conftest.in > conftest.out
9589 rm -f conftest.in
9590 mv conftest.out conftest.in
9591 ' >> $CONFIG_STATUS
9592 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9593 rm -f conftest.vals
9594 mv conftest.tail conftest.vals
9595 done
9596 rm -f conftest.vals
9598 cat >> $CONFIG_STATUS <<\EOF
9599 rm -f conftest.frag conftest.h
9600 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9601 cat conftest.in >> conftest.h
9602 rm -f conftest.in
9603 if cmp -s $ac_file conftest.h 2>/dev/null; then
9604 echo "$ac_file is unchanged"
9605 rm -f conftest.h
9606 else
9607 # Remove last slash and all that follows it. Not all systems have dirname.
9608 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9609 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9610 # The file is in a subdirectory.
9611 test ! -d "$ac_dir" && mkdir "$ac_dir"
9613 rm -f $ac_file
9614 mv conftest.h $ac_file
9616 fi; done
9619 cat >> $CONFIG_STATUS <<EOF
9620 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
9622 cat >> $CONFIG_STATUS <<\EOF
9625 ### Make the necessary directories, if they don't exist.
9626 for dir in etc lisp ; do
9627 test -d ${dir} || mkdir ${dir}
9628 done
9630 # Build src/Makefile from ${srcdir}/src/Makefile.c
9631 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
9632 # This must be done after src/config.h is built, since we rely on that file.
9634 # Now get this: Some word that is part of the ${srcdir} directory name
9635 # or the ${configuration} value might, just might, happen to be an
9636 # identifier like `sun4' or `i386' or something, and be predefined by
9637 # the C preprocessor to some helpful value like 1, or maybe the empty
9638 # string. Needless to say consequent macro substitutions are less
9639 # than conducive to the makefile finding the correct directory.
9640 undefs="`echo $top_srcdir $configuration $canonical |
9641 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
9642 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
9645 echo creating src/epaths.h
9646 ${MAKE-make} epaths-force
9648 # As of 2000-11-19, newest development versions of GNU cpp preprocess
9649 # `..' to `. .' unless invoked with -traditional
9651 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
9652 CPPFLAGS="$CPPFLAGS -traditional"
9655 echo creating lib-src/Makefile
9656 ( cd lib-src
9657 rm -f junk.c junk1.c junk2.c
9658 sed -e '/start of cpp stuff/q' \
9659 < Makefile.c > junk1.c
9660 sed -e '1,/start of cpp stuff/d'\
9661 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9662 < Makefile.c > junk.c
9663 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9664 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9665 cat junk1.c junk2.c > Makefile.new
9666 rm -f junk.c junk1.c junk2.c
9667 chmod 444 Makefile.new
9668 mv -f Makefile.new Makefile
9671 echo creating src/Makefile
9672 ( cd src
9673 rm -f junk.c junk1.c junk2.c
9674 sed -e '/start of cpp stuff/q' \
9675 < Makefile.c > junk1.c
9676 sed -e '1,/start of cpp stuff/d'\
9677 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
9678 < Makefile.c > junk.c
9679 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
9680 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
9681 cat junk1.c junk2.c > Makefile.new
9682 rm -f junk.c junk1.c junk2.c
9683 chmod 444 Makefile.new
9684 mv -f Makefile.new Makefile
9687 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
9688 echo creating src/.gdbinit
9689 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
9692 # This is how we know whether to re-run configure in certain cases.
9693 touch src/config.stamp
9696 exit 0
9698 chmod +x $CONFIG_STATUS
9699 rm -fr confdefs* $ac_clean_files
9700 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1