[!HAVE_TERMCAP_H]: Declare tputs, tgetent, tgetflag, tgetnum.
[emacs.git] / configure
blob892279a85dd01f70fd99d87e95693b94f440ee75
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 --with-x use the X Window System"
41 ac_help="$ac_help
42 --disable-largefile omit support for large files"
44 # Initialize some variables set by options.
45 # The variables have the same names as the options, with
46 # dashes changed to underlines.
47 build=NONE
48 cache_file=./config.cache
49 exec_prefix=NONE
50 host=NONE
51 no_create=
52 nonopt=NONE
53 no_recursion=
54 prefix=NONE
55 program_prefix=NONE
56 program_suffix=NONE
57 program_transform_name=s,x,x,
58 silent=
59 site=
60 srcdir=
61 target=NONE
62 verbose=
63 x_includes=NONE
64 x_libraries=NONE
65 bindir='${exec_prefix}/bin'
66 sbindir='${exec_prefix}/sbin'
67 libexecdir='${exec_prefix}/libexec'
68 datadir='${prefix}/share'
69 sysconfdir='${prefix}/etc'
70 sharedstatedir='${prefix}/com'
71 localstatedir='${prefix}/var'
72 libdir='${exec_prefix}/lib'
73 includedir='${prefix}/include'
74 oldincludedir='/usr/include'
75 infodir='${prefix}/info'
76 mandir='${prefix}/man'
78 # Initialize some other variables.
79 subdirs=
80 MFLAGS= MAKEFLAGS=
81 SHELL=${CONFIG_SHELL-/bin/sh}
82 # Maximum number of lines to put in a shell here document.
83 ac_max_here_lines=12
85 ac_prev=
86 for ac_option
89 # If the previous option needs an argument, assign it.
90 if test -n "$ac_prev"; then
91 eval "$ac_prev=\$ac_option"
92 ac_prev=
93 continue
96 case "$ac_option" in
97 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98 *) ac_optarg= ;;
99 esac
101 # Accept the important Cygnus configure options, so we can diagnose typos.
103 case "$ac_option" in
105 -bindir | --bindir | --bindi | --bind | --bin | --bi)
106 ac_prev=bindir ;;
107 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
108 bindir="$ac_optarg" ;;
110 -build | --build | --buil | --bui | --bu)
111 ac_prev=build ;;
112 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
113 build="$ac_optarg" ;;
115 -cache-file | --cache-file | --cache-fil | --cache-fi \
116 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117 ac_prev=cache_file ;;
118 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120 cache_file="$ac_optarg" ;;
122 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123 ac_prev=datadir ;;
124 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125 | --da=*)
126 datadir="$ac_optarg" ;;
128 -disable-* | --disable-*)
129 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
130 # Reject names that are not valid shell variable names.
131 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
132 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135 eval "enable_${ac_feature}=no" ;;
137 -enable-* | --enable-*)
138 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
139 # Reject names that are not valid shell variable names.
140 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
141 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144 case "$ac_option" in
145 *=*) ;;
146 *) ac_optarg=yes ;;
147 esac
148 eval "enable_${ac_feature}='$ac_optarg'" ;;
150 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
151 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
152 | --exec | --exe | --ex)
153 ac_prev=exec_prefix ;;
154 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
155 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
156 | --exec=* | --exe=* | --ex=*)
157 exec_prefix="$ac_optarg" ;;
159 -gas | --gas | --ga | --g)
160 # Obsolete; use --with-gas.
161 with_gas=yes ;;
163 -help | --help | --hel | --he)
164 # Omit some internal or obsolete options to make the list less imposing.
165 # This message is too long to be a string in the A/UX 3.1 sh.
166 cat << EOF
167 Usage: configure [options] [host]
168 Options: [defaults in brackets after descriptions]
169 Configuration:
170 --cache-file=FILE cache test results in FILE
171 --help print this message
172 --no-create do not create output files
173 --quiet, --silent do not print \`checking...' messages
174 --version print the version of autoconf that created configure
175 Directory and file names:
176 --prefix=PREFIX install architecture-independent files in PREFIX
177 [$ac_default_prefix]
178 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
179 [same as prefix]
180 --bindir=DIR user executables in DIR [EPREFIX/bin]
181 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
182 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
183 --datadir=DIR read-only architecture-independent data in DIR
184 [PREFIX/share]
185 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
186 --sharedstatedir=DIR modifiable architecture-independent data in DIR
187 [PREFIX/com]
188 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
189 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
190 --includedir=DIR C header files in DIR [PREFIX/include]
191 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
192 --infodir=DIR info documentation in DIR [PREFIX/info]
193 --mandir=DIR man documentation in DIR [PREFIX/man]
194 --srcdir=DIR find the sources in DIR [configure dir or ..]
195 --program-prefix=PREFIX prepend PREFIX to installed program names
196 --program-suffix=SUFFIX append SUFFIX to installed program names
197 --program-transform-name=PROGRAM
198 run sed PROGRAM on installed program names
200 cat << EOF
201 Host type:
202 --build=BUILD configure for building on BUILD [BUILD=HOST]
203 --host=HOST configure for HOST [guessed]
204 --target=TARGET configure for TARGET [TARGET=HOST]
205 Features and packages:
206 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
207 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
208 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
209 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
210 --x-includes=DIR X include files are in DIR
211 --x-libraries=DIR X library files are in DIR
213 if test -n "$ac_help"; then
214 echo "--enable and --with options recognized:$ac_help"
216 exit 0 ;;
218 -host | --host | --hos | --ho)
219 ac_prev=host ;;
220 -host=* | --host=* | --hos=* | --ho=*)
221 host="$ac_optarg" ;;
223 -includedir | --includedir | --includedi | --included | --include \
224 | --includ | --inclu | --incl | --inc)
225 ac_prev=includedir ;;
226 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227 | --includ=* | --inclu=* | --incl=* | --inc=*)
228 includedir="$ac_optarg" ;;
230 -infodir | --infodir | --infodi | --infod | --info | --inf)
231 ac_prev=infodir ;;
232 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233 infodir="$ac_optarg" ;;
235 -libdir | --libdir | --libdi | --libd)
236 ac_prev=libdir ;;
237 -libdir=* | --libdir=* | --libdi=* | --libd=*)
238 libdir="$ac_optarg" ;;
240 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241 | --libexe | --libex | --libe)
242 ac_prev=libexecdir ;;
243 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244 | --libexe=* | --libex=* | --libe=*)
245 libexecdir="$ac_optarg" ;;
247 -localstatedir | --localstatedir | --localstatedi | --localstated \
248 | --localstate | --localstat | --localsta | --localst \
249 | --locals | --local | --loca | --loc | --lo)
250 ac_prev=localstatedir ;;
251 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254 localstatedir="$ac_optarg" ;;
256 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257 ac_prev=mandir ;;
258 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259 mandir="$ac_optarg" ;;
261 -nfp | --nfp | --nf)
262 # Obsolete; use --without-fp.
263 with_fp=no ;;
265 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266 | --no-cr | --no-c)
267 no_create=yes ;;
269 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271 no_recursion=yes ;;
273 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275 | --oldin | --oldi | --old | --ol | --o)
276 ac_prev=oldincludedir ;;
277 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280 oldincludedir="$ac_optarg" ;;
282 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283 ac_prev=prefix ;;
284 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285 prefix="$ac_optarg" ;;
287 -program-prefix | --program-prefix | --program-prefi | --program-pref \
288 | --program-pre | --program-pr | --program-p)
289 ac_prev=program_prefix ;;
290 -program-prefix=* | --program-prefix=* | --program-prefi=* \
291 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292 program_prefix="$ac_optarg" ;;
294 -program-suffix | --program-suffix | --program-suffi | --program-suff \
295 | --program-suf | --program-su | --program-s)
296 ac_prev=program_suffix ;;
297 -program-suffix=* | --program-suffix=* | --program-suffi=* \
298 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299 program_suffix="$ac_optarg" ;;
301 -program-transform-name | --program-transform-name \
302 | --program-transform-nam | --program-transform-na \
303 | --program-transform-n | --program-transform- \
304 | --program-transform | --program-transfor \
305 | --program-transfo | --program-transf \
306 | --program-trans | --program-tran \
307 | --progr-tra | --program-tr | --program-t)
308 ac_prev=program_transform_name ;;
309 -program-transform-name=* | --program-transform-name=* \
310 | --program-transform-nam=* | --program-transform-na=* \
311 | --program-transform-n=* | --program-transform-=* \
312 | --program-transform=* | --program-transfor=* \
313 | --program-transfo=* | --program-transf=* \
314 | --program-trans=* | --program-tran=* \
315 | --progr-tra=* | --program-tr=* | --program-t=*)
316 program_transform_name="$ac_optarg" ;;
318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319 | -silent | --silent | --silen | --sile | --sil)
320 silent=yes ;;
322 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323 ac_prev=sbindir ;;
324 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325 | --sbi=* | --sb=*)
326 sbindir="$ac_optarg" ;;
328 -sharedstatedir | --sharedstatedir | --sharedstatedi \
329 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330 | --sharedst | --shareds | --shared | --share | --shar \
331 | --sha | --sh)
332 ac_prev=sharedstatedir ;;
333 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336 | --sha=* | --sh=*)
337 sharedstatedir="$ac_optarg" ;;
339 -site | --site | --sit)
340 ac_prev=site ;;
341 -site=* | --site=* | --sit=*)
342 site="$ac_optarg" ;;
344 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345 ac_prev=srcdir ;;
346 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347 srcdir="$ac_optarg" ;;
349 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350 | --syscon | --sysco | --sysc | --sys | --sy)
351 ac_prev=sysconfdir ;;
352 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354 sysconfdir="$ac_optarg" ;;
356 -target | --target | --targe | --targ | --tar | --ta | --t)
357 ac_prev=target ;;
358 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359 target="$ac_optarg" ;;
361 -v | -verbose | --verbose | --verbos | --verbo | --verb)
362 verbose=yes ;;
364 -version | --version | --versio | --versi | --vers)
365 echo "configure generated by autoconf version 2.13"
366 exit 0 ;;
368 -with-* | --with-*)
369 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370 # Reject names that are not valid shell variable names.
371 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
375 case "$ac_option" in
376 *=*) ;;
377 *) ac_optarg=yes ;;
378 esac
379 eval "with_${ac_package}='$ac_optarg'" ;;
381 -without-* | --without-*)
382 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383 # Reject names that are not valid shell variable names.
384 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 eval "with_${ac_package}=no" ;;
390 --x)
391 # Obsolete; use --with-x.
392 with_x=yes ;;
394 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395 | --x-incl | --x-inc | --x-in | --x-i)
396 ac_prev=x_includes ;;
397 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399 x_includes="$ac_optarg" ;;
401 -x-libraries | --x-libraries | --x-librarie | --x-librari \
402 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403 ac_prev=x_libraries ;;
404 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406 x_libraries="$ac_optarg" ;;
408 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
412 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413 echo "configure: warning: $ac_option: invalid host type" 1>&2
415 if test "x$nonopt" != xNONE; then
416 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418 nonopt="$ac_option"
421 esac
422 done
424 if test -n "$ac_prev"; then
425 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
428 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430 # File descriptor usage:
431 # 0 standard input
432 # 1 file creation
433 # 2 errors and warnings
434 # 3 some systems may open it to /dev/tty
435 # 4 used on the Kubota Titan
436 # 6 checking for... messages and results
437 # 5 compiler messages saved in config.log
438 if test "$silent" = yes; then
439 exec 6>/dev/null
440 else
441 exec 6>&1
443 exec 5>./config.log
445 echo "\
446 This file contains any messages produced by compilers while
447 running configure, to aid debugging if configure makes a mistake.
448 " 1>&5
450 # Strip out --no-create and --no-recursion so they do not pile up.
451 # Also quote any args containing shell metacharacters.
452 ac_configure_args=
453 for ac_arg
455 case "$ac_arg" in
456 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457 | --no-cr | --no-c) ;;
458 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
463 esac
464 done
466 # NLS nuisances.
467 # Only set these to C if already set. These must not be set unconditionally
468 # because not all systems understand e.g. LANG=C (notably SCO).
469 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470 # Non-C LC_CTYPE values break the ctype check.
471 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
472 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
476 # confdefs.h avoids OS command line length limits that DEFS can exceed.
477 rm -rf conftest* confdefs.h
478 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
479 echo > confdefs.h
481 # A filename unique to this package, relative to the directory that
482 # configure is in, which we can look for to find out if srcdir is correct.
483 ac_unique_file=src/lisp.h
485 # Find the source files, if location was not specified.
486 if test -z "$srcdir"; then
487 ac_srcdir_defaulted=yes
488 # Try the directory containing this script, then its parent.
489 ac_prog=$0
490 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492 srcdir=$ac_confdir
493 if test ! -r $srcdir/$ac_unique_file; then
494 srcdir=..
496 else
497 ac_srcdir_defaulted=no
499 if test ! -r $srcdir/$ac_unique_file; then
500 if test "$ac_srcdir_defaulted" = yes; then
501 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502 else
503 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
506 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508 # Prefer explicitly selected file to automatically selected ones.
509 if test -z "$CONFIG_SITE"; then
510 if test "x$prefix" != xNONE; then
511 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512 else
513 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
516 for ac_site_file in $CONFIG_SITE; do
517 if test -r "$ac_site_file"; then
518 echo "loading site script $ac_site_file"
519 . "$ac_site_file"
521 done
523 if test -r "$cache_file"; then
524 echo "loading cache $cache_file"
525 . $cache_file
526 else
527 echo "creating cache $cache_file"
528 > $cache_file
531 ac_ext=c
532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
533 ac_cpp='$CPP $CPPFLAGS'
534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
535 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
536 cross_compiling=$ac_cv_prog_cc_cross
538 ac_exeext=
539 ac_objext=o
540 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
541 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
542 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
543 ac_n= ac_c='
544 ' ac_t=' '
545 else
546 ac_n=-n ac_c= ac_t=
548 else
549 ac_n= ac_c='\c' ac_t=
555 lispdir='${datadir}/emacs/${version}/lisp'
556 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
557 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
558 lisppath='${locallisppath}:${lispdir}'
559 etcdir='${datadir}/emacs/${version}/etc'
560 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
561 docdir='${datadir}/emacs/${version}/etc'
563 # Check whether --with-gcc or --without-gcc was given.
564 if test "${with_gcc+set}" = set; then
565 withval="$with_gcc"
569 # Check whether --with-pop or --without-pop was given.
570 if test "${with_pop+set}" = set; then
571 withval="$with_pop"
572 if test "$withval" = yes; then
573 cat >> confdefs.h <<\EOF
574 #define MAIL_USE_POP 1
577 else :
579 else
580 cat >> confdefs.h <<\EOF
581 #define MAIL_USE_POP 1
586 # Check whether --with-kerberos or --without-kerberos was given.
587 if test "${with_kerberos+set}" = set; then
588 withval="$with_kerberos"
589 cat >> confdefs.h <<\EOF
590 #define KERBEROS 1
595 # Check whether --with-kerberos5 or --without-kerberos5 was given.
596 if test "${with_kerberos5+set}" = set; then
597 withval="$with_kerberos5"
598 if test "${with_kerberos5+set}" = set; then
599 if test "${with_kerberos+set}" != set; then
600 with_kerberos=yes
601 cat >> confdefs.h <<\EOF
602 #define KERBEROS 1
607 cat >> confdefs.h <<\EOF
608 #define KERBEROS5 1
613 # Check whether --with-hesiod or --without-hesiod was given.
614 if test "${with_hesiod+set}" = set; then
615 withval="$with_hesiod"
616 cat >> confdefs.h <<\EOF
617 #define HESIOD 1
622 # Check whether --with-x-toolkit or --without-x-toolkit was given.
623 if test "${with_x_toolkit+set}" = set; then
624 withval="$with_x_toolkit"
625 case "${withval}" in
626 y | ye | yes ) val=athena ;;
627 n | no ) val=no ;;
628 l | lu | luc | luci | lucid ) val=lucid ;;
629 a | at | ath | athe | athen | athena ) val=athena ;;
630 m | mo | mot | moti | motif ) val=motif ;;
632 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
633 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
634 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
636 esac
637 with_x_toolkit=$val
641 # Check whether --with-xpm or --without-xpm was given.
642 if test "${with_xpm+set}" = set; then
643 withval="$with_xpm"
647 # Check whether --with-jpeg or --without-jpeg was given.
648 if test "${with_jpeg+set}" = set; then
649 withval="$with_jpeg"
653 # Check whether --with-tiff or --without-tiff was given.
654 if test "${with_tiff+set}" = set; then
655 withval="$with_tiff"
659 # Check whether --with-gif or --without-gif was given.
660 if test "${with_gif+set}" = set; then
661 withval="$with_gif"
665 # Check whether --with-png or --without-png was given.
666 if test "${with_png+set}" = set; then
667 withval="$with_png"
671 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
672 if test "${with_toolkit_scroll_bars+set}" = set; then
673 withval="$with_toolkit_scroll_bars"
678 #### Make srcdir absolute, if it isn't already. It's important to
679 #### avoid running the path through pwd unnecessary, since pwd can
680 #### give you automounter prefixes, which can go away. We do all this
681 #### so Emacs can find its files when run uninstalled.
682 case "${srcdir}" in
683 /* ) ;;
685 ## We may be able to use the $PWD environment variable to make this
686 ## absolute. But sometimes PWD is inaccurate.
687 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
688 unset CDPATH
689 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
690 then
691 srcdir="$PWD"
692 else
693 srcdir="`(cd ${srcdir}; pwd)`"
696 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
697 esac
699 #### Check if the source directory already has a configured system in it.
700 if test `pwd` != `(cd ${srcdir} && pwd)` \
701 && test -f "${srcdir}/src/config.h" ; then
702 echo "configure: warning: The directory tree \`${srcdir}' is being used
703 as a build directory right now; it has been configured in its own
704 right. To configure in another directory as well, you MUST
705 use GNU make. If you do not have GNU make, then you must
706 now do \`make distclean' in ${srcdir},
707 and then run $0 again." 1>&2
709 extrasub='/^VPATH[ ]*=/c\
710 vpath %.c $(srcdir)\
711 vpath %.h $(srcdir)\
712 vpath %.y $(srcdir)\
713 vpath %.l $(srcdir)\
714 vpath %.s $(srcdir)\
715 vpath %.in $(srcdir)\
716 vpath %.texi $(srcdir)'
719 #### Given the configuration name, set machfile and opsysfile to the
720 #### names of the m/*.h and s/*.h files we should use.
722 ### Canonicalize the configuration name.
724 ac_aux_dir=
725 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
726 if test -f $ac_dir/install-sh; then
727 ac_aux_dir=$ac_dir
728 ac_install_sh="$ac_aux_dir/install-sh -c"
729 break
730 elif test -f $ac_dir/install.sh; then
731 ac_aux_dir=$ac_dir
732 ac_install_sh="$ac_aux_dir/install.sh -c"
733 break
735 done
736 if test -z "$ac_aux_dir"; then
737 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
739 ac_config_guess=$ac_aux_dir/config.guess
740 ac_config_sub=$ac_aux_dir/config.sub
741 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
744 # Make sure we can run config.sub.
745 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
746 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
749 echo $ac_n "checking host system type""... $ac_c" 1>&6
750 echo "configure:751: checking host system type" >&5
752 host_alias=$host
753 case "$host_alias" in
754 NONE)
755 case $nonopt in
756 NONE)
757 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
758 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
759 fi ;;
760 *) host_alias=$nonopt ;;
761 esac ;;
762 esac
764 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
765 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
766 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
767 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
768 echo "$ac_t""$host" 1>&6
770 canonical=$host
771 configuration=$host_alias
774 ### If you add support for a new configuration, add code to this
775 ### switch statement to recognize your configuration name and select
776 ### the appropriate operating system and machine description files.
778 ### You would hope that you could choose an m/*.h file pretty much
779 ### based on the machine portion of the configuration name, and an s-
780 ### file based on the operating system portion. However, it turns out
781 ### that each m/*.h file is pretty manufacturer-specific - for
782 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
783 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
784 ### machines. So we basically have to have a special case for each
785 ### configuration name.
787 ### As far as handling version numbers on operating systems is
788 ### concerned, make sure things will fail in a fixable way. If
789 ### /etc/MACHINES doesn't say anything about version numbers, be
790 ### prepared to handle anything reasonably. If version numbers
791 ### matter, be sure /etc/MACHINES says something about it.
793 ### Eric Raymond says we should accept strings like "sysvr4" to mean
794 ### "System V Release 4"; he writes, "The old convention encouraged
795 ### confusion between `system' and `release' levels'."
797 machine='' opsys='' unported=no
798 case "${canonical}" in
800 ## NetBSD ports
801 *-*-netbsd* )
802 opsys=netbsd
803 case "${canonical}" in
804 alpha*-*-netbsd*) machine=alpha ;;
805 i[3456]86-*-netbsd*) machine=intel386 ;;
806 m68k-*-netbsd*)
807 # This is somewhat bogus.
808 machine=hp9000s300 ;;
809 powerpc-apple-netbsd*) machine=macppc ;;
810 mips-*-netbsd*) machine=pmax ;;
811 mipsel-*-netbsd*) machine=pmax ;;
812 ns32k-*-netbsd*) machine=ns32000 ;;
813 powerpc-*-netbsd*) machine=macppc ;;
814 sparc-*-netbsd*) machine=sparc ;;
815 vax-*-netbsd*) machine=vax ;;
816 arm-*-netbsd*) machine=arm ;;
817 esac
820 ## OpenBSD ports
821 *-*-openbsd* )
822 opsys=openbsd
823 case "${canonical}" in
824 alpha*-*-openbsd*) machine=alpha ;;
825 i386-*-openbsd*) machine=intel386 ;;
826 m68k-*-openbsd*) machine=hp9000s300 ;;
827 mipsel-*-openbsd*) machine=pmax ;;
828 ns32k-*-openbsd*) machine=ns32000 ;;
829 sparc-*-openbsd*) machine=sparc ;;
830 vax-*-openbsd*) machine=vax ;;
831 esac
834 ## Acorn RISCiX:
835 arm-acorn-riscix1.1* )
836 machine=acorn opsys=riscix1-1
838 arm-acorn-riscix1.2* | arm-acorn-riscix )
839 ## This name is riscix12 instead of riscix1.2
840 ## to avoid a file name conflict on MSDOS.
841 machine=acorn opsys=riscix12
844 ## BSDI ports
845 *-*-bsdi* )
846 opsys=bsdi
847 case "${canonical}" in
848 i[345]86-*-bsdi*) machine=intel386 ;;
849 sparc-*-bsdi*) machine=sparc ;;
850 powerpc-*-bsdi*) machine=powerpc ;;
851 esac
852 case "${canonical}" in
853 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
854 *-*-bsdi2.0* ) opsys=bsdos2 ;;
855 *-*-bsdi2* ) opsys=bsdos2-1 ;;
856 *-*-bsdi3* ) opsys=bsdos3 ;;
857 *-*-bsdi4* ) opsys=bsdos4 ;;
858 esac
861 ## Alliant machines
862 ## Strictly speaking, we need the version of the alliant operating
863 ## system to choose the right machine file, but currently the
864 ## configuration name doesn't tell us enough to choose the right
865 ## one; we need to give alliants their own operating system name to
866 ## do this right. When someone cares, they can help us.
867 fx80-alliant-* )
868 machine=alliant4 opsys=bsd4-2
870 i860-alliant-* )
871 machine=alliant-2800 opsys=bsd4-3
874 ## Alpha (DEC) machines.
875 alpha*-dec-osf* )
876 machine=alpha opsys=osf1
877 # This is needed to find X11R6.1 libraries for certain tests.
878 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
879 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
880 case "${canonical}" in
881 # This is necessary on 5.0 to avoid mangling src/Makefile.
882 # Separated out in case it causes problems on earlier versions.
883 alpha*-dec-osf[5-9]*)
884 opsys=osf5-0
885 NON_GNU_CPP='cpp' ;;
886 esac
889 alpha*-*-linux-gnu* )
890 machine=alpha opsys=gnu-linux
893 arm*-*-linux-gnu* )
894 machine=arm opsys=gnu-linux
897 ppc-*-linux | \
898 powerpc-*-linux* )
899 machine=powerpc opsys=gnu-linux
902 ## Altos 3068
903 m68*-altos-sysv* )
904 machine=altos opsys=usg5-2
907 ## Amdahl UTS
908 580-amdahl-sysv* )
909 machine=amdahl opsys=usg5-2-2
912 ## Apollo, Domain/OS
913 m68*-apollo-* )
914 machine=apollo opsys=bsd4-3
917 ## AT&T 3b2, 3b5, 3b15, 3b20
918 we32k-att-sysv* )
919 machine=att3b opsys=usg5-2-2
922 ## AT&T 3b1 - The Mighty Unix PC!
923 m68*-att-sysv* )
924 machine=7300 opsys=usg5-2-2
927 ## Bull dpx20
928 rs6000-bull-bosx* )
929 machine=ibmrs6000 opsys=aix3-2
932 ## Bull dpx2
933 m68*-bull-sysv3* )
934 machine=dpx2 opsys=usg5-3
937 ## Bull sps7
938 m68*-bull-sysv2* )
939 machine=sps7 opsys=usg5-2
942 ## CCI 5/32, 6/32 -- see "Tahoe".
944 ## Celerity
945 ## I don't know what configuration name to use for this; config.sub
946 ## doesn't seem to know anything about it. Hey, Celerity users, get
947 ## in touch with us!
948 celerity-celerity-bsd* )
949 machine=celerity opsys=bsd4-2
952 ## Clipper
953 ## What operating systems does this chip run that Emacs has been
954 ## tested on?
955 clipper-* )
956 machine=clipper
957 ## We'll use the catch-all code at the bottom to guess the
958 ## operating system.
961 ## Convex
962 *-convex-bsd* | *-convex-convexos* )
963 machine=convex opsys=bsd4-3
964 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
965 NON_GNU_CPP="cc -E -P"
968 ## Cubix QBx/386
969 i[3456]86-cubix-sysv* )
970 machine=intel386 opsys=usg5-3
973 ## Cydra 5
974 cydra*-cydrome-sysv* )
975 machine=cydra5 opsys=usg5-3
978 ## Data General AViiON Machines
979 ## DG changed naming conventions with the release of 5.4.4.10, they
980 ## dropped the initial 5.4 but left the intervening R. Because of the
981 ## R this shouldn't conflict with older versions of the OS (which I
982 ## think were named like dgux4.*). In addition, DG new AViiONs series
983 ## uses either Motorola M88k or Intel Pentium CPUs.
984 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
985 machine=aviion opsys=dgux4
987 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
988 ## This name is dgux5-4-3 instead of dgux5-4r3
989 ## to avoid a file name conflict on MSDOS.
990 machine=aviion opsys=dgux5-4-3
992 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
993 machine=aviion opsys=dgux5-4r2
995 m88k-dg-dgux* )
996 machine=aviion opsys=dgux
999 ## Data General AViiON Intel (x86) Machines
1000 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1001 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1002 i[345]86-dg-dguxR4* )
1003 machine=aviion-intel opsys=dgux4
1006 ## DECstations
1007 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1008 machine=pmax opsys=bsd4-2
1010 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1011 machine=pmax opsys=bsd4-3
1013 mips-dec-ultrix* )
1014 machine=pmax opsys=ultrix4-3
1016 mips-dec-osf* )
1017 machine=pmax opsys=osf1
1019 mips-dec-mach_bsd4.3* )
1020 machine=pmax opsys=mach-bsd4-3
1023 ## Motorola Delta machines
1024 m68k-motorola-sysv* | m68000-motorola-sysv* )
1025 machine=delta opsys=usg5-3
1026 if test -z "`type gnucc | grep 'not found'`"
1027 then
1028 if test -s /etc/167config
1029 then CC="gnucc -m68040"
1030 else CC="gnucc -m68881"
1032 else
1033 if test -z "`type gcc | grep 'not found'`"
1034 then CC=gcc
1035 else CC=cc
1039 m88k-motorola-sysv4* )
1040 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1041 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1042 # I hope there are not other 4.0 versions for this machine
1043 # which really need usg5-4 instead.
1044 machine=delta88k opsys=usg5-4-2
1046 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1047 machine=delta88k opsys=usg5-3
1050 ## Dual machines
1051 m68*-dual-sysv* )
1052 machine=dual opsys=usg5-2
1054 m68*-dual-uniplus* )
1055 machine=dual opsys=unipl5-2
1058 ## Elxsi 6400
1059 elxsi-elxsi-sysv* )
1060 machine=elxsi opsys=usg5-2
1063 ## Encore machines
1064 ns16k-encore-bsd* )
1065 machine=ns16000 opsys=umax
1068 ## The GEC 93 - apparently, this port isn't really finished yet.
1070 ## Gould Power Node and NP1
1071 pn-gould-bsd4.2* )
1072 machine=gould opsys=bsd4-2
1074 pn-gould-bsd4.3* )
1075 machine=gould opsys=bsd4-3
1077 np1-gould-bsd* )
1078 machine=gould-np1 opsys=bsd4-3
1081 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1082 ## as far as Emacs is concerned).
1083 m88k-harris-cxux* )
1084 # Build needs to be different on 7.0 and later releases
1085 case "`uname -r`" in
1086 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1087 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1088 esac
1089 NON_GNU_CPP="/lib/cpp"
1091 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1092 m68k-harris-cxux* )
1093 machine=nh3000 opsys=cxux
1095 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1096 powerpc-harris-powerunix )
1097 machine=nh6000 opsys=powerunix
1098 NON_GNU_CPP="cc -Xo -E -P"
1100 ## SR2001/SR2201 running HI-UX/MPP
1101 hppa1.1-hitachi-hiuxmpp* )
1102 machine=sr2k opsys=hiuxmpp
1104 ## Honeywell XPS100
1105 xps*-honeywell-sysv* )
1106 machine=xps100 opsys=usg5-2
1109 ## HP 9000 series 200 or 300
1110 m68*-hp-bsd* )
1111 machine=hp9000s300 opsys=bsd4-3
1113 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1114 m68*-hp-hpux* )
1115 case "`uname -r`" in
1116 ## Someone's system reports A.B8.05 for this.
1117 ## I wonder what other possibilities there are.
1118 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1119 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1120 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1121 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1122 *) machine=hp9000s300 opsys=hpux ;;
1123 esac
1126 ## HP 9000 series 700 and 800, running HP/UX
1127 hppa*-hp-hpux7* )
1128 machine=hp800 opsys=hpux
1130 hppa*-hp-hpux8* )
1131 machine=hp800 opsys=hpux8
1133 hppa*-hp-hpux9shr* )
1134 machine=hp800 opsys=hpux9shr
1136 hppa*-hp-hpux9* )
1137 machine=hp800 opsys=hpux9
1139 hppa*-hp-hpux1[0-9]* )
1140 machine=hp800 opsys=hpux10
1143 ## HP 9000 series 700 and 800, running HP/UX
1144 hppa*-hp-hpux* )
1145 ## Cross-compilation? Nah!
1146 case "`uname -r`" in
1147 ## Someone's system reports A.B8.05 for this.
1148 ## I wonder what other possibilities there are.
1149 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1150 *.08.* ) machine=hp800 opsys=hpux8 ;;
1151 *.09.* ) machine=hp800 opsys=hpux9 ;;
1152 *) machine=hp800 opsys=hpux10 ;;
1153 esac
1155 hppa*-*-nextstep* )
1156 machine=hp800 opsys=nextstep
1159 ## Orion machines
1160 orion-orion-bsd* )
1161 machine=orion opsys=bsd4-2
1163 clipper-orion-bsd* )
1164 machine=orion105 opsys=bsd4-2
1167 ## IBM machines
1168 i[3456]86-ibm-aix1.1* )
1169 machine=ibmps2-aix opsys=usg5-2-2
1171 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1172 machine=ibmps2-aix opsys=usg5-3
1174 i370-ibm-aix*)
1175 machine=ibm370aix opsys=usg5-3
1177 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1178 machine=ibmrs6000 opsys=aix3-1
1180 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1181 machine=ibmrs6000 opsys=aix3-2-5
1183 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1184 machine=ibmrs6000 opsys=aix4-1
1186 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1187 machine=ibmrs6000 opsys=aix4-2
1189 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1190 machine=ibmrs6000 opsys=aix4
1192 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1193 machine=ibmrs6000 opsys=aix4-1
1195 rs6000-ibm-aix* | powerpc-ibm-aix* )
1196 machine=ibmrs6000 opsys=aix3-2
1198 romp-ibm-bsd4.3* )
1199 machine=ibmrt opsys=bsd4-3
1201 romp-ibm-bsd4.2* )
1202 machine=ibmrt opsys=bsd4-2
1204 romp-ibm-aos4.3* )
1205 machine=ibmrt opsys=bsd4-3
1207 romp-ibm-aos4.2* )
1208 machine=ibmrt opsys=bsd4-2
1210 romp-ibm-aos* )
1211 machine=ibmrt opsys=bsd4-3
1213 romp-ibm-bsd* )
1214 machine=ibmrt opsys=bsd4-3
1216 romp-ibm-aix* )
1217 machine=ibmrt-aix opsys=usg5-2-2
1220 ## Integrated Solutions `Optimum V'
1221 m68*-isi-bsd4.2* )
1222 machine=isi-ov opsys=bsd4-2
1224 m68*-isi-bsd4.3* )
1225 machine=isi-ov opsys=bsd4-3
1228 ## Intel 386 machines where we do care about the manufacturer
1229 i[3456]86-intsys-sysv* )
1230 machine=is386 opsys=usg5-2-2
1233 ## Prime EXL
1234 i[3456]86-prime-sysv* )
1235 machine=i386 opsys=usg5-3
1238 ## Sequent Symmetry running Dynix
1239 i[3456]86-sequent-bsd* )
1240 machine=symmetry opsys=bsd4-3
1243 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1244 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1245 machine=sequent-ptx opsys=ptx4
1246 NON_GNU_CPP=/lib/cpp
1249 ## Sequent Symmetry running DYNIX/ptx
1250 ## Use the old cpp rather than the newer ANSI one.
1251 i[3456]86-sequent-ptx* )
1252 machine=sequent-ptx opsys=ptx
1253 NON_GNU_CPP="/lib/cpp"
1256 ## ncr machine running svr4.3.
1257 i[3456]86-ncr-sysv4.3 )
1258 machine=ncr386 opsys=usg5-4-3
1261 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1262 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1263 i[3456]86-ncr-sysv* )
1264 machine=ncr386 opsys=usg5-4-2
1267 ## Intel Paragon OSF/1
1268 i860-intel-osf1* )
1269 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1272 ## Intel 860
1273 i860-*-sysv4* )
1274 machine=i860 opsys=usg5-4
1275 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1276 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1279 ## Macintosh PowerPC
1280 powerpc*-*-linux-gnu* )
1281 machine=macppc opsys=gnu-linux
1284 ## Masscomp machines
1285 m68*-masscomp-rtu* )
1286 machine=masscomp opsys=rtu
1289 ## Megatest machines
1290 m68*-megatest-bsd* )
1291 machine=mega68 opsys=bsd4-2
1294 ## Workstations sold by MIPS
1295 ## This is not necessarily all workstations using the MIPS processor -
1296 ## Irises are produced by SGI, and DECstations by DEC.
1298 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1299 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1300 ## it gives for choosing between the alternatives seems to be "Use
1301 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1302 ## the BSD world." I'll assume that these are instructions for
1303 ## handling two odd situations, and that every other situation
1304 ## should use mips.h and usg5-2-2, they being listed first.
1305 mips-mips-usg* )
1306 machine=mips4
1307 ## Fall through to the general code at the bottom to decide on the OS.
1309 mips-mips-riscos4* )
1310 machine=mips4 opsys=bsd4-3
1311 NON_GNU_CC="cc -systype bsd43"
1312 NON_GNU_CPP="cc -systype bsd43 -E"
1314 mips-mips-riscos5* )
1315 machine=mips4 opsys=riscos5
1316 NON_GNU_CC="cc -systype bsd43"
1317 NON_GNU_CPP="cc -systype bsd43 -E"
1319 mips-mips-bsd* )
1320 machine=mips opsys=bsd4-3
1322 mips-mips-* )
1323 machine=mips opsys=usg5-2-2
1326 ## NeXT
1327 m68*-next-* | m68k-*-nextstep* )
1328 machine=m68k opsys=nextstep
1331 ## The complete machine from National Semiconductor
1332 ns32k-ns-genix* )
1333 machine=ns32000 opsys=usg5-2
1336 ## NCR machines
1337 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1338 machine=tower32 opsys=usg5-2-2
1340 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1341 machine=tower32v3 opsys=usg5-3
1344 ## NEC EWS4800
1345 mips-nec-sysv4*)
1346 machine=ews4800 opsys=ux4800
1349 ## Nixdorf Targon 31
1350 m68*-nixdorf-sysv* )
1351 machine=targon31 opsys=usg5-2-2
1354 ## Nu (TI or LMI)
1355 m68*-nu-sysv* )
1356 machine=nu opsys=usg5-2
1359 ## Plexus
1360 m68*-plexus-sysv* )
1361 machine=plexus opsys=usg5-2
1364 ## PowerPC reference platform
1365 powerpcle-*-solaris2* )
1366 machine=prep
1367 opsys=sol2-5
1370 ## Pyramid machines
1371 ## I don't really have any idea what sort of processor the Pyramid has,
1372 ## so I'm assuming it is its own architecture.
1373 pyramid-pyramid-bsd* )
1374 machine=pyramid opsys=bsd4-2
1377 ## Sequent Balance
1378 ns32k-sequent-bsd4.2* )
1379 machine=sequent opsys=bsd4-2
1381 ns32k-sequent-bsd4.3* )
1382 machine=sequent opsys=bsd4-3
1385 ## Siemens Nixdorf
1386 mips-siemens-sysv* | mips-sni-sysv*)
1387 machine=mips-siemens opsys=usg5-4
1388 NON_GNU_CC=/usr/ccs/bin/cc
1389 NON_GNU_CPP=/usr/ccs/lib/cpp
1392 ## Silicon Graphics machines
1393 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1394 m68*-sgi-iris3.5* )
1395 machine=irist opsys=iris3-5
1397 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1398 machine=irist opsys=iris3-6
1400 ## Iris 4D
1401 mips-sgi-irix3* )
1402 machine=iris4d opsys=irix3-3
1404 mips-sgi-irix4* )
1405 machine=iris4d opsys=irix4-0
1407 mips-sgi-irix6.5 )
1408 machine=iris4d opsys=irix6-5
1409 # Without defining _LANGUAGE_C, things get masked out in the headers
1410 # so that, for instance, grepping for `free' in stdlib.h fails and
1411 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1412 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1413 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1415 mips-sgi-irix6* )
1416 machine=iris4d opsys=irix6-0
1417 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1418 # but presumably it does no harm.
1419 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1420 # -32 probably isn't necessary in later v.6s -- anyone know which?
1421 NON_GCC_TEST_OPTIONS=-32
1423 mips-sgi-irix5.[01]* )
1424 machine=iris4d opsys=irix5-0
1426 mips-sgi-irix5* | mips-sgi-irix* )
1427 machine=iris4d opsys=irix5-2
1430 ## SONY machines
1431 m68*-sony-bsd4.2* )
1432 machine=news opsys=bsd4-2
1434 m68*-sony-bsd4.3* )
1435 machine=news opsys=bsd4-3
1437 m68*-sony-newsos3* | m68*-sony-news3*)
1438 machine=news opsys=bsd4-3
1440 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1441 machine=news-risc opsys=bsd4-3
1443 mips-sony-newsos6* )
1444 machine=news-r6 opsys=newsos6
1446 mips-sony-news* )
1447 machine=news-risc opsys=newsos5
1450 ## Stride
1451 m68*-stride-sysv* )
1452 machine=stride opsys=usg5-2
1455 ## Suns
1456 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1457 machine=sparc opsys=gnu-linux
1460 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1461 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1462 | rs6000-*-solaris2*)
1463 case "${canonical}" in
1464 m68*-sunos1* ) machine=sun1 ;;
1465 m68*-sunos2* ) machine=sun2 ;;
1466 m68* ) machine=sun3 ;;
1467 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1468 i[3456]86-*-* ) machine=intel386 ;;
1469 powerpcle* ) machine=powerpcle ;;
1470 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1471 sparc* ) machine=sparc ;;
1472 * ) unported=yes ;;
1473 esac
1474 case "${canonical}" in
1475 ## The Sun386 didn't get past 4.0.
1476 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1477 *-sunos4.0* ) opsys=sunos4-0 ;;
1478 *-sunos4.1.[3-9]*noshare )
1479 ## This name is sunos413 instead of sunos4-1-3
1480 ## to avoid a file name conflict on MSDOS.
1481 opsys=sunos413
1482 NON_GNU_CPP=/usr/lib/cpp
1483 NON_GCC_TEST_OPTIONS=-Bstatic
1484 GCC_TEST_OPTIONS=-static
1486 *-sunos4.1.[3-9]* | *-sunos4shr*)
1487 opsys=sunos4shr
1488 NON_GNU_CPP=/usr/lib/cpp
1490 *-sunos4* | *-sunos )
1491 opsys=sunos4-1
1492 NON_GCC_TEST_OPTIONS=-Bstatic
1493 GCC_TEST_OPTIONS=-static
1495 *-sunos5.3* | *-solaris2.3* )
1496 opsys=sol2-3
1497 NON_GNU_CPP=/usr/ccs/lib/cpp
1499 *-sunos5.4* | *-solaris2.4* )
1500 opsys=sol2-4
1501 NON_GNU_CPP=/usr/ccs/lib/cpp
1502 RANLIB="ar -ts"
1504 *-sunos5.5* | *-solaris2.5* )
1505 opsys=sol2-5
1506 NON_GNU_CPP=/usr/ccs/lib/cpp
1507 RANLIB="ar -ts"
1509 *-sunos5* | *-solaris* )
1510 opsys=sol2-5
1511 NON_GNU_CPP=/usr/ccs/lib/cpp
1513 * ) opsys=bsd4-2 ;;
1514 esac
1515 ## Watch out for a compiler that we know will not work.
1516 case "${canonical}" in
1517 *-solaris* | *-sunos5* )
1518 if [ "x$CC" = x/usr/ucb/cc ]; then
1519 ## /usr/ucb/cc doesn't work;
1520 ## we should find some other compiler that does work.
1521 unset CC
1524 *) ;;
1525 esac
1527 sparc-*-nextstep* )
1528 machine=sparc opsys=nextstep
1531 ## Tadpole 68k
1532 m68*-tadpole-sysv* )
1533 machine=tad68k opsys=usg5-3
1536 ## Tahoe machines
1537 tahoe-tahoe-bsd4.2* )
1538 machine=tahoe opsys=bsd4-2
1540 tahoe-tahoe-bsd4.3* )
1541 machine=tahoe opsys=bsd4-3
1544 ## Tandem Integrity S2
1545 mips-tandem-sysv* )
1546 machine=tandem-s2 opsys=usg5-3
1549 ## Tektronix XD88
1550 m88k-tektronix-sysv3* )
1551 machine=tekxd88 opsys=usg5-3
1554 ## Tektronix 16000 box (6130?)
1555 ns16k-tektronix-bsd* )
1556 machine=ns16000 opsys=bsd4-2
1558 ## Tektronix 4300
1559 ## src/m/tek4300.h hints that this is a m68k machine.
1560 m68*-tektronix-bsd* )
1561 machine=tek4300 opsys=bsd4-3
1564 ## Titan P2 or P3
1565 ## We seem to have lost the machine-description file titan.h!
1566 titan-titan-sysv* )
1567 machine=titan opsys=usg5-3
1570 ## Ustation E30 (SS5E)
1571 m68*-unisys-uniplus* )
1572 machine=ustation opsystem=unipl5-2
1575 ## Vaxen.
1576 vax-dec-* )
1577 machine=vax
1578 case "${canonical}" in
1579 *-bsd4.1* ) opsys=bsd4-1 ;;
1580 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1581 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1582 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1583 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1584 *-vms* ) opsys=vms ;;
1585 * ) unported=yes
1586 esac
1589 ## Whitechapel MG1
1590 ns16k-whitechapel-* )
1591 machine=mg1
1592 ## We don't know what sort of OS runs on these; we'll let the
1593 ## operating system guessing code below try.
1596 ## Wicat
1597 m68*-wicat-sysv* )
1598 machine=wicat opsys=usg5-2
1601 ## Intel 386 machines where we don't care about the manufacturer
1602 i[3456]86-*-* )
1603 machine=intel386
1604 case "${canonical}" in
1605 *-lynxos* ) opsys=lynxos ;;
1606 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1607 *-isc2.2* ) opsys=isc2-2 ;;
1608 *-isc4.0* ) opsys=isc4-0 ;;
1609 *-isc4.* ) opsys=isc4-1
1610 GCC_TEST_OPTIONS=-posix
1611 NON_GCC_TEST_OPTIONS=-Xp
1613 *-isc* ) opsys=isc3-0 ;;
1614 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1615 *-esix* ) opsys=esix ;;
1616 *-xenix* ) opsys=xenix ;;
1617 *-linux-gnu* ) opsys=gnu-linux ;;
1618 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1619 *-sco3.2v5* ) opsys=sco5
1620 NON_GNU_CPP=/lib/cpp
1621 # Prevent -belf from being passed to $CPP.
1622 # /lib/cpp does not accept it.
1623 OVERRIDE_CPPFLAGS=" "
1625 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1626 *-386bsd* ) opsys=386bsd ;;
1627 *-freebsd* ) opsys=freebsd ;;
1628 *-nextstep* ) opsys=nextstep ;;
1629 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1630 esac
1633 ## m68k Linux-based GNU system
1634 m68k-*-linux-gnu* )
1635 machine=m68k opsys=gnu-linux
1638 ## Mips Linux-based GNU system
1639 mips-*-linux-gnu* )
1640 machine=mips opsys=gnu-linux
1643 ## UXP/DS
1644 sparc-fujitsu-sysv4* )
1645 machine=sparc opsys=uxpds
1646 NON_GNU_CPP=/usr/ccs/lib/cpp
1647 RANLIB="ar -ts"
1650 ## UXP/V
1651 f301-fujitsu-uxpv4.1)
1652 machine=f301 opsys=uxpv
1656 unported=yes
1658 esac
1660 ### If the code above didn't choose an operating system, just choose
1661 ### an operating system based on the configuration name. You really
1662 ### only want to use this when you have no idea what the right
1663 ### operating system is; if you know what operating systems a machine
1664 ### runs, it's cleaner to make it explicit in the case statement
1665 ### above.
1666 if test x"${opsys}" = x; then
1667 case "${canonical}" in
1668 *-gnu* ) opsys=gnu ;;
1669 *-bsd4.[01] ) opsys=bsd4-1 ;;
1670 *-bsd4.2 ) opsys=bsd4-2 ;;
1671 *-bsd4.3 ) opsys=bsd4-3 ;;
1672 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1673 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1674 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1675 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1676 *-sysv4.2uw* ) opsys=unixware ;;
1677 *-sysv4.1* | *-sysvr4.1* )
1678 NON_GNU_CPP=/usr/lib/cpp
1679 opsys=usg5-4 ;;
1680 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1681 if [ x$NON_GNU_CPP = x ]; then
1682 if [ -f /usr/ccs/lib/cpp ]; then
1683 NON_GNU_CPP=/usr/ccs/lib/cpp
1684 else
1685 NON_GNU_CPP=/lib/cpp
1688 opsys=usg5-4-2 ;;
1689 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1691 unported=yes
1693 esac
1697 if test $unported = yes; then
1698 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1699 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1702 machfile="m/${machine}.h"
1703 opsysfile="s/${opsys}.h"
1706 #### Choose a compiler.
1707 test -n "$CC" && cc_specified=yes
1709 # Save the value of CFLAGS that the user specified.
1710 SPECIFIED_CFLAGS="$CFLAGS"
1712 case ${with_gcc} in
1713 "yes" ) CC="gcc" GCC=yes ;;
1714 "no" ) : ${CC=cc} ;;
1715 * ) # Extract the first word of "gcc", so it can be a program name with args.
1716 set dummy gcc; ac_word=$2
1717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1718 echo "configure:1719: checking for $ac_word" >&5
1719 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722 if test -n "$CC"; then
1723 ac_cv_prog_CC="$CC" # Let the user override the test.
1724 else
1725 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1726 ac_dummy="$PATH"
1727 for ac_dir in $ac_dummy; do
1728 test -z "$ac_dir" && ac_dir=.
1729 if test -f $ac_dir/$ac_word; then
1730 ac_cv_prog_CC="gcc"
1731 break
1733 done
1734 IFS="$ac_save_ifs"
1737 CC="$ac_cv_prog_CC"
1738 if test -n "$CC"; then
1739 echo "$ac_t""$CC" 1>&6
1740 else
1741 echo "$ac_t""no" 1>&6
1744 if test -z "$CC"; then
1745 # Extract the first word of "cc", so it can be a program name with args.
1746 set dummy cc; ac_word=$2
1747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1748 echo "configure:1749: checking for $ac_word" >&5
1749 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1750 echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752 if test -n "$CC"; then
1753 ac_cv_prog_CC="$CC" # Let the user override the test.
1754 else
1755 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1756 ac_prog_rejected=no
1757 ac_dummy="$PATH"
1758 for ac_dir in $ac_dummy; do
1759 test -z "$ac_dir" && ac_dir=.
1760 if test -f $ac_dir/$ac_word; then
1761 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1762 ac_prog_rejected=yes
1763 continue
1765 ac_cv_prog_CC="cc"
1766 break
1768 done
1769 IFS="$ac_save_ifs"
1770 if test $ac_prog_rejected = yes; then
1771 # We found a bogon in the path, so make sure we never use it.
1772 set dummy $ac_cv_prog_CC
1773 shift
1774 if test $# -gt 0; then
1775 # We chose a different compiler from the bogus one.
1776 # However, it has the same basename, so the bogon will be chosen
1777 # first if we set CC to just the basename; use the full file name.
1778 shift
1779 set dummy "$ac_dir/$ac_word" "$@"
1780 shift
1781 ac_cv_prog_CC="$@"
1786 CC="$ac_cv_prog_CC"
1787 if test -n "$CC"; then
1788 echo "$ac_t""$CC" 1>&6
1789 else
1790 echo "$ac_t""no" 1>&6
1793 if test -z "$CC"; then
1794 case "`uname -s`" in
1795 *win32* | *WIN32*)
1796 # Extract the first word of "cl", so it can be a program name with args.
1797 set dummy cl; ac_word=$2
1798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1799 echo "configure:1800: checking for $ac_word" >&5
1800 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1801 echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803 if test -n "$CC"; then
1804 ac_cv_prog_CC="$CC" # Let the user override the test.
1805 else
1806 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1807 ac_dummy="$PATH"
1808 for ac_dir in $ac_dummy; do
1809 test -z "$ac_dir" && ac_dir=.
1810 if test -f $ac_dir/$ac_word; then
1811 ac_cv_prog_CC="cl"
1812 break
1814 done
1815 IFS="$ac_save_ifs"
1818 CC="$ac_cv_prog_CC"
1819 if test -n "$CC"; then
1820 echo "$ac_t""$CC" 1>&6
1821 else
1822 echo "$ac_t""no" 1>&6
1825 esac
1827 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1830 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1831 echo "configure:1832: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1833 ac_ext=c
1834 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1835 ac_cpp='$CPP $CPPFLAGS'
1836 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1837 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1838 cross_compiling=$ac_cv_prog_cc_cross
1840 cat > conftest.$ac_ext << EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1845 main(){return(0);}
1847 if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1848 ac_cv_prog_cc_works=yes
1849 # If we can't run a trivial program, we are probably using a cross compiler.
1850 if (./conftest; exit) 2>/dev/null; then
1851 ac_cv_prog_cc_cross=no
1852 else
1853 ac_cv_prog_cc_cross=yes
1855 else
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 ac_cv_prog_cc_works=no
1860 rm -fr conftest*
1861 ac_ext=c
1862 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1863 ac_cpp='$CPP $CPPFLAGS'
1864 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1865 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1866 cross_compiling=$ac_cv_prog_cc_cross
1868 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1869 if test $ac_cv_prog_cc_works = no; then
1870 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1872 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1873 echo "configure:1874: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1874 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1875 cross_compiling=$ac_cv_prog_cc_cross
1877 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1878 echo "configure:1879: checking whether we are using GNU C" >&5
1879 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1880 echo $ac_n "(cached) $ac_c" 1>&6
1881 else
1882 cat > conftest.c <<EOF
1883 #ifdef __GNUC__
1884 yes;
1885 #endif
1887 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1888 ac_cv_prog_gcc=yes
1889 else
1890 ac_cv_prog_gcc=no
1894 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1896 if test $ac_cv_prog_gcc = yes; then
1897 GCC=yes
1898 else
1899 GCC=
1902 ac_test_CFLAGS="${CFLAGS+set}"
1903 ac_save_CFLAGS="$CFLAGS"
1904 CFLAGS=
1905 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1906 echo "configure:1907: checking whether ${CC-cc} accepts -g" >&5
1907 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1908 echo $ac_n "(cached) $ac_c" 1>&6
1909 else
1910 echo 'void f(){}' > conftest.c
1911 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1912 ac_cv_prog_cc_g=yes
1913 else
1914 ac_cv_prog_cc_g=no
1916 rm -f conftest*
1920 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1921 if test "$ac_test_CFLAGS" = set; then
1922 CFLAGS="$ac_save_CFLAGS"
1923 elif test $ac_cv_prog_cc_g = yes; then
1924 if test "$GCC" = yes; then
1925 CFLAGS="-g -O2"
1926 else
1927 CFLAGS="-g"
1929 else
1930 if test "$GCC" = yes; then
1931 CFLAGS="-O2"
1932 else
1933 CFLAGS=
1937 esac
1939 # On Suns, sometimes $CPP names a directory.
1940 if test -n "$CPP" && test -d "$CPP"; then
1941 CPP=
1944 #### Some systems specify a CPP to use unless we are using GCC.
1945 #### Now that we know whether we are using GCC, we can decide whether
1946 #### to use that one.
1947 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1948 then
1949 CPP="$NON_GNU_CPP"
1952 #### Some systems specify a CC to use unless we are using GCC.
1953 #### Now that we know whether we are using GCC, we can decide whether
1954 #### to use that one.
1955 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1956 test x$cc_specified != xyes
1957 then
1958 CC="$NON_GNU_CC"
1961 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1962 then
1963 CC="$CC $GCC_TEST_OPTIONS"
1966 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1967 then
1968 CC="$CC $NON_GCC_TEST_OPTIONS"
1971 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1972 then
1973 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1976 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1977 then
1978 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1981 #### Some other nice autoconf tests. If you add a test here which
1982 #### should make an entry in src/config.h, don't forget to add an
1983 #### #undef clause to src/config.h.in for autoconf to modify.
1985 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1986 echo "configure:1987: checking whether ln -s works" >&5
1987 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1988 echo $ac_n "(cached) $ac_c" 1>&6
1989 else
1990 rm -f conftestdata
1991 if ln -s X conftestdata 2>/dev/null
1992 then
1993 rm -f conftestdata
1994 ac_cv_prog_LN_S="ln -s"
1995 else
1996 ac_cv_prog_LN_S=ln
1999 LN_S="$ac_cv_prog_LN_S"
2000 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2001 echo "$ac_t""yes" 1>&6
2002 else
2003 echo "$ac_t""no" 1>&6
2006 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2007 echo "configure:2008: checking how to run the C preprocessor" >&5
2008 # On Suns, sometimes $CPP names a directory.
2009 if test -n "$CPP" && test -d "$CPP"; then
2010 CPP=
2012 if test -z "$CPP"; then
2013 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015 else
2016 # This must be in double quotes, not single quotes, because CPP may get
2017 # substituted into the Makefile and "${CC-cc}" will confuse make.
2018 CPP="${CC-cc} -E"
2019 # On the NeXT, cc -E runs the code through the compiler's parser,
2020 # not just through cpp.
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2024 #include <assert.h>
2025 Syntax Error
2027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2028 { (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2030 if test -z "$ac_err"; then
2032 else
2033 echo "$ac_err" >&5
2034 echo "configure: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 rm -rf conftest*
2037 CPP="${CC-cc} -E -traditional-cpp"
2038 cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 #include <assert.h>
2042 Syntax Error
2044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2045 { (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2047 if test -z "$ac_err"; then
2049 else
2050 echo "$ac_err" >&5
2051 echo "configure: failed program was:" >&5
2052 cat conftest.$ac_ext >&5
2053 rm -rf conftest*
2054 CPP="${CC-cc} -nologo -E"
2055 cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <assert.h>
2059 Syntax Error
2061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2062 { (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2064 if test -z "$ac_err"; then
2066 else
2067 echo "$ac_err" >&5
2068 echo "configure: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 rm -rf conftest*
2071 CPP=/lib/cpp
2073 rm -f conftest*
2075 rm -f conftest*
2077 rm -f conftest*
2078 ac_cv_prog_CPP="$CPP"
2080 CPP="$ac_cv_prog_CPP"
2081 else
2082 ac_cv_prog_CPP="$CPP"
2084 echo "$ac_t""$CPP" 1>&6
2086 # Find a good install program. We prefer a C program (faster),
2087 # so one script is as good as another. But avoid the broken or
2088 # incompatible versions:
2089 # SysV /etc/install, /usr/sbin/install
2090 # SunOS /usr/etc/install
2091 # IRIX /sbin/install
2092 # AIX /bin/install
2093 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2094 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2095 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2096 # ./install, which can be erroneously created by make from ./install.sh.
2097 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2098 echo "configure:2099: checking for a BSD compatible install" >&5
2099 if test -z "$INSTALL"; then
2100 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2101 echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2104 for ac_dir in $PATH; do
2105 # Account for people who put trailing slashes in PATH elements.
2106 case "$ac_dir/" in
2107 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2109 # OSF1 and SCO ODT 3.0 have their own names for install.
2110 # Don't use installbsd from OSF since it installs stuff as root
2111 # by default.
2112 for ac_prog in ginstall scoinst install; do
2113 if test -f $ac_dir/$ac_prog; then
2114 if test $ac_prog = install &&
2115 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2116 # AIX install. It has an incompatible calling convention.
2118 else
2119 ac_cv_path_install="$ac_dir/$ac_prog -c"
2120 break 2
2123 done
2125 esac
2126 done
2127 IFS="$ac_save_IFS"
2130 if test "${ac_cv_path_install+set}" = set; then
2131 INSTALL="$ac_cv_path_install"
2132 else
2133 # As a last resort, use the slow shell script. We don't cache a
2134 # path for INSTALL within a source directory, because that will
2135 # break other packages using the cache if that directory is
2136 # removed, or if the path is relative.
2137 INSTALL="$ac_install_sh"
2140 echo "$ac_t""$INSTALL" 1>&6
2142 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2143 # It thinks the first close brace ends the variable substitution.
2144 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2146 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2148 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2150 for ac_prog in 'bison -y' byacc
2152 # Extract the first word of "$ac_prog", so it can be a program name with args.
2153 set dummy $ac_prog; ac_word=$2
2154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2155 echo "configure:2156: checking for $ac_word" >&5
2156 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2157 echo $ac_n "(cached) $ac_c" 1>&6
2158 else
2159 if test -n "$YACC"; then
2160 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2161 else
2162 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2163 ac_dummy="$PATH"
2164 for ac_dir in $ac_dummy; do
2165 test -z "$ac_dir" && ac_dir=.
2166 if test -f $ac_dir/$ac_word; then
2167 ac_cv_prog_YACC="$ac_prog"
2168 break
2170 done
2171 IFS="$ac_save_ifs"
2174 YACC="$ac_cv_prog_YACC"
2175 if test -n "$YACC"; then
2176 echo "$ac_t""$YACC" 1>&6
2177 else
2178 echo "$ac_t""no" 1>&6
2181 test -n "$YACC" && break
2182 done
2183 test -n "$YACC" || YACC="yacc"
2185 if test "x$RANLIB" = x; then
2186 # Extract the first word of "ranlib", so it can be a program name with args.
2187 set dummy ranlib; ac_word=$2
2188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2189 echo "configure:2190: checking for $ac_word" >&5
2190 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193 if test -n "$RANLIB"; then
2194 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2195 else
2196 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2197 ac_dummy="$PATH"
2198 for ac_dir in $ac_dummy; do
2199 test -z "$ac_dir" && ac_dir=.
2200 if test -f $ac_dir/$ac_word; then
2201 ac_cv_prog_RANLIB="ranlib"
2202 break
2204 done
2205 IFS="$ac_save_ifs"
2206 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2209 RANLIB="$ac_cv_prog_RANLIB"
2210 if test -n "$RANLIB"; then
2211 echo "$ac_t""$RANLIB" 1>&6
2212 else
2213 echo "$ac_t""no" 1>&6
2218 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2219 echo "configure:2220: checking for AIX" >&5
2220 cat > conftest.$ac_ext <<EOF
2221 #line 2222 "configure"
2222 #include "confdefs.h"
2223 #ifdef _AIX
2225 #endif
2228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2229 egrep "yes" >/dev/null 2>&1; then
2230 rm -rf conftest*
2231 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2232 #define _ALL_SOURCE 1
2235 else
2236 rm -rf conftest*
2237 echo "$ac_t""no" 1>&6
2239 rm -f conftest*
2243 # Sound support for GNU/Linux and the free BSDs.
2244 for ac_hdr in machine/soundcard.h sys/soundcard.h
2246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2248 echo "configure:2249: checking for $ac_hdr" >&5
2249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2250 echo $ac_n "(cached) $ac_c" 1>&6
2251 else
2252 cat > conftest.$ac_ext <<EOF
2253 #line 2254 "configure"
2254 #include "confdefs.h"
2255 #include <$ac_hdr>
2257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2258 { (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2260 if test -z "$ac_err"; then
2261 rm -rf conftest*
2262 eval "ac_cv_header_$ac_safe=yes"
2263 else
2264 echo "$ac_err" >&5
2265 echo "configure: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 rm -rf conftest*
2268 eval "ac_cv_header_$ac_safe=no"
2270 rm -f conftest*
2272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2273 echo "$ac_t""yes" 1>&6
2274 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2275 cat >> confdefs.h <<EOF
2276 #define $ac_tr_hdr 1
2279 else
2280 echo "$ac_t""no" 1>&6
2282 done
2285 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2286 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2287 termcap.h stdio_ext.h fcntl.h term.h
2289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2291 echo "configure:2292: checking for $ac_hdr" >&5
2292 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2293 echo $ac_n "(cached) $ac_c" 1>&6
2294 else
2295 cat > conftest.$ac_ext <<EOF
2296 #line 2297 "configure"
2297 #include "confdefs.h"
2298 #include <$ac_hdr>
2300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2301 { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2303 if test -z "$ac_err"; then
2304 rm -rf conftest*
2305 eval "ac_cv_header_$ac_safe=yes"
2306 else
2307 echo "$ac_err" >&5
2308 echo "configure: failed program was:" >&5
2309 cat conftest.$ac_ext >&5
2310 rm -rf conftest*
2311 eval "ac_cv_header_$ac_safe=no"
2313 rm -f conftest*
2315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2316 echo "$ac_t""yes" 1>&6
2317 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2318 cat >> confdefs.h <<EOF
2319 #define $ac_tr_hdr 1
2322 else
2323 echo "$ac_t""no" 1>&6
2325 done
2327 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2328 echo "configure:2329: checking for ANSI C header files" >&5
2329 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2330 echo $ac_n "(cached) $ac_c" 1>&6
2331 else
2332 cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 #include <stdlib.h>
2336 #include <stdarg.h>
2337 #include <string.h>
2338 #include <float.h>
2340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2341 { (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2343 if test -z "$ac_err"; then
2344 rm -rf conftest*
2345 ac_cv_header_stdc=yes
2346 else
2347 echo "$ac_err" >&5
2348 echo "configure: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350 rm -rf conftest*
2351 ac_cv_header_stdc=no
2353 rm -f conftest*
2355 if test $ac_cv_header_stdc = yes; then
2356 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2357 cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 #include <string.h>
2362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363 egrep "memchr" >/dev/null 2>&1; then
2365 else
2366 rm -rf conftest*
2367 ac_cv_header_stdc=no
2369 rm -f conftest*
2373 if test $ac_cv_header_stdc = yes; then
2374 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 #include <stdlib.h>
2380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2381 egrep "free" >/dev/null 2>&1; then
2383 else
2384 rm -rf conftest*
2385 ac_cv_header_stdc=no
2387 rm -f conftest*
2391 if test $ac_cv_header_stdc = yes; then
2392 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2393 if test "$cross_compiling" = yes; then
2395 else
2396 cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <ctype.h>
2400 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2401 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2402 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2403 int main () { int i; for (i = 0; i < 256; i++)
2404 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2405 exit (0); }
2408 if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2409 then
2411 else
2412 echo "configure: failed program was:" >&5
2413 cat conftest.$ac_ext >&5
2414 rm -fr conftest*
2415 ac_cv_header_stdc=no
2417 rm -fr conftest*
2423 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2424 if test $ac_cv_header_stdc = yes; then
2425 cat >> confdefs.h <<\EOF
2426 #define STDC_HEADERS 1
2431 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2432 echo "configure:2433: checking whether time.h and sys/time.h may both be included" >&5
2433 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436 cat > conftest.$ac_ext <<EOF
2437 #line 2438 "configure"
2438 #include "confdefs.h"
2439 #include <sys/types.h>
2440 #include <sys/time.h>
2441 #include <time.h>
2442 int main() {
2443 struct tm *tp;
2444 ; return 0; }
2446 if { (eval echo configure:2447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2447 rm -rf conftest*
2448 ac_cv_header_time=yes
2449 else
2450 echo "configure: failed program was:" >&5
2451 cat conftest.$ac_ext >&5
2452 rm -rf conftest*
2453 ac_cv_header_time=no
2455 rm -f conftest*
2458 echo "$ac_t""$ac_cv_header_time" 1>&6
2459 if test $ac_cv_header_time = yes; then
2460 cat >> confdefs.h <<\EOF
2461 #define TIME_WITH_SYS_TIME 1
2466 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2467 echo "configure:2468: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2468 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471 cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 #include <sys/types.h>
2475 #include <signal.h>
2476 /* NetBSD declares sys_siglist in unistd.h. */
2477 #ifdef HAVE_UNISTD_H
2478 #include <unistd.h>
2479 #endif
2480 int main() {
2481 char *msg = *(sys_siglist + 1);
2482 ; return 0; }
2484 if { (eval echo configure:2485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2485 rm -rf conftest*
2486 ac_cv_decl_sys_siglist=yes
2487 else
2488 echo "configure: failed program was:" >&5
2489 cat conftest.$ac_ext >&5
2490 rm -rf conftest*
2491 ac_cv_decl_sys_siglist=no
2493 rm -f conftest*
2496 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2497 if test $ac_cv_decl_sys_siglist = yes; then
2498 cat >> confdefs.h <<\EOF
2499 #define SYS_SIGLIST_DECLARED 1
2505 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2506 echo "configure:2507: checking for struct utimbuf" >&5
2507 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2508 echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510 cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #ifdef TIME_WITH_SYS_TIME
2514 #include <sys/time.h>
2515 #include <time.h>
2516 #else
2517 #ifdef HAVE_SYS_TIME_H
2518 #include <sys/time.h>
2519 #else
2520 #include <time.h>
2521 #endif
2522 #endif
2523 #ifdef HAVE_UTIME_H
2524 #include <utime.h>
2525 #endif
2526 int main() {
2527 static struct utimbuf x; x.actime = x.modtime;
2528 ; return 0; }
2530 if { (eval echo configure:2531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2531 rm -rf conftest*
2532 emacs_cv_struct_utimbuf=yes
2533 else
2534 echo "configure: failed program was:" >&5
2535 cat conftest.$ac_ext >&5
2536 rm -rf conftest*
2537 emacs_cv_struct_utimbuf=no
2539 rm -f conftest*
2542 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2543 if test $emacs_cv_struct_utimbuf = yes; then
2544 cat >> confdefs.h <<\EOF
2545 #define HAVE_STRUCT_UTIMBUF 1
2550 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2551 echo "configure:2552: checking return type of signal handlers" >&5
2552 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2554 else
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2558 #include <sys/types.h>
2559 #include <signal.h>
2560 #ifdef signal
2561 #undef signal
2562 #endif
2563 #ifdef __cplusplus
2564 extern "C" void (*signal (int, void (*)(int)))(int);
2565 #else
2566 void (*signal ()) ();
2567 #endif
2569 int main() {
2570 int i;
2571 ; return 0; }
2573 if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2574 rm -rf conftest*
2575 ac_cv_type_signal=void
2576 else
2577 echo "configure: failed program was:" >&5
2578 cat conftest.$ac_ext >&5
2579 rm -rf conftest*
2580 ac_cv_type_signal=int
2582 rm -f conftest*
2585 echo "$ac_t""$ac_cv_type_signal" 1>&6
2586 cat >> confdefs.h <<EOF
2587 #define RETSIGTYPE $ac_cv_type_signal
2592 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
2593 echo "configure:2594: checking for speed_t" >&5
2594 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
2595 echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597 cat > conftest.$ac_ext <<EOF
2598 #line 2599 "configure"
2599 #include "confdefs.h"
2600 #include <termios.h>
2601 int main() {
2602 speed_t x = 1;
2603 ; return 0; }
2605 if { (eval echo configure:2606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2606 rm -rf conftest*
2607 emacs_cv_speed_t=yes
2608 else
2609 echo "configure: failed program was:" >&5
2610 cat conftest.$ac_ext >&5
2612 rm -f conftest*
2615 echo "$ac_t""$emacs_cv_speed_t" 1>&6
2616 if test $emacs_cv_speed_t = yes; then
2617 cat >> confdefs.h <<\EOF
2618 #define HAVE_SPEED_T 1
2623 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
2624 echo "configure:2625: checking for struct timeval" >&5
2625 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2626 echo $ac_n "(cached) $ac_c" 1>&6
2627 else
2628 cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 #ifdef TIME_WITH_SYS_TIME
2632 #include <sys/time.h>
2633 #include <time.h>
2634 #else
2635 #ifdef HAVE_SYS_TIME_H
2636 #include <sys/time.h>
2637 #else
2638 #include <time.h>
2639 #endif
2640 #endif
2641 int main() {
2642 static struct timeval x; x.tv_sec = x.tv_usec;
2643 ; return 0; }
2645 if { (eval echo configure:2646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2646 rm -rf conftest*
2647 emacs_cv_struct_timeval=yes
2648 else
2649 echo "configure: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
2651 rm -rf conftest*
2652 emacs_cv_struct_timeval=no
2654 rm -f conftest*
2657 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2658 HAVE_TIMEVAL=$emacs_cv_struct_timeval
2659 if test $emacs_cv_struct_timeval = yes; then
2660 cat >> confdefs.h <<\EOF
2661 #define HAVE_TIMEVAL 1
2666 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
2667 echo "configure:2668: checking for struct exception" >&5
2668 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
2669 echo $ac_n "(cached) $ac_c" 1>&6
2670 else
2671 cat > conftest.$ac_ext <<EOF
2672 #line 2673 "configure"
2673 #include "confdefs.h"
2674 #include <math.h>
2675 int main() {
2676 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
2677 ; return 0; }
2679 if { (eval echo configure:2680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2680 rm -rf conftest*
2681 emacs_cv_struct_exception=yes
2682 else
2683 echo "configure: failed program was:" >&5
2684 cat conftest.$ac_ext >&5
2685 rm -rf conftest*
2686 emacs_cv_struct_exception=no
2688 rm -f conftest*
2691 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
2692 HAVE_EXCEPTION=$emacs_cv_struct_exception
2693 if test $emacs_cv_struct_exception != yes; then
2694 cat >> confdefs.h <<\EOF
2695 #define NO_MATHERR 1
2700 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2701 echo "configure:2702: checking whether struct tm is in sys/time.h or time.h" >&5
2702 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2703 echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705 cat > conftest.$ac_ext <<EOF
2706 #line 2707 "configure"
2707 #include "confdefs.h"
2708 #include <sys/types.h>
2709 #include <time.h>
2710 int main() {
2711 struct tm *tp; tp->tm_sec;
2712 ; return 0; }
2714 if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2715 rm -rf conftest*
2716 ac_cv_struct_tm=time.h
2717 else
2718 echo "configure: failed program was:" >&5
2719 cat conftest.$ac_ext >&5
2720 rm -rf conftest*
2721 ac_cv_struct_tm=sys/time.h
2723 rm -f conftest*
2726 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2727 if test $ac_cv_struct_tm = sys/time.h; then
2728 cat >> confdefs.h <<\EOF
2729 #define TM_IN_SYS_TIME 1
2734 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2735 echo "configure:2736: checking for tm_zone in struct tm" >&5
2736 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2737 echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739 cat > conftest.$ac_ext <<EOF
2740 #line 2741 "configure"
2741 #include "confdefs.h"
2742 #include <sys/types.h>
2743 #include <$ac_cv_struct_tm>
2744 int main() {
2745 struct tm tm; tm.tm_zone;
2746 ; return 0; }
2748 if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2749 rm -rf conftest*
2750 ac_cv_struct_tm_zone=yes
2751 else
2752 echo "configure: failed program was:" >&5
2753 cat conftest.$ac_ext >&5
2754 rm -rf conftest*
2755 ac_cv_struct_tm_zone=no
2757 rm -f conftest*
2760 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2761 if test "$ac_cv_struct_tm_zone" = yes; then
2762 cat >> confdefs.h <<\EOF
2763 #define HAVE_TM_ZONE 1
2766 else
2767 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2768 echo "configure:2769: checking for tzname" >&5
2769 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772 cat > conftest.$ac_ext <<EOF
2773 #line 2774 "configure"
2774 #include "confdefs.h"
2775 #include <time.h>
2776 #ifndef tzname /* For SGI. */
2777 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2778 #endif
2779 int main() {
2780 atoi(*tzname);
2781 ; return 0; }
2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784 rm -rf conftest*
2785 ac_cv_var_tzname=yes
2786 else
2787 echo "configure: failed program was:" >&5
2788 cat conftest.$ac_ext >&5
2789 rm -rf conftest*
2790 ac_cv_var_tzname=no
2792 rm -f conftest*
2795 echo "$ac_t""$ac_cv_var_tzname" 1>&6
2796 if test $ac_cv_var_tzname = yes; then
2797 cat >> confdefs.h <<\EOF
2798 #define HAVE_TZNAME 1
2804 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2805 echo "configure:2806: checking for tm_gmtoff in struct tm" >&5
2806 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
2807 echo $ac_n "(cached) $ac_c" 1>&6
2808 else
2809 cat > conftest.$ac_ext <<EOF
2810 #line 2811 "configure"
2811 #include "confdefs.h"
2812 #include <time.h>
2813 int main() {
2814 struct tm t; t.tm_gmtoff = 0
2815 ; return 0; }
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818 rm -rf conftest*
2819 emacs_cv_tm_gmtoff=yes
2820 else
2821 echo "configure: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 rm -rf conftest*
2824 emacs_cv_tm_gmtoff=no
2826 rm -f conftest*
2829 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
2830 if test $emacs_cv_tm_gmtoff = yes; then
2831 cat >> confdefs.h <<\EOF
2832 #define HAVE_TM_GMTOFF 1
2838 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2839 echo "configure:2840: checking for ${CC-cc} option to accept ANSI C" >&5
2840 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
2841 echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843 ac_cv_prog_cc_stdc=no
2844 ac_save_CC="$CC"
2845 # Don't try gcc -ansi; that turns off useful extensions and
2846 # breaks some systems' header files.
2847 # AIX -qlanglvl=ansi
2848 # Ultrix and OSF/1 -std1
2849 # HP-UX 10.20 and later -Ae
2850 # HP-UX older versions -Aa -D_HPUX_SOURCE
2851 # SVR4 -Xc -D__EXTENSIONS__
2852 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2854 CC="$ac_save_CC $ac_arg"
2855 cat > conftest.$ac_ext <<EOF
2856 #line 2857 "configure"
2857 #include "confdefs.h"
2858 #include <stdarg.h>
2859 #include <stdio.h>
2860 #include <sys/types.h>
2861 #include <sys/stat.h>
2862 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2863 struct buf { int x; };
2864 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2865 static char *e (p, i)
2866 char **p;
2867 int i;
2869 return p[i];
2871 static char *f (char * (*g) (char **, int), char **p, ...)
2873 char *s;
2874 va_list v;
2875 va_start (v,p);
2876 s = g (p, va_arg (v,int));
2877 va_end (v);
2878 return s;
2880 int test (int i, double x);
2881 struct s1 {int (*f) (int a);};
2882 struct s2 {int (*f) (double a);};
2883 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2884 int argc;
2885 char **argv;
2886 int main() {
2887 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2888 ; return 0; }
2890 if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2891 rm -rf conftest*
2892 ac_cv_prog_cc_stdc="$ac_arg"; break
2893 else
2894 echo "configure: failed program was:" >&5
2895 cat conftest.$ac_ext >&5
2897 rm -f conftest*
2898 done
2899 CC="$ac_save_CC"
2903 case "x$ac_cv_prog_cc_stdc" in
2904 x|xno)
2905 echo "$ac_t""none needed" 1>&6 ;;
2907 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
2908 CC="$CC $ac_cv_prog_cc_stdc" ;;
2909 esac
2911 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
2912 echo "configure:2913: checking for function prototypes" >&5
2913 if test "$ac_cv_prog_cc_stdc" != no; then
2914 echo "$ac_t""yes" 1>&6
2915 cat >> confdefs.h <<\EOF
2916 #define PROTOTYPES 1
2919 else
2920 echo "$ac_t""no" 1>&6
2923 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
2924 echo "configure:2925: checking for working volatile" >&5
2925 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
2926 echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2932 int main() {
2934 volatile int x;
2935 int * volatile y;
2936 ; return 0; }
2938 if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2939 rm -rf conftest*
2940 ac_cv_c_volatile=yes
2941 else
2942 echo "configure: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 rm -rf conftest*
2945 ac_cv_c_volatile=no
2947 rm -f conftest*
2950 echo "$ac_t""$ac_cv_c_volatile" 1>&6
2951 if test $ac_cv_c_volatile = no; then
2952 cat >> confdefs.h <<\EOF
2953 #define volatile
2958 echo $ac_n "checking for working const""... $ac_c" 1>&6
2959 echo "configure:2960: checking for working const" >&5
2960 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2961 echo $ac_n "(cached) $ac_c" 1>&6
2962 else
2963 cat > conftest.$ac_ext <<EOF
2964 #line 2965 "configure"
2965 #include "confdefs.h"
2967 int main() {
2969 /* Ultrix mips cc rejects this. */
2970 typedef int charset[2]; const charset x = {0,0};
2971 /* SunOS 4.1.1 cc rejects this. */
2972 char const *const *ccp;
2973 char **p;
2974 /* NEC SVR4.0.2 mips cc rejects this. */
2975 struct point {int x, y;};
2976 static struct point const zero = {0,0};
2977 /* AIX XL C 1.02.0.0 rejects this.
2978 It does not let you subtract one const X* pointer from another in an arm
2979 of an if-expression whose if-part is not a constant expression */
2980 const char *g = "string";
2981 ccp = &g + (g ? g-g : 0);
2982 /* HPUX 7.0 cc rejects these. */
2983 ++ccp;
2984 p = (char**) ccp;
2985 ccp = (char const *const *) p;
2986 { /* SCO 3.2v4 cc rejects this. */
2987 char *t;
2988 char const *s = 0 ? (char *) 0 : (char const *) 0;
2990 *t++ = 0;
2992 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2993 int x[] = {25, 17};
2994 const int *foo = &x[0];
2995 ++foo;
2997 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2998 typedef const int *iptr;
2999 iptr p = 0;
3000 ++p;
3002 { /* AIX XL C 1.02.0.0 rejects this saying
3003 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3004 struct s { int j; const int *ap[3]; };
3005 struct s *b; b->j = 5;
3007 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3008 const int foo = 10;
3011 ; return 0; }
3013 if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014 rm -rf conftest*
3015 ac_cv_c_const=yes
3016 else
3017 echo "configure: failed program was:" >&5
3018 cat conftest.$ac_ext >&5
3019 rm -rf conftest*
3020 ac_cv_c_const=no
3022 rm -f conftest*
3025 echo "$ac_t""$ac_cv_c_const" 1>&6
3026 if test $ac_cv_c_const = no; then
3027 cat >> confdefs.h <<\EOF
3028 #define const
3033 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3034 echo "configure:3035: checking for void * support" >&5
3035 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3036 echo $ac_n "(cached) $ac_c" 1>&6
3037 else
3038 cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3042 int main() {
3043 void * foo;
3044 ; return 0; }
3046 if { (eval echo configure:3047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3047 rm -rf conftest*
3048 emacs_cv_void_star=yes
3049 else
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 rm -rf conftest*
3053 emacs_cv_void_star=no
3055 rm -f conftest*
3058 echo "$ac_t""$emacs_cv_void_star" 1>&6
3059 if test $emacs_cv_void_star = yes; then
3060 cat >> confdefs.h <<\EOF
3061 #define POINTER_TYPE void
3064 else
3065 cat >> confdefs.h <<\EOF
3066 #define POINTER_TYPE char
3071 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3072 echo "configure:3073: checking whether ${MAKE-make} sets \${MAKE}" >&5
3073 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3074 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3075 echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077 cat > conftestmake <<\EOF
3078 all:
3079 @echo 'ac_maketemp="${MAKE}"'
3081 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3082 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3083 if test -n "$ac_maketemp"; then
3084 eval ac_cv_prog_make_${ac_make}_set=yes
3085 else
3086 eval ac_cv_prog_make_${ac_make}_set=no
3088 rm -f conftestmake
3090 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3091 echo "$ac_t""yes" 1>&6
3092 SET_MAKE=
3093 else
3094 echo "$ac_t""no" 1>&6
3095 SET_MAKE="MAKE=${MAKE-make}"
3099 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3100 echo "configure:3101: checking for long file names" >&5
3101 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3102 echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104 ac_cv_sys_long_file_names=yes
3105 # Test for long file names in all the places we know might matter:
3106 # . the current directory, where building will happen
3107 # $prefix/lib where we will be installing things
3108 # $exec_prefix/lib likewise
3109 # eval it to expand exec_prefix.
3110 # $TMPDIR if set, where it might want to write temporary files
3111 # if $TMPDIR is not set:
3112 # /tmp where it might want to write temporary files
3113 # /var/tmp likewise
3114 # /usr/tmp likewise
3115 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3116 ac_tmpdirs="$TMPDIR"
3117 else
3118 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3120 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3121 test -d $ac_dir || continue
3122 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3123 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3124 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3125 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3126 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3127 ac_cv_sys_long_file_names=no
3128 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3129 break
3131 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3132 done
3135 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3136 if test $ac_cv_sys_long_file_names = yes; then
3137 cat >> confdefs.h <<\EOF
3138 #define HAVE_LONG_FILE_NAMES 1
3144 #### Choose a window system.
3146 # If we find X, set shell vars x_includes and x_libraries to the
3147 # paths, otherwise set no_x=yes.
3148 # Uses ac_ vars as temps to allow command line to override cache and checks.
3149 # --without-x overrides everything else, but does not touch the cache.
3150 echo $ac_n "checking for X""... $ac_c" 1>&6
3151 echo "configure:3152: checking for X" >&5
3153 # Check whether --with-x or --without-x was given.
3154 if test "${with_x+set}" = set; then
3155 withval="$with_x"
3159 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3160 if test "x$with_x" = xno; then
3161 # The user explicitly disabled X.
3162 have_x=disabled
3163 else
3164 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3165 # Both variables are already set.
3166 have_x=yes
3167 else
3168 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3169 echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171 # One or both of the vars are not set, and there is no cached value.
3172 ac_x_includes=NO ac_x_libraries=NO
3173 rm -fr conftestdir
3174 if mkdir conftestdir; then
3175 cd conftestdir
3176 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3177 cat > Imakefile <<'EOF'
3178 acfindx:
3179 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3181 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3182 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3183 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3184 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3185 for ac_extension in a so sl; do
3186 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3187 test -f $ac_im_libdir/libX11.$ac_extension; then
3188 ac_im_usrlibdir=$ac_im_libdir; break
3190 done
3191 # Screen out bogus values from the imake configuration. They are
3192 # bogus both because they are the default anyway, and because
3193 # using them would break gcc on systems where it needs fixed includes.
3194 case "$ac_im_incroot" in
3195 /usr/include) ;;
3196 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3197 esac
3198 case "$ac_im_usrlibdir" in
3199 /usr/lib | /lib) ;;
3200 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3201 esac
3203 cd ..
3204 rm -fr conftestdir
3207 if test "$ac_x_includes" = NO; then
3208 # Guess where to find include files, by looking for this one X11 .h file.
3209 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3211 # First, try using that file with no special directory specified.
3212 cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <$x_direct_test_include>
3217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3218 { (eval echo configure:3219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3220 if test -z "$ac_err"; then
3221 rm -rf conftest*
3222 # We can compile using X headers with no special include directory.
3223 ac_x_includes=
3224 else
3225 echo "$ac_err" >&5
3226 echo "configure: failed program was:" >&5
3227 cat conftest.$ac_ext >&5
3228 rm -rf conftest*
3229 # Look for the header file in a standard set of common directories.
3230 # Check X11 before X11Rn because it is often a symlink to the current release.
3231 for ac_dir in \
3232 /usr/X11/include \
3233 /usr/X11R6/include \
3234 /usr/X11R5/include \
3235 /usr/X11R4/include \
3237 /usr/include/X11 \
3238 /usr/include/X11R6 \
3239 /usr/include/X11R5 \
3240 /usr/include/X11R4 \
3242 /usr/local/X11/include \
3243 /usr/local/X11R6/include \
3244 /usr/local/X11R5/include \
3245 /usr/local/X11R4/include \
3247 /usr/local/include/X11 \
3248 /usr/local/include/X11R6 \
3249 /usr/local/include/X11R5 \
3250 /usr/local/include/X11R4 \
3252 /usr/X386/include \
3253 /usr/x386/include \
3254 /usr/XFree86/include/X11 \
3256 /usr/include \
3257 /usr/local/include \
3258 /usr/unsupported/include \
3259 /usr/athena/include \
3260 /usr/local/x11r5/include \
3261 /usr/lpp/Xamples/include \
3263 /usr/openwin/include \
3264 /usr/openwin/share/include \
3267 if test -r "$ac_dir/$x_direct_test_include"; then
3268 ac_x_includes=$ac_dir
3269 break
3271 done
3273 rm -f conftest*
3274 fi # $ac_x_includes = NO
3276 if test "$ac_x_libraries" = NO; then
3277 # Check for the libraries.
3279 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3280 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3282 # See if we find them without any special options.
3283 # Don't add to $LIBS permanently.
3284 ac_save_LIBS="$LIBS"
3285 LIBS="-l$x_direct_test_library $LIBS"
3286 cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3290 int main() {
3291 ${x_direct_test_function}()
3292 ; return 0; }
3294 if { (eval echo configure:3295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3295 rm -rf conftest*
3296 LIBS="$ac_save_LIBS"
3297 # We can link X programs with no special library path.
3298 ac_x_libraries=
3299 else
3300 echo "configure: failed program was:" >&5
3301 cat conftest.$ac_ext >&5
3302 rm -rf conftest*
3303 LIBS="$ac_save_LIBS"
3304 # First see if replacing the include by lib works.
3305 # Check X11 before X11Rn because it is often a symlink to the current release.
3306 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3307 /usr/X11/lib \
3308 /usr/X11R6/lib \
3309 /usr/X11R5/lib \
3310 /usr/X11R4/lib \
3312 /usr/lib/X11 \
3313 /usr/lib/X11R6 \
3314 /usr/lib/X11R5 \
3315 /usr/lib/X11R4 \
3317 /usr/local/X11/lib \
3318 /usr/local/X11R6/lib \
3319 /usr/local/X11R5/lib \
3320 /usr/local/X11R4/lib \
3322 /usr/local/lib/X11 \
3323 /usr/local/lib/X11R6 \
3324 /usr/local/lib/X11R5 \
3325 /usr/local/lib/X11R4 \
3327 /usr/X386/lib \
3328 /usr/x386/lib \
3329 /usr/XFree86/lib/X11 \
3331 /usr/lib \
3332 /usr/local/lib \
3333 /usr/unsupported/lib \
3334 /usr/athena/lib \
3335 /usr/local/x11r5/lib \
3336 /usr/lpp/Xamples/lib \
3337 /lib/usr/lib/X11 \
3339 /usr/openwin/lib \
3340 /usr/openwin/share/lib \
3343 for ac_extension in a so sl; do
3344 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3345 ac_x_libraries=$ac_dir
3346 break 2
3348 done
3349 done
3351 rm -f conftest*
3352 fi # $ac_x_libraries = NO
3354 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3355 # Didn't find X anywhere. Cache the known absence of X.
3356 ac_cv_have_x="have_x=no"
3357 else
3358 # Record where we found X for the cache.
3359 ac_cv_have_x="have_x=yes \
3360 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3364 eval "$ac_cv_have_x"
3365 fi # $with_x != no
3367 if test "$have_x" != yes; then
3368 echo "$ac_t""$have_x" 1>&6
3369 no_x=yes
3370 else
3371 # If each of the values was on the command line, it overrides each guess.
3372 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3373 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3374 # Update the cache value to reflect the command line values.
3375 ac_cv_have_x="have_x=yes \
3376 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3377 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3380 if test "$no_x" = yes; then
3381 window_system=none
3382 else
3383 window_system=x11
3386 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3387 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3388 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3389 x_default_search_path=""
3390 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3391 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3392 ${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3393 ${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3394 ${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3395 if test x"${x_default_search_path}" = x; then
3396 x_default_search_path=${x_search_path}
3397 else
3398 x_default_search_path="${x_search_path}:${x_default_search_path}"
3400 done
3402 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3403 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3406 if test x"${x_includes}" = x; then
3407 bitmapdir=/usr/include/X11/bitmaps
3408 else
3409 # accumulate include directories that have X11 bitmap subdirectories
3410 bmd_acc="dummyval"
3411 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3412 if test -d "${bmd}/X11/bitmaps"; then
3413 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3415 if test -d "${bmd}/bitmaps"; then
3416 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3418 done
3419 if test ${bmd_acc} != "dummyval"; then
3420 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3424 case "${window_system}" in
3425 x11 )
3426 HAVE_X_WINDOWS=yes
3427 HAVE_X11=yes
3428 case "${with_x_toolkit}" in
3429 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3430 motif ) USE_X_TOOLKIT=MOTIF ;;
3431 no ) USE_X_TOOLKIT=none ;;
3432 * ) USE_X_TOOLKIT=maybe ;;
3433 esac
3435 none )
3436 HAVE_X_WINDOWS=no
3437 HAVE_X11=no
3438 USE_X_TOOLKIT=none
3440 esac
3442 ### If we're using X11, we should use the X menu package.
3443 HAVE_MENUS=no
3444 case ${HAVE_X11} in
3445 yes ) HAVE_MENUS=yes ;;
3446 esac
3448 if test "${opsys}" = "hpux9"; then
3449 case "${x_libraries}" in
3450 *X11R4* )
3451 opsysfile="s/hpux9-x11r4.h"
3453 esac
3456 if test "${opsys}" = "hpux9shr"; then
3457 case "${x_libraries}" in
3458 *X11R4* )
3459 opsysfile="s/hpux9shxr4.h"
3461 esac
3464 #### Extract some information from the operating system and machine files.
3466 echo "checking the machine- and system-dependent files to find out
3467 - which libraries the lib-src programs will want, and
3468 - whether the GNU malloc routines are usable" 1>&6
3469 echo "configure:3470: checking the machine- and system-dependent files to find out
3470 - which libraries the lib-src programs will want, and
3471 - whether the GNU malloc routines are usable" >&5
3473 ### First figure out CFLAGS (which we use for running the compiler here)
3474 ### and REAL_CFLAGS (which we use for real compilation).
3475 ### The two are the same except on a few systems, where they are made
3476 ### different to work around various lossages. For example,
3477 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3478 ### as implying static linking.
3480 ### If the CFLAGS env var is specified, we use that value
3481 ### instead of the default.
3483 ### It's not important that this name contain the PID; you can't run
3484 ### two configures in the same directory and have anything work
3485 ### anyway.
3486 tempcname="conftest.c"
3488 echo '
3489 #include "'${srcdir}'/src/'${opsysfile}'"
3490 #include "'${srcdir}'/src/'${machfile}'"
3491 #ifndef LIBS_MACHINE
3492 #define LIBS_MACHINE
3493 #endif
3494 #ifndef LIBS_SYSTEM
3495 #define LIBS_SYSTEM
3496 #endif
3497 #ifndef C_SWITCH_SYSTEM
3498 #define C_SWITCH_SYSTEM
3499 #endif
3500 #ifndef C_SWITCH_MACHINE
3501 #define C_SWITCH_MACHINE
3502 #endif
3503 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3504 configure___ c_switch_system=C_SWITCH_SYSTEM
3505 configure___ c_switch_machine=C_SWITCH_MACHINE
3507 #ifndef LIB_X11_LIB
3508 #define LIB_X11_LIB -lX11
3509 #endif
3511 #ifndef LIBX11_MACHINE
3512 #define LIBX11_MACHINE
3513 #endif
3515 #ifndef LIBX11_SYSTEM
3516 #define LIBX11_SYSTEM
3517 #endif
3518 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3520 #ifdef UNEXEC
3521 configure___ unexec=UNEXEC
3522 #else
3523 configure___ unexec=unexec.o
3524 #endif
3526 #ifdef SYSTEM_MALLOC
3527 configure___ system_malloc=yes
3528 #else
3529 configure___ system_malloc=no
3530 #endif
3532 #ifndef C_DEBUG_SWITCH
3533 #define C_DEBUG_SWITCH -g
3534 #endif
3536 #ifndef C_OPTIMIZE_SWITCH
3537 #ifdef __GNUC__
3538 #define C_OPTIMIZE_SWITCH -O2
3539 #else
3540 #define C_OPTIMIZE_SWITCH -O
3541 #endif
3542 #endif
3544 #ifndef LD_SWITCH_MACHINE
3545 #define LD_SWITCH_MACHINE
3546 #endif
3548 #ifndef LD_SWITCH_SYSTEM
3549 #define LD_SWITCH_SYSTEM
3550 #endif
3552 #ifndef LD_SWITCH_X_SITE_AUX
3553 #define LD_SWITCH_X_SITE_AUX
3554 #endif
3556 configure___ ld_switch_system=LD_SWITCH_SYSTEM
3557 configure___ ld_switch_machine=LD_SWITCH_MACHINE
3559 #ifdef THIS_IS_CONFIGURE
3561 /* Get the CFLAGS for tests in configure. */
3562 #ifdef __GNUC__
3563 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3564 #else
3565 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3566 #endif
3568 #else /* not THIS_IS_CONFIGURE */
3570 /* Get the CFLAGS for real compilation. */
3571 #ifdef __GNUC__
3572 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3573 #else
3574 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3575 #endif
3577 #endif /* not THIS_IS_CONFIGURE */
3578 ' > ${tempcname}
3580 # The value of CPP is a quoted variable reference, so we need to do this
3581 # to get its actual value...
3582 CPP=`eval "echo $CPP"`
3583 eval `${CPP} -Isrc ${tempcname} \
3584 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3585 if test "x$SPECIFIED_CFLAGS" = x; then
3586 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3587 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3588 else
3589 REAL_CFLAGS="$CFLAGS"
3591 rm ${tempcname}
3593 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3595 ### Compute the unexec source name from the object name.
3596 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3598 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3599 # Assume not, until told otherwise.
3600 GNU_MALLOC=yes
3601 doug_lea_malloc=yes
3602 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3603 echo "configure:3604: checking for malloc_get_state" >&5
3604 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607 cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 /* System header to define __stub macros and hopefully few prototypes,
3611 which can conflict with char malloc_get_state(); below. */
3612 #include <assert.h>
3613 /* Override any gcc2 internal prototype to avoid an error. */
3614 /* We use char because int might match the return type of a gcc2
3615 builtin and then its argument prototype would still apply. */
3616 char malloc_get_state();
3618 int main() {
3620 /* The GNU C library defines this for functions which it implements
3621 to always fail with ENOSYS. Some functions are actually named
3622 something starting with __ and the normal name is an alias. */
3623 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3624 choke me
3625 #else
3626 malloc_get_state();
3627 #endif
3629 ; return 0; }
3631 if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3632 rm -rf conftest*
3633 eval "ac_cv_func_malloc_get_state=yes"
3634 else
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 rm -rf conftest*
3638 eval "ac_cv_func_malloc_get_state=no"
3640 rm -f conftest*
3643 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3644 echo "$ac_t""yes" 1>&6
3646 else
3647 echo "$ac_t""no" 1>&6
3648 doug_lea_malloc=no
3651 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3652 echo "configure:3653: checking for malloc_set_state" >&5
3653 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3654 echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656 cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659 /* System header to define __stub macros and hopefully few prototypes,
3660 which can conflict with char malloc_set_state(); below. */
3661 #include <assert.h>
3662 /* Override any gcc2 internal prototype to avoid an error. */
3663 /* We use char because int might match the return type of a gcc2
3664 builtin and then its argument prototype would still apply. */
3665 char malloc_set_state();
3667 int main() {
3669 /* The GNU C library defines this for functions which it implements
3670 to always fail with ENOSYS. Some functions are actually named
3671 something starting with __ and the normal name is an alias. */
3672 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3673 choke me
3674 #else
3675 malloc_set_state();
3676 #endif
3678 ; return 0; }
3680 if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3681 rm -rf conftest*
3682 eval "ac_cv_func_malloc_set_state=yes"
3683 else
3684 echo "configure: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 rm -rf conftest*
3687 eval "ac_cv_func_malloc_set_state=no"
3689 rm -f conftest*
3692 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3693 echo "$ac_t""yes" 1>&6
3695 else
3696 echo "$ac_t""no" 1>&6
3697 doug_lea_malloc=no
3700 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3701 echo "configure:3702: checking whether __after_morecore_hook exists" >&5
3702 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3703 echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 extern void (* __after_morecore_hook)();
3709 int main() {
3710 __after_morecore_hook = 0
3711 ; return 0; }
3713 if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3714 rm -rf conftest*
3715 emacs_cv_var___after_morecore_hook=yes
3716 else
3717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -rf conftest*
3720 emacs_cv_var___after_morecore_hook=no
3722 rm -f conftest*
3725 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3726 if test $emacs_cv_var___after_morecore_hook = no; then
3727 doug_lea_malloc=no
3729 if test "${system_malloc}" = "yes"; then
3730 GNU_MALLOC=no
3731 GNU_MALLOC_reason="
3732 (The GNU allocators don't work with this system configuration.)"
3734 if test "$doug_lea_malloc" = "yes" ; then
3735 if test "$GNU_MALLOC" = yes ; then
3736 GNU_MALLOC_reason="
3737 (Using Doug Lea's new malloc from the GNU C Library.)"
3739 cat >> confdefs.h <<\EOF
3740 #define DOUG_LEA_MALLOC 1
3745 if test x"${REL_ALLOC}" = x; then
3746 REL_ALLOC=${GNU_MALLOC}
3749 #### Add the libraries to LIBS and check for some functions.
3751 if test x"${OVERRIDE_CPPFLAGS}" != x; then
3752 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3753 else
3754 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3757 LIBS="$libsrc_libs $LIBS"
3759 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3760 echo "configure:3761: checking for dnet_ntoa in -ldnet" >&5
3761 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3763 echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765 ac_save_LIBS="$LIBS"
3766 LIBS="-ldnet $LIBS"
3767 cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 /* Override any gcc2 internal prototype to avoid an error. */
3771 /* We use char because int might match the return type of a gcc2
3772 builtin and then its argument prototype would still apply. */
3773 char dnet_ntoa();
3775 int main() {
3776 dnet_ntoa()
3777 ; return 0; }
3779 if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3780 rm -rf conftest*
3781 eval "ac_cv_lib_$ac_lib_var=yes"
3782 else
3783 echo "configure: failed program was:" >&5
3784 cat conftest.$ac_ext >&5
3785 rm -rf conftest*
3786 eval "ac_cv_lib_$ac_lib_var=no"
3788 rm -f conftest*
3789 LIBS="$ac_save_LIBS"
3792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3793 echo "$ac_t""yes" 1>&6
3794 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3795 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3796 cat >> confdefs.h <<EOF
3797 #define $ac_tr_lib 1
3800 LIBS="-ldnet $LIBS"
3802 else
3803 echo "$ac_t""no" 1>&6
3807 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
3808 echo "configure:3809: checking for main in -lXbsd" >&5
3809 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3811 echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813 ac_save_LIBS="$LIBS"
3814 LIBS="-lXbsd $LIBS"
3815 cat > conftest.$ac_ext <<EOF
3816 #line 3817 "configure"
3817 #include "confdefs.h"
3819 int main() {
3820 main()
3821 ; return 0; }
3823 if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3824 rm -rf conftest*
3825 eval "ac_cv_lib_$ac_lib_var=yes"
3826 else
3827 echo "configure: failed program was:" >&5
3828 cat conftest.$ac_ext >&5
3829 rm -rf conftest*
3830 eval "ac_cv_lib_$ac_lib_var=no"
3832 rm -f conftest*
3833 LIBS="$ac_save_LIBS"
3836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3837 echo "$ac_t""yes" 1>&6
3838 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3839 else
3840 echo "$ac_t""no" 1>&6
3844 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
3845 echo "configure:3846: checking for cma_open in -lpthreads" >&5
3846 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3847 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850 ac_save_LIBS="$LIBS"
3851 LIBS="-lpthreads $LIBS"
3852 cat > conftest.$ac_ext <<EOF
3853 #line 3854 "configure"
3854 #include "confdefs.h"
3855 /* Override any gcc2 internal prototype to avoid an error. */
3856 /* We use char because int might match the return type of a gcc2
3857 builtin and then its argument prototype would still apply. */
3858 char cma_open();
3860 int main() {
3861 cma_open()
3862 ; return 0; }
3864 if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3865 rm -rf conftest*
3866 eval "ac_cv_lib_$ac_lib_var=yes"
3867 else
3868 echo "configure: failed program was:" >&5
3869 cat conftest.$ac_ext >&5
3870 rm -rf conftest*
3871 eval "ac_cv_lib_$ac_lib_var=no"
3873 rm -f conftest*
3874 LIBS="$ac_save_LIBS"
3877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3878 echo "$ac_t""yes" 1>&6
3879 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3880 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3881 cat >> confdefs.h <<EOF
3882 #define $ac_tr_lib 1
3885 LIBS="-lpthreads $LIBS"
3887 else
3888 echo "$ac_t""no" 1>&6
3892 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
3893 echo "configure:3894: checking for XFree86 in /usr/X386" >&5
3894 if test -d /usr/X386/include; then
3895 HAVE_XFREE386=yes
3896 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3897 else
3898 HAVE_XFREE386=no
3900 echo "$ac_t""$HAVE_XFREE386" 1>&6
3902 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3903 # for the tests that follow. We set it back to REAL_CFLAGS later on.
3905 if test "${HAVE_X11}" = "yes"; then
3906 DEFS="$C_SWITCH_X_SITE $DEFS"
3907 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3908 LIBS="$LIBX $LIBS"
3909 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3911 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3912 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3913 # but it's more convenient here to set LD_RUN_PATH
3914 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3915 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3916 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3917 export LD_RUN_PATH
3920 if test "${opsys}" = "gnu-linux"; then
3921 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
3922 echo "configure:3923: checking whether X on GNU/Linux needs -b to link" >&5
3923 cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3927 int main() {
3928 XOpenDisplay ("foo");
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 xlinux_first_failure=no
3934 else
3935 echo "configure: failed program was:" >&5
3936 cat conftest.$ac_ext >&5
3937 rm -rf conftest*
3938 xlinux_first_failure=yes
3940 rm -f conftest*
3941 if test "${xlinux_first_failure}" = "yes"; then
3942 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3943 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3944 OLD_CPPFLAGS="$CPPFLAGS"
3945 OLD_LIBS="$LIBS"
3946 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3947 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3948 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3949 LIBS="$LIBS -b i486-linuxaout"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3954 int main() {
3955 XOpenDisplay ("foo");
3956 ; return 0; }
3958 if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3959 rm -rf conftest*
3960 xlinux_second_failure=no
3961 else
3962 echo "configure: failed program was:" >&5
3963 cat conftest.$ac_ext >&5
3964 rm -rf conftest*
3965 xlinux_second_failure=yes
3967 rm -f conftest*
3968 if test "${xlinux_second_failure}" = "yes"; then
3969 # If we get the same failure with -b, there is no use adding -b.
3970 # So take it out. This plays safe.
3971 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3972 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3973 CPPFLAGS="$OLD_CPPFLAGS"
3974 LIBS="$OLD_LIBS"
3975 echo "$ac_t""no" 1>&6
3976 else
3977 echo "$ac_t""yes" 1>&6
3979 else
3980 echo "$ac_t""no" 1>&6
3984 for ac_func in XrmSetDatabase XScreenResourceString \
3985 XScreenNumberOfScreen XSetWMProtocols
3987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3988 echo "configure:3989: checking for $ac_func" >&5
3989 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3990 echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 /* System header to define __stub macros and hopefully few prototypes,
3996 which can conflict with char $ac_func(); below. */
3997 #include <assert.h>
3998 /* Override any gcc2 internal prototype to avoid an error. */
3999 /* We use char because int might match the return type of a gcc2
4000 builtin and then its argument prototype would still apply. */
4001 char $ac_func();
4003 int main() {
4005 /* The GNU C library defines this for functions which it implements
4006 to always fail with ENOSYS. Some functions are actually named
4007 something starting with __ and the normal name is an alias. */
4008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4009 choke me
4010 #else
4011 $ac_func();
4012 #endif
4014 ; return 0; }
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4017 rm -rf conftest*
4018 eval "ac_cv_func_$ac_func=yes"
4019 else
4020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 rm -rf conftest*
4023 eval "ac_cv_func_$ac_func=no"
4025 rm -f conftest*
4028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4029 echo "$ac_t""yes" 1>&6
4030 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4031 cat >> confdefs.h <<EOF
4032 #define $ac_tr_func 1
4035 else
4036 echo "$ac_t""no" 1>&6
4038 done
4042 if test "${window_system}" = "x11"; then
4043 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4044 echo "configure:4045: checking X11 version 6" >&5
4045 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4046 echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048 cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <X11/Xlib.h>
4052 int main() {
4053 #if XlibSpecificationRelease < 6
4054 fail;
4055 #endif
4057 ; return 0; }
4059 if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4060 rm -rf conftest*
4061 emacs_cv_x11_version_6=yes
4062 else
4063 echo "configure: failed program was:" >&5
4064 cat conftest.$ac_ext >&5
4065 rm -rf conftest*
4066 emacs_cv_x11_version_6=no
4068 rm -f conftest*
4071 if test $emacs_cv_x11_version_6 = yes; then
4072 echo "$ac_t""6 or newer" 1>&6
4073 cat >> confdefs.h <<\EOF
4074 #define HAVE_X11R6 1
4077 else
4078 echo "$ac_t""before 6" 1>&6
4082 if test "${window_system}" = "x11"; then
4083 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4084 echo "configure:4085: checking X11 version 5" >&5
4085 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4086 echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088 cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091 #include <X11/Xlib.h>
4092 int main() {
4093 #if XlibSpecificationRelease < 5
4094 fail;
4095 #endif
4097 ; return 0; }
4099 if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4100 rm -rf conftest*
4101 emacs_cv_x11_version_5=yes
4102 else
4103 echo "configure: failed program was:" >&5
4104 cat conftest.$ac_ext >&5
4105 rm -rf conftest*
4106 emacs_cv_x11_version_5=no
4108 rm -f conftest*
4111 if test $emacs_cv_x11_version_5 = yes; then
4112 echo "$ac_t""5 or newer" 1>&6
4113 HAVE_X11R5=yes
4114 cat >> confdefs.h <<\EOF
4115 #define HAVE_X11R5 1
4118 else
4119 HAVE_X11R5=no
4120 echo "$ac_t""before 5" 1>&6
4124 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4125 if test x"${HAVE_X11R5}" = xyes; then
4126 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4127 echo "configure:4128: checking X11 version 5 with Xaw" >&5
4128 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4129 echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4135 #include <X11/Intrinsic.h>
4136 #include <X11/Xaw/Simple.h>
4137 int main() {
4139 ; return 0; }
4141 if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4142 rm -rf conftest*
4143 emacs_cv_x11_version_5_with_xaw=yes
4144 else
4145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
4147 rm -rf conftest*
4148 emacs_cv_x11_version_5_with_xaw=no
4150 rm -f conftest*
4153 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4154 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4155 USE_X_TOOLKIT=LUCID
4156 else
4157 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4158 USE_X_TOOLKIT=none
4160 else
4161 USE_X_TOOLKIT=none
4165 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4167 if test "${USE_X_TOOLKIT}" != "none"; then
4168 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4169 echo "configure:4170: checking X11 toolkit version" >&5
4170 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4171 echo $ac_n "(cached) $ac_c" 1>&6
4172 else
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #include <X11/Intrinsic.h>
4177 int main() {
4178 #if XtSpecificationRelease < 6
4179 fail;
4180 #endif
4182 ; return 0; }
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4185 rm -rf conftest*
4186 emacs_cv_x11_toolkit_version_6=yes
4187 else
4188 echo "configure: failed program was:" >&5
4189 cat conftest.$ac_ext >&5
4190 rm -rf conftest*
4191 emacs_cv_x11_toolkit_version_6=no
4193 rm -f conftest*
4196 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4197 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4198 echo "$ac_t""6 or newer" 1>&6
4199 cat >> confdefs.h <<\EOF
4200 #define HAVE_X11XTR6 1
4203 else
4204 echo "$ac_t""before 6" 1>&6
4207 OLDLIBS="$LIBS"
4208 if test x$HAVE_X11XTR6 = xyes; then
4209 LIBS="-lXt -lSM -lICE $LIBS"
4210 else
4211 LIBS="-lXt $LIBS"
4213 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4214 echo "configure:4215: checking for XmuConvertStandardSelection in -lXmu" >&5
4215 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4217 echo $ac_n "(cached) $ac_c" 1>&6
4218 else
4219 ac_save_LIBS="$LIBS"
4220 LIBS="-lXmu $LIBS"
4221 cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 /* Override any gcc2 internal prototype to avoid an error. */
4225 /* We use char because int might match the return type of a gcc2
4226 builtin and then its argument prototype would still apply. */
4227 char XmuConvertStandardSelection();
4229 int main() {
4230 XmuConvertStandardSelection()
4231 ; return 0; }
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234 rm -rf conftest*
4235 eval "ac_cv_lib_$ac_lib_var=yes"
4236 else
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 rm -rf conftest*
4240 eval "ac_cv_lib_$ac_lib_var=no"
4242 rm -f conftest*
4243 LIBS="$ac_save_LIBS"
4246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4247 echo "$ac_t""yes" 1>&6
4248 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4249 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4250 cat >> confdefs.h <<EOF
4251 #define $ac_tr_lib 1
4254 LIBS="-lXmu $LIBS"
4256 else
4257 echo "$ac_t""no" 1>&6
4260 LIBS="$OLDLIBS"
4263 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4264 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4265 echo "configure:4266: checking for Motif version 2.1" >&5
4266 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4267 echo $ac_n "(cached) $ac_c" 1>&6
4268 else
4269 cat > conftest.$ac_ext <<EOF
4270 #line 4271 "configure"
4271 #include "confdefs.h"
4272 #include <Xm/Xm.h>
4273 int main() {
4274 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4275 int x = 5;
4276 #else
4277 Motif version prior to 2.1.
4278 #endif
4279 ; return 0; }
4281 if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4282 rm -rf conftest*
4283 emacs_cv_motif_version_2_1=yes
4284 else
4285 echo "configure: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 rm -rf conftest*
4288 emacs_cv_motif_version_2_1=no
4290 rm -f conftest*
4293 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4294 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4295 if test $emacs_cv_motif_version_2_1 = yes; then
4296 cat >> confdefs.h <<\EOF
4297 #define HAVE_MOTIF_2_1 1
4300 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4301 echo "configure:4302: checking for XpCreateContext in -lXp" >&5
4302 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4304 echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306 ac_save_LIBS="$LIBS"
4307 LIBS="-lXp -lXext $LIBS"
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 /* Override any gcc2 internal prototype to avoid an error. */
4312 /* We use char because int might match the return type of a gcc2
4313 builtin and then its argument prototype would still apply. */
4314 char XpCreateContext();
4316 int main() {
4317 XpCreateContext()
4318 ; return 0; }
4320 if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4321 rm -rf conftest*
4322 eval "ac_cv_lib_$ac_lib_var=yes"
4323 else
4324 echo "configure: failed program was:" >&5
4325 cat conftest.$ac_ext >&5
4326 rm -rf conftest*
4327 eval "ac_cv_lib_$ac_lib_var=no"
4329 rm -f conftest*
4330 LIBS="$ac_save_LIBS"
4333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4334 echo "$ac_t""yes" 1>&6
4335 HAVE_LIBXP=yes
4336 else
4337 echo "$ac_t""no" 1>&6
4340 if test ${HAVE_LIBXP} = yes; then
4341 cat >> confdefs.h <<\EOF
4342 #define HAVE_LIBXP 1
4349 ### Is -lXaw3d available?
4350 HAVE_XAW3D=no
4351 if test "${HAVE_X11}" = "yes"; then
4352 if test "${USE_X_TOOLKIT}" != "none"; then
4353 old_c_flags="${CFLAGS}"
4354 CFLAGS="${LD_SWITCH_X_SITE}"
4355 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4356 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4357 echo "configure:4358: checking for X11/Xaw3d/Scrollbar.h" >&5
4358 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4359 echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361 cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364 #include <X11/Xaw3d/Scrollbar.h>
4366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4367 { (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4369 if test -z "$ac_err"; then
4370 rm -rf conftest*
4371 eval "ac_cv_header_$ac_safe=yes"
4372 else
4373 echo "$ac_err" >&5
4374 echo "configure: failed program was:" >&5
4375 cat conftest.$ac_ext >&5
4376 rm -rf conftest*
4377 eval "ac_cv_header_$ac_safe=no"
4379 rm -f conftest*
4381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4382 echo "$ac_t""yes" 1>&6
4383 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
4384 echo "configure:4385: checking for XawScrollbarSetThumb in -lXaw3d" >&5
4385 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4386 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4387 echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389 ac_save_LIBS="$LIBS"
4390 LIBS="-lXaw3d -lX11 $LIBS"
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 /* Override any gcc2 internal prototype to avoid an error. */
4395 /* We use char because int might match the return type of a gcc2
4396 builtin and then its argument prototype would still apply. */
4397 char XawScrollbarSetThumb();
4399 int main() {
4400 XawScrollbarSetThumb()
4401 ; return 0; }
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404 rm -rf conftest*
4405 eval "ac_cv_lib_$ac_lib_var=yes"
4406 else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -rf conftest*
4410 eval "ac_cv_lib_$ac_lib_var=no"
4412 rm -f conftest*
4413 LIBS="$ac_save_LIBS"
4416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417 echo "$ac_t""yes" 1>&6
4418 HAVE_XAW3D=yes
4419 else
4420 echo "$ac_t""no" 1>&6
4423 else
4424 echo "$ac_t""no" 1>&6
4427 CFLAGS="${old_c_flags}"
4429 if test "${HAVE_XAW3D}" = "yes"; then
4430 cat >> confdefs.h <<\EOF
4431 #define HAVE_XAW3D 1
4439 USE_TOOLKIT_SCROLL_BARS=no
4440 if test "${with_toolkit_scroll_bars}" != "no"; then
4441 if test "${USE_X_TOOLKIT}" != "none"; then
4442 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4443 cat >> confdefs.h <<\EOF
4444 #define USE_TOOLKIT_SCROLL_BARS 1
4447 HAVE_XAW3D=no
4448 USE_TOOLKIT_SCROLL_BARS=yes
4449 elif test "${HAVE_XAW3D}" = "yes"; then
4450 cat >> confdefs.h <<\EOF
4451 #define USE_TOOLKIT_SCROLL_BARS 1
4454 USE_TOOLKIT_SCROLL_BARS=yes
4459 ### Use -lXpm if available, unless `--with-xpm=no'.
4460 HAVE_XPM=no
4461 if test "${HAVE_X11}" = "yes"; then
4462 if test "${with_xpm}" != "no"; then
4463 old_c_flags="${CFLAGS}"
4464 CFLAGS="${LD_SWITCH_X_SITE}"
4465 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4466 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
4467 echo "configure:4468: checking for X11/xpm.h" >&5
4468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4469 echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 #include <X11/xpm.h>
4476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4477 { (eval echo configure:4478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4479 if test -z "$ac_err"; then
4480 rm -rf conftest*
4481 eval "ac_cv_header_$ac_safe=yes"
4482 else
4483 echo "$ac_err" >&5
4484 echo "configure: failed program was:" >&5
4485 cat conftest.$ac_ext >&5
4486 rm -rf conftest*
4487 eval "ac_cv_header_$ac_safe=no"
4489 rm -f conftest*
4491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4492 echo "$ac_t""yes" 1>&6
4493 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
4494 echo "configure:4495: checking for XpmReadFileToPixmap in -lXpm" >&5
4495 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4497 echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499 ac_save_LIBS="$LIBS"
4500 LIBS="-lXpm -lX11 $LIBS"
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 /* Override any gcc2 internal prototype to avoid an error. */
4505 /* We use char because int might match the return type of a gcc2
4506 builtin and then its argument prototype would still apply. */
4507 char XpmReadFileToPixmap();
4509 int main() {
4510 XpmReadFileToPixmap()
4511 ; return 0; }
4513 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4514 rm -rf conftest*
4515 eval "ac_cv_lib_$ac_lib_var=yes"
4516 else
4517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4519 rm -rf conftest*
4520 eval "ac_cv_lib_$ac_lib_var=no"
4522 rm -f conftest*
4523 LIBS="$ac_save_LIBS"
4526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4527 echo "$ac_t""yes" 1>&6
4528 HAVE_XPM=yes
4529 else
4530 echo "$ac_t""no" 1>&6
4533 else
4534 echo "$ac_t""no" 1>&6
4537 CFLAGS="${old_c_flags}"
4540 if test "${HAVE_XPM}" = "yes"; then
4541 cat >> confdefs.h <<\EOF
4542 #define HAVE_XPM 1
4548 ### Use -ljpeg if available, unless `--with-jpeg=no'.
4549 HAVE_JPEG=no
4550 if test "${HAVE_X11}" = "yes"; then
4551 if test "${with_jpeg}" != "no"; then
4552 old_c_flags="${CFLAGS}"
4553 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4554 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
4555 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
4556 echo "configure:4557: checking for jerror.h" >&5
4557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4558 echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <jerror.h>
4565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4566 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4568 if test -z "$ac_err"; then
4569 rm -rf conftest*
4570 eval "ac_cv_header_$ac_safe=yes"
4571 else
4572 echo "$ac_err" >&5
4573 echo "configure: failed program was:" >&5
4574 cat conftest.$ac_ext >&5
4575 rm -rf conftest*
4576 eval "ac_cv_header_$ac_safe=no"
4578 rm -f conftest*
4580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4581 echo "$ac_t""yes" 1>&6
4582 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
4583 echo "configure:4584: checking for jpeg_destroy_compress in -ljpeg" >&5
4584 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4585 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4586 echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588 ac_save_LIBS="$LIBS"
4589 LIBS="-ljpeg -lX11 $LIBS"
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 /* Override any gcc2 internal prototype to avoid an error. */
4594 /* We use char because int might match the return type of a gcc2
4595 builtin and then its argument prototype would still apply. */
4596 char jpeg_destroy_compress();
4598 int main() {
4599 jpeg_destroy_compress()
4600 ; return 0; }
4602 if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4603 rm -rf conftest*
4604 eval "ac_cv_lib_$ac_lib_var=yes"
4605 else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 eval "ac_cv_lib_$ac_lib_var=no"
4611 rm -f conftest*
4612 LIBS="$ac_save_LIBS"
4615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4616 echo "$ac_t""yes" 1>&6
4617 HAVE_JPEG=yes
4618 else
4619 echo "$ac_t""no" 1>&6
4622 else
4623 echo "$ac_t""no" 1>&6
4626 CFLAGS="${old_c_flags}"
4629 if test "${HAVE_JPEG}" = "yes"; then
4630 cat >> confdefs.h <<\EOF
4631 #define HAVE_JPEG 1
4637 ### Use -lpng if available, unless `--with-png=no'.
4638 HAVE_PNG=no
4639 if test "${HAVE_X11}" = "yes"; then
4640 if test "${with_png}" != "no"; then
4641 old_c_flags="${CFLAGS}"
4642 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4643 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4644 echo $ac_n "checking for png.h""... $ac_c" 1>&6
4645 echo "configure:4646: checking for png.h" >&5
4646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649 cat > conftest.$ac_ext <<EOF
4650 #line 4651 "configure"
4651 #include "confdefs.h"
4652 #include <png.h>
4654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4655 { (eval echo configure:4656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4657 if test -z "$ac_err"; then
4658 rm -rf conftest*
4659 eval "ac_cv_header_$ac_safe=yes"
4660 else
4661 echo "$ac_err" >&5
4662 echo "configure: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4664 rm -rf conftest*
4665 eval "ac_cv_header_$ac_safe=no"
4667 rm -f conftest*
4669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4670 echo "$ac_t""yes" 1>&6
4671 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
4672 echo "configure:4673: checking for png_set_expand in -lpng" >&5
4673 ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4675 echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677 ac_save_LIBS="$LIBS"
4678 LIBS="-lpng -lX11 -lz -lm $LIBS"
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 /* Override any gcc2 internal prototype to avoid an error. */
4683 /* We use char because int might match the return type of a gcc2
4684 builtin and then its argument prototype would still apply. */
4685 char png_set_expand();
4687 int main() {
4688 png_set_expand()
4689 ; return 0; }
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692 rm -rf conftest*
4693 eval "ac_cv_lib_$ac_lib_var=yes"
4694 else
4695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -rf conftest*
4698 eval "ac_cv_lib_$ac_lib_var=no"
4700 rm -f conftest*
4701 LIBS="$ac_save_LIBS"
4704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4705 echo "$ac_t""yes" 1>&6
4706 HAVE_PNG=yes
4707 else
4708 echo "$ac_t""no" 1>&6
4711 else
4712 echo "$ac_t""no" 1>&6
4715 CFLAGS="${old_c_flags}"
4718 if test "${HAVE_PNG}" = "yes"; then
4719 cat >> confdefs.h <<\EOF
4720 #define HAVE_PNG 1
4726 ### Use -ltiff if available, unless `--with-tiff=no'.
4727 HAVE_TIFF=no
4728 if test "${HAVE_X11}" = "yes"; then
4729 if test "${with_tiff}" != "no"; then
4730 old_c_flags="${CFLAGS}"
4731 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4732 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4733 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
4734 echo "configure:4735: checking for tiffio.h" >&5
4735 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4736 echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738 cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 #include <tiffio.h>
4743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4744 { (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4746 if test -z "$ac_err"; then
4747 rm -rf conftest*
4748 eval "ac_cv_header_$ac_safe=yes"
4749 else
4750 echo "$ac_err" >&5
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
4754 eval "ac_cv_header_$ac_safe=no"
4756 rm -f conftest*
4758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4759 echo "$ac_t""yes" 1>&6
4760 tifflibs="-lX11 -lz -lm"
4761 # At least one tiff package requires the jpeg library.
4762 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
4763 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
4764 echo "configure:4765: checking for TIFFGetVersion in -ltiff" >&5
4765 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4767 echo $ac_n "(cached) $ac_c" 1>&6
4768 else
4769 ac_save_LIBS="$LIBS"
4770 LIBS="-ltiff $tifflibs $LIBS"
4771 cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 /* Override any gcc2 internal prototype to avoid an error. */
4775 /* We use char because int might match the return type of a gcc2
4776 builtin and then its argument prototype would still apply. */
4777 char TIFFGetVersion();
4779 int main() {
4780 TIFFGetVersion()
4781 ; return 0; }
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784 rm -rf conftest*
4785 eval "ac_cv_lib_$ac_lib_var=yes"
4786 else
4787 echo "configure: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4789 rm -rf conftest*
4790 eval "ac_cv_lib_$ac_lib_var=no"
4792 rm -f conftest*
4793 LIBS="$ac_save_LIBS"
4796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4797 echo "$ac_t""yes" 1>&6
4798 HAVE_TIFF=yes
4799 else
4800 echo "$ac_t""no" 1>&6
4803 else
4804 echo "$ac_t""no" 1>&6
4807 CFLAGS="${old_c_flags}"
4810 if test "${HAVE_TIFF}" = "yes"; then
4811 cat >> confdefs.h <<\EOF
4812 #define HAVE_TIFF 1
4818 ### Use -lgif if available, unless `--with-gif=no'.
4819 HAVE_GIF=no
4820 if test "${HAVE_X11}" = "yes"; then
4821 if test "${with_gif}" != "no"; then
4822 old_c_flags="${CFLAGS}"
4823 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4824 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4825 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
4826 echo "configure:4827: checking for gif_lib.h" >&5
4827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4828 echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 #include <gif_lib.h>
4835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4836 { (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4838 if test -z "$ac_err"; then
4839 rm -rf conftest*
4840 eval "ac_cv_header_$ac_safe=yes"
4841 else
4842 echo "$ac_err" >&5
4843 echo "configure: failed program was:" >&5
4844 cat conftest.$ac_ext >&5
4845 rm -rf conftest*
4846 eval "ac_cv_header_$ac_safe=no"
4848 rm -f conftest*
4850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4851 echo "$ac_t""yes" 1>&6
4852 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
4853 echo "configure:4854: checking for DGifOpen in -lungif" >&5
4854 ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
4855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858 ac_save_LIBS="$LIBS"
4859 LIBS="-lungif -lX11 $LIBS"
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error. */
4864 /* We use char because int might match the return type of a gcc2
4865 builtin and then its argument prototype would still apply. */
4866 char DGifOpen();
4868 int main() {
4869 DGifOpen()
4870 ; return 0; }
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873 rm -rf conftest*
4874 eval "ac_cv_lib_$ac_lib_var=yes"
4875 else
4876 echo "configure: failed program was:" >&5
4877 cat conftest.$ac_ext >&5
4878 rm -rf conftest*
4879 eval "ac_cv_lib_$ac_lib_var=no"
4881 rm -f conftest*
4882 LIBS="$ac_save_LIBS"
4885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4886 echo "$ac_t""yes" 1>&6
4887 HAVE_GIF=yes
4888 else
4889 echo "$ac_t""no" 1>&6
4892 else
4893 echo "$ac_t""no" 1>&6
4896 CFLAGS="${old_c_flags}"
4899 if test "${HAVE_GIF}" = "yes"; then
4900 cat >> confdefs.h <<\EOF
4901 #define HAVE_GIF 1
4907 # If netdb.h doesn't declare h_errno, we must declare it by hand.
4908 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
4909 echo "configure:4910: checking whether netdb declares h_errno" >&5
4910 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+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 <netdb.h>
4917 int main() {
4918 return h_errno;
4919 ; return 0; }
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922 rm -rf conftest*
4923 emacs_cv_netdb_declares_h_errno=yes
4924 else
4925 echo "configure: failed program was:" >&5
4926 cat conftest.$ac_ext >&5
4927 rm -rf conftest*
4928 emacs_cv_netdb_declares_h_errno=no
4930 rm -f conftest*
4933 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4934 if test $emacs_cv_netdb_declares_h_errno = yes; then
4935 cat >> confdefs.h <<\EOF
4936 #define HAVE_H_ERRNO 1
4941 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4942 # for constant arguments. Useless!
4943 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4944 echo "configure:4945: checking for working alloca.h" >&5
4945 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4946 echo $ac_n "(cached) $ac_c" 1>&6
4947 else
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 #include <alloca.h>
4952 int main() {
4953 void *p = alloca(2 * sizeof(int));
4954 ; return 0; }
4956 if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4957 rm -rf conftest*
4958 ac_cv_header_alloca_h=yes
4959 else
4960 echo "configure: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
4962 rm -rf conftest*
4963 ac_cv_header_alloca_h=no
4965 rm -f conftest*
4968 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4969 if test $ac_cv_header_alloca_h = yes; then
4970 cat >> confdefs.h <<\EOF
4971 #define HAVE_ALLOCA_H 1
4976 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4977 echo "configure:4978: checking for alloca" >&5
4978 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4979 echo $ac_n "(cached) $ac_c" 1>&6
4980 else
4981 cat > conftest.$ac_ext <<EOF
4982 #line 4983 "configure"
4983 #include "confdefs.h"
4985 #ifdef __GNUC__
4986 # define alloca __builtin_alloca
4987 #else
4988 # ifdef _MSC_VER
4989 # include <malloc.h>
4990 # define alloca _alloca
4991 # else
4992 # if HAVE_ALLOCA_H
4993 # include <alloca.h>
4994 # else
4995 # ifdef _AIX
4996 #pragma alloca
4997 # else
4998 # ifndef alloca /* predefined by HP cc +Olibcalls */
4999 char *alloca ();
5000 # endif
5001 # endif
5002 # endif
5003 # endif
5004 #endif
5006 int main() {
5007 char *p = (char *) alloca(1);
5008 ; return 0; }
5010 if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5011 rm -rf conftest*
5012 ac_cv_func_alloca_works=yes
5013 else
5014 echo "configure: failed program was:" >&5
5015 cat conftest.$ac_ext >&5
5016 rm -rf conftest*
5017 ac_cv_func_alloca_works=no
5019 rm -f conftest*
5022 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5023 if test $ac_cv_func_alloca_works = yes; then
5024 cat >> confdefs.h <<\EOF
5025 #define HAVE_ALLOCA 1
5030 if test $ac_cv_func_alloca_works = no; then
5031 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5032 # that cause trouble. Some versions do not even contain alloca or
5033 # contain a buggy version. If you still want to use their alloca,
5034 # use ar to extract alloca.o from them instead of compiling alloca.c.
5035 ALLOCA=alloca.${ac_objext}
5036 cat >> confdefs.h <<\EOF
5037 #define C_ALLOCA 1
5041 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5042 echo "configure:5043: checking whether alloca needs Cray hooks" >&5
5043 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5044 echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 #if defined(CRAY) && ! defined(CRAY2)
5050 webecray
5051 #else
5052 wenotbecray
5053 #endif
5056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5057 egrep "webecray" >/dev/null 2>&1; then
5058 rm -rf conftest*
5059 ac_cv_os_cray=yes
5060 else
5061 rm -rf conftest*
5062 ac_cv_os_cray=no
5064 rm -f conftest*
5068 echo "$ac_t""$ac_cv_os_cray" 1>&6
5069 if test $ac_cv_os_cray = yes; then
5070 for ac_func in _getb67 GETB67 getb67; do
5071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5072 echo "configure:5073: checking for $ac_func" >&5
5073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5074 echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079 /* System header to define __stub macros and hopefully few prototypes,
5080 which can conflict with char $ac_func(); below. */
5081 #include <assert.h>
5082 /* Override any gcc2 internal prototype to avoid an error. */
5083 /* We use char because int might match the return type of a gcc2
5084 builtin and then its argument prototype would still apply. */
5085 char $ac_func();
5087 int main() {
5089 /* The GNU C library defines this for functions which it implements
5090 to always fail with ENOSYS. Some functions are actually named
5091 something starting with __ and the normal name is an alias. */
5092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5093 choke me
5094 #else
5095 $ac_func();
5096 #endif
5098 ; return 0; }
5100 if { (eval echo configure:5101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5101 rm -rf conftest*
5102 eval "ac_cv_func_$ac_func=yes"
5103 else
5104 echo "configure: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 rm -rf conftest*
5107 eval "ac_cv_func_$ac_func=no"
5109 rm -f conftest*
5112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5113 echo "$ac_t""yes" 1>&6
5114 cat >> confdefs.h <<EOF
5115 #define CRAY_STACKSEG_END $ac_func
5118 break
5119 else
5120 echo "$ac_t""no" 1>&6
5123 done
5126 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5127 echo "configure:5128: checking stack direction for C alloca" >&5
5128 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5129 echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131 if test "$cross_compiling" = yes; then
5132 ac_cv_c_stack_direction=0
5133 else
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 find_stack_direction ()
5139 static char *addr = 0;
5140 auto char dummy;
5141 if (addr == 0)
5143 addr = &dummy;
5144 return find_stack_direction ();
5146 else
5147 return (&dummy > addr) ? 1 : -1;
5149 main ()
5151 exit (find_stack_direction() < 0);
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5155 then
5156 ac_cv_c_stack_direction=1
5157 else
5158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5160 rm -fr conftest*
5161 ac_cv_c_stack_direction=-1
5163 rm -fr conftest*
5168 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5169 cat >> confdefs.h <<EOF
5170 #define STACK_DIRECTION $ac_cv_c_stack_direction
5176 # fmod, logb, and frexp are found in -lm on most systems.
5177 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5178 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5179 echo "configure:5180: checking for sqrt in -lm" >&5
5180 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5182 echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184 ac_save_LIBS="$LIBS"
5185 LIBS="-lm $LIBS"
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 /* Override any gcc2 internal prototype to avoid an error. */
5190 /* We use char because int might match the return type of a gcc2
5191 builtin and then its argument prototype would still apply. */
5192 char sqrt();
5194 int main() {
5195 sqrt()
5196 ; return 0; }
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5199 rm -rf conftest*
5200 eval "ac_cv_lib_$ac_lib_var=yes"
5201 else
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 rm -rf conftest*
5205 eval "ac_cv_lib_$ac_lib_var=no"
5207 rm -f conftest*
5208 LIBS="$ac_save_LIBS"
5211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5212 echo "$ac_t""yes" 1>&6
5213 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5214 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5215 cat >> confdefs.h <<EOF
5216 #define $ac_tr_lib 1
5219 LIBS="-lm $LIBS"
5221 else
5222 echo "$ac_t""no" 1>&6
5226 # Check for mail-locking functions in a "mail" library
5227 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5228 echo "configure:5229: checking for maillock in -lmail" >&5
5229 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5230 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233 ac_save_LIBS="$LIBS"
5234 LIBS="-lmail $LIBS"
5235 cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238 /* Override any gcc2 internal prototype to avoid an error. */
5239 /* We use char because int might match the return type of a gcc2
5240 builtin and then its argument prototype would still apply. */
5241 char maillock();
5243 int main() {
5244 maillock()
5245 ; return 0; }
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248 rm -rf conftest*
5249 eval "ac_cv_lib_$ac_lib_var=yes"
5250 else
5251 echo "configure: failed program was:" >&5
5252 cat conftest.$ac_ext >&5
5253 rm -rf conftest*
5254 eval "ac_cv_lib_$ac_lib_var=no"
5256 rm -f conftest*
5257 LIBS="$ac_save_LIBS"
5260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5261 echo "$ac_t""yes" 1>&6
5262 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5263 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5264 cat >> confdefs.h <<EOF
5265 #define $ac_tr_lib 1
5268 LIBS="-lmail $LIBS"
5270 else
5271 echo "$ac_t""no" 1>&6
5274 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5275 echo "configure:5276: checking for maillock in -llockfile" >&5
5276 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5278 echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280 ac_save_LIBS="$LIBS"
5281 LIBS="-llockfile $LIBS"
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 /* Override any gcc2 internal prototype to avoid an error. */
5286 /* We use char because int might match the return type of a gcc2
5287 builtin and then its argument prototype would still apply. */
5288 char maillock();
5290 int main() {
5291 maillock()
5292 ; return 0; }
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295 rm -rf conftest*
5296 eval "ac_cv_lib_$ac_lib_var=yes"
5297 else
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 rm -rf conftest*
5301 eval "ac_cv_lib_$ac_lib_var=no"
5303 rm -f conftest*
5304 LIBS="$ac_save_LIBS"
5307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5308 echo "$ac_t""yes" 1>&6
5309 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5310 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5311 cat >> confdefs.h <<EOF
5312 #define $ac_tr_lib 1
5315 LIBS="-llockfile $LIBS"
5317 else
5318 echo "$ac_t""no" 1>&6
5321 # If we have the shared liblockfile, assume we must use it for mail
5322 # locking (e.g. Debian). If we couldn't link against liblockfile
5323 # (no liblockfile.a installed), ensure that we don't need to.
5324 if test "$ac_cv_lib_lockfile_maillock" = no; then
5325 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5326 set dummy liblockfile.so; ac_word=$2
5327 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5328 echo "configure:5329: checking for $ac_word" >&5
5329 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5330 echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332 if test -n "$liblockfile"; then
5333 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5334 else
5335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5336 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5337 for ac_dir in $ac_dummy; do
5338 test -z "$ac_dir" && ac_dir=.
5339 if test -f $ac_dir/$ac_word; then
5340 ac_cv_prog_liblockfile="yes"
5341 break
5343 done
5344 IFS="$ac_save_ifs"
5345 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
5348 liblockfile="$ac_cv_prog_liblockfile"
5349 if test -n "$liblockfile"; then
5350 echo "$ac_t""$liblockfile" 1>&6
5351 else
5352 echo "$ac_t""no" 1>&6
5355 if test $ac_cv_prog_liblockfile = yes; then
5356 { echo "configure: error: Shared liblockfile found but can't link against it.
5357 This probably means that movemail could lose mail.
5358 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
5359 else cat >> confdefs.h <<\EOF
5360 #define LIBMAIL -llockfile
5364 else :
5366 for ac_func in touchlock
5368 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5369 echo "configure:5370: checking for $ac_func" >&5
5370 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5371 echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376 /* System header to define __stub macros and hopefully few prototypes,
5377 which can conflict with char $ac_func(); below. */
5378 #include <assert.h>
5379 /* Override any gcc2 internal prototype to avoid an error. */
5380 /* We use char because int might match the return type of a gcc2
5381 builtin and then its argument prototype would still apply. */
5382 char $ac_func();
5384 int main() {
5386 /* The GNU C library defines this for functions which it implements
5387 to always fail with ENOSYS. Some functions are actually named
5388 something starting with __ and the normal name is an alias. */
5389 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5390 choke me
5391 #else
5392 $ac_func();
5393 #endif
5395 ; return 0; }
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398 rm -rf conftest*
5399 eval "ac_cv_func_$ac_func=yes"
5400 else
5401 echo "configure: failed program was:" >&5
5402 cat conftest.$ac_ext >&5
5403 rm -rf conftest*
5404 eval "ac_cv_func_$ac_func=no"
5406 rm -f conftest*
5409 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5410 echo "$ac_t""yes" 1>&6
5411 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5412 cat >> confdefs.h <<EOF
5413 #define $ac_tr_func 1
5416 else
5417 echo "$ac_t""no" 1>&6
5419 done
5421 for ac_hdr in maillock.h
5423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5425 echo "configure:5426: checking for $ac_hdr" >&5
5426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5427 echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429 cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 #include <$ac_hdr>
5434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5435 { (eval echo configure:5436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5437 if test -z "$ac_err"; then
5438 rm -rf conftest*
5439 eval "ac_cv_header_$ac_safe=yes"
5440 else
5441 echo "$ac_err" >&5
5442 echo "configure: failed program was:" >&5
5443 cat conftest.$ac_ext >&5
5444 rm -rf conftest*
5445 eval "ac_cv_header_$ac_safe=no"
5447 rm -f conftest*
5449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5450 echo "$ac_t""yes" 1>&6
5451 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5452 cat >> confdefs.h <<EOF
5453 #define $ac_tr_hdr 1
5456 else
5457 echo "$ac_t""no" 1>&6
5459 done
5462 for ac_func in gethostname getdomainname dup2 \
5463 rename closedir mkdir rmdir sysinfo \
5464 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5465 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5466 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
5467 __fpending mblen mbrlen strsignal setitimer ualarm
5469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5470 echo "configure:5471: checking for $ac_func" >&5
5471 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5472 echo $ac_n "(cached) $ac_c" 1>&6
5473 else
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477 /* System header to define __stub macros and hopefully few prototypes,
5478 which can conflict with char $ac_func(); below. */
5479 #include <assert.h>
5480 /* Override any gcc2 internal prototype to avoid an error. */
5481 /* We use char because int might match the return type of a gcc2
5482 builtin and then its argument prototype would still apply. */
5483 char $ac_func();
5485 int main() {
5487 /* The GNU C library defines this for functions which it implements
5488 to always fail with ENOSYS. Some functions are actually named
5489 something starting with __ and the normal name is an alias. */
5490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5491 choke me
5492 #else
5493 $ac_func();
5494 #endif
5496 ; return 0; }
5498 if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5499 rm -rf conftest*
5500 eval "ac_cv_func_$ac_func=yes"
5501 else
5502 echo "configure: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 rm -rf conftest*
5505 eval "ac_cv_func_$ac_func=no"
5507 rm -f conftest*
5510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5511 echo "$ac_t""yes" 1>&6
5512 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5513 cat >> confdefs.h <<EOF
5514 #define $ac_tr_func 1
5517 else
5518 echo "$ac_t""no" 1>&6
5520 done
5523 for ac_hdr in sys/time.h unistd.h
5525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5527 echo "configure:5528: checking for $ac_hdr" >&5
5528 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5529 echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531 cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 #include <$ac_hdr>
5536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5537 { (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5539 if test -z "$ac_err"; then
5540 rm -rf conftest*
5541 eval "ac_cv_header_$ac_safe=yes"
5542 else
5543 echo "$ac_err" >&5
5544 echo "configure: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 rm -rf conftest*
5547 eval "ac_cv_header_$ac_safe=no"
5549 rm -f conftest*
5551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5552 echo "$ac_t""yes" 1>&6
5553 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5554 cat >> confdefs.h <<EOF
5555 #define $ac_tr_hdr 1
5558 else
5559 echo "$ac_t""no" 1>&6
5561 done
5563 for ac_func in alarm
5565 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5566 echo "configure:5567: checking for $ac_func" >&5
5567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5568 echo $ac_n "(cached) $ac_c" 1>&6
5569 else
5570 cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573 /* System header to define __stub macros and hopefully few prototypes,
5574 which can conflict with char $ac_func(); below. */
5575 #include <assert.h>
5576 /* Override any gcc2 internal prototype to avoid an error. */
5577 /* We use char because int might match the return type of a gcc2
5578 builtin and then its argument prototype would still apply. */
5579 char $ac_func();
5581 int main() {
5583 /* The GNU C library defines this for functions which it implements
5584 to always fail with ENOSYS. Some functions are actually named
5585 something starting with __ and the normal name is an alias. */
5586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5587 choke me
5588 #else
5589 $ac_func();
5590 #endif
5592 ; return 0; }
5594 if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5595 rm -rf conftest*
5596 eval "ac_cv_func_$ac_func=yes"
5597 else
5598 echo "configure: failed program was:" >&5
5599 cat conftest.$ac_ext >&5
5600 rm -rf conftest*
5601 eval "ac_cv_func_$ac_func=no"
5603 rm -f conftest*
5606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5607 echo "$ac_t""yes" 1>&6
5608 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5609 cat >> confdefs.h <<EOF
5610 #define $ac_tr_func 1
5613 else
5614 echo "$ac_t""no" 1>&6
5616 done
5618 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
5619 echo "configure:5620: checking for working mktime" >&5
5620 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5622 else
5623 if test "$cross_compiling" = yes; then
5624 ac_cv_func_working_mktime=no
5625 else
5626 cat > conftest.$ac_ext <<EOF
5627 #line 5628 "configure"
5628 #include "confdefs.h"
5629 /* Test program from Paul Eggert (eggert@twinsun.com)
5630 and Tony Leneis (tony@plaza.ds.adp.com). */
5631 #if TIME_WITH_SYS_TIME
5632 # include <sys/time.h>
5633 # include <time.h>
5634 #else
5635 # if HAVE_SYS_TIME_H
5636 # include <sys/time.h>
5637 # else
5638 # include <time.h>
5639 # endif
5640 #endif
5642 #if HAVE_UNISTD_H
5643 # include <unistd.h>
5644 #endif
5646 #if !HAVE_ALARM
5647 # define alarm(X) /* empty */
5648 #endif
5650 /* Work around redefinition to rpl_putenv by other config tests. */
5651 #undef putenv
5653 static time_t time_t_max;
5655 /* Values we'll use to set the TZ environment variable. */
5656 static const char *const tz_strings[] = {
5657 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
5658 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
5660 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5662 /* Fail if mktime fails to convert a date in the spring-forward gap.
5663 Based on a problem report from Andreas Jaeger. */
5664 static void
5665 spring_forward_gap ()
5667 /* glibc (up to about 1998-10-07) failed this test) */
5668 struct tm tm;
5670 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
5671 instead of "TZ=America/Vancouver" in order to detect the bug even
5672 on systems that don't support the Olson extension, or don't have the
5673 full zoneinfo tables installed. */
5674 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5676 tm.tm_year = 98;
5677 tm.tm_mon = 3;
5678 tm.tm_mday = 5;
5679 tm.tm_hour = 2;
5680 tm.tm_min = 0;
5681 tm.tm_sec = 0;
5682 tm.tm_isdst = -1;
5683 if (mktime (&tm) == (time_t)-1)
5684 exit (1);
5687 static void
5688 mktime_test (now)
5689 time_t now;
5691 struct tm *lt;
5692 if ((lt = localtime (&now)) && mktime (lt) != now)
5693 exit (1);
5694 now = time_t_max - now;
5695 if ((lt = localtime (&now)) && mktime (lt) != now)
5696 exit (1);
5699 static void
5700 irix_6_4_bug ()
5702 /* Based on code from Ariel Faigon. */
5703 struct tm tm;
5704 tm.tm_year = 96;
5705 tm.tm_mon = 3;
5706 tm.tm_mday = 0;
5707 tm.tm_hour = 0;
5708 tm.tm_min = 0;
5709 tm.tm_sec = 0;
5710 tm.tm_isdst = -1;
5711 mktime (&tm);
5712 if (tm.tm_mon != 2 || tm.tm_mday != 31)
5713 exit (1);
5716 static void
5717 bigtime_test (j)
5718 int j;
5720 struct tm tm;
5721 time_t now;
5722 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
5723 now = mktime (&tm);
5724 if (now != (time_t) -1)
5726 struct tm *lt = localtime (&now);
5727 if (! (lt
5728 && lt->tm_year == tm.tm_year
5729 && lt->tm_mon == tm.tm_mon
5730 && lt->tm_mday == tm.tm_mday
5731 && lt->tm_hour == tm.tm_hour
5732 && lt->tm_min == tm.tm_min
5733 && lt->tm_sec == tm.tm_sec
5734 && lt->tm_yday == tm.tm_yday
5735 && lt->tm_wday == tm.tm_wday
5736 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
5737 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
5738 exit (1);
5743 main ()
5745 time_t t, delta;
5746 int i, j;
5748 /* This test makes some buggy mktime implementations loop.
5749 Give up after 60 seconds; a mktime slower than that
5750 isn't worth using anyway. */
5751 alarm (60);
5753 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
5754 continue;
5755 time_t_max--;
5756 delta = time_t_max / 997; /* a suitable prime number */
5757 for (i = 0; i < N_STRINGS; i++)
5759 if (tz_strings[i])
5760 putenv (tz_strings[i]);
5762 for (t = 0; t <= time_t_max - delta; t += delta)
5763 mktime_test (t);
5764 mktime_test ((time_t) 60 * 60);
5765 mktime_test ((time_t) 60 * 60 * 24);
5767 for (j = 1; 0 < j; j *= 2)
5768 bigtime_test (j);
5769 bigtime_test (j - 1);
5771 irix_6_4_bug ();
5772 spring_forward_gap ();
5773 exit (0);
5776 if { (eval echo configure:5777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5777 then
5778 ac_cv_func_working_mktime=yes
5779 else
5780 echo "configure: failed program was:" >&5
5781 cat conftest.$ac_ext >&5
5782 rm -fr conftest*
5783 ac_cv_func_working_mktime=no
5785 rm -fr conftest*
5790 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
5791 if test $ac_cv_func_working_mktime = no; then
5792 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
5795 if test "$ac_cv_func_working_mktime" = no; then
5796 cat >> confdefs.h <<\EOF
5797 #define BROKEN_MKTIME 1
5802 ac_have_func=no # yes means we've found a way to get the load average.
5804 # Some systems with -lutil have (and need) -lkvm as well, some do not.
5805 # On Solaris, -lkvm requires nlist from -lelf, so check that first
5806 # to get the right answer into the cache.
5807 echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6
5808 echo "configure:5809: checking for elf_begin in -lelf" >&5
5809 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'`
5810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5811 echo $ac_n "(cached) $ac_c" 1>&6
5812 else
5813 ac_save_LIBS="$LIBS"
5814 LIBS="-lelf $LIBS"
5815 cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818 /* Override any gcc2 internal prototype to avoid an error. */
5819 /* We use char because int might match the return type of a gcc2
5820 builtin and then its argument prototype would still apply. */
5821 char elf_begin();
5823 int main() {
5824 elf_begin()
5825 ; return 0; }
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5828 rm -rf conftest*
5829 eval "ac_cv_lib_$ac_lib_var=yes"
5830 else
5831 echo "configure: failed program was:" >&5
5832 cat conftest.$ac_ext >&5
5833 rm -rf conftest*
5834 eval "ac_cv_lib_$ac_lib_var=no"
5836 rm -f conftest*
5837 LIBS="$ac_save_LIBS"
5840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5841 echo "$ac_t""yes" 1>&6
5842 LIBS="-lelf $LIBS"
5843 else
5844 echo "$ac_t""no" 1>&6
5847 echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
5848 echo "configure:5849: checking for kvm_open in -lkvm" >&5
5849 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
5850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5851 echo $ac_n "(cached) $ac_c" 1>&6
5852 else
5853 ac_save_LIBS="$LIBS"
5854 LIBS="-lkvm $LIBS"
5855 cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858 /* Override any gcc2 internal prototype to avoid an error. */
5859 /* We use char because int might match the return type of a gcc2
5860 builtin and then its argument prototype would still apply. */
5861 char kvm_open();
5863 int main() {
5864 kvm_open()
5865 ; return 0; }
5867 if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5868 rm -rf conftest*
5869 eval "ac_cv_lib_$ac_lib_var=yes"
5870 else
5871 echo "configure: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 rm -rf conftest*
5874 eval "ac_cv_lib_$ac_lib_var=no"
5876 rm -f conftest*
5877 LIBS="$ac_save_LIBS"
5880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5881 echo "$ac_t""yes" 1>&6
5882 LIBS="-lkvm $LIBS"
5883 else
5884 echo "$ac_t""no" 1>&6
5887 # Check for the 4.4BSD definition of getloadavg.
5888 echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6
5889 echo "configure:5890: checking for getloadavg in -lutil" >&5
5890 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'`
5891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5892 echo $ac_n "(cached) $ac_c" 1>&6
5893 else
5894 ac_save_LIBS="$LIBS"
5895 LIBS="-lutil $LIBS"
5896 cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899 /* Override any gcc2 internal prototype to avoid an error. */
5900 /* We use char because int might match the return type of a gcc2
5901 builtin and then its argument prototype would still apply. */
5902 char getloadavg();
5904 int main() {
5905 getloadavg()
5906 ; return 0; }
5908 if { (eval echo configure:5909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5909 rm -rf conftest*
5910 eval "ac_cv_lib_$ac_lib_var=yes"
5911 else
5912 echo "configure: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 rm -rf conftest*
5915 eval "ac_cv_lib_$ac_lib_var=no"
5917 rm -f conftest*
5918 LIBS="$ac_save_LIBS"
5921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5922 echo "$ac_t""yes" 1>&6
5923 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
5924 else
5925 echo "$ac_t""no" 1>&6
5929 if test $ac_have_func = no; then
5930 # There is a commonly available library for RS/6000 AIX.
5931 # Since it is not a standard part of AIX, it might be installed locally.
5932 ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
5933 echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6
5934 echo "configure:5935: checking for getloadavg in -lgetloadavg" >&5
5935 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'`
5936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5937 echo $ac_n "(cached) $ac_c" 1>&6
5938 else
5939 ac_save_LIBS="$LIBS"
5940 LIBS="-lgetloadavg $LIBS"
5941 cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* Override any gcc2 internal prototype to avoid an error. */
5945 /* We use char because int might match the return type of a gcc2
5946 builtin and then its argument prototype would still apply. */
5947 char getloadavg();
5949 int main() {
5950 getloadavg()
5951 ; return 0; }
5953 if { (eval echo configure:5954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5954 rm -rf conftest*
5955 eval "ac_cv_lib_$ac_lib_var=yes"
5956 else
5957 echo "configure: failed program was:" >&5
5958 cat conftest.$ac_ext >&5
5959 rm -rf conftest*
5960 eval "ac_cv_lib_$ac_lib_var=no"
5962 rm -f conftest*
5963 LIBS="$ac_save_LIBS"
5966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5967 echo "$ac_t""yes" 1>&6
5968 LIBS="-lgetloadavg $LIBS"
5969 else
5970 echo "$ac_t""no" 1>&6
5971 LIBS="$ac_getloadavg_LIBS"
5976 # Make sure it is really in the library, if we think we found it.
5977 for ac_func in getloadavg
5979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5980 echo "configure:5981: checking for $ac_func" >&5
5981 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5982 echo $ac_n "(cached) $ac_c" 1>&6
5983 else
5984 cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987 /* System header to define __stub macros and hopefully few prototypes,
5988 which can conflict with char $ac_func(); below. */
5989 #include <assert.h>
5990 /* Override any gcc2 internal prototype to avoid an error. */
5991 /* We use char because int might match the return type of a gcc2
5992 builtin and then its argument prototype would still apply. */
5993 char $ac_func();
5995 int main() {
5997 /* The GNU C library defines this for functions which it implements
5998 to always fail with ENOSYS. Some functions are actually named
5999 something starting with __ and the normal name is an alias. */
6000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6001 choke me
6002 #else
6003 $ac_func();
6004 #endif
6006 ; return 0; }
6008 if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6009 rm -rf conftest*
6010 eval "ac_cv_func_$ac_func=yes"
6011 else
6012 echo "configure: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6014 rm -rf conftest*
6015 eval "ac_cv_func_$ac_func=no"
6017 rm -f conftest*
6020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6021 echo "$ac_t""yes" 1>&6
6022 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6023 cat >> confdefs.h <<EOF
6024 #define $ac_tr_func 1
6027 else
6028 echo "$ac_t""no" 1>&6
6029 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6031 done
6035 if test $ac_cv_func_getloadavg = yes; then
6036 cat >> confdefs.h <<\EOF
6037 #define HAVE_GETLOADAVG 1
6040 ac_have_func=yes
6041 else
6042 # Figure out what our getloadavg.c needs.
6043 ac_have_func=no
6044 ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'`
6045 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
6046 echo "configure:6047: checking for sys/dg_sys_info.h" >&5
6047 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6048 echo $ac_n "(cached) $ac_c" 1>&6
6049 else
6050 cat > conftest.$ac_ext <<EOF
6051 #line 6052 "configure"
6052 #include "confdefs.h"
6053 #include <sys/dg_sys_info.h>
6055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6056 { (eval echo configure:6057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6058 if test -z "$ac_err"; then
6059 rm -rf conftest*
6060 eval "ac_cv_header_$ac_safe=yes"
6061 else
6062 echo "$ac_err" >&5
6063 echo "configure: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 rm -rf conftest*
6066 eval "ac_cv_header_$ac_safe=no"
6068 rm -f conftest*
6070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6071 echo "$ac_t""yes" 1>&6
6072 ac_have_func=yes; cat >> confdefs.h <<\EOF
6073 #define DGUX 1
6076 echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6
6077 echo "configure:6078: checking for dg_sys_info in -ldgc" >&5
6078 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'`
6079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6080 echo $ac_n "(cached) $ac_c" 1>&6
6081 else
6082 ac_save_LIBS="$LIBS"
6083 LIBS="-ldgc $LIBS"
6084 cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 /* Override any gcc2 internal prototype to avoid an error. */
6088 /* We use char because int might match the return type of a gcc2
6089 builtin and then its argument prototype would still apply. */
6090 char dg_sys_info();
6092 int main() {
6093 dg_sys_info()
6094 ; return 0; }
6096 if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6097 rm -rf conftest*
6098 eval "ac_cv_lib_$ac_lib_var=yes"
6099 else
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
6103 eval "ac_cv_lib_$ac_lib_var=no"
6105 rm -f conftest*
6106 LIBS="$ac_save_LIBS"
6109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6110 echo "$ac_t""yes" 1>&6
6111 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6112 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6113 cat >> confdefs.h <<EOF
6114 #define $ac_tr_lib 1
6117 LIBS="-ldgc $LIBS"
6119 else
6120 echo "$ac_t""no" 1>&6
6123 else
6124 echo "$ac_t""no" 1>&6
6128 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
6129 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
6130 # Irix 4.0.5F has the header but not the library.
6131 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
6132 ac_have_func=yes; cat >> confdefs.h <<\EOF
6133 #define SVR4 1
6138 if test $ac_have_func = no; then
6139 ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'`
6140 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
6141 echo "configure:6142: checking for inq_stats/cpustats.h" >&5
6142 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6143 echo $ac_n "(cached) $ac_c" 1>&6
6144 else
6145 cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148 #include <inq_stats/cpustats.h>
6150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6151 { (eval echo configure:6152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6153 if test -z "$ac_err"; then
6154 rm -rf conftest*
6155 eval "ac_cv_header_$ac_safe=yes"
6156 else
6157 echo "$ac_err" >&5
6158 echo "configure: failed program was:" >&5
6159 cat conftest.$ac_ext >&5
6160 rm -rf conftest*
6161 eval "ac_cv_header_$ac_safe=no"
6163 rm -f conftest*
6165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6166 echo "$ac_t""yes" 1>&6
6167 ac_have_func=yes; cat >> confdefs.h <<\EOF
6168 #define UMAX 1
6171 cat >> confdefs.h <<\EOF
6172 #define UMAX4_3 1
6175 else
6176 echo "$ac_t""no" 1>&6
6181 if test $ac_have_func = no; then
6182 ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'`
6183 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
6184 echo "configure:6185: checking for sys/cpustats.h" >&5
6185 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6186 echo $ac_n "(cached) $ac_c" 1>&6
6187 else
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6190 "configure"
6190 #include "confdefs.h"
6191 #include <sys/cpustats.h>
6193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6194 { (eval echo configure:6195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6196 if test -z "$ac_err"; then
6197 rm -rf conftest*
6198 eval "ac_cv_header_$ac_safe=yes"
6199 else
6200 echo "$ac_err" >&5
6201 echo "configure: failed program was:" >&5
6202 cat conftest.$ac_ext >&5
6203 rm -rf conftest*
6204 eval "ac_cv_header_$ac_safe=no"
6206 rm -f conftest*
6208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6209 echo "$ac_t""yes" 1>&6
6210 ac_have_func=yes; cat >> confdefs.h <<\EOF
6211 #define UMAX 1
6214 else
6215 echo "$ac_t""no" 1>&6
6220 if test $ac_have_func = no; then
6221 for ac_hdr in mach/mach.h
6223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6225 echo "configure:6226: checking for $ac_hdr" >&5
6226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6227 echo $ac_n "(cached) $ac_c" 1>&6
6228 else
6229 cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6232 #include <$ac_hdr>
6234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6235 { (eval echo configure:6236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6237 if test -z "$ac_err"; then
6238 rm -rf conftest*
6239 eval "ac_cv_header_$ac_safe=yes"
6240 else
6241 echo "$ac_err" >&5
6242 echo "configure: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 rm -rf conftest*
6245 eval "ac_cv_header_$ac_safe=no"
6247 rm -f conftest*
6249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6250 echo "$ac_t""yes" 1>&6
6251 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6252 cat >> confdefs.h <<EOF
6253 #define $ac_tr_hdr 1
6256 else
6257 echo "$ac_t""no" 1>&6
6259 done
6263 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
6264 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
6265 echo "configure:6266: checking for nlist.h" >&5
6266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6267 echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269 cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272 #include <nlist.h>
6274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6275 { (eval echo configure:6276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6277 if test -z "$ac_err"; then
6278 rm -rf conftest*
6279 eval "ac_cv_header_$ac_safe=yes"
6280 else
6281 echo "$ac_err" >&5
6282 echo "configure: failed program was:" >&5
6283 cat conftest.$ac_ext >&5
6284 rm -rf conftest*
6285 eval "ac_cv_header_$ac_safe=no"
6287 rm -f conftest*
6289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6290 echo "$ac_t""yes" 1>&6
6291 cat >> confdefs.h <<\EOF
6292 #define NLIST_STRUCT 1
6295 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
6296 echo "configure:6297: checking for n_un in struct nlist" >&5
6297 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
6298 echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300 cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303 #include <nlist.h>
6304 int main() {
6305 struct nlist n; n.n_un.n_name = 0;
6306 ; return 0; }
6308 if { (eval echo configure:6309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6309 rm -rf conftest*
6310 ac_cv_struct_nlist_n_un=yes
6311 else
6312 echo "configure: failed program was:" >&5
6313 cat conftest.$ac_ext >&5
6314 rm -rf conftest*
6315 ac_cv_struct_nlist_n_un=no
6317 rm -f conftest*
6320 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
6321 if test $ac_cv_struct_nlist_n_un = yes; then
6322 cat >> confdefs.h <<\EOF
6323 #define NLIST_NAME_UNION 1
6328 else
6329 echo "$ac_t""no" 1>&6
6331 fi # Do not have getloadavg in system libraries.
6333 # Some definitions of getloadavg require that the program be installed setgid.
6334 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
6335 echo "configure:6336: checking whether getloadavg requires setgid" >&5
6336 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
6337 echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339 cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 #include "$srcdir/getloadavg.c"
6343 #ifdef LDAV_PRIVILEGED
6344 Yowza Am I SETGID yet
6345 #endif
6347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6348 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
6349 rm -rf conftest*
6350 ac_cv_func_getloadavg_setgid=yes
6351 else
6352 rm -rf conftest*
6353 ac_cv_func_getloadavg_setgid=no
6355 rm -f conftest*
6359 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
6360 if test $ac_cv_func_getloadavg_setgid = yes; then
6361 NEED_SETGID=true; cat >> confdefs.h <<\EOF
6362 #define GETLOADAVG_PRIVILEGED 1
6365 else
6366 NEED_SETGID=false
6369 if test $ac_cv_func_getloadavg_setgid = yes; then
6370 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
6371 echo "configure:6372: checking group of /dev/kmem" >&5
6372 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
6373 echo $ac_n "(cached) $ac_c" 1>&6
6374 else
6375 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
6376 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
6377 # If we got an error (system does not support symlinks), try without -L.
6378 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
6379 ac_cv_group_kmem=`echo $ac_ls_output \
6380 | sed -ne 's/[ ][ ]*/ /g;
6381 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
6382 / /s/.* //;p;'`
6386 echo "$ac_t""$ac_cv_group_kmem" 1>&6
6387 KMEM_GROUP=$ac_cv_group_kmem
6391 # Check whether --enable-largefile or --disable-largefile was given.
6392 if test "${enable_largefile+set}" = set; then
6393 enableval="$enable_largefile"
6397 if test "$enable_largefile" != no; then
6399 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
6400 echo "configure:6401: checking for special C compiler options needed for large files" >&5
6401 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
6402 echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404 ac_cv_sys_largefile_CC=no
6405 if test "$GCC" != yes; then
6406 # IRIX 6.2 and later do not support large files by default,
6407 # so use the C compiler's -n32 option if that helps.
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6411 #include <sys/types.h>
6412 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6414 int main() {
6416 ; return 0; }
6418 if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6420 else
6421 echo "configure: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423 rm -rf conftest*
6424 ac_save_CC="$CC"
6425 CC="$CC -n32"
6426 cat > conftest.$ac_ext <<EOF
6427 #line 6428 "configure"
6428 #include "confdefs.h"
6429 #include <sys/types.h>
6430 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6432 int main() {
6434 ; return 0; }
6436 if { (eval echo configure:6437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6437 rm -rf conftest*
6438 ac_cv_sys_largefile_CC=' -n32'
6439 else
6440 echo "configure: failed program was:" >&5
6441 cat conftest.$ac_ext >&5
6443 rm -f conftest*
6444 CC="$ac_save_CC"
6446 rm -f conftest*
6450 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
6451 if test "$ac_cv_sys_largefile_CC" != no; then
6452 CC="$CC$ac_cv_sys_largefile_CC"
6455 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
6456 echo "configure:6457: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6457 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
6458 echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460 ac_cv_sys_file_offset_bits=no
6461 cat > conftest.$ac_ext <<EOF
6462 #line 6463 "configure"
6463 #include "confdefs.h"
6464 #include <sys/types.h>
6465 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6469 int main() {
6471 ; return 0; }
6473 if { (eval echo configure:6474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6475 else
6476 echo "configure: failed program was:" >&5
6477 cat conftest.$ac_ext >&5
6478 rm -rf conftest*
6479 cat > conftest.$ac_ext <<EOF
6480 #line 6481 "configure"
6481 #include "confdefs.h"
6482 #define _FILE_OFFSET_BITS 64
6483 #include <sys/types.h>
6484 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6488 int main() {
6490 ; return 0; }
6492 if { (eval echo configure:6493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6493 rm -rf conftest*
6494 ac_cv_sys_file_offset_bits=64
6495 else
6496 echo "configure: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6499 rm -f conftest*
6501 rm -f conftest*
6504 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
6505 if test "$ac_cv_sys_file_offset_bits" != no; then
6506 cat >> confdefs.h <<EOF
6507 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6511 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
6512 echo "configure:6513: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6513 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
6514 echo $ac_n "(cached) $ac_c" 1>&6
6515 else
6516 ac_cv_sys_largefile_source=no
6517 cat > conftest.$ac_ext <<EOF
6518 #line 6519 "configure"
6519 #include "confdefs.h"
6520 #include <sys/types.h>
6521 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6523 #include <stdio.h>
6525 int main() {
6526 return !ftello;
6527 ; return 0; }
6529 if { (eval echo configure:6530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6531 else
6532 echo "configure: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6534 rm -rf conftest*
6535 cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 #define _LARGEFILE_SOURCE 1
6539 #include <sys/types.h>
6540 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6542 #include <stdio.h>
6544 int main() {
6545 return !ftello;
6546 ; return 0; }
6548 if { (eval echo configure:6549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6549 rm -rf conftest*
6550 ac_cv_sys_largefile_source=1
6551 else
6552 echo "configure: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6555 rm -f conftest*
6557 rm -f conftest*
6560 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
6561 if test "$ac_cv_sys_largefile_source" != no; then
6562 cat >> confdefs.h <<EOF
6563 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6567 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
6568 echo "configure:6569: checking for _LARGE_FILES value needed for large files" >&5
6569 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
6570 echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572 ac_cv_sys_large_files=no
6573 cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 #include <sys/types.h>
6577 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6581 int main() {
6583 ; return 0; }
6585 if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6587 else
6588 echo "configure: failed program was:" >&5
6589 cat conftest.$ac_ext >&5
6590 rm -rf conftest*
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 #define _LARGE_FILES 1
6595 #include <sys/types.h>
6596 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6600 int main() {
6602 ; return 0; }
6604 if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6605 rm -rf conftest*
6606 ac_cv_sys_large_files=1
6607 else
6608 echo "configure: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6611 rm -f conftest*
6613 rm -f conftest*
6616 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
6617 if test "$ac_cv_sys_large_files" != no; then
6618 cat >> confdefs.h <<EOF
6619 #define _LARGE_FILES $ac_cv_sys_large_files
6623 echo $ac_n "checking for _XOPEN_SOURCE value needed for large files""... $ac_c" 1>&6
6624 echo "configure:6625: checking for _XOPEN_SOURCE value needed for large files" >&5
6625 if eval "test \"`echo '$''{'ac_cv_sys_xopen_source'+set}'`\" = set"; then
6626 echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628 ac_cv_sys_xopen_source=no
6629 cat > conftest.$ac_ext <<EOF
6630 #line 6631 "configure"
6631 #include "confdefs.h"
6632 #include <sys/types.h>
6633 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6635 #include <stdio.h>
6637 int main() {
6638 return !ftello;
6639 ; return 0; }
6641 if { (eval echo configure:6642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6643 else
6644 echo "configure: failed program was:" >&5
6645 cat conftest.$ac_ext >&5
6646 rm -rf conftest*
6647 cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 #define _XOPEN_SOURCE 500
6651 #include <sys/types.h>
6652 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6654 #include <stdio.h>
6656 int main() {
6657 return !ftello;
6658 ; return 0; }
6660 if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6661 rm -rf conftest*
6662 ac_cv_sys_xopen_source=500
6663 else
6664 echo "configure: failed program was:" >&5
6665 cat conftest.$ac_ext >&5
6667 rm -f conftest*
6669 rm -f conftest*
6672 echo "$ac_t""$ac_cv_sys_xopen_source" 1>&6
6673 if test "$ac_cv_sys_xopen_source" != no; then
6674 cat >> confdefs.h <<EOF
6675 #define _XOPEN_SOURCE $ac_cv_sys_xopen_source
6681 for ac_func in ftello
6683 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6684 echo "configure:6685: checking for $ac_func" >&5
6685 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6686 echo $ac_n "(cached) $ac_c" 1>&6
6687 else
6688 cat > conftest.$ac_ext <<EOF
6689 #line 6690 "configure"
6690 #include "confdefs.h"
6691 /* System header to define __stub macros and hopefully few prototypes,
6692 which can conflict with char $ac_func(); below. */
6693 #include <assert.h>
6694 /* Override any gcc2 internal prototype to avoid an error. */
6695 /* We use char because int might match the return type of a gcc2
6696 builtin and then its argument prototype would still apply. */
6697 char $ac_func();
6699 int main() {
6701 /* The GNU C library defines this for functions which it implements
6702 to always fail with ENOSYS. Some functions are actually named
6703 something starting with __ and the normal name is an alias. */
6704 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6705 choke me
6706 #else
6707 $ac_func();
6708 #endif
6710 ; return 0; }
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6713 rm -rf conftest*
6714 eval "ac_cv_func_$ac_func=yes"
6715 else
6716 echo "configure: failed program was:" >&5
6717 cat conftest.$ac_ext >&5
6718 rm -rf conftest*
6719 eval "ac_cv_func_$ac_func=no"
6721 rm -f conftest*
6724 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6725 echo "$ac_t""yes" 1>&6
6726 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6727 cat >> confdefs.h <<EOF
6728 #define $ac_tr_func 1
6731 else
6732 echo "$ac_t""no" 1>&6
6734 done
6737 # UNIX98 PTYs. AC_SYS_LARGEFILE should have defined _XOPEN_SOURCE
6738 # if we need it.
6739 for ac_func in grantpt
6741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6742 echo "configure:6743: checking for $ac_func" >&5
6743 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6744 echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746 cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 /* System header to define __stub macros and hopefully few prototypes,
6750 which can conflict with char $ac_func(); below. */
6751 #include <assert.h>
6752 /* Override any gcc2 internal prototype to avoid an error. */
6753 /* We use char because int might match the return type of a gcc2
6754 builtin and then its argument prototype would still apply. */
6755 char $ac_func();
6757 int main() {
6759 /* The GNU C library defines this for functions which it implements
6760 to always fail with ENOSYS. Some functions are actually named
6761 something starting with __ and the normal name is an alias. */
6762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6763 choke me
6764 #else
6765 $ac_func();
6766 #endif
6768 ; return 0; }
6770 if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771 rm -rf conftest*
6772 eval "ac_cv_func_$ac_func=yes"
6773 else
6774 echo "configure: failed program was:" >&5
6775 cat conftest.$ac_ext >&5
6776 rm -rf conftest*
6777 eval "ac_cv_func_$ac_func=no"
6779 rm -f conftest*
6782 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6783 echo "$ac_t""yes" 1>&6
6784 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6785 cat >> confdefs.h <<EOF
6786 #define $ac_tr_func 1
6789 else
6790 echo "$ac_t""no" 1>&6
6792 done
6795 # PTY-related GNU extensions.
6796 for ac_func in getpt
6798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6799 echo "configure:6800: checking for $ac_func" >&5
6800 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6801 echo $ac_n "(cached) $ac_c" 1>&6
6802 else
6803 cat > conftest.$ac_ext <<EOF
6804 #line 6805 "configure"
6805 #include "confdefs.h"
6806 /* System header to define __stub macros and hopefully few prototypes,
6807 which can conflict with char $ac_func(); below. */
6808 #include <assert.h>
6809 /* Override any gcc2 internal prototype to avoid an error. */
6810 /* We use char because int might match the return type of a gcc2
6811 builtin and then its argument prototype would still apply. */
6812 char $ac_func();
6814 int main() {
6816 /* The GNU C library defines this for functions which it implements
6817 to always fail with ENOSYS. Some functions are actually named
6818 something starting with __ and the normal name is an alias. */
6819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6820 choke me
6821 #else
6822 $ac_func();
6823 #endif
6825 ; return 0; }
6827 if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6828 rm -rf conftest*
6829 eval "ac_cv_func_$ac_func=yes"
6830 else
6831 echo "configure: failed program was:" >&5
6832 cat conftest.$ac_ext >&5
6833 rm -rf conftest*
6834 eval "ac_cv_func_$ac_func=no"
6836 rm -f conftest*
6839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6840 echo "$ac_t""yes" 1>&6
6841 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6842 cat >> confdefs.h <<EOF
6843 #define $ac_tr_func 1
6846 else
6847 echo "$ac_t""no" 1>&6
6849 done
6852 # Check this now, so that we will NOT find the above functions in ncurses.
6853 # That is because we have not set up to link ncurses in lib-src.
6854 # It's better to believe a function is not available
6855 # than to expect to find it in ncurses.
6856 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
6857 echo "configure:6858: checking for tparm in -lncurses" >&5
6858 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
6859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6860 echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862 ac_save_LIBS="$LIBS"
6863 LIBS="-lncurses $LIBS"
6864 cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 /* Override any gcc2 internal prototype to avoid an error. */
6868 /* We use char because int might match the return type of a gcc2
6869 builtin and then its argument prototype would still apply. */
6870 char tparm();
6872 int main() {
6873 tparm()
6874 ; return 0; }
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6877 rm -rf conftest*
6878 eval "ac_cv_lib_$ac_lib_var=yes"
6879 else
6880 echo "configure: failed program was:" >&5
6881 cat conftest.$ac_ext >&5
6882 rm -rf conftest*
6883 eval "ac_cv_lib_$ac_lib_var=no"
6885 rm -f conftest*
6886 LIBS="$ac_save_LIBS"
6889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6890 echo "$ac_t""yes" 1>&6
6891 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6892 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6893 cat >> confdefs.h <<EOF
6894 #define $ac_tr_lib 1
6897 LIBS="-lncurses $LIBS"
6899 else
6900 echo "$ac_t""no" 1>&6
6904 # These tell us which Kerberos-related libraries to use.
6905 if test "${with_kerberos+set}" = set; then
6906 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
6907 echo "configure:6908: checking for com_err in -lcom_err" >&5
6908 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
6909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6910 echo $ac_n "(cached) $ac_c" 1>&6
6911 else
6912 ac_save_LIBS="$LIBS"
6913 LIBS="-lcom_err $LIBS"
6914 cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 /* Override any gcc2 internal prototype to avoid an error. */
6918 /* We use char because int might match the return type of a gcc2
6919 builtin and then its argument prototype would still apply. */
6920 char com_err();
6922 int main() {
6923 com_err()
6924 ; return 0; }
6926 if { (eval echo configure:6927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6927 rm -rf conftest*
6928 eval "ac_cv_lib_$ac_lib_var=yes"
6929 else
6930 echo "configure: failed program was:" >&5
6931 cat conftest.$ac_ext >&5
6932 rm -rf conftest*
6933 eval "ac_cv_lib_$ac_lib_var=no"
6935 rm -f conftest*
6936 LIBS="$ac_save_LIBS"
6939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6940 echo "$ac_t""yes" 1>&6
6941 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6942 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6943 cat >> confdefs.h <<EOF
6944 #define $ac_tr_lib 1
6947 LIBS="-lcom_err $LIBS"
6949 else
6950 echo "$ac_t""no" 1>&6
6953 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
6954 echo "configure:6955: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
6955 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
6956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6957 echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959 ac_save_LIBS="$LIBS"
6960 LIBS="-lk5crypto $LIBS"
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 /* Override any gcc2 internal prototype to avoid an error. */
6965 /* We use char because int might match the return type of a gcc2
6966 builtin and then its argument prototype would still apply. */
6967 char mit_des_cbc_encrypt();
6969 int main() {
6970 mit_des_cbc_encrypt()
6971 ; return 0; }
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974 rm -rf conftest*
6975 eval "ac_cv_lib_$ac_lib_var=yes"
6976 else
6977 echo "configure: failed program was:" >&5
6978 cat conftest.$ac_ext >&5
6979 rm -rf conftest*
6980 eval "ac_cv_lib_$ac_lib_var=no"
6982 rm -f conftest*
6983 LIBS="$ac_save_LIBS"
6986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6987 echo "$ac_t""yes" 1>&6
6988 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6989 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6990 cat >> confdefs.h <<EOF
6991 #define $ac_tr_lib 1
6994 LIBS="-lk5crypto $LIBS"
6996 else
6997 echo "$ac_t""no" 1>&6
7000 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7001 echo "configure:7002: checking for mit_des_cbc_encrypt in -lcrypto" >&5
7002 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
7003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7004 echo $ac_n "(cached) $ac_c" 1>&6
7005 else
7006 ac_save_LIBS="$LIBS"
7007 LIBS="-lcrypto $LIBS"
7008 cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011 /* Override any gcc2 internal prototype to avoid an error. */
7012 /* We use char because int might match the return type of a gcc2
7013 builtin and then its argument prototype would still apply. */
7014 char mit_des_cbc_encrypt();
7016 int main() {
7017 mit_des_cbc_encrypt()
7018 ; return 0; }
7020 if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7021 rm -rf conftest*
7022 eval "ac_cv_lib_$ac_lib_var=yes"
7023 else
7024 echo "configure: failed program was:" >&5
7025 cat conftest.$ac_ext >&5
7026 rm -rf conftest*
7027 eval "ac_cv_lib_$ac_lib_var=no"
7029 rm -f conftest*
7030 LIBS="$ac_save_LIBS"
7033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7034 echo "$ac_t""yes" 1>&6
7035 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7036 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7037 cat >> confdefs.h <<EOF
7038 #define $ac_tr_lib 1
7041 LIBS="-lcrypto $LIBS"
7043 else
7044 echo "$ac_t""no" 1>&6
7047 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7048 echo "configure:7049: checking for krb5_init_context in -lkrb5" >&5
7049 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
7050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7051 echo $ac_n "(cached) $ac_c" 1>&6
7052 else
7053 ac_save_LIBS="$LIBS"
7054 LIBS="-lkrb5 $LIBS"
7055 cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058 /* Override any gcc2 internal prototype to avoid an error. */
7059 /* We use char because int might match the return type of a gcc2
7060 builtin and then its argument prototype would still apply. */
7061 char krb5_init_context();
7063 int main() {
7064 krb5_init_context()
7065 ; return 0; }
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7068 rm -rf conftest*
7069 eval "ac_cv_lib_$ac_lib_var=yes"
7070 else
7071 echo "configure: failed program was:" >&5
7072 cat conftest.$ac_ext >&5
7073 rm -rf conftest*
7074 eval "ac_cv_lib_$ac_lib_var=no"
7076 rm -f conftest*
7077 LIBS="$ac_save_LIBS"
7080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7081 echo "$ac_t""yes" 1>&6
7082 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7083 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7084 cat >> confdefs.h <<EOF
7085 #define $ac_tr_lib 1
7088 LIBS="-lkrb5 $LIBS"
7090 else
7091 echo "$ac_t""no" 1>&6
7094 if test "${with_kerberos5+set}" != set; then
7095 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7096 echo "configure:7097: checking for des_cbc_encrypt in -ldes425" >&5
7097 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101 ac_save_LIBS="$LIBS"
7102 LIBS="-ldes425 $LIBS"
7103 cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106 /* Override any gcc2 internal prototype to avoid an error. */
7107 /* We use char because int might match the return type of a gcc2
7108 builtin and then its argument prototype would still apply. */
7109 char des_cbc_encrypt();
7111 int main() {
7112 des_cbc_encrypt()
7113 ; return 0; }
7115 if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7116 rm -rf conftest*
7117 eval "ac_cv_lib_$ac_lib_var=yes"
7118 else
7119 echo "configure: failed program was:" >&5
7120 cat conftest.$ac_ext >&5
7121 rm -rf conftest*
7122 eval "ac_cv_lib_$ac_lib_var=no"
7124 rm -f conftest*
7125 LIBS="$ac_save_LIBS"
7128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7129 echo "$ac_t""yes" 1>&6
7130 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7131 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7132 cat >> confdefs.h <<EOF
7133 #define $ac_tr_lib 1
7136 LIBS="-ldes425 $LIBS"
7138 else
7139 echo "$ac_t""no" 1>&6
7140 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7141 echo "configure:7142: checking for des_cbc_encrypt in -ldes" >&5
7142 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
7143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7144 echo $ac_n "(cached) $ac_c" 1>&6
7145 else
7146 ac_save_LIBS="$LIBS"
7147 LIBS="-ldes $LIBS"
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 /* Override any gcc2 internal prototype to avoid an error. */
7152 /* We use char because int might match the return type of a gcc2
7153 builtin and then its argument prototype would still apply. */
7154 char des_cbc_encrypt();
7156 int main() {
7157 des_cbc_encrypt()
7158 ; return 0; }
7160 if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7161 rm -rf conftest*
7162 eval "ac_cv_lib_$ac_lib_var=yes"
7163 else
7164 echo "configure: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7166 rm -rf conftest*
7167 eval "ac_cv_lib_$ac_lib_var=no"
7169 rm -f conftest*
7170 LIBS="$ac_save_LIBS"
7173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7174 echo "$ac_t""yes" 1>&6
7175 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
7176 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7177 cat >> confdefs.h <<EOF
7178 #define $ac_tr_lib 1
7181 LIBS="-ldes $LIBS"
7183 else
7184 echo "$ac_t""no" 1>&6
7189 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7190 echo "configure:7191: checking for krb_get_cred in -lkrb4" >&5
7191 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
7192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7193 echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195 ac_save_LIBS="$LIBS"
7196 LIBS="-lkrb4 $LIBS"
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 /* Override any gcc2 internal prototype to avoid an error. */
7201 /* We use char because int might match the return type of a gcc2
7202 builtin and then its argument prototype would still apply. */
7203 char krb_get_cred();
7205 int main() {
7206 krb_get_cred()
7207 ; return 0; }
7209 if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7210 rm -rf conftest*
7211 eval "ac_cv_lib_$ac_lib_var=yes"
7212 else
7213 echo "configure: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7215 rm -rf conftest*
7216 eval "ac_cv_lib_$ac_lib_var=no"
7218 rm -f conftest*
7219 LIBS="$ac_save_LIBS"
7222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7223 echo "$ac_t""yes" 1>&6
7224 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7225 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7226 cat >> confdefs.h <<EOF
7227 #define $ac_tr_lib 1
7230 LIBS="-lkrb4 $LIBS"
7232 else
7233 echo "$ac_t""no" 1>&6
7234 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7235 echo "configure:7236: checking for krb_get_cred in -lkrb" >&5
7236 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
7237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7238 echo $ac_n "(cached) $ac_c" 1>&6
7239 else
7240 ac_save_LIBS="$LIBS"
7241 LIBS="-lkrb $LIBS"
7242 cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* Override any gcc2 internal prototype to avoid an error. */
7246 /* We use char because int might match the return type of a gcc2
7247 builtin and then its argument prototype would still apply. */
7248 char krb_get_cred();
7250 int main() {
7251 krb_get_cred()
7252 ; return 0; }
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255 rm -rf conftest*
7256 eval "ac_cv_lib_$ac_lib_var=yes"
7257 else
7258 echo "configure: failed program was:" >&5
7259 cat conftest.$ac_ext >&5
7260 rm -rf conftest*
7261 eval "ac_cv_lib_$ac_lib_var=no"
7263 rm -f conftest*
7264 LIBS="$ac_save_LIBS"
7267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7268 echo "$ac_t""yes" 1>&6
7269 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
7270 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7271 cat >> confdefs.h <<EOF
7272 #define $ac_tr_lib 1
7275 LIBS="-lkrb $LIBS"
7277 else
7278 echo "$ac_t""no" 1>&6
7285 if test "${with_kerberos5+set}" = set; then
7286 for ac_hdr in krb5.h
7288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7290 echo "configure:7291: checking for $ac_hdr" >&5
7291 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7292 echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294 cat > conftest.$ac_ext <<EOF
7295 #line 7296 "configure"
7296 #include "confdefs.h"
7297 #include <$ac_hdr>
7299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7300 { (eval echo configure:7301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7302 if test -z "$ac_err"; then
7303 rm -rf conftest*
7304 eval "ac_cv_header_$ac_safe=yes"
7305 else
7306 echo "$ac_err" >&5
7307 echo "configure: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
7309 rm -rf conftest*
7310 eval "ac_cv_header_$ac_safe=no"
7312 rm -f conftest*
7314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7315 echo "$ac_t""yes" 1>&6
7316 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7317 cat >> confdefs.h <<EOF
7318 #define $ac_tr_hdr 1
7321 else
7322 echo "$ac_t""no" 1>&6
7324 done
7326 else
7327 for ac_hdr in des.h
7329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7331 echo "configure:7332: checking for $ac_hdr" >&5
7332 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7333 echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335 cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 #include <$ac_hdr>
7340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7341 { (eval echo configure:7342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7343 if test -z "$ac_err"; then
7344 rm -rf conftest*
7345 eval "ac_cv_header_$ac_safe=yes"
7346 else
7347 echo "$ac_err" >&5
7348 echo "configure: failed program was:" >&5
7349 cat conftest.$ac_ext >&5
7350 rm -rf conftest*
7351 eval "ac_cv_header_$ac_safe=no"
7353 rm -f conftest*
7355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7356 echo "$ac_t""yes" 1>&6
7357 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7358 cat >> confdefs.h <<EOF
7359 #define $ac_tr_hdr 1
7362 else
7363 echo "$ac_t""no" 1>&6
7364 for ac_hdr in kerberosIV/des.h
7366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7368 echo "configure:7369: checking for $ac_hdr" >&5
7369 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7370 echo $ac_n "(cached) $ac_c" 1>&6
7371 else
7372 cat > conftest.$ac_ext <<EOF
7373 #line 7374 "configure"
7374 #include "confdefs.h"
7375 #include <$ac_hdr>
7377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7378 { (eval echo configure:7379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7380 if test -z "$ac_err"; then
7381 rm -rf conftest*
7382 eval "ac_cv_header_$ac_safe=yes"
7383 else
7384 echo "$ac_err" >&5
7385 echo "configure: failed program was:" >&5
7386 cat conftest.$ac_ext >&5
7387 rm -rf conftest*
7388 eval "ac_cv_header_$ac_safe=no"
7390 rm -f conftest*
7392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7393 echo "$ac_t""yes" 1>&6
7394 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7395 cat >> confdefs.h <<EOF
7396 #define $ac_tr_hdr 1
7399 else
7400 echo "$ac_t""no" 1>&6
7401 for ac_hdr in kerberos/des.h
7403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7405 echo "configure:7406: checking for $ac_hdr" >&5
7406 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7407 echo $ac_n "(cached) $ac_c" 1>&6
7408 else
7409 cat > conftest.$ac_ext <<EOF
7410 #line 7411 "configure"
7411 #include "confdefs.h"
7412 #include <$ac_hdr>
7414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7415 { (eval echo configure:7416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7417 if test -z "$ac_err"; then
7418 rm -rf conftest*
7419 eval "ac_cv_header_$ac_safe=yes"
7420 else
7421 echo "$ac_err" >&5
7422 echo "configure: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7424 rm -rf conftest*
7425 eval "ac_cv_header_$ac_safe=no"
7427 rm -f conftest*
7429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7430 echo "$ac_t""yes" 1>&6
7431 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7432 cat >> confdefs.h <<EOF
7433 #define $ac_tr_hdr 1
7436 else
7437 echo "$ac_t""no" 1>&6
7439 done
7442 done
7445 done
7447 for ac_hdr in krb.h
7449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7451 echo "configure:7452: checking for $ac_hdr" >&5
7452 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7453 echo $ac_n "(cached) $ac_c" 1>&6
7454 else
7455 cat > conftest.$ac_ext <<EOF
7456 #line 7457 "configure"
7457 #include "confdefs.h"
7458 #include <$ac_hdr>
7460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7461 { (eval echo configure:7462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7463 if test -z "$ac_err"; then
7464 rm -rf conftest*
7465 eval "ac_cv_header_$ac_safe=yes"
7466 else
7467 echo "$ac_err" >&5
7468 echo "configure: failed program was:" >&5
7469 cat conftest.$ac_ext >&5
7470 rm -rf conftest*
7471 eval "ac_cv_header_$ac_safe=no"
7473 rm -f conftest*
7475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7476 echo "$ac_t""yes" 1>&6
7477 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7478 cat >> confdefs.h <<EOF
7479 #define $ac_tr_hdr 1
7482 else
7483 echo "$ac_t""no" 1>&6
7484 for ac_hdr in kerberosIV/krb.h
7486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7488 echo "configure:7489: checking for $ac_hdr" >&5
7489 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7490 echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492 cat > conftest.$ac_ext <<EOF
7493 #line 7494 "configure"
7494 #include "confdefs.h"
7495 #include <$ac_hdr>
7497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7498 { (eval echo configure:7499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7500 if test -z "$ac_err"; then
7501 rm -rf conftest*
7502 eval "ac_cv_header_$ac_safe=yes"
7503 else
7504 echo "$ac_err" >&5
7505 echo "configure: failed program was:" >&5
7506 cat conftest.$ac_ext >&5
7507 rm -rf conftest*
7508 eval "ac_cv_header_$ac_safe=no"
7510 rm -f conftest*
7512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7513 echo "$ac_t""yes" 1>&6
7514 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7515 cat >> confdefs.h <<EOF
7516 #define $ac_tr_hdr 1
7519 else
7520 echo "$ac_t""no" 1>&6
7521 for ac_hdr in kerberos/krb.h
7523 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7524 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7525 echo "configure:7526: checking for $ac_hdr" >&5
7526 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7527 echo $ac_n "(cached) $ac_c" 1>&6
7528 else
7529 cat > conftest.$ac_ext <<EOF
7530 #line 7531 "configure"
7531 #include "confdefs.h"
7532 #include <$ac_hdr>
7534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7535 { (eval echo configure:7536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7537 if test -z "$ac_err"; then
7538 rm -rf conftest*
7539 eval "ac_cv_header_$ac_safe=yes"
7540 else
7541 echo "$ac_err" >&5
7542 echo "configure: failed program was:" >&5
7543 cat conftest.$ac_ext >&5
7544 rm -rf conftest*
7545 eval "ac_cv_header_$ac_safe=no"
7547 rm -f conftest*
7549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7550 echo "$ac_t""yes" 1>&6
7551 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7552 cat >> confdefs.h <<EOF
7553 #define $ac_tr_hdr 1
7556 else
7557 echo "$ac_t""no" 1>&6
7559 done
7562 done
7565 done
7568 for ac_hdr in com_err.h
7570 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7571 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7572 echo "configure:7573: checking for $ac_hdr" >&5
7573 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7574 echo $ac_n "(cached) $ac_c" 1>&6
7575 else
7576 cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 #include <$ac_hdr>
7581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7582 { (eval echo configure:7583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7584 if test -z "$ac_err"; then
7585 rm -rf conftest*
7586 eval "ac_cv_header_$ac_safe=yes"
7587 else
7588 echo "$ac_err" >&5
7589 echo "configure: failed program was:" >&5
7590 cat conftest.$ac_ext >&5
7591 rm -rf conftest*
7592 eval "ac_cv_header_$ac_safe=no"
7594 rm -f conftest*
7596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7597 echo "$ac_t""yes" 1>&6
7598 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7599 cat >> confdefs.h <<EOF
7600 #define $ac_tr_hdr 1
7603 else
7604 echo "$ac_t""no" 1>&6
7606 done
7610 # Solaris requires -lintl if you want strerror (which calls dgettext)
7611 # to return localized messages.
7612 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
7613 echo "configure:7614: checking for dgettext in -lintl" >&5
7614 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
7615 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7616 echo $ac_n "(cached) $ac_c" 1>&6
7617 else
7618 ac_save_LIBS="$LIBS"
7619 LIBS="-lintl $LIBS"
7620 cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* Override any gcc2 internal prototype to avoid an error. */
7624 /* We use char because int might match the return type of a gcc2
7625 builtin and then its argument prototype would still apply. */
7626 char dgettext();
7628 int main() {
7629 dgettext()
7630 ; return 0; }
7632 if { (eval echo configure:7633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7633 rm -rf conftest*
7634 eval "ac_cv_lib_$ac_lib_var=yes"
7635 else
7636 echo "configure: failed program was:" >&5
7637 cat conftest.$ac_ext >&5
7638 rm -rf conftest*
7639 eval "ac_cv_lib_$ac_lib_var=no"
7641 rm -f conftest*
7642 LIBS="$ac_save_LIBS"
7645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7646 echo "$ac_t""yes" 1>&6
7647 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7648 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7649 cat >> confdefs.h <<EOF
7650 #define $ac_tr_lib 1
7653 LIBS="-lintl $LIBS"
7655 else
7656 echo "$ac_t""no" 1>&6
7660 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
7661 echo "configure:7662: checking whether localtime caches TZ" >&5
7662 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
7663 echo $ac_n "(cached) $ac_c" 1>&6
7664 else
7665 if test x$ac_cv_func_tzset = xyes; then
7666 if test "$cross_compiling" = yes; then
7667 # If we have tzset, assume the worst when cross-compiling.
7668 emacs_cv_localtime_cache=yes
7669 else
7670 cat > conftest.$ac_ext <<EOF
7671 #line 7672 "configure"
7672 #include "confdefs.h"
7673 #include <time.h>
7674 extern char **environ;
7675 unset_TZ ()
7677 char **from, **to;
7678 for (to = from = environ; (*to = *from); from++)
7679 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
7680 to++;
7682 char TZ_GMT0[] = "TZ=GMT0";
7683 char TZ_PST8[] = "TZ=PST8";
7684 main()
7686 time_t now = time ((time_t *) 0);
7687 int hour_GMT0, hour_unset;
7688 if (putenv (TZ_GMT0) != 0)
7689 exit (1);
7690 hour_GMT0 = localtime (&now)->tm_hour;
7691 unset_TZ ();
7692 hour_unset = localtime (&now)->tm_hour;
7693 if (putenv (TZ_PST8) != 0)
7694 exit (1);
7695 if (localtime (&now)->tm_hour == hour_GMT0)
7696 exit (1);
7697 unset_TZ ();
7698 if (localtime (&now)->tm_hour != hour_unset)
7699 exit (1);
7700 exit (0);
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7704 then
7705 emacs_cv_localtime_cache=no
7706 else
7707 echo "configure: failed program was:" >&5
7708 cat conftest.$ac_ext >&5
7709 rm -fr conftest*
7710 emacs_cv_localtime_cache=yes
7712 rm -fr conftest*
7715 else
7716 # If we lack tzset, report that localtime does not cache TZ,
7717 # since we can't invalidate the cache if we don't have tzset.
7718 emacs_cv_localtime_cache=no
7721 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
7722 if test $emacs_cv_localtime_cache = yes; then
7723 cat >> confdefs.h <<\EOF
7724 #define LOCALTIME_CACHE 1
7729 if test "x$HAVE_TIMEVAL" = xyes; then
7730 for ac_func in gettimeofday
7732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7733 echo "configure:7734: checking for $ac_func" >&5
7734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7735 echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737 cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7740 /* System header to define __stub macros and hopefully few prototypes,
7741 which can conflict with char $ac_func(); below. */
7742 #include <assert.h>
7743 /* Override any gcc2 internal prototype to avoid an error. */
7744 /* We use char because int might match the return type of a gcc2
7745 builtin and then its argument prototype would still apply. */
7746 char $ac_func();
7748 int main() {
7750 /* The GNU C library defines this for functions which it implements
7751 to always fail with ENOSYS. Some functions are actually named
7752 something starting with __ and the normal name is an alias. */
7753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7754 choke me
7755 #else
7756 $ac_func();
7757 #endif
7759 ; return 0; }
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762 rm -rf conftest*
7763 eval "ac_cv_func_$ac_func=yes"
7764 else
7765 echo "configure: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 rm -rf conftest*
7768 eval "ac_cv_func_$ac_func=no"
7770 rm -f conftest*
7773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7774 echo "$ac_t""yes" 1>&6
7775 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7776 cat >> confdefs.h <<EOF
7777 #define $ac_tr_func 1
7780 else
7781 echo "$ac_t""no" 1>&6
7783 done
7785 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
7786 echo "configure:7787: checking whether gettimeofday can accept two arguments" >&5
7787 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
7788 echo $ac_n "(cached) $ac_c" 1>&6
7789 else
7790 cat > conftest.$ac_ext <<EOF
7791 #line 7792 "configure"
7792 #include "confdefs.h"
7794 #ifdef TIME_WITH_SYS_TIME
7795 #include <sys/time.h>
7796 #include <time.h>
7797 #else
7798 #ifdef HAVE_SYS_TIME_H
7799 #include <sys/time.h>
7800 #else
7801 #include <time.h>
7802 #endif
7803 #endif
7804 int main() {
7805 struct timeval time;
7806 gettimeofday (&time, 0);
7807 ; return 0; }
7809 if { (eval echo configure:7810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7810 rm -rf conftest*
7811 emacs_cv_gettimeofday_two_arguments=yes
7812 else
7813 echo "configure: failed program was:" >&5
7814 cat conftest.$ac_ext >&5
7815 rm -rf conftest*
7816 emacs_cv_gettimeofday_two_arguments=no
7818 rm -f conftest*
7821 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
7822 if test $emacs_cv_gettimeofday_two_arguments = no; then
7823 cat >> confdefs.h <<\EOF
7824 #define GETTIMEOFDAY_ONE_ARGUMENT 1
7830 if test "$ac_cv_func_gettimeofday" = yes; then
7831 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
7832 echo "configure:7833: checking for struct timezone" >&5
7833 if eval "test \"`echo '$''{'emacs_cv_struct_timezone'+set}'`\" = set"; then
7834 echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836 cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 #include <sys/time.h>
7840 int main() {
7841 struct timezone tz;
7842 ; return 0; }
7844 if { (eval echo configure:7845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7845 rm -rf conftest*
7846 if test "$cross_compiling" = yes; then
7847 emacs_cv_struct_timezone=yes
7848 else
7849 cat > conftest.$ac_ext <<EOF
7850 #line 7851 "configure"
7851 #include "confdefs.h"
7853 #ifdef TIME_WITH_SYS_TIME
7854 #include <sys/time.h>
7855 #include <time.h>
7856 #else
7857 #ifdef HAVE_SYS_TIME_H
7858 #include <sys/time.h>
7859 #else
7860 #include <time.h>
7861 #endif
7862 #endif
7863 main () {
7864 struct timeval time;
7865 struct timezone dummy;
7866 exit (gettimeofday (&time, &dummy));
7869 if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7870 then
7871 emacs_cv_struct_timezone=yes
7872 else
7873 echo "configure: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 rm -fr conftest*
7876 emacs_cv_struct_timezone=no
7878 rm -fr conftest*
7881 else
7882 echo "configure: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 rm -rf conftest*
7885 emacs_cv_struct_timezone=no
7887 rm -f conftest*
7890 echo "$ac_t""$emacs_cv_struct_timezone" 1>&6
7893 ok_so_far=yes
7894 echo $ac_n "checking for socket""... $ac_c" 1>&6
7895 echo "configure:7896: checking for socket" >&5
7896 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7897 echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899 cat > conftest.$ac_ext <<EOF
7900 #line 7901 "configure"
7901 #include "confdefs.h"
7902 /* System header to define __stub macros and hopefully few prototypes,
7903 which can conflict with char socket(); below. */
7904 #include <assert.h>
7905 /* Override any gcc2 internal prototype to avoid an error. */
7906 /* We use char because int might match the return type of a gcc2
7907 builtin and then its argument prototype would still apply. */
7908 char socket();
7910 int main() {
7912 /* The GNU C library defines this for functions which it implements
7913 to always fail with ENOSYS. Some functions are actually named
7914 something starting with __ and the normal name is an alias. */
7915 #if defined (__stub_socket) || defined (__stub___socket)
7916 choke me
7917 #else
7918 socket();
7919 #endif
7921 ; return 0; }
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924 rm -rf conftest*
7925 eval "ac_cv_func_socket=yes"
7926 else
7927 echo "configure: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929 rm -rf conftest*
7930 eval "ac_cv_func_socket=no"
7932 rm -f conftest*
7935 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
7936 echo "$ac_t""yes" 1>&6
7938 else
7939 echo "$ac_t""no" 1>&6
7940 ok_so_far=no
7943 if test $ok_so_far = yes; then
7944 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
7945 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
7946 echo "configure:7947: checking for netinet/in.h" >&5
7947 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7948 echo $ac_n "(cached) $ac_c" 1>&6
7949 else
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 #include <netinet/in.h>
7955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7956 { (eval echo configure:7957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7958 if test -z "$ac_err"; then
7959 rm -rf conftest*
7960 eval "ac_cv_header_$ac_safe=yes"
7961 else
7962 echo "$ac_err" >&5
7963 echo "configure: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7965 rm -rf conftest*
7966 eval "ac_cv_header_$ac_safe=no"
7968 rm -f conftest*
7970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7971 echo "$ac_t""yes" 1>&6
7973 else
7974 echo "$ac_t""no" 1>&6
7975 ok_so_far=no
7979 if test $ok_so_far = yes; then
7980 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
7981 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
7982 echo "configure:7983: checking for arpa/inet.h" >&5
7983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7984 echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986 cat > conftest.$ac_ext <<EOF
7987 #line 7988 "configure"
7988 #include "confdefs.h"
7989 #include <arpa/inet.h>
7991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7992 { (eval echo configure:7993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7994 if test -z "$ac_err"; then
7995 rm -rf conftest*
7996 eval "ac_cv_header_$ac_safe=yes"
7997 else
7998 echo "$ac_err" >&5
7999 echo "configure: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8001 rm -rf conftest*
8002 eval "ac_cv_header_$ac_safe=no"
8004 rm -f conftest*
8006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8007 echo "$ac_t""yes" 1>&6
8009 else
8010 echo "$ac_t""no" 1>&6
8011 ok_so_far=no
8015 if test $ok_so_far = yes; then
8016 cat >> confdefs.h <<\EOF
8017 #define HAVE_INET_SOCKETS 1
8022 if test -f /usr/lpp/X11/bin/smt.exp; then
8023 cat >> confdefs.h <<\EOF
8024 #define HAVE_AIX_SMT_EXP 1
8029 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
8030 echo "configure:8031: checking whether system supports dynamic ptys" >&5
8031 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
8032 echo "$ac_t""yes" 1>&6
8033 cat >> confdefs.h <<\EOF
8034 #define HAVE_DEV_PTMX 1
8037 else
8038 echo "$ac_t""no" 1>&6
8041 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8042 echo "configure:8043: checking for pid_t" >&5
8043 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8044 echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046 cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 #include <sys/types.h>
8050 #if STDC_HEADERS
8051 #include <stdlib.h>
8052 #include <stddef.h>
8053 #endif
8055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8056 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8057 rm -rf conftest*
8058 ac_cv_type_pid_t=yes
8059 else
8060 rm -rf conftest*
8061 ac_cv_type_pid_t=no
8063 rm -f conftest*
8066 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8067 if test $ac_cv_type_pid_t = no; then
8068 cat >> confdefs.h <<\EOF
8069 #define pid_t int
8074 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8075 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8076 echo "configure:8077: checking for vfork.h" >&5
8077 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8078 echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <vfork.h>
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089 rm -rf conftest*
8090 eval "ac_cv_header_$ac_safe=yes"
8091 else
8092 echo "$ac_err" >&5
8093 echo "configure: failed program was:" >&5
8094 cat conftest.$ac_ext >&5
8095 rm -rf conftest*
8096 eval "ac_cv_header_$ac_safe=no"
8098 rm -f conftest*
8100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8101 echo "$ac_t""yes" 1>&6
8102 cat >> confdefs.h <<\EOF
8103 #define HAVE_VFORK_H 1
8106 else
8107 echo "$ac_t""no" 1>&6
8110 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8111 echo "configure:8112: checking for working vfork" >&5
8112 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8113 echo $ac_n "(cached) $ac_c" 1>&6
8114 else
8115 if test "$cross_compiling" = yes; then
8116 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8117 echo "configure:8118: checking for vfork" >&5
8118 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8119 echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121 cat > conftest.$ac_ext <<EOF
8122 #line 8123 "configure"
8123 #include "confdefs.h"
8124 /* System header to define __stub macros and hopefully few prototypes,
8125 which can conflict with char vfork(); below. */
8126 #include <assert.h>
8127 /* Override any gcc2 internal prototype to avoid an error. */
8128 /* We use char because int might match the return type of a gcc2
8129 builtin and then its argument prototype would still apply. */
8130 char vfork();
8132 int main() {
8134 /* The GNU C library defines this for functions which it implements
8135 to always fail with ENOSYS. Some functions are actually named
8136 something starting with __ and the normal name is an alias. */
8137 #if defined (__stub_vfork) || defined (__stub___vfork)
8138 choke me
8139 #else
8140 vfork();
8141 #endif
8143 ; return 0; }
8145 if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8146 rm -rf conftest*
8147 eval "ac_cv_func_vfork=yes"
8148 else
8149 echo "configure: failed program was:" >&5
8150 cat conftest.$ac_ext >&5
8151 rm -rf conftest*
8152 eval "ac_cv_func_vfork=no"
8154 rm -f conftest*
8157 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8158 echo "$ac_t""yes" 1>&6
8160 else
8161 echo "$ac_t""no" 1>&6
8164 ac_cv_func_vfork_works=$ac_cv_func_vfork
8165 else
8166 cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169 /* Thanks to Paul Eggert for this test. */
8170 #include <stdio.h>
8171 #include <sys/types.h>
8172 #include <sys/stat.h>
8173 #ifdef HAVE_UNISTD_H
8174 #include <unistd.h>
8175 #endif
8176 #ifdef HAVE_VFORK_H
8177 #include <vfork.h>
8178 #endif
8179 /* On some sparc systems, changes by the child to local and incoming
8180 argument registers are propagated back to the parent.
8181 The compiler is told about this with #include <vfork.h>,
8182 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8183 Test for this by using a static variable whose address
8184 is put into a register that is clobbered by the vfork. */
8185 static
8186 #ifdef __cplusplus
8187 sparc_address_test (int arg)
8188 #else
8189 sparc_address_test (arg) int arg;
8190 #endif
8192 static pid_t child;
8193 if (!child) {
8194 child = vfork ();
8195 if (child < 0) {
8196 perror ("vfork");
8197 _exit(2);
8199 if (!child) {
8200 arg = getpid();
8201 write(-1, "", 0);
8202 _exit (arg);
8206 main() {
8207 pid_t parent = getpid ();
8208 pid_t child;
8210 sparc_address_test ();
8212 child = vfork ();
8214 if (child == 0) {
8215 /* Here is another test for sparc vfork register problems.
8216 This test uses lots of local variables, at least
8217 as many local variables as main has allocated so far
8218 including compiler temporaries. 4 locals are enough for
8219 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8220 A buggy compiler should reuse the register of parent
8221 for one of the local variables, since it will think that
8222 parent can't possibly be used any more in this routine.
8223 Assigning to the local variable will thus munge parent
8224 in the parent process. */
8225 pid_t
8226 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8227 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8228 /* Convince the compiler that p..p7 are live; otherwise, it might
8229 use the same hardware register for all 8 local variables. */
8230 if (p != p1 || p != p2 || p != p3 || p != p4
8231 || p != p5 || p != p6 || p != p7)
8232 _exit(1);
8234 /* On some systems (e.g. IRIX 3.3),
8235 vfork doesn't separate parent from child file descriptors.
8236 If the child closes a descriptor before it execs or exits,
8237 this munges the parent's descriptor as well.
8238 Test for this by closing stdout in the child. */
8239 _exit(close(fileno(stdout)) != 0);
8240 } else {
8241 int status;
8242 struct stat st;
8244 while (wait(&status) != child)
8246 exit(
8247 /* Was there some problem with vforking? */
8248 child < 0
8250 /* Did the child fail? (This shouldn't happen.) */
8251 || status
8253 /* Did the vfork/compiler bug occur? */
8254 || parent != getpid()
8256 /* Did the file descriptor bug occur? */
8257 || fstat(fileno(stdout), &st) != 0
8262 if { (eval echo configure:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8263 then
8264 ac_cv_func_vfork_works=yes
8265 else
8266 echo "configure: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 rm -fr conftest*
8269 ac_cv_func_vfork_works=no
8271 rm -fr conftest*
8276 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
8277 if test $ac_cv_func_vfork_works = no; then
8278 cat >> confdefs.h <<\EOF
8279 #define vfork fork
8285 # Set up the CFLAGS for real compilation, so we can substitute it.
8286 CFLAGS="$REAL_CFLAGS"
8288 #### Find out which version of Emacs this is.
8289 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
8290 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
8291 if test x"${version}" = x; then
8292 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
8295 ### Specify what sort of things we'll be editing into Makefile and config.h.
8296 ### Use configuration here uncanonicalized to avoid exceeding size limits.
8328 cat >> confdefs.h <<EOF
8329 #define EMACS_CONFIGURATION "${canonical}"
8332 cat >> confdefs.h <<EOF
8333 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
8336 cat >> confdefs.h <<EOF
8337 #define config_machfile "${machfile}"
8340 cat >> confdefs.h <<EOF
8341 #define config_opsysfile "${opsysfile}"
8344 cat >> confdefs.h <<EOF
8345 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
8348 cat >> confdefs.h <<EOF
8349 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
8352 cat >> confdefs.h <<EOF
8353 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
8356 cat >> confdefs.h <<EOF
8357 #define UNEXEC_SRC ${UNEXEC_SRC}
8361 if test "${HAVE_X_WINDOWS}" = "yes" ; then
8362 cat >> confdefs.h <<\EOF
8363 #define HAVE_X_WINDOWS 1
8367 if test "${USE_X_TOOLKIT}" != "none" ; then
8368 cat >> confdefs.h <<\EOF
8369 #define USE_X_TOOLKIT 1
8373 if test "${HAVE_X11}" = "yes" ; then
8374 cat >> confdefs.h <<\EOF
8375 #define HAVE_X11 1
8379 if test "${HAVE_XFREE386}" = "yes" ; then
8380 cat >> confdefs.h <<\EOF
8381 #define HAVE_XFREE386 1
8385 if test "${HAVE_MENUS}" = "yes" ; then
8386 cat >> confdefs.h <<\EOF
8387 #define HAVE_MENUS 1
8391 if test "${GNU_MALLOC}" = "yes" ; then
8392 cat >> confdefs.h <<\EOF
8393 #define GNU_MALLOC 1
8397 if test "${REL_ALLOC}" = "yes" ; then
8398 cat >> confdefs.h <<\EOF
8399 #define REL_ALLOC 1
8404 #### Report on what we decided to do.
8405 echo "
8406 Configured for \`${canonical}'.
8408 Where should the build process find the source code? ${srcdir}
8409 What operating system and machine description files should Emacs use?
8410 \`${opsysfile}' and \`${machfile}'
8411 What compiler should emacs be built with? ${CC} ${CFLAGS}
8412 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
8413 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
8414 What window system should Emacs use? ${window_system}
8415 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
8417 if test -n "${x_includes}"; then
8418 echo " Where do we find X Windows header files? ${x_includes}"
8419 else
8420 echo " Where do we find X Windows header files? Standard dirs"
8422 if test -n "${x_libraries}"; then
8423 echo " Where do we find X Windows libraries? ${x_libraries}"
8424 else
8425 echo " Where do we find X Windows libraries? Standard dirs"
8428 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
8429 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
8430 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
8431 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
8432 echo " Does Emacs use -lungif? ${HAVE_GIF}"
8433 echo " Does Emacs use -lpng? ${HAVE_PNG}"
8434 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
8435 echo
8437 # Remove any trailing slashes in these variables.
8438 test "${prefix}" != NONE &&
8439 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
8440 test "${exec_prefix}" != NONE &&
8441 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
8443 trap '' 1 2 15
8444 cat > confcache <<\EOF
8445 # This file is a shell script that caches the results of configure
8446 # tests run on this system so they can be shared between configure
8447 # scripts and configure runs. It is not useful on other systems.
8448 # If it contains results you don't want to keep, you may remove or edit it.
8450 # By default, configure uses ./config.cache as the cache file,
8451 # creating it if it does not exist already. You can give configure
8452 # the --cache-file=FILE option to use a different cache file; that is
8453 # what configure does when it calls configure scripts in
8454 # subdirectories, so they share the cache.
8455 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8456 # config.status only pays attention to the cache file if you give it the
8457 # --recheck option to rerun configure.
8460 # The following way of writing the cache mishandles newlines in values,
8461 # but we know of no workaround that is simple, portable, and efficient.
8462 # So, don't put newlines in cache variables' values.
8463 # Ultrix sh set writes to stderr and can't be redirected directly,
8464 # and sets the high bit in the cache file unless we assign to the vars.
8465 (set) 2>&1 |
8466 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8467 *ac_space=\ *)
8468 # `set' does not quote correctly, so add quotes (double-quote substitution
8469 # turns \\\\ into \\, and sed turns \\ into \).
8470 sed -n \
8471 -e "s/'/'\\\\''/g" \
8472 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8475 # `set' quotes correctly as required by POSIX, so do not add quotes.
8476 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8478 esac >> confcache
8479 if cmp -s $cache_file confcache; then
8481 else
8482 if test -w $cache_file; then
8483 echo "updating cache $cache_file"
8484 cat confcache > $cache_file
8485 else
8486 echo "not updating unwritable cache $cache_file"
8489 rm -f confcache
8491 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8493 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8494 # Let make expand exec_prefix.
8495 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8497 # Any assignment to VPATH causes Sun make to only execute
8498 # the first set of double-colon rules, so remove it if not needed.
8499 # If there is a colon in the path, we need to keep it.
8500 if test "x$srcdir" = x.; then
8501 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8504 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8506 DEFS=-DHAVE_CONFIG_H
8508 # Without the "./", some shells look in PATH for config.status.
8509 : ${CONFIG_STATUS=./config.status}
8511 echo creating $CONFIG_STATUS
8512 rm -f $CONFIG_STATUS
8513 cat > $CONFIG_STATUS <<EOF
8514 #! /bin/sh
8515 # Generated automatically by configure.
8516 # Run this file to recreate the current configuration.
8517 # This directory was configured as follows,
8518 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8520 # $0 $ac_configure_args
8522 # Compiler output produced by configure, useful for debugging
8523 # configure, is in ./config.log if it exists.
8525 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8526 for ac_option
8528 case "\$ac_option" in
8529 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8530 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8531 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8532 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8533 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8534 exit 0 ;;
8535 -help | --help | --hel | --he | --h)
8536 echo "\$ac_cs_usage"; exit 0 ;;
8537 *) echo "\$ac_cs_usage"; exit 1 ;;
8538 esac
8539 done
8541 ac_given_srcdir=$srcdir
8542 ac_given_INSTALL="$INSTALL"
8544 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
8545 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
8546 lisp/Makefile leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8548 cat >> $CONFIG_STATUS <<EOF
8550 # Protect against being on the right side of a sed subst in config.status.
8551 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8552 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8553 $ac_vpsub
8554 $extrasub
8555 s%@SHELL@%$SHELL%g
8556 s%@CFLAGS@%$CFLAGS%g
8557 s%@CPPFLAGS@%$CPPFLAGS%g
8558 s%@CXXFLAGS@%$CXXFLAGS%g
8559 s%@FFLAGS@%$FFLAGS%g
8560 s%@DEFS@%$DEFS%g
8561 s%@LDFLAGS@%$LDFLAGS%g
8562 s%@LIBS@%$LIBS%g
8563 s%@exec_prefix@%$exec_prefix%g
8564 s%@prefix@%$prefix%g
8565 s%@program_transform_name@%$program_transform_name%g
8566 s%@bindir@%$bindir%g
8567 s%@sbindir@%$sbindir%g
8568 s%@libexecdir@%$libexecdir%g
8569 s%@datadir@%$datadir%g
8570 s%@sysconfdir@%$sysconfdir%g
8571 s%@sharedstatedir@%$sharedstatedir%g
8572 s%@localstatedir@%$localstatedir%g
8573 s%@libdir@%$libdir%g
8574 s%@includedir@%$includedir%g
8575 s%@oldincludedir@%$oldincludedir%g
8576 s%@infodir@%$infodir%g
8577 s%@mandir@%$mandir%g
8578 s%@host@%$host%g
8579 s%@host_alias@%$host_alias%g
8580 s%@host_cpu@%$host_cpu%g
8581 s%@host_vendor@%$host_vendor%g
8582 s%@host_os@%$host_os%g
8583 s%@CC@%$CC%g
8584 s%@LN_S@%$LN_S%g
8585 s%@CPP@%$CPP%g
8586 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8587 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8588 s%@INSTALL_DATA@%$INSTALL_DATA%g
8589 s%@YACC@%$YACC%g
8590 s%@RANLIB@%$RANLIB%g
8591 s%@SET_MAKE@%$SET_MAKE%g
8592 s%@ALLOCA@%$ALLOCA%g
8593 s%@liblockfile@%$liblockfile%g
8594 s%@LIBOBJS@%$LIBOBJS%g
8595 s%@NEED_SETGID@%$NEED_SETGID%g
8596 s%@KMEM_GROUP@%$KMEM_GROUP%g
8597 s%@version@%$version%g
8598 s%@configuration@%$configuration%g
8599 s%@canonical@%$canonical%g
8600 s%@srcdir@%$srcdir%g
8601 s%@lispdir@%$lispdir%g
8602 s%@locallisppath@%$locallisppath%g
8603 s%@lisppath@%$lisppath%g
8604 s%@x_default_search_path@%$x_default_search_path%g
8605 s%@etcdir@%$etcdir%g
8606 s%@archlibdir@%$archlibdir%g
8607 s%@docdir@%$docdir%g
8608 s%@bitmapdir@%$bitmapdir%g
8609 s%@c_switch_system@%$c_switch_system%g
8610 s%@c_switch_machine@%$c_switch_machine%g
8611 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
8612 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
8613 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
8614 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
8615 s%@machfile@%$machfile%g
8616 s%@opsysfile@%$opsysfile%g
8617 s%@GETLOADAVG_LIBS@%$GETLOADAVG_LIBS%g
8619 CEOF
8622 cat >> $CONFIG_STATUS <<\EOF
8624 # Split the substitutions into bite-sized pieces for seds with
8625 # small command number limits, like on Digital OSF/1 and HP-UX.
8626 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8627 ac_file=1 # Number of current file.
8628 ac_beg=1 # First line for current file.
8629 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8630 ac_more_lines=:
8631 ac_sed_cmds=""
8632 while $ac_more_lines; do
8633 if test $ac_beg -gt 1; then
8634 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8635 else
8636 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8638 if test ! -s conftest.s$ac_file; then
8639 ac_more_lines=false
8640 rm -f conftest.s$ac_file
8641 else
8642 if test -z "$ac_sed_cmds"; then
8643 ac_sed_cmds="sed -f conftest.s$ac_file"
8644 else
8645 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8647 ac_file=`expr $ac_file + 1`
8648 ac_beg=$ac_end
8649 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8651 done
8652 if test -z "$ac_sed_cmds"; then
8653 ac_sed_cmds=cat
8657 cat >> $CONFIG_STATUS <<EOF
8659 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
8660 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
8661 lisp/Makefile leim/Makefile"}
8663 cat >> $CONFIG_STATUS <<\EOF
8664 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8665 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8666 case "$ac_file" in
8667 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8668 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8669 *) ac_file_in="${ac_file}.in" ;;
8670 esac
8672 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8674 # Remove last slash and all that follows it. Not all systems have dirname.
8675 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8676 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8677 # The file is in a subdirectory.
8678 test ! -d "$ac_dir" && mkdir "$ac_dir"
8679 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8680 # A "../" for each directory in $ac_dir_suffix.
8681 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8682 else
8683 ac_dir_suffix= ac_dots=
8686 case "$ac_given_srcdir" in
8687 .) srcdir=.
8688 if test -z "$ac_dots"; then top_srcdir=.
8689 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8690 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8691 *) # Relative path.
8692 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8693 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8694 esac
8696 case "$ac_given_INSTALL" in
8697 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8698 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8699 esac
8701 echo creating "$ac_file"
8702 rm -f "$ac_file"
8703 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8704 case "$ac_file" in
8705 *Makefile*) ac_comsub="1i\\
8706 # $configure_input" ;;
8707 *) ac_comsub= ;;
8708 esac
8710 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8711 sed -e "$ac_comsub
8712 s%@configure_input@%$configure_input%g
8713 s%@srcdir@%$srcdir%g
8714 s%@top_srcdir@%$top_srcdir%g
8715 s%@INSTALL@%$INSTALL%g
8716 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8717 fi; done
8718 rm -f conftest.s*
8720 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8721 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8723 # ac_d sets the value in "#define NAME VALUE" lines.
8724 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8725 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8726 ac_dC='\3'
8727 ac_dD='%g'
8728 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8729 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8730 ac_uB='\([ ]\)%\1#\2define\3'
8731 ac_uC=' '
8732 ac_uD='\4%g'
8733 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8734 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8735 ac_eB='$%\1#\2define\3'
8736 ac_eC=' '
8737 ac_eD='%g'
8739 if test "${CONFIG_HEADERS+set}" != set; then
8741 cat >> $CONFIG_STATUS <<EOF
8742 CONFIG_HEADERS="src/config.h:src/config.in"
8744 cat >> $CONFIG_STATUS <<\EOF
8746 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8747 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8748 case "$ac_file" in
8749 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8750 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8751 *) ac_file_in="${ac_file}.in" ;;
8752 esac
8754 echo creating $ac_file
8756 rm -f conftest.frag conftest.in conftest.out
8757 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8758 cat $ac_file_inputs > conftest.in
8762 # Transform confdefs.h into a sed script conftest.vals that substitutes
8763 # the proper values into config.h.in to produce config.h. And first:
8764 # Protect against being on the right side of a sed subst in config.status.
8765 # Protect against being in an unquoted here document in config.status.
8766 rm -f conftest.vals
8767 cat > conftest.hdr <<\EOF
8768 s/[\\&%]/\\&/g
8769 s%[\\$`]%\\&%g
8770 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8771 s%ac_d%ac_u%gp
8772 s%ac_u%ac_e%gp
8774 sed -n -f conftest.hdr confdefs.h > conftest.vals
8775 rm -f conftest.hdr
8777 # This sed command replaces #undef with comments. This is necessary, for
8778 # example, in the case of _POSIX_SOURCE, which is predefined and required
8779 # on some systems where configure will not decide to define it.
8780 cat >> conftest.vals <<\EOF
8781 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8784 # Break up conftest.vals because some shells have a limit on
8785 # the size of here documents, and old seds have small limits too.
8787 rm -f conftest.tail
8788 while :
8790 ac_lines=`grep -c . conftest.vals`
8791 # grep -c gives empty output for an empty file on some AIX systems.
8792 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8793 # Write a limited-size here document to conftest.frag.
8794 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8795 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8796 echo 'CEOF
8797 sed -f conftest.frag conftest.in > conftest.out
8798 rm -f conftest.in
8799 mv conftest.out conftest.in
8800 ' >> $CONFIG_STATUS
8801 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8802 rm -f conftest.vals
8803 mv conftest.tail conftest.vals
8804 done
8805 rm -f conftest.vals
8807 cat >> $CONFIG_STATUS <<\EOF
8808 rm -f conftest.frag conftest.h
8809 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8810 cat conftest.in >> conftest.h
8811 rm -f conftest.in
8812 if cmp -s $ac_file conftest.h 2>/dev/null; then
8813 echo "$ac_file is unchanged"
8814 rm -f conftest.h
8815 else
8816 # Remove last slash and all that follows it. Not all systems have dirname.
8817 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8818 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8819 # The file is in a subdirectory.
8820 test ! -d "$ac_dir" && mkdir "$ac_dir"
8822 rm -f $ac_file
8823 mv conftest.h $ac_file
8825 fi; done
8828 cat >> $CONFIG_STATUS <<EOF
8829 CPP="$CPP" CPPFLAGS="$CPPFLAGS"
8831 cat >> $CONFIG_STATUS <<\EOF
8834 ### Make the necessary directories, if they don't exist.
8835 for dir in etc lisp ; do
8836 test -d ${dir} || mkdir ${dir}
8837 done
8839 # Build src/Makefile from ${srcdir}/src/Makefile.c
8840 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
8841 # This must be done after src/config.h is built, since we rely on that file.
8843 # Now get this: Some word that is part of the ${srcdir} directory name
8844 # or the ${configuration} value might, just might, happen to be an
8845 # identifier like `sun4' or `i386' or something, and be predefined by
8846 # the C preprocessor to some helpful value like 1, or maybe the empty
8847 # string. Needless to say consequent macro substitutions are less
8848 # than conducive to the makefile finding the correct directory.
8849 undefs="`echo $top_srcdir $configuration $canonical |
8850 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
8851 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
8854 echo creating src/epaths.h
8855 make epaths-force
8857 echo creating lib-src/Makefile
8858 ( cd lib-src
8859 rm -f junk.c junk1.c junk2.c
8860 sed -e '/start of cpp stuff/q' \
8861 < Makefile.c > junk1.c
8862 sed -e '1,/start of cpp stuff/d'\
8863 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
8864 < Makefile.c > junk.c
8865 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
8866 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
8867 cat junk1.c junk2.c > Makefile.new
8868 rm -f junk.c junk1.c junk2.c
8869 chmod 444 Makefile.new
8870 mv -f Makefile.new Makefile
8873 echo creating src/Makefile
8874 ( cd src
8875 rm -f junk.c junk1.c junk2.c
8876 sed -e '/start of cpp stuff/q' \
8877 < Makefile.c > junk1.c
8878 sed -e '1,/start of cpp stuff/d'\
8879 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
8880 < Makefile.c > junk.c
8881 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
8882 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
8883 cat junk1.c junk2.c > Makefile.new
8884 rm -f junk.c junk1.c junk2.c
8885 chmod 444 Makefile.new
8886 mv -f Makefile.new Makefile
8889 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
8890 echo creating src/.gdbinit
8891 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
8894 # This is how we know whether to re-run configure in certain cases.
8895 touch src/config.stamp
8898 exit 0
8900 chmod +x $CONFIG_STATUS
8901 rm -fr confdefs* $ac_clean_files
8902 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1