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