Don't use _MSDOS_H_ as a symbol, use MSDOS_H_ instead.
[emacs.git] / configure
blobf75628b0367cb035b2c032d5615376ca7fbe3a18
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 NON_GNU_CPP='cc -E -std0' ;;
885 esac
888 alpha*-*-linux-gnu* )
889 machine=alpha opsys=gnu-linux
892 arm*-*-linux-gnu* )
893 machine=arm opsys=gnu-linux
896 ppc-*-linux | \
897 powerpc-*-linux* )
898 machine=powerpc opsys=gnu-linux
901 ## Altos 3068
902 m68*-altos-sysv* )
903 machine=altos opsys=usg5-2
906 ## Amdahl UTS
907 580-amdahl-sysv* )
908 machine=amdahl opsys=usg5-2-2
911 ## Apollo, Domain/OS
912 m68*-apollo-* )
913 machine=apollo opsys=bsd4-3
916 ## AT&T 3b2, 3b5, 3b15, 3b20
917 we32k-att-sysv* )
918 machine=att3b opsys=usg5-2-2
921 ## AT&T 3b1 - The Mighty Unix PC!
922 m68*-att-sysv* )
923 machine=7300 opsys=usg5-2-2
926 ## Bull dpx20
927 rs6000-bull-bosx* )
928 machine=ibmrs6000 opsys=aix3-2
931 ## Bull dpx2
932 m68*-bull-sysv3* )
933 machine=dpx2 opsys=usg5-3
936 ## Bull sps7
937 m68*-bull-sysv2* )
938 machine=sps7 opsys=usg5-2
941 ## CCI 5/32, 6/32 -- see "Tahoe".
943 ## Celerity
944 ## I don't know what configuration name to use for this; config.sub
945 ## doesn't seem to know anything about it. Hey, Celerity users, get
946 ## in touch with us!
947 celerity-celerity-bsd* )
948 machine=celerity opsys=bsd4-2
951 ## Clipper
952 ## What operating systems does this chip run that Emacs has been
953 ## tested on?
954 clipper-* )
955 machine=clipper
956 ## We'll use the catch-all code at the bottom to guess the
957 ## operating system.
960 ## Convex
961 *-convex-bsd* | *-convex-convexos* )
962 machine=convex opsys=bsd4-3
963 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
964 NON_GNU_CPP="cc -E -P"
967 ## Cubix QBx/386
968 i[3456]86-cubix-sysv* )
969 machine=intel386 opsys=usg5-3
972 ## Cydra 5
973 cydra*-cydrome-sysv* )
974 machine=cydra5 opsys=usg5-3
977 ## Data General AViiON Machines
978 ## DG changed naming conventions with the release of 5.4.4.10, they
979 ## dropped the initial 5.4 but left the intervening R. Because of the
980 ## R this shouldn't conflict with older versions of the OS (which I
981 ## think were named like dgux4.*). In addition, DG new AViiONs series
982 ## uses either Motorola M88k or Intel Pentium CPUs.
983 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
984 machine=aviion opsys=dgux4
986 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
987 ## This name is dgux5-4-3 instead of dgux5-4r3
988 ## to avoid a file name conflict on MSDOS.
989 machine=aviion opsys=dgux5-4-3
991 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
992 machine=aviion opsys=dgux5-4r2
994 m88k-dg-dgux* )
995 machine=aviion opsys=dgux
998 ## Data General AViiON Intel (x86) Machines
999 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1000 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1001 i[345]86-dg-dguxR4* )
1002 machine=aviion-intel opsys=dgux4
1005 ## DECstations
1006 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1007 machine=pmax opsys=bsd4-2
1009 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1010 machine=pmax opsys=bsd4-3
1012 mips-dec-ultrix* )
1013 machine=pmax opsys=ultrix4-3
1015 mips-dec-osf* )
1016 machine=pmax opsys=osf1
1018 mips-dec-mach_bsd4.3* )
1019 machine=pmax opsys=mach-bsd4-3
1022 ## Motorola Delta machines
1023 m68k-motorola-sysv* | m68000-motorola-sysv* )
1024 machine=delta opsys=usg5-3
1025 if test -z "`type gnucc | grep 'not found'`"
1026 then
1027 if test -s /etc/167config
1028 then CC="gnucc -m68040"
1029 else CC="gnucc -m68881"
1031 else
1032 if test -z "`type gcc | grep 'not found'`"
1033 then CC=gcc
1034 else CC=cc
1038 m88k-motorola-sysv4* )
1039 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1040 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1041 # I hope there are not other 4.0 versions for this machine
1042 # which really need usg5-4 instead.
1043 machine=delta88k opsys=usg5-4-2
1045 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1046 machine=delta88k opsys=usg5-3
1049 ## Dual machines
1050 m68*-dual-sysv* )
1051 machine=dual opsys=usg5-2
1053 m68*-dual-uniplus* )
1054 machine=dual opsys=unipl5-2
1057 ## Elxsi 6400
1058 elxsi-elxsi-sysv* )
1059 machine=elxsi opsys=usg5-2
1062 ## Encore machines
1063 ns16k-encore-bsd* )
1064 machine=ns16000 opsys=umax
1067 ## The GEC 93 - apparently, this port isn't really finished yet.
1069 ## Gould Power Node and NP1
1070 pn-gould-bsd4.2* )
1071 machine=gould opsys=bsd4-2
1073 pn-gould-bsd4.3* )
1074 machine=gould opsys=bsd4-3
1076 np1-gould-bsd* )
1077 machine=gould-np1 opsys=bsd4-3
1080 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1081 ## as far as Emacs is concerned).
1082 m88k-harris-cxux* )
1083 # Build needs to be different on 7.0 and later releases
1084 case "`uname -r`" in
1085 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1086 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1087 esac
1088 NON_GNU_CPP="/lib/cpp"
1090 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1091 m68k-harris-cxux* )
1092 machine=nh3000 opsys=cxux
1094 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1095 powerpc-harris-powerunix )
1096 machine=nh6000 opsys=powerunix
1097 NON_GNU_CPP="cc -Xo -E -P"
1099 ## SR2001/SR2201 running HI-UX/MPP
1100 hppa1.1-hitachi-hiuxmpp* )
1101 machine=sr2k opsys=hiuxmpp
1103 ## Honeywell XPS100
1104 xps*-honeywell-sysv* )
1105 machine=xps100 opsys=usg5-2
1108 ## HP 9000 series 200 or 300
1109 m68*-hp-bsd* )
1110 machine=hp9000s300 opsys=bsd4-3
1112 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1113 m68*-hp-hpux* )
1114 case "`uname -r`" in
1115 ## Someone's system reports A.B8.05 for this.
1116 ## I wonder what other possibilities there are.
1117 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1118 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1119 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1120 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1121 *) machine=hp9000s300 opsys=hpux ;;
1122 esac
1125 ## HP 9000 series 700 and 800, running HP/UX
1126 hppa*-hp-hpux7* )
1127 machine=hp800 opsys=hpux
1129 hppa*-hp-hpux8* )
1130 machine=hp800 opsys=hpux8
1132 hppa*-hp-hpux9shr* )
1133 machine=hp800 opsys=hpux9shr
1135 hppa*-hp-hpux9* )
1136 machine=hp800 opsys=hpux9
1138 hppa*-hp-hpux1[0-9]* )
1139 machine=hp800 opsys=hpux10
1142 ## HP 9000 series 700 and 800, running HP/UX
1143 hppa*-hp-hpux* )
1144 ## Cross-compilation? Nah!
1145 case "`uname -r`" in
1146 ## Someone's system reports A.B8.05 for this.
1147 ## I wonder what other possibilities there are.
1148 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1149 *.08.* ) machine=hp800 opsys=hpux8 ;;
1150 *.09.* ) machine=hp800 opsys=hpux9 ;;
1151 *) machine=hp800 opsys=hpux10 ;;
1152 esac
1154 hppa*-*-nextstep* )
1155 machine=hp800 opsys=nextstep
1158 ## Orion machines
1159 orion-orion-bsd* )
1160 machine=orion opsys=bsd4-2
1162 clipper-orion-bsd* )
1163 machine=orion105 opsys=bsd4-2
1166 ## IBM machines
1167 i[3456]86-ibm-aix1.1* )
1168 machine=ibmps2-aix opsys=usg5-2-2
1170 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1171 machine=ibmps2-aix opsys=usg5-3
1173 i370-ibm-aix*)
1174 machine=ibm370aix opsys=usg5-3
1176 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1177 machine=ibmrs6000 opsys=aix3-1
1179 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1180 machine=ibmrs6000 opsys=aix3-2-5
1182 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1183 machine=ibmrs6000 opsys=aix4-1
1185 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1186 machine=ibmrs6000 opsys=aix4-2
1188 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1189 machine=ibmrs6000 opsys=aix4
1191 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1192 machine=ibmrs6000 opsys=aix4-1
1194 rs6000-ibm-aix* | powerpc-ibm-aix* )
1195 machine=ibmrs6000 opsys=aix3-2
1197 romp-ibm-bsd4.3* )
1198 machine=ibmrt opsys=bsd4-3
1200 romp-ibm-bsd4.2* )
1201 machine=ibmrt opsys=bsd4-2
1203 romp-ibm-aos4.3* )
1204 machine=ibmrt opsys=bsd4-3
1206 romp-ibm-aos4.2* )
1207 machine=ibmrt opsys=bsd4-2
1209 romp-ibm-aos* )
1210 machine=ibmrt opsys=bsd4-3
1212 romp-ibm-bsd* )
1213 machine=ibmrt opsys=bsd4-3
1215 romp-ibm-aix* )
1216 machine=ibmrt-aix opsys=usg5-2-2
1219 ## Integrated Solutions `Optimum V'
1220 m68*-isi-bsd4.2* )
1221 machine=isi-ov opsys=bsd4-2
1223 m68*-isi-bsd4.3* )
1224 machine=isi-ov opsys=bsd4-3
1227 ## Intel 386 machines where we do care about the manufacturer
1228 i[3456]86-intsys-sysv* )
1229 machine=is386 opsys=usg5-2-2
1232 ## Prime EXL
1233 i[3456]86-prime-sysv* )
1234 machine=i386 opsys=usg5-3
1237 ## Sequent Symmetry running Dynix
1238 i[3456]86-sequent-bsd* )
1239 machine=symmetry opsys=bsd4-3
1242 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1243 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1244 machine=sequent-ptx opsys=ptx4
1245 NON_GNU_CPP=/lib/cpp
1248 ## Sequent Symmetry running DYNIX/ptx
1249 ## Use the old cpp rather than the newer ANSI one.
1250 i[3456]86-sequent-ptx* )
1251 machine=sequent-ptx opsys=ptx
1252 NON_GNU_CPP="/lib/cpp"
1255 ## ncr machine running svr4.3.
1256 i[3456]86-ncr-sysv4.3 )
1257 machine=ncr386 opsys=usg5-4-3
1260 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1261 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1262 i[3456]86-ncr-sysv* )
1263 machine=ncr386 opsys=usg5-4-2
1266 ## Intel Paragon OSF/1
1267 i860-intel-osf1* )
1268 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1271 ## Intel 860
1272 i860-*-sysv4* )
1273 machine=i860 opsys=usg5-4
1274 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1275 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1278 ## Macintosh PowerPC
1279 powerpc*-*-linux-gnu* )
1280 machine=macppc opsys=gnu-linux
1283 ## Masscomp machines
1284 m68*-masscomp-rtu* )
1285 machine=masscomp opsys=rtu
1288 ## Megatest machines
1289 m68*-megatest-bsd* )
1290 machine=mega68 opsys=bsd4-2
1293 ## Workstations sold by MIPS
1294 ## This is not necessarily all workstations using the MIPS processor -
1295 ## Irises are produced by SGI, and DECstations by DEC.
1297 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1298 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1299 ## it gives for choosing between the alternatives seems to be "Use
1300 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1301 ## the BSD world." I'll assume that these are instructions for
1302 ## handling two odd situations, and that every other situation
1303 ## should use mips.h and usg5-2-2, they being listed first.
1304 mips-mips-usg* )
1305 machine=mips4
1306 ## Fall through to the general code at the bottom to decide on the OS.
1308 mips-mips-riscos4* )
1309 machine=mips4 opsys=bsd4-3
1310 NON_GNU_CC="cc -systype bsd43"
1311 NON_GNU_CPP="cc -systype bsd43 -E"
1313 mips-mips-riscos5* )
1314 machine=mips4 opsys=riscos5
1315 NON_GNU_CC="cc -systype bsd43"
1316 NON_GNU_CPP="cc -systype bsd43 -E"
1318 mips-mips-bsd* )
1319 machine=mips opsys=bsd4-3
1321 mips-mips-* )
1322 machine=mips opsys=usg5-2-2
1325 ## NeXT
1326 m68*-next-* | m68k-*-nextstep* )
1327 machine=m68k opsys=nextstep
1330 ## The complete machine from National Semiconductor
1331 ns32k-ns-genix* )
1332 machine=ns32000 opsys=usg5-2
1335 ## NCR machines
1336 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1337 machine=tower32 opsys=usg5-2-2
1339 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1340 machine=tower32v3 opsys=usg5-3
1343 ## NEC EWS4800
1344 mips-nec-sysv4*)
1345 machine=ews4800 opsys=ux4800
1348 ## Nixdorf Targon 31
1349 m68*-nixdorf-sysv* )
1350 machine=targon31 opsys=usg5-2-2
1353 ## Nu (TI or LMI)
1354 m68*-nu-sysv* )
1355 machine=nu opsys=usg5-2
1358 ## Plexus
1359 m68*-plexus-sysv* )
1360 machine=plexus opsys=usg5-2
1363 ## PowerPC reference platform
1364 powerpcle-*-solaris2* )
1365 machine=prep
1366 opsys=sol2-5
1369 ## Pyramid machines
1370 ## I don't really have any idea what sort of processor the Pyramid has,
1371 ## so I'm assuming it is its own architecture.
1372 pyramid-pyramid-bsd* )
1373 machine=pyramid opsys=bsd4-2
1376 ## Sequent Balance
1377 ns32k-sequent-bsd4.2* )
1378 machine=sequent opsys=bsd4-2
1380 ns32k-sequent-bsd4.3* )
1381 machine=sequent opsys=bsd4-3
1384 ## Siemens Nixdorf
1385 mips-siemens-sysv* | mips-sni-sysv*)
1386 machine=mips-siemens opsys=usg5-4
1387 NON_GNU_CC=/usr/ccs/bin/cc
1388 NON_GNU_CPP=/usr/ccs/lib/cpp
1391 ## Silicon Graphics machines
1392 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1393 m68*-sgi-iris3.5* )
1394 machine=irist opsys=iris3-5
1396 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1397 machine=irist opsys=iris3-6
1399 ## Iris 4D
1400 mips-sgi-irix3* )
1401 machine=iris4d opsys=irix3-3
1403 mips-sgi-irix4* )
1404 machine=iris4d opsys=irix4-0
1406 mips-sgi-irix6.5 )
1407 machine=iris4d opsys=irix6-5
1408 # Without defining _LANGUAGE_C, things get masked out in the headers
1409 # so that, for instance, grepping for `free' in stdlib.h fails and
1410 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1411 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1412 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
1414 mips-sgi-irix6* )
1415 machine=iris4d opsys=irix6-0
1416 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
1417 # but presumably it does no harm.
1418 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1419 # -32 probably isn't necessary in later v.6s -- anyone know which?
1420 NON_GCC_TEST_OPTIONS=-32
1422 mips-sgi-irix5.[01]* )
1423 machine=iris4d opsys=irix5-0
1425 mips-sgi-irix5* | mips-sgi-irix* )
1426 machine=iris4d opsys=irix5-2
1429 ## SONY machines
1430 m68*-sony-bsd4.2* )
1431 machine=news opsys=bsd4-2
1433 m68*-sony-bsd4.3* )
1434 machine=news opsys=bsd4-3
1436 m68*-sony-newsos3* | m68*-sony-news3*)
1437 machine=news opsys=bsd4-3
1439 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1440 machine=news-risc opsys=bsd4-3
1442 mips-sony-newsos6* )
1443 machine=news-r6 opsys=newsos6
1445 mips-sony-news* )
1446 machine=news-risc opsys=newsos5
1449 ## Stride
1450 m68*-stride-sysv* )
1451 machine=stride opsys=usg5-2
1454 ## Suns
1455 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1456 machine=sparc opsys=gnu-linux
1459 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1460 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1461 | rs6000-*-solaris2*)
1462 case "${canonical}" in
1463 m68*-sunos1* ) machine=sun1 ;;
1464 m68*-sunos2* ) machine=sun2 ;;
1465 m68* ) machine=sun3 ;;
1466 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1467 i[3456]86-*-* ) machine=intel386 ;;
1468 powerpcle* ) machine=powerpcle ;;
1469 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1470 sparc* ) machine=sparc ;;
1471 * ) unported=yes ;;
1472 esac
1473 case "${canonical}" in
1474 ## The Sun386 didn't get past 4.0.
1475 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1476 *-sunos4.0* ) opsys=sunos4-0 ;;
1477 *-sunos4.1.[3-9]*noshare )
1478 ## This name is sunos413 instead of sunos4-1-3
1479 ## to avoid a file name conflict on MSDOS.
1480 opsys=sunos413
1481 NON_GNU_CPP=/usr/lib/cpp
1482 NON_GCC_TEST_OPTIONS=-Bstatic
1483 GCC_TEST_OPTIONS=-static
1485 *-sunos4.1.[3-9]* | *-sunos4shr*)
1486 opsys=sunos4shr
1487 NON_GNU_CPP=/usr/lib/cpp
1489 *-sunos4* | *-sunos )
1490 opsys=sunos4-1
1491 NON_GCC_TEST_OPTIONS=-Bstatic
1492 GCC_TEST_OPTIONS=-static
1494 *-sunos5.3* | *-solaris2.3* )
1495 opsys=sol2-3
1496 NON_GNU_CPP=/usr/ccs/lib/cpp
1498 *-sunos5.4* | *-solaris2.4* )
1499 opsys=sol2-4
1500 NON_GNU_CPP=/usr/ccs/lib/cpp
1501 RANLIB="ar -ts"
1503 *-sunos5.5* | *-solaris2.5* )
1504 opsys=sol2-5
1505 NON_GNU_CPP=/usr/ccs/lib/cpp
1506 RANLIB="ar -ts"
1508 *-sunos5* | *-solaris* )
1509 opsys=sol2-5
1510 NON_GNU_CPP=/usr/ccs/lib/cpp
1512 * ) opsys=bsd4-2 ;;
1513 esac
1514 ## Watch out for a compiler that we know will not work.
1515 case "${canonical}" in
1516 *-solaris* | *-sunos5* )
1517 if [ "x$CC" = x/usr/ucb/cc ]; then
1518 ## /usr/ucb/cc doesn't work;
1519 ## we should find some other compiler that does work.
1520 unset CC
1523 *) ;;
1524 esac
1526 sparc-*-nextstep* )
1527 machine=sparc opsys=nextstep
1530 ## Tadpole 68k
1531 m68*-tadpole-sysv* )
1532 machine=tad68k opsys=usg5-3
1535 ## Tahoe machines
1536 tahoe-tahoe-bsd4.2* )
1537 machine=tahoe opsys=bsd4-2
1539 tahoe-tahoe-bsd4.3* )
1540 machine=tahoe opsys=bsd4-3
1543 ## Tandem Integrity S2
1544 mips-tandem-sysv* )
1545 machine=tandem-s2 opsys=usg5-3
1548 ## Tektronix XD88
1549 m88k-tektronix-sysv3* )
1550 machine=tekxd88 opsys=usg5-3
1553 ## Tektronix 16000 box (6130?)
1554 ns16k-tektronix-bsd* )
1555 machine=ns16000 opsys=bsd4-2
1557 ## Tektronix 4300
1558 ## src/m/tek4300.h hints that this is a m68k machine.
1559 m68*-tektronix-bsd* )
1560 machine=tek4300 opsys=bsd4-3
1563 ## Titan P2 or P3
1564 ## We seem to have lost the machine-description file titan.h!
1565 titan-titan-sysv* )
1566 machine=titan opsys=usg5-3
1569 ## Ustation E30 (SS5E)
1570 m68*-unisys-uniplus* )
1571 machine=ustation opsystem=unipl5-2
1574 ## Vaxen.
1575 vax-dec-* )
1576 machine=vax
1577 case "${canonical}" in
1578 *-bsd4.1* ) opsys=bsd4-1 ;;
1579 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1580 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1581 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1582 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1583 *-vms* ) opsys=vms ;;
1584 * ) unported=yes
1585 esac
1588 ## Whitechapel MG1
1589 ns16k-whitechapel-* )
1590 machine=mg1
1591 ## We don't know what sort of OS runs on these; we'll let the
1592 ## operating system guessing code below try.
1595 ## Wicat
1596 m68*-wicat-sysv* )
1597 machine=wicat opsys=usg5-2
1600 ## Intel 386 machines where we don't care about the manufacturer
1601 i[3456]86-*-* )
1602 machine=intel386
1603 case "${canonical}" in
1604 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1605 *-isc2.2* ) opsys=isc2-2 ;;
1606 *-isc4.0* ) opsys=isc4-0 ;;
1607 *-isc4.* ) opsys=isc4-1
1608 GCC_TEST_OPTIONS=-posix
1609 NON_GCC_TEST_OPTIONS=-Xp
1611 *-isc* ) opsys=isc3-0 ;;
1612 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1613 *-esix* ) opsys=esix ;;
1614 *-xenix* ) opsys=xenix ;;
1615 *-linux-gnu* ) opsys=gnu-linux ;;
1616 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1617 *-sco3.2v5* ) opsys=sco5
1618 NON_GNU_CPP=/lib/cpp
1619 # Prevent -belf from being passed to $CPP.
1620 # /lib/cpp does not accept it.
1621 OVERRIDE_CPPFLAGS=" "
1623 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1624 *-386bsd* ) opsys=386bsd ;;
1625 *-freebsd* ) opsys=freebsd ;;
1626 *-nextstep* ) opsys=nextstep ;;
1627 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1628 esac
1631 ## m68k Linux-based GNU system
1632 m68k-*-linux-gnu* )
1633 machine=m68k opsys=gnu-linux
1636 ## Mips Linux-based GNU system
1637 mips-*-linux-gnu* )
1638 machine=mips opsys=gnu-linux
1641 ## UXP/DS
1642 sparc-fujitsu-sysv4* )
1643 machine=sparc opsys=uxpds
1644 NON_GNU_CPP=/usr/ccs/lib/cpp
1645 RANLIB="ar -ts"
1648 ## UXP/V
1649 f301-fujitsu-uxpv4.1)
1650 machine=f301 opsys=uxpv
1654 unported=yes
1656 esac
1658 ### If the code above didn't choose an operating system, just choose
1659 ### an operating system based on the configuration name. You really
1660 ### only want to use this when you have no idea what the right
1661 ### operating system is; if you know what operating systems a machine
1662 ### runs, it's cleaner to make it explicit in the case statement
1663 ### above.
1664 if test x"${opsys}" = x; then
1665 case "${canonical}" in
1666 *-gnu* ) opsys=gnu ;;
1667 *-bsd4.[01] ) opsys=bsd4-1 ;;
1668 *-bsd4.2 ) opsys=bsd4-2 ;;
1669 *-bsd4.3 ) opsys=bsd4-3 ;;
1670 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1671 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1672 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1673 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1674 *-sysv4.2uw* ) opsys=unixware ;;
1675 *-sysv4.1* | *-sysvr4.1* )
1676 NON_GNU_CPP=/usr/lib/cpp
1677 opsys=usg5-4 ;;
1678 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1679 if [ x$NON_GNU_CPP = x ]; then
1680 if [ -f /usr/ccs/lib/cpp ]; then
1681 NON_GNU_CPP=/usr/ccs/lib/cpp
1682 else
1683 NON_GNU_CPP=/lib/cpp
1686 opsys=usg5-4-2 ;;
1687 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1689 unported=yes
1691 esac
1695 if test $unported = yes; then
1696 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1697 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1700 machfile="m/${machine}.h"
1701 opsysfile="s/${opsys}.h"
1704 #### Choose a compiler.
1705 test -n "$CC" && cc_specified=yes
1707 # Save the value of CFLAGS that the user specified.
1708 SPECIFIED_CFLAGS="$CFLAGS"
1710 case ${with_gcc} in
1711 "yes" ) CC="gcc" GCC=yes ;;
1712 "no" ) : ${CC=cc} ;;
1713 * ) # Extract the first word of "gcc", so it can be a program name with args.
1714 set dummy gcc; ac_word=$2
1715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1716 echo "configure:1717: checking for $ac_word" >&5
1717 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1718 echo $ac_n "(cached) $ac_c" 1>&6
1719 else
1720 if test -n "$CC"; then
1721 ac_cv_prog_CC="$CC" # Let the user override the test.
1722 else
1723 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1724 ac_dummy="$PATH"
1725 for ac_dir in $ac_dummy; do
1726 test -z "$ac_dir" && ac_dir=.
1727 if test -f $ac_dir/$ac_word; then
1728 ac_cv_prog_CC="gcc"
1729 break
1731 done
1732 IFS="$ac_save_ifs"
1735 CC="$ac_cv_prog_CC"
1736 if test -n "$CC"; then
1737 echo "$ac_t""$CC" 1>&6
1738 else
1739 echo "$ac_t""no" 1>&6
1742 if test -z "$CC"; then
1743 # Extract the first word of "cc", so it can be a program name with args.
1744 set dummy cc; ac_word=$2
1745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1746 echo "configure:1747: checking for $ac_word" >&5
1747 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1748 echo $ac_n "(cached) $ac_c" 1>&6
1749 else
1750 if test -n "$CC"; then
1751 ac_cv_prog_CC="$CC" # Let the user override the test.
1752 else
1753 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1754 ac_prog_rejected=no
1755 ac_dummy="$PATH"
1756 for ac_dir in $ac_dummy; do
1757 test -z "$ac_dir" && ac_dir=.
1758 if test -f $ac_dir/$ac_word; then
1759 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1760 ac_prog_rejected=yes
1761 continue
1763 ac_cv_prog_CC="cc"
1764 break
1766 done
1767 IFS="$ac_save_ifs"
1768 if test $ac_prog_rejected = yes; then
1769 # We found a bogon in the path, so make sure we never use it.
1770 set dummy $ac_cv_prog_CC
1771 shift
1772 if test $# -gt 0; then
1773 # We chose a different compiler from the bogus one.
1774 # However, it has the same basename, so the bogon will be chosen
1775 # first if we set CC to just the basename; use the full file name.
1776 shift
1777 set dummy "$ac_dir/$ac_word" "$@"
1778 shift
1779 ac_cv_prog_CC="$@"
1784 CC="$ac_cv_prog_CC"
1785 if test -n "$CC"; then
1786 echo "$ac_t""$CC" 1>&6
1787 else
1788 echo "$ac_t""no" 1>&6
1791 if test -z "$CC"; then
1792 case "`uname -s`" in
1793 *win32* | *WIN32*)
1794 # Extract the first word of "cl", so it can be a program name with args.
1795 set dummy cl; ac_word=$2
1796 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1797 echo "configure:1798: checking for $ac_word" >&5
1798 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1799 echo $ac_n "(cached) $ac_c" 1>&6
1800 else
1801 if test -n "$CC"; then
1802 ac_cv_prog_CC="$CC" # Let the user override the test.
1803 else
1804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1805 ac_dummy="$PATH"
1806 for ac_dir in $ac_dummy; do
1807 test -z "$ac_dir" && ac_dir=.
1808 if test -f $ac_dir/$ac_word; then
1809 ac_cv_prog_CC="cl"
1810 break
1812 done
1813 IFS="$ac_save_ifs"
1816 CC="$ac_cv_prog_CC"
1817 if test -n "$CC"; then
1818 echo "$ac_t""$CC" 1>&6
1819 else
1820 echo "$ac_t""no" 1>&6
1823 esac
1825 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1828 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1829 echo "configure:1830: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1831 ac_ext=c
1832 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1833 ac_cpp='$CPP $CPPFLAGS'
1834 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1835 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1836 cross_compiling=$ac_cv_prog_cc_cross
1838 cat > conftest.$ac_ext << EOF
1840 #line 1841 "configure"
1841 #include "confdefs.h"
1843 main(){return(0);}
1845 if { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1846 ac_cv_prog_cc_works=yes
1847 # If we can't run a trivial program, we are probably using a cross compiler.
1848 if (./conftest; exit) 2>/dev/null; then
1849 ac_cv_prog_cc_cross=no
1850 else
1851 ac_cv_prog_cc_cross=yes
1853 else
1854 echo "configure: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1856 ac_cv_prog_cc_works=no
1858 rm -fr conftest*
1859 ac_ext=c
1860 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1861 ac_cpp='$CPP $CPPFLAGS'
1862 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1863 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1864 cross_compiling=$ac_cv_prog_cc_cross
1866 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1867 if test $ac_cv_prog_cc_works = no; then
1868 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1870 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1871 echo "configure:1872: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1872 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1873 cross_compiling=$ac_cv_prog_cc_cross
1875 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1876 echo "configure:1877: checking whether we are using GNU C" >&5
1877 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1878 echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880 cat > conftest.c <<EOF
1881 #ifdef __GNUC__
1882 yes;
1883 #endif
1885 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1886 ac_cv_prog_gcc=yes
1887 else
1888 ac_cv_prog_gcc=no
1892 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1894 if test $ac_cv_prog_gcc = yes; then
1895 GCC=yes
1896 else
1897 GCC=
1900 ac_test_CFLAGS="${CFLAGS+set}"
1901 ac_save_CFLAGS="$CFLAGS"
1902 CFLAGS=
1903 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1904 echo "configure:1905: checking whether ${CC-cc} accepts -g" >&5
1905 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908 echo 'void f(){}' > conftest.c
1909 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1910 ac_cv_prog_cc_g=yes
1911 else
1912 ac_cv_prog_cc_g=no
1914 rm -f conftest*
1918 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1919 if test "$ac_test_CFLAGS" = set; then
1920 CFLAGS="$ac_save_CFLAGS"
1921 elif test $ac_cv_prog_cc_g = yes; then
1922 if test "$GCC" = yes; then
1923 CFLAGS="-g -O2"
1924 else
1925 CFLAGS="-g"
1927 else
1928 if test "$GCC" = yes; then
1929 CFLAGS="-O2"
1930 else
1931 CFLAGS=
1935 esac
1937 # On Suns, sometimes $CPP names a directory.
1938 if test -n "$CPP" && test -d "$CPP"; then
1939 CPP=
1942 #### Some systems specify a CPP to use unless we are using GCC.
1943 #### Now that we know whether we are using GCC, we can decide whether
1944 #### to use that one.
1945 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1946 then
1947 CPP="$NON_GNU_CPP"
1950 #### Some systems specify a CC to use unless we are using GCC.
1951 #### Now that we know whether we are using GCC, we can decide whether
1952 #### to use that one.
1953 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1954 test x$cc_specified != xyes
1955 then
1956 CC="$NON_GNU_CC"
1959 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1960 then
1961 CC="$CC $GCC_TEST_OPTIONS"
1964 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1965 then
1966 CC="$CC $NON_GCC_TEST_OPTIONS"
1969 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1970 then
1971 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1974 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1975 then
1976 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1979 #### Some other nice autoconf tests. If you add a test here which
1980 #### should make an entry in src/config.h, don't forget to add an
1981 #### #undef clause to src/config.h.in for autoconf to modify.
1983 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1984 echo "configure:1985: checking whether ln -s works" >&5
1985 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1986 echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988 rm -f conftestdata
1989 if ln -s X conftestdata 2>/dev/null
1990 then
1991 rm -f conftestdata
1992 ac_cv_prog_LN_S="ln -s"
1993 else
1994 ac_cv_prog_LN_S=ln
1997 LN_S="$ac_cv_prog_LN_S"
1998 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1999 echo "$ac_t""yes" 1>&6
2000 else
2001 echo "$ac_t""no" 1>&6
2004 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2005 echo "configure:2006: checking how to run the C preprocessor" >&5
2006 # On Suns, sometimes $CPP names a directory.
2007 if test -n "$CPP" && test -d "$CPP"; then
2008 CPP=
2010 if test -z "$CPP"; then
2011 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2012 echo $ac_n "(cached) $ac_c" 1>&6
2013 else
2014 # This must be in double quotes, not single quotes, because CPP may get
2015 # substituted into the Makefile and "${CC-cc}" will confuse make.
2016 CPP="${CC-cc} -E"
2017 # On the NeXT, cc -E runs the code through the compiler's parser,
2018 # not just through cpp.
2019 cat > conftest.$ac_ext <<EOF
2020 #line 2021 "configure"
2021 #include "confdefs.h"
2022 #include <assert.h>
2023 Syntax Error
2025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2026 { (eval echo configure:2027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2028 if test -z "$ac_err"; then
2030 else
2031 echo "$ac_err" >&5
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 rm -rf conftest*
2035 CPP="${CC-cc} -E -traditional-cpp"
2036 cat > conftest.$ac_ext <<EOF
2037 #line 2038 "configure"
2038 #include "confdefs.h"
2039 #include <assert.h>
2040 Syntax Error
2042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2043 { (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2045 if test -z "$ac_err"; then
2047 else
2048 echo "$ac_err" >&5
2049 echo "configure: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 rm -rf conftest*
2052 CPP="${CC-cc} -nologo -E"
2053 cat > conftest.$ac_ext <<EOF
2054 #line 2055 "configure"
2055 #include "confdefs.h"
2056 #include <assert.h>
2057 Syntax Error
2059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2060 { (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2062 if test -z "$ac_err"; then
2064 else
2065 echo "$ac_err" >&5
2066 echo "configure: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2068 rm -rf conftest*
2069 CPP=/lib/cpp
2071 rm -f conftest*
2073 rm -f conftest*
2075 rm -f conftest*
2076 ac_cv_prog_CPP="$CPP"
2078 CPP="$ac_cv_prog_CPP"
2079 else
2080 ac_cv_prog_CPP="$CPP"
2082 echo "$ac_t""$CPP" 1>&6
2084 # Find a good install program. We prefer a C program (faster),
2085 # so one script is as good as another. But avoid the broken or
2086 # incompatible versions:
2087 # SysV /etc/install, /usr/sbin/install
2088 # SunOS /usr/etc/install
2089 # IRIX /sbin/install
2090 # AIX /bin/install
2091 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2092 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2093 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2094 # ./install, which can be erroneously created by make from ./install.sh.
2095 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2096 echo "configure:2097: checking for a BSD compatible install" >&5
2097 if test -z "$INSTALL"; then
2098 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2102 for ac_dir in $PATH; do
2103 # Account for people who put trailing slashes in PATH elements.
2104 case "$ac_dir/" in
2105 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2107 # OSF1 and SCO ODT 3.0 have their own names for install.
2108 # Don't use installbsd from OSF since it installs stuff as root
2109 # by default.
2110 for ac_prog in ginstall scoinst install; do
2111 if test -f $ac_dir/$ac_prog; then
2112 if test $ac_prog = install &&
2113 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2114 # AIX install. It has an incompatible calling convention.
2116 else
2117 ac_cv_path_install="$ac_dir/$ac_prog -c"
2118 break 2
2121 done
2123 esac
2124 done
2125 IFS="$ac_save_IFS"
2128 if test "${ac_cv_path_install+set}" = set; then
2129 INSTALL="$ac_cv_path_install"
2130 else
2131 # As a last resort, use the slow shell script. We don't cache a
2132 # path for INSTALL within a source directory, because that will
2133 # break other packages using the cache if that directory is
2134 # removed, or if the path is relative.
2135 INSTALL="$ac_install_sh"
2138 echo "$ac_t""$INSTALL" 1>&6
2140 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2141 # It thinks the first close brace ends the variable substitution.
2142 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2144 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2146 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2148 for ac_prog in 'bison -y' byacc
2150 # Extract the first word of "$ac_prog", so it can be a program name with args.
2151 set dummy $ac_prog; ac_word=$2
2152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2153 echo "configure:2154: checking for $ac_word" >&5
2154 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2155 echo $ac_n "(cached) $ac_c" 1>&6
2156 else
2157 if test -n "$YACC"; then
2158 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2159 else
2160 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2161 ac_dummy="$PATH"
2162 for ac_dir in $ac_dummy; do
2163 test -z "$ac_dir" && ac_dir=.
2164 if test -f $ac_dir/$ac_word; then
2165 ac_cv_prog_YACC="$ac_prog"
2166 break
2168 done
2169 IFS="$ac_save_ifs"
2172 YACC="$ac_cv_prog_YACC"
2173 if test -n "$YACC"; then
2174 echo "$ac_t""$YACC" 1>&6
2175 else
2176 echo "$ac_t""no" 1>&6
2179 test -n "$YACC" && break
2180 done
2181 test -n "$YACC" || YACC="yacc"
2183 if test "x$RANLIB" = x; then
2184 # Extract the first word of "ranlib", so it can be a program name with args.
2185 set dummy ranlib; ac_word=$2
2186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2187 echo "configure:2188: checking for $ac_word" >&5
2188 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2189 echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191 if test -n "$RANLIB"; then
2192 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2193 else
2194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2195 ac_dummy="$PATH"
2196 for ac_dir in $ac_dummy; do
2197 test -z "$ac_dir" && ac_dir=.
2198 if test -f $ac_dir/$ac_word; then
2199 ac_cv_prog_RANLIB="ranlib"
2200 break
2202 done
2203 IFS="$ac_save_ifs"
2204 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2207 RANLIB="$ac_cv_prog_RANLIB"
2208 if test -n "$RANLIB"; then
2209 echo "$ac_t""$RANLIB" 1>&6
2210 else
2211 echo "$ac_t""no" 1>&6
2216 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2217 echo "configure:2218: checking for AIX" >&5
2218 cat > conftest.$ac_ext <<EOF
2219 #line 2220 "configure"
2220 #include "confdefs.h"
2221 #ifdef _AIX
2223 #endif
2226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2227 egrep "yes" >/dev/null 2>&1; then
2228 rm -rf conftest*
2229 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2230 #define _ALL_SOURCE 1
2233 else
2234 rm -rf conftest*
2235 echo "$ac_t""no" 1>&6
2237 rm -f conftest*
2241 # Sound support for GNU/Linux and the free BSDs.
2242 for ac_hdr in machine/soundcard.h sys/soundcard.h
2244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2246 echo "configure:2247: checking for $ac_hdr" >&5
2247 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2248 echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250 cat > conftest.$ac_ext <<EOF
2251 #line 2252 "configure"
2252 #include "confdefs.h"
2253 #include <$ac_hdr>
2255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2256 { (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2258 if test -z "$ac_err"; then
2259 rm -rf conftest*
2260 eval "ac_cv_header_$ac_safe=yes"
2261 else
2262 echo "$ac_err" >&5
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2265 rm -rf conftest*
2266 eval "ac_cv_header_$ac_safe=no"
2268 rm -f conftest*
2270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2271 echo "$ac_t""yes" 1>&6
2272 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2273 cat >> confdefs.h <<EOF
2274 #define $ac_tr_hdr 1
2277 else
2278 echo "$ac_t""no" 1>&6
2280 done
2283 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2284 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2285 termcap.h stdio_ext.h
2287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2289 echo "configure:2290: checking for $ac_hdr" >&5
2290 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293 cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 #include <$ac_hdr>
2298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2299 { (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2301 if test -z "$ac_err"; then
2302 rm -rf conftest*
2303 eval "ac_cv_header_$ac_safe=yes"
2304 else
2305 echo "$ac_err" >&5
2306 echo "configure: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2308 rm -rf conftest*
2309 eval "ac_cv_header_$ac_safe=no"
2311 rm -f conftest*
2313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2314 echo "$ac_t""yes" 1>&6
2315 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2316 cat >> confdefs.h <<EOF
2317 #define $ac_tr_hdr 1
2320 else
2321 echo "$ac_t""no" 1>&6
2323 done
2325 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2326 echo "configure:2327: checking for ANSI C header files" >&5
2327 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
2329 else
2330 cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 #include <stdlib.h>
2334 #include <stdarg.h>
2335 #include <string.h>
2336 #include <float.h>
2338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2339 { (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2341 if test -z "$ac_err"; then
2342 rm -rf conftest*
2343 ac_cv_header_stdc=yes
2344 else
2345 echo "$ac_err" >&5
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 rm -rf conftest*
2349 ac_cv_header_stdc=no
2351 rm -f conftest*
2353 if test $ac_cv_header_stdc = yes; then
2354 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358 #include <string.h>
2360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2361 egrep "memchr" >/dev/null 2>&1; then
2363 else
2364 rm -rf conftest*
2365 ac_cv_header_stdc=no
2367 rm -f conftest*
2371 if test $ac_cv_header_stdc = yes; then
2372 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2373 cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376 #include <stdlib.h>
2378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2379 egrep "free" >/dev/null 2>&1; then
2381 else
2382 rm -rf conftest*
2383 ac_cv_header_stdc=no
2385 rm -f conftest*
2389 if test $ac_cv_header_stdc = yes; then
2390 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2391 if test "$cross_compiling" = yes; then
2393 else
2394 cat > conftest.$ac_ext <<EOF
2395 #line 2396 "configure"
2396 #include "confdefs.h"
2397 #include <ctype.h>
2398 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2399 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2400 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2401 int main () { int i; for (i = 0; i < 256; i++)
2402 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2403 exit (0); }
2406 if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2407 then
2409 else
2410 echo "configure: failed program was:" >&5
2411 cat conftest.$ac_ext >&5
2412 rm -fr conftest*
2413 ac_cv_header_stdc=no
2415 rm -fr conftest*
2421 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2422 if test $ac_cv_header_stdc = yes; then
2423 cat >> confdefs.h <<\EOF
2424 #define STDC_HEADERS 1
2429 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2430 echo "configure:2431: checking whether time.h and sys/time.h may both be included" >&5
2431 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2432 echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434 cat > conftest.$ac_ext <<EOF
2435 #line 2436 "configure"
2436 #include "confdefs.h"
2437 #include <sys/types.h>
2438 #include <sys/time.h>
2439 #include <time.h>
2440 int main() {
2441 struct tm *tp;
2442 ; return 0; }
2444 if { (eval echo configure:2445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2445 rm -rf conftest*
2446 ac_cv_header_time=yes
2447 else
2448 echo "configure: failed program was:" >&5
2449 cat conftest.$ac_ext >&5
2450 rm -rf conftest*
2451 ac_cv_header_time=no
2453 rm -f conftest*
2456 echo "$ac_t""$ac_cv_header_time" 1>&6
2457 if test $ac_cv_header_time = yes; then
2458 cat >> confdefs.h <<\EOF
2459 #define TIME_WITH_SYS_TIME 1
2464 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2465 echo "configure:2466: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2466 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2467 echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 #include <sys/types.h>
2473 #include <signal.h>
2474 /* NetBSD declares sys_siglist in unistd.h. */
2475 #ifdef HAVE_UNISTD_H
2476 #include <unistd.h>
2477 #endif
2478 int main() {
2479 char *msg = *(sys_siglist + 1);
2480 ; return 0; }
2482 if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2483 rm -rf conftest*
2484 ac_cv_decl_sys_siglist=yes
2485 else
2486 echo "configure: failed program was:" >&5
2487 cat conftest.$ac_ext >&5
2488 rm -rf conftest*
2489 ac_cv_decl_sys_siglist=no
2491 rm -f conftest*
2494 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2495 if test $ac_cv_decl_sys_siglist = yes; then
2496 cat >> confdefs.h <<\EOF
2497 #define SYS_SIGLIST_DECLARED 1
2503 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2504 echo "configure:2505: checking for struct utimbuf" >&5
2505 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2506 echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508 cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #ifdef TIME_WITH_SYS_TIME
2512 #include <sys/time.h>
2513 #include <time.h>
2514 #else
2515 #ifdef HAVE_SYS_TIME_H
2516 #include <sys/time.h>
2517 #else
2518 #include <time.h>
2519 #endif
2520 #endif
2521 #ifdef HAVE_UTIME_H
2522 #include <utime.h>
2523 #endif
2524 int main() {
2525 static struct utimbuf x; x.actime = x.modtime;
2526 ; return 0; }
2528 if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2529 rm -rf conftest*
2530 emacs_cv_struct_utimbuf=yes
2531 else
2532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2534 rm -rf conftest*
2535 emacs_cv_struct_utimbuf=no
2537 rm -f conftest*
2540 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2541 if test $emacs_cv_struct_utimbuf = yes; then
2542 cat >> confdefs.h <<\EOF
2543 #define HAVE_STRUCT_UTIMBUF 1
2548 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2549 echo "configure:2550: checking return type of signal handlers" >&5
2550 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2551 echo $ac_n "(cached) $ac_c" 1>&6
2552 else
2553 cat > conftest.$ac_ext <<EOF
2554 #line 2555 "configure"
2555 #include "confdefs.h"
2556 #include <sys/types.h>
2557 #include <signal.h>
2558 #ifdef signal
2559 #undef signal
2560 #endif
2561 #ifdef __cplusplus
2562 extern "C" void (*signal (int, void (*)(int)))(int);
2563 #else
2564 void (*signal ()) ();
2565 #endif
2567 int main() {
2568 int i;
2569 ; return 0; }
2571 if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2572 rm -rf conftest*
2573 ac_cv_type_signal=void
2574 else
2575 echo "configure: failed program was:" >&5
2576 cat conftest.$ac_ext >&5
2577 rm -rf conftest*
2578 ac_cv_type_signal=int
2580 rm -f conftest*
2583 echo "$ac_t""$ac_cv_type_signal" 1>&6
2584 cat >> confdefs.h <<EOF
2585 #define RETSIGTYPE $ac_cv_type_signal
2590 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
2591 echo "configure:2592: checking for speed_t" >&5
2592 if eval "test \"`echo '$''{'emacs_cv_speed_t'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598 #include <termios.h>
2599 int main() {
2600 speed_t x = 1;
2601 ; return 0; }
2603 if { (eval echo configure:2604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2604 rm -rf conftest*
2605 emacs_cv_speed_t=yes
2606 else
2607 echo "configure: failed program was:" >&5
2608 cat conftest.$ac_ext >&5
2610 rm -f conftest*
2613 echo "$ac_t""$emacs_cv_speed_t" 1>&6
2614 if test $emacs_cv_speed_t = yes; then
2615 cat >> confdefs.h <<\EOF
2616 #define HAVE_SPEED_T 1
2621 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
2622 echo "configure:2623: checking for struct timeval" >&5
2623 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2624 echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626 cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629 #ifdef TIME_WITH_SYS_TIME
2630 #include <sys/time.h>
2631 #include <time.h>
2632 #else
2633 #ifdef HAVE_SYS_TIME_H
2634 #include <sys/time.h>
2635 #else
2636 #include <time.h>
2637 #endif
2638 #endif
2639 int main() {
2640 static struct timeval x; x.tv_sec = x.tv_usec;
2641 ; return 0; }
2643 if { (eval echo configure:2644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2644 rm -rf conftest*
2645 emacs_cv_struct_timeval=yes
2646 else
2647 echo "configure: failed program was:" >&5
2648 cat conftest.$ac_ext >&5
2649 rm -rf conftest*
2650 emacs_cv_struct_timeval=no
2652 rm -f conftest*
2655 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2656 HAVE_TIMEVAL=$emacs_cv_struct_timeval
2657 if test $emacs_cv_struct_timeval = yes; then
2658 cat >> confdefs.h <<\EOF
2659 #define HAVE_TIMEVAL 1
2664 echo $ac_n "checking for struct exception""... $ac_c" 1>&6
2665 echo "configure:2666: checking for struct exception" >&5
2666 if eval "test \"`echo '$''{'emacs_cv_struct_exception'+set}'`\" = set"; then
2667 echo $ac_n "(cached) $ac_c" 1>&6
2668 else
2669 cat > conftest.$ac_ext <<EOF
2670 #line 2671 "configure"
2671 #include "confdefs.h"
2672 #include <math.h>
2673 int main() {
2674 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
2675 ; return 0; }
2677 if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2678 rm -rf conftest*
2679 emacs_cv_struct_exception=yes
2680 else
2681 echo "configure: failed program was:" >&5
2682 cat conftest.$ac_ext >&5
2683 rm -rf conftest*
2684 emacs_cv_struct_exception=no
2686 rm -f conftest*
2689 echo "$ac_t""$emacs_cv_struct_exception" 1>&6
2690 HAVE_EXCEPTION=$emacs_cv_struct_exception
2691 if test $emacs_cv_struct_exception != yes; then
2692 cat >> confdefs.h <<\EOF
2693 #define NO_MATHERR 1
2698 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2699 echo "configure:2700: checking whether struct tm is in sys/time.h or time.h" >&5
2700 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2701 echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703 cat > conftest.$ac_ext <<EOF
2704 #line 2705 "configure"
2705 #include "confdefs.h"
2706 #include <sys/types.h>
2707 #include <time.h>
2708 int main() {
2709 struct tm *tp; tp->tm_sec;
2710 ; return 0; }
2712 if { (eval echo configure:2713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2713 rm -rf conftest*
2714 ac_cv_struct_tm=time.h
2715 else
2716 echo "configure: failed program was:" >&5
2717 cat conftest.$ac_ext >&5
2718 rm -rf conftest*
2719 ac_cv_struct_tm=sys/time.h
2721 rm -f conftest*
2724 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2725 if test $ac_cv_struct_tm = sys/time.h; then
2726 cat >> confdefs.h <<\EOF
2727 #define TM_IN_SYS_TIME 1
2732 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2733 echo "configure:2734: checking for tm_zone in struct tm" >&5
2734 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2735 echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737 cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740 #include <sys/types.h>
2741 #include <$ac_cv_struct_tm>
2742 int main() {
2743 struct tm tm; tm.tm_zone;
2744 ; return 0; }
2746 if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2747 rm -rf conftest*
2748 ac_cv_struct_tm_zone=yes
2749 else
2750 echo "configure: failed program was:" >&5
2751 cat conftest.$ac_ext >&5
2752 rm -rf conftest*
2753 ac_cv_struct_tm_zone=no
2755 rm -f conftest*
2758 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2759 if test "$ac_cv_struct_tm_zone" = yes; then
2760 cat >> confdefs.h <<\EOF
2761 #define HAVE_TM_ZONE 1
2764 else
2765 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2766 echo "configure:2767: checking for tzname" >&5
2767 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2768 echo $ac_n "(cached) $ac_c" 1>&6
2769 else
2770 cat > conftest.$ac_ext <<EOF
2771 #line 2772 "configure"
2772 #include "confdefs.h"
2773 #include <time.h>
2774 #ifndef tzname /* For SGI. */
2775 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2776 #endif
2777 int main() {
2778 atoi(*tzname);
2779 ; return 0; }
2781 if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2782 rm -rf conftest*
2783 ac_cv_var_tzname=yes
2784 else
2785 echo "configure: failed program was:" >&5
2786 cat conftest.$ac_ext >&5
2787 rm -rf conftest*
2788 ac_cv_var_tzname=no
2790 rm -f conftest*
2793 echo "$ac_t""$ac_cv_var_tzname" 1>&6
2794 if test $ac_cv_var_tzname = yes; then
2795 cat >> confdefs.h <<\EOF
2796 #define HAVE_TZNAME 1
2802 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2803 echo "configure:2804: checking for tm_gmtoff in struct tm" >&5
2804 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
2805 echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <time.h>
2811 int main() {
2812 struct tm t; t.tm_gmtoff = 0
2813 ; return 0; }
2815 if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2816 rm -rf conftest*
2817 emacs_cv_tm_gmtoff=yes
2818 else
2819 echo "configure: failed program was:" >&5
2820 cat conftest.$ac_ext >&5
2821 rm -rf conftest*
2822 emacs_cv_tm_gmtoff=no
2824 rm -f conftest*
2827 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
2828 if test $emacs_cv_tm_gmtoff = yes; then
2829 cat >> confdefs.h <<\EOF
2830 #define HAVE_TM_GMTOFF 1
2836 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2837 echo "configure:2838: checking for ${CC-cc} option to accept ANSI C" >&5
2838 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
2839 echo $ac_n "(cached) $ac_c" 1>&6
2840 else
2841 ac_cv_prog_cc_stdc=no
2842 ac_save_CC="$CC"
2843 # Don't try gcc -ansi; that turns off useful extensions and
2844 # breaks some systems' header files.
2845 # AIX -qlanglvl=ansi
2846 # Ultrix and OSF/1 -std1
2847 # HP-UX 10.20 and later -Ae
2848 # HP-UX older versions -Aa -D_HPUX_SOURCE
2849 # SVR4 -Xc -D__EXTENSIONS__
2850 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2852 CC="$ac_save_CC $ac_arg"
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856 #include <stdarg.h>
2857 #include <stdio.h>
2858 #include <sys/types.h>
2859 #include <sys/stat.h>
2860 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2861 struct buf { int x; };
2862 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2863 static char *e (p, i)
2864 char **p;
2865 int i;
2867 return p[i];
2869 static char *f (char * (*g) (char **, int), char **p, ...)
2871 char *s;
2872 va_list v;
2873 va_start (v,p);
2874 s = g (p, va_arg (v,int));
2875 va_end (v);
2876 return s;
2878 int test (int i, double x);
2879 struct s1 {int (*f) (int a);};
2880 struct s2 {int (*f) (double a);};
2881 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2882 int argc;
2883 char **argv;
2884 int main() {
2885 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2886 ; return 0; }
2888 if { (eval echo configure:2889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2889 rm -rf conftest*
2890 ac_cv_prog_cc_stdc="$ac_arg"; break
2891 else
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2895 rm -f conftest*
2896 done
2897 CC="$ac_save_CC"
2901 case "x$ac_cv_prog_cc_stdc" in
2902 x|xno)
2903 echo "$ac_t""none needed" 1>&6 ;;
2905 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
2906 CC="$CC $ac_cv_prog_cc_stdc" ;;
2907 esac
2909 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
2910 echo "configure:2911: checking for function prototypes" >&5
2911 if test "$ac_cv_prog_cc_stdc" != no; then
2912 echo "$ac_t""yes" 1>&6
2913 cat >> confdefs.h <<\EOF
2914 #define PROTOTYPES 1
2917 else
2918 echo "$ac_t""no" 1>&6
2921 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
2922 echo "configure:2923: checking for working volatile" >&5
2923 if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
2924 echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926 cat > conftest.$ac_ext <<EOF
2927 #line 2928 "configure"
2928 #include "confdefs.h"
2930 int main() {
2932 volatile int x;
2933 int * volatile y;
2934 ; return 0; }
2936 if { (eval echo configure:2937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2937 rm -rf conftest*
2938 ac_cv_c_volatile=yes
2939 else
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 rm -rf conftest*
2943 ac_cv_c_volatile=no
2945 rm -f conftest*
2948 echo "$ac_t""$ac_cv_c_volatile" 1>&6
2949 if test $ac_cv_c_volatile = no; then
2950 cat >> confdefs.h <<\EOF
2951 #define volatile
2956 echo $ac_n "checking for working const""... $ac_c" 1>&6
2957 echo "configure:2958: checking for working const" >&5
2958 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2959 echo $ac_n "(cached) $ac_c" 1>&6
2960 else
2961 cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2965 int main() {
2967 /* Ultrix mips cc rejects this. */
2968 typedef int charset[2]; const charset x = {0,0};
2969 /* SunOS 4.1.1 cc rejects this. */
2970 char const *const *ccp;
2971 char **p;
2972 /* NEC SVR4.0.2 mips cc rejects this. */
2973 struct point {int x, y;};
2974 static struct point const zero = {0,0};
2975 /* AIX XL C 1.02.0.0 rejects this.
2976 It does not let you subtract one const X* pointer from another in an arm
2977 of an if-expression whose if-part is not a constant expression */
2978 const char *g = "string";
2979 ccp = &g + (g ? g-g : 0);
2980 /* HPUX 7.0 cc rejects these. */
2981 ++ccp;
2982 p = (char**) ccp;
2983 ccp = (char const *const *) p;
2984 { /* SCO 3.2v4 cc rejects this. */
2985 char *t;
2986 char const *s = 0 ? (char *) 0 : (char const *) 0;
2988 *t++ = 0;
2990 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2991 int x[] = {25, 17};
2992 const int *foo = &x[0];
2993 ++foo;
2995 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2996 typedef const int *iptr;
2997 iptr p = 0;
2998 ++p;
3000 { /* AIX XL C 1.02.0.0 rejects this saying
3001 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3002 struct s { int j; const int *ap[3]; };
3003 struct s *b; b->j = 5;
3005 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3006 const int foo = 10;
3009 ; return 0; }
3011 if { (eval echo configure:3012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3012 rm -rf conftest*
3013 ac_cv_c_const=yes
3014 else
3015 echo "configure: failed program was:" >&5
3016 cat conftest.$ac_ext >&5
3017 rm -rf conftest*
3018 ac_cv_c_const=no
3020 rm -f conftest*
3023 echo "$ac_t""$ac_cv_c_const" 1>&6
3024 if test $ac_cv_c_const = no; then
3025 cat >> confdefs.h <<\EOF
3026 #define const
3031 echo $ac_n "checking for void * support""... $ac_c" 1>&6
3032 echo "configure:3033: checking for void * support" >&5
3033 if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
3034 echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036 cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3040 int main() {
3041 void * foo;
3042 ; return 0; }
3044 if { (eval echo configure:3045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3045 rm -rf conftest*
3046 emacs_cv_void_star=yes
3047 else
3048 echo "configure: failed program was:" >&5
3049 cat conftest.$ac_ext >&5
3050 rm -rf conftest*
3051 emacs_cv_void_star=no
3053 rm -f conftest*
3056 echo "$ac_t""$emacs_cv_void_star" 1>&6
3057 if test $emacs_cv_void_star = yes; then
3058 cat >> confdefs.h <<\EOF
3059 #define POINTER_TYPE void
3062 else
3063 cat >> confdefs.h <<\EOF
3064 #define POINTER_TYPE char
3069 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3070 echo "configure:3071: checking whether ${MAKE-make} sets \${MAKE}" >&5
3071 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3072 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3073 echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075 cat > conftestmake <<\EOF
3076 all:
3077 @echo 'ac_maketemp="${MAKE}"'
3079 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3080 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3081 if test -n "$ac_maketemp"; then
3082 eval ac_cv_prog_make_${ac_make}_set=yes
3083 else
3084 eval ac_cv_prog_make_${ac_make}_set=no
3086 rm -f conftestmake
3088 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3089 echo "$ac_t""yes" 1>&6
3090 SET_MAKE=
3091 else
3092 echo "$ac_t""no" 1>&6
3093 SET_MAKE="MAKE=${MAKE-make}"
3097 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3098 echo "configure:3099: checking for long file names" >&5
3099 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3100 echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102 ac_cv_sys_long_file_names=yes
3103 # Test for long file names in all the places we know might matter:
3104 # . the current directory, where building will happen
3105 # $prefix/lib where we will be installing things
3106 # $exec_prefix/lib likewise
3107 # eval it to expand exec_prefix.
3108 # $TMPDIR if set, where it might want to write temporary files
3109 # if $TMPDIR is not set:
3110 # /tmp where it might want to write temporary files
3111 # /var/tmp likewise
3112 # /usr/tmp likewise
3113 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3114 ac_tmpdirs="$TMPDIR"
3115 else
3116 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3118 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3119 test -d $ac_dir || continue
3120 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3121 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3122 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3123 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3124 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3125 ac_cv_sys_long_file_names=no
3126 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3127 break
3129 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3130 done
3133 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3134 if test $ac_cv_sys_long_file_names = yes; then
3135 cat >> confdefs.h <<\EOF
3136 #define HAVE_LONG_FILE_NAMES 1
3142 #### Choose a window system.
3144 # If we find X, set shell vars x_includes and x_libraries to the
3145 # paths, otherwise set no_x=yes.
3146 # Uses ac_ vars as temps to allow command line to override cache and checks.
3147 # --without-x overrides everything else, but does not touch the cache.
3148 echo $ac_n "checking for X""... $ac_c" 1>&6
3149 echo "configure:3150: checking for X" >&5
3151 # Check whether --with-x or --without-x was given.
3152 if test "${with_x+set}" = set; then
3153 withval="$with_x"
3157 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3158 if test "x$with_x" = xno; then
3159 # The user explicitly disabled X.
3160 have_x=disabled
3161 else
3162 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3163 # Both variables are already set.
3164 have_x=yes
3165 else
3166 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3167 echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169 # One or both of the vars are not set, and there is no cached value.
3170 ac_x_includes=NO ac_x_libraries=NO
3171 rm -fr conftestdir
3172 if mkdir conftestdir; then
3173 cd conftestdir
3174 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3175 cat > Imakefile <<'EOF'
3176 acfindx:
3177 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3179 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3180 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3181 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3182 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3183 for ac_extension in a so sl; do
3184 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3185 test -f $ac_im_libdir/libX11.$ac_extension; then
3186 ac_im_usrlibdir=$ac_im_libdir; break
3188 done
3189 # Screen out bogus values from the imake configuration. They are
3190 # bogus both because they are the default anyway, and because
3191 # using them would break gcc on systems where it needs fixed includes.
3192 case "$ac_im_incroot" in
3193 /usr/include) ;;
3194 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3195 esac
3196 case "$ac_im_usrlibdir" in
3197 /usr/lib | /lib) ;;
3198 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3199 esac
3201 cd ..
3202 rm -fr conftestdir
3205 if test "$ac_x_includes" = NO; then
3206 # Guess where to find include files, by looking for this one X11 .h file.
3207 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3209 # First, try using that file with no special directory specified.
3210 cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 #include <$x_direct_test_include>
3215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3216 { (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3218 if test -z "$ac_err"; then
3219 rm -rf conftest*
3220 # We can compile using X headers with no special include directory.
3221 ac_x_includes=
3222 else
3223 echo "$ac_err" >&5
3224 echo "configure: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3226 rm -rf conftest*
3227 # Look for the header file in a standard set of common directories.
3228 # Check X11 before X11Rn because it is often a symlink to the current release.
3229 for ac_dir in \
3230 /usr/X11/include \
3231 /usr/X11R6/include \
3232 /usr/X11R5/include \
3233 /usr/X11R4/include \
3235 /usr/include/X11 \
3236 /usr/include/X11R6 \
3237 /usr/include/X11R5 \
3238 /usr/include/X11R4 \
3240 /usr/local/X11/include \
3241 /usr/local/X11R6/include \
3242 /usr/local/X11R5/include \
3243 /usr/local/X11R4/include \
3245 /usr/local/include/X11 \
3246 /usr/local/include/X11R6 \
3247 /usr/local/include/X11R5 \
3248 /usr/local/include/X11R4 \
3250 /usr/X386/include \
3251 /usr/x386/include \
3252 /usr/XFree86/include/X11 \
3254 /usr/include \
3255 /usr/local/include \
3256 /usr/unsupported/include \
3257 /usr/athena/include \
3258 /usr/local/x11r5/include \
3259 /usr/lpp/Xamples/include \
3261 /usr/openwin/include \
3262 /usr/openwin/share/include \
3265 if test -r "$ac_dir/$x_direct_test_include"; then
3266 ac_x_includes=$ac_dir
3267 break
3269 done
3271 rm -f conftest*
3272 fi # $ac_x_includes = NO
3274 if test "$ac_x_libraries" = NO; then
3275 # Check for the libraries.
3277 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3278 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3280 # See if we find them without any special options.
3281 # Don't add to $LIBS permanently.
3282 ac_save_LIBS="$LIBS"
3283 LIBS="-l$x_direct_test_library $LIBS"
3284 cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3288 int main() {
3289 ${x_direct_test_function}()
3290 ; return 0; }
3292 if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3293 rm -rf conftest*
3294 LIBS="$ac_save_LIBS"
3295 # We can link X programs with no special library path.
3296 ac_x_libraries=
3297 else
3298 echo "configure: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 rm -rf conftest*
3301 LIBS="$ac_save_LIBS"
3302 # First see if replacing the include by lib works.
3303 # Check X11 before X11Rn because it is often a symlink to the current release.
3304 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3305 /usr/X11/lib \
3306 /usr/X11R6/lib \
3307 /usr/X11R5/lib \
3308 /usr/X11R4/lib \
3310 /usr/lib/X11 \
3311 /usr/lib/X11R6 \
3312 /usr/lib/X11R5 \
3313 /usr/lib/X11R4 \
3315 /usr/local/X11/lib \
3316 /usr/local/X11R6/lib \
3317 /usr/local/X11R5/lib \
3318 /usr/local/X11R4/lib \
3320 /usr/local/lib/X11 \
3321 /usr/local/lib/X11R6 \
3322 /usr/local/lib/X11R5 \
3323 /usr/local/lib/X11R4 \
3325 /usr/X386/lib \
3326 /usr/x386/lib \
3327 /usr/XFree86/lib/X11 \
3329 /usr/lib \
3330 /usr/local/lib \
3331 /usr/unsupported/lib \
3332 /usr/athena/lib \
3333 /usr/local/x11r5/lib \
3334 /usr/lpp/Xamples/lib \
3335 /lib/usr/lib/X11 \
3337 /usr/openwin/lib \
3338 /usr/openwin/share/lib \
3341 for ac_extension in a so sl; do
3342 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3343 ac_x_libraries=$ac_dir
3344 break 2
3346 done
3347 done
3349 rm -f conftest*
3350 fi # $ac_x_libraries = NO
3352 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3353 # Didn't find X anywhere. Cache the known absence of X.
3354 ac_cv_have_x="have_x=no"
3355 else
3356 # Record where we found X for the cache.
3357 ac_cv_have_x="have_x=yes \
3358 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3362 eval "$ac_cv_have_x"
3363 fi # $with_x != no
3365 if test "$have_x" != yes; then
3366 echo "$ac_t""$have_x" 1>&6
3367 no_x=yes
3368 else
3369 # If each of the values was on the command line, it overrides each guess.
3370 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3371 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3372 # Update the cache value to reflect the command line values.
3373 ac_cv_have_x="have_x=yes \
3374 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3375 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3378 if test "$no_x" = yes; then
3379 window_system=none
3380 else
3381 window_system=x11
3384 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3385 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3386 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3387 x_default_search_path=""
3388 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3389 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3390 ${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3391 ${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3392 ${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3393 if test x"${x_default_search_path}" = x; then
3394 x_default_search_path=${x_search_path}
3395 else
3396 x_default_search_path="${x_search_path}:${x_default_search_path}"
3398 done
3400 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3401 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3404 if test x"${x_includes}" = x; then
3405 bitmapdir=/usr/include/X11/bitmaps
3406 else
3407 # accumulate include directories that have X11 bitmap subdirectories
3408 bmd_acc="dummyval"
3409 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3410 if test -d "${bmd}/X11/bitmaps"; then
3411 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3413 if test -d "${bmd}/bitmaps"; then
3414 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3416 done
3417 if test ${bmd_acc} != "dummyval"; then
3418 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3422 case "${window_system}" in
3423 x11 )
3424 HAVE_X_WINDOWS=yes
3425 HAVE_X11=yes
3426 case "${with_x_toolkit}" in
3427 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3428 motif ) USE_X_TOOLKIT=MOTIF ;;
3429 no ) USE_X_TOOLKIT=none ;;
3430 * ) USE_X_TOOLKIT=maybe ;;
3431 esac
3433 none )
3434 HAVE_X_WINDOWS=no
3435 HAVE_X11=no
3436 USE_X_TOOLKIT=none
3438 esac
3440 ### If we're using X11, we should use the X menu package.
3441 HAVE_MENUS=no
3442 case ${HAVE_X11} in
3443 yes ) HAVE_MENUS=yes ;;
3444 esac
3446 if test "${opsys}" = "hpux9"; then
3447 case "${x_libraries}" in
3448 *X11R4* )
3449 opsysfile="s/hpux9-x11r4.h"
3451 esac
3454 if test "${opsys}" = "hpux9shr"; then
3455 case "${x_libraries}" in
3456 *X11R4* )
3457 opsysfile="s/hpux9shxr4.h"
3459 esac
3462 #### Extract some information from the operating system and machine files.
3464 echo "checking the machine- and system-dependent files to find out
3465 - which libraries the lib-src programs will want, and
3466 - whether the GNU malloc routines are usable" 1>&6
3467 echo "configure:3468: checking the machine- and system-dependent files to find out
3468 - which libraries the lib-src programs will want, and
3469 - whether the GNU malloc routines are usable" >&5
3471 ### First figure out CFLAGS (which we use for running the compiler here)
3472 ### and REAL_CFLAGS (which we use for real compilation).
3473 ### The two are the same except on a few systems, where they are made
3474 ### different to work around various lossages. For example,
3475 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3476 ### as implying static linking.
3478 ### If the CFLAGS env var is specified, we use that value
3479 ### instead of the default.
3481 ### It's not important that this name contain the PID; you can't run
3482 ### two configures in the same directory and have anything work
3483 ### anyway.
3484 tempcname="conftest.c"
3486 echo '
3487 #include "'${srcdir}'/src/'${opsysfile}'"
3488 #include "'${srcdir}'/src/'${machfile}'"
3489 #ifndef LIBS_MACHINE
3490 #define LIBS_MACHINE
3491 #endif
3492 #ifndef LIBS_SYSTEM
3493 #define LIBS_SYSTEM
3494 #endif
3495 #ifndef C_SWITCH_SYSTEM
3496 #define C_SWITCH_SYSTEM
3497 #endif
3498 #ifndef C_SWITCH_MACHINE
3499 #define C_SWITCH_MACHINE
3500 #endif
3501 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3502 configure___ c_switch_system=C_SWITCH_SYSTEM
3503 configure___ c_switch_machine=C_SWITCH_MACHINE
3505 #ifndef LIB_X11_LIB
3506 #define LIB_X11_LIB -lX11
3507 #endif
3509 #ifndef LIBX11_MACHINE
3510 #define LIBX11_MACHINE
3511 #endif
3513 #ifndef LIBX11_SYSTEM
3514 #define LIBX11_SYSTEM
3515 #endif
3516 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3518 #ifdef UNEXEC
3519 configure___ unexec=UNEXEC
3520 #else
3521 configure___ unexec=unexec.o
3522 #endif
3524 #ifdef SYSTEM_MALLOC
3525 configure___ system_malloc=yes
3526 #else
3527 configure___ system_malloc=no
3528 #endif
3530 #ifndef C_DEBUG_SWITCH
3531 #define C_DEBUG_SWITCH -g
3532 #endif
3534 #ifndef C_OPTIMIZE_SWITCH
3535 #ifdef __GNUC__
3536 #define C_OPTIMIZE_SWITCH -O2
3537 #else
3538 #define C_OPTIMIZE_SWITCH -O
3539 #endif
3540 #endif
3542 #ifndef LD_SWITCH_MACHINE
3543 #define LD_SWITCH_MACHINE
3544 #endif
3546 #ifndef LD_SWITCH_SYSTEM
3547 #define LD_SWITCH_SYSTEM
3548 #endif
3550 #ifndef LD_SWITCH_X_SITE_AUX
3551 #define LD_SWITCH_X_SITE_AUX
3552 #endif
3554 configure___ ld_switch_system=LD_SWITCH_SYSTEM
3555 configure___ ld_switch_machine=LD_SWITCH_MACHINE
3557 #ifdef THIS_IS_CONFIGURE
3559 /* Get the CFLAGS for tests in configure. */
3560 #ifdef __GNUC__
3561 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3562 #else
3563 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3564 #endif
3566 #else /* not THIS_IS_CONFIGURE */
3568 /* Get the CFLAGS for real compilation. */
3569 #ifdef __GNUC__
3570 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3571 #else
3572 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3573 #endif
3575 #endif /* not THIS_IS_CONFIGURE */
3576 ' > ${tempcname}
3578 # The value of CPP is a quoted variable reference, so we need to do this
3579 # to get its actual value...
3580 CPP=`eval "echo $CPP"`
3581 eval `${CPP} -Isrc ${tempcname} \
3582 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3583 if test "x$SPECIFIED_CFLAGS" = x; then
3584 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3585 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3586 else
3587 REAL_CFLAGS="$CFLAGS"
3589 rm ${tempcname}
3591 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3593 ### Compute the unexec source name from the object name.
3594 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3596 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3597 # Assume not, until told otherwise.
3598 GNU_MALLOC=yes
3599 doug_lea_malloc=yes
3600 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3601 echo "configure:3602: checking for malloc_get_state" >&5
3602 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3603 echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 /* System header to define __stub macros and hopefully few prototypes,
3609 which can conflict with char malloc_get_state(); below. */
3610 #include <assert.h>
3611 /* Override any gcc2 internal prototype to avoid an error. */
3612 /* We use char because int might match the return type of a gcc2
3613 builtin and then its argument prototype would still apply. */
3614 char malloc_get_state();
3616 int main() {
3618 /* The GNU C library defines this for functions which it implements
3619 to always fail with ENOSYS. Some functions are actually named
3620 something starting with __ and the normal name is an alias. */
3621 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3622 choke me
3623 #else
3624 malloc_get_state();
3625 #endif
3627 ; return 0; }
3629 if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630 rm -rf conftest*
3631 eval "ac_cv_func_malloc_get_state=yes"
3632 else
3633 echo "configure: failed program was:" >&5
3634 cat conftest.$ac_ext >&5
3635 rm -rf conftest*
3636 eval "ac_cv_func_malloc_get_state=no"
3638 rm -f conftest*
3641 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3642 echo "$ac_t""yes" 1>&6
3644 else
3645 echo "$ac_t""no" 1>&6
3646 doug_lea_malloc=no
3649 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3650 echo "configure:3651: checking for malloc_set_state" >&5
3651 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654 cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 /* System header to define __stub macros and hopefully few prototypes,
3658 which can conflict with char malloc_set_state(); below. */
3659 #include <assert.h>
3660 /* Override any gcc2 internal prototype to avoid an error. */
3661 /* We use char because int might match the return type of a gcc2
3662 builtin and then its argument prototype would still apply. */
3663 char malloc_set_state();
3665 int main() {
3667 /* The GNU C library defines this for functions which it implements
3668 to always fail with ENOSYS. Some functions are actually named
3669 something starting with __ and the normal name is an alias. */
3670 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3671 choke me
3672 #else
3673 malloc_set_state();
3674 #endif
3676 ; return 0; }
3678 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679 rm -rf conftest*
3680 eval "ac_cv_func_malloc_set_state=yes"
3681 else
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3684 rm -rf conftest*
3685 eval "ac_cv_func_malloc_set_state=no"
3687 rm -f conftest*
3690 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3691 echo "$ac_t""yes" 1>&6
3693 else
3694 echo "$ac_t""no" 1>&6
3695 doug_lea_malloc=no
3698 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3699 echo "configure:3700: checking whether __after_morecore_hook exists" >&5
3700 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3701 echo $ac_n "(cached) $ac_c" 1>&6
3702 else
3703 cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706 extern void (* __after_morecore_hook)();
3707 int main() {
3708 __after_morecore_hook = 0
3709 ; return 0; }
3711 if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3712 rm -rf conftest*
3713 emacs_cv_var___after_morecore_hook=yes
3714 else
3715 echo "configure: failed program was:" >&5
3716 cat conftest.$ac_ext >&5
3717 rm -rf conftest*
3718 emacs_cv_var___after_morecore_hook=no
3720 rm -f conftest*
3723 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3724 if test $emacs_cv_var___after_morecore_hook = no; then
3725 doug_lea_malloc=no
3727 if test "${system_malloc}" = "yes"; then
3728 GNU_MALLOC=no
3729 GNU_MALLOC_reason="
3730 (The GNU allocators don't work with this system configuration.)"
3732 if test "$doug_lea_malloc" = "yes" ; then
3733 if test "$GNU_MALLOC" = yes ; then
3734 GNU_MALLOC_reason="
3735 (Using Doug Lea's new malloc from the GNU C Library.)"
3737 cat >> confdefs.h <<\EOF
3738 #define DOUG_LEA_MALLOC 1
3743 if test x"${REL_ALLOC}" = x; then
3744 REL_ALLOC=${GNU_MALLOC}
3747 #### Add the libraries to LIBS and check for some functions.
3749 if test x"${OVERRIDE_CPPFLAGS}" != x; then
3750 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3751 else
3752 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3755 LIBS="$libsrc_libs $LIBS"
3757 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3758 echo "configure:3759: checking for dnet_ntoa in -ldnet" >&5
3759 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3760 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3761 echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763 ac_save_LIBS="$LIBS"
3764 LIBS="-ldnet $LIBS"
3765 cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 /* Override any gcc2 internal prototype to avoid an error. */
3769 /* We use char because int might match the return type of a gcc2
3770 builtin and then its argument prototype would still apply. */
3771 char dnet_ntoa();
3773 int main() {
3774 dnet_ntoa()
3775 ; return 0; }
3777 if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3778 rm -rf conftest*
3779 eval "ac_cv_lib_$ac_lib_var=yes"
3780 else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 rm -rf conftest*
3784 eval "ac_cv_lib_$ac_lib_var=no"
3786 rm -f conftest*
3787 LIBS="$ac_save_LIBS"
3790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3791 echo "$ac_t""yes" 1>&6
3792 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3793 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3794 cat >> confdefs.h <<EOF
3795 #define $ac_tr_lib 1
3798 LIBS="-ldnet $LIBS"
3800 else
3801 echo "$ac_t""no" 1>&6
3805 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
3806 echo "configure:3807: checking for main in -lXbsd" >&5
3807 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3808 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3809 echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811 ac_save_LIBS="$LIBS"
3812 LIBS="-lXbsd $LIBS"
3813 cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3817 int main() {
3818 main()
3819 ; return 0; }
3821 if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3822 rm -rf conftest*
3823 eval "ac_cv_lib_$ac_lib_var=yes"
3824 else
3825 echo "configure: failed program was:" >&5
3826 cat conftest.$ac_ext >&5
3827 rm -rf conftest*
3828 eval "ac_cv_lib_$ac_lib_var=no"
3830 rm -f conftest*
3831 LIBS="$ac_save_LIBS"
3834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3835 echo "$ac_t""yes" 1>&6
3836 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3837 else
3838 echo "$ac_t""no" 1>&6
3842 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
3843 echo "configure:3844: checking for cma_open in -lpthreads" >&5
3844 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3845 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848 ac_save_LIBS="$LIBS"
3849 LIBS="-lpthreads $LIBS"
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 /* Override any gcc2 internal prototype to avoid an error. */
3854 /* We use char because int might match the return type of a gcc2
3855 builtin and then its argument prototype would still apply. */
3856 char cma_open();
3858 int main() {
3859 cma_open()
3860 ; return 0; }
3862 if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3863 rm -rf conftest*
3864 eval "ac_cv_lib_$ac_lib_var=yes"
3865 else
3866 echo "configure: failed program was:" >&5
3867 cat conftest.$ac_ext >&5
3868 rm -rf conftest*
3869 eval "ac_cv_lib_$ac_lib_var=no"
3871 rm -f conftest*
3872 LIBS="$ac_save_LIBS"
3875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3876 echo "$ac_t""yes" 1>&6
3877 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3878 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3879 cat >> confdefs.h <<EOF
3880 #define $ac_tr_lib 1
3883 LIBS="-lpthreads $LIBS"
3885 else
3886 echo "$ac_t""no" 1>&6
3890 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
3891 echo "configure:3892: checking for XFree86 in /usr/X386" >&5
3892 if test -d /usr/X386/include; then
3893 HAVE_XFREE386=yes
3894 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3895 else
3896 HAVE_XFREE386=no
3898 echo "$ac_t""$HAVE_XFREE386" 1>&6
3900 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3901 # for the tests that follow. We set it back to REAL_CFLAGS later on.
3903 if test "${HAVE_X11}" = "yes"; then
3904 DEFS="$C_SWITCH_X_SITE $DEFS"
3905 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3906 LIBS="$LIBX $LIBS"
3907 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3909 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3910 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3911 # but it's more convenient here to set LD_RUN_PATH
3912 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3913 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3914 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3915 export LD_RUN_PATH
3918 if test "${opsys}" = "gnu-linux"; then
3919 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
3920 echo "configure:3921: checking whether X on GNU/Linux needs -b to link" >&5
3921 cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3925 int main() {
3926 XOpenDisplay ("foo");
3927 ; return 0; }
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930 rm -rf conftest*
3931 xlinux_first_failure=no
3932 else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 xlinux_first_failure=yes
3938 rm -f conftest*
3939 if test "${xlinux_first_failure}" = "yes"; then
3940 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3941 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3942 OLD_CPPFLAGS="$CPPFLAGS"
3943 OLD_LIBS="$LIBS"
3944 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3945 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3946 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3947 LIBS="$LIBS -b i486-linuxaout"
3948 cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3952 int main() {
3953 XOpenDisplay ("foo");
3954 ; return 0; }
3956 if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3957 rm -rf conftest*
3958 xlinux_second_failure=no
3959 else
3960 echo "configure: failed program was:" >&5
3961 cat conftest.$ac_ext >&5
3962 rm -rf conftest*
3963 xlinux_second_failure=yes
3965 rm -f conftest*
3966 if test "${xlinux_second_failure}" = "yes"; then
3967 # If we get the same failure with -b, there is no use adding -b.
3968 # So take it out. This plays safe.
3969 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3970 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3971 CPPFLAGS="$OLD_CPPFLAGS"
3972 LIBS="$OLD_LIBS"
3973 echo "$ac_t""no" 1>&6
3974 else
3975 echo "$ac_t""yes" 1>&6
3977 else
3978 echo "$ac_t""no" 1>&6
3982 for ac_func in XrmSetDatabase XScreenResourceString \
3983 XScreenNumberOfScreen XSetWMProtocols
3985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3986 echo "configure:3987: checking for $ac_func" >&5
3987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3988 echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 /* System header to define __stub macros and hopefully few prototypes,
3994 which can conflict with char $ac_func(); below. */
3995 #include <assert.h>
3996 /* Override any gcc2 internal prototype to avoid an error. */
3997 /* We use char because int might match the return type of a gcc2
3998 builtin and then its argument prototype would still apply. */
3999 char $ac_func();
4001 int main() {
4003 /* The GNU C library defines this for functions which it implements
4004 to always fail with ENOSYS. Some functions are actually named
4005 something starting with __ and the normal name is an alias. */
4006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4007 choke me
4008 #else
4009 $ac_func();
4010 #endif
4012 ; return 0; }
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015 rm -rf conftest*
4016 eval "ac_cv_func_$ac_func=yes"
4017 else
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
4020 rm -rf conftest*
4021 eval "ac_cv_func_$ac_func=no"
4023 rm -f conftest*
4026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4027 echo "$ac_t""yes" 1>&6
4028 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4029 cat >> confdefs.h <<EOF
4030 #define $ac_tr_func 1
4033 else
4034 echo "$ac_t""no" 1>&6
4036 done
4040 if test "${window_system}" = "x11"; then
4041 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
4042 echo "configure:4043: checking X11 version 6" >&5
4043 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4044 echo $ac_n "(cached) $ac_c" 1>&6
4045 else
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <X11/Xlib.h>
4050 int main() {
4051 #if XlibSpecificationRelease < 6
4052 fail;
4053 #endif
4055 ; return 0; }
4057 if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4058 rm -rf conftest*
4059 emacs_cv_x11_version_6=yes
4060 else
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063 rm -rf conftest*
4064 emacs_cv_x11_version_6=no
4066 rm -f conftest*
4069 if test $emacs_cv_x11_version_6 = yes; then
4070 echo "$ac_t""6 or newer" 1>&6
4071 cat >> confdefs.h <<\EOF
4072 #define HAVE_X11R6 1
4075 else
4076 echo "$ac_t""before 6" 1>&6
4080 if test "${window_system}" = "x11"; then
4081 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
4082 echo "configure:4083: checking X11 version 5" >&5
4083 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4084 echo $ac_n "(cached) $ac_c" 1>&6
4085 else
4086 cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4089 #include <X11/Xlib.h>
4090 int main() {
4091 #if XlibSpecificationRelease < 5
4092 fail;
4093 #endif
4095 ; return 0; }
4097 if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4098 rm -rf conftest*
4099 emacs_cv_x11_version_5=yes
4100 else
4101 echo "configure: failed program was:" >&5
4102 cat conftest.$ac_ext >&5
4103 rm -rf conftest*
4104 emacs_cv_x11_version_5=no
4106 rm -f conftest*
4109 if test $emacs_cv_x11_version_5 = yes; then
4110 echo "$ac_t""5 or newer" 1>&6
4111 HAVE_X11R5=yes
4112 cat >> confdefs.h <<\EOF
4113 #define HAVE_X11R5 1
4116 else
4117 HAVE_X11R5=no
4118 echo "$ac_t""before 5" 1>&6
4122 if test x"${USE_X_TOOLKIT}" = xmaybe; then
4123 if test x"${HAVE_X11R5}" = xyes; then
4124 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
4125 echo "configure:4126: checking X11 version 5 with Xaw" >&5
4126 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4127 echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4133 #include <X11/Intrinsic.h>
4134 #include <X11/Xaw/Simple.h>
4135 int main() {
4137 ; return 0; }
4139 if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4140 rm -rf conftest*
4141 emacs_cv_x11_version_5_with_xaw=yes
4142 else
4143 echo "configure: failed program was:" >&5
4144 cat conftest.$ac_ext >&5
4145 rm -rf conftest*
4146 emacs_cv_x11_version_5_with_xaw=no
4148 rm -f conftest*
4151 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4152 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4153 USE_X_TOOLKIT=LUCID
4154 else
4155 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4156 USE_X_TOOLKIT=none
4158 else
4159 USE_X_TOOLKIT=none
4163 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4165 if test "${USE_X_TOOLKIT}" != "none"; then
4166 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
4167 echo "configure:4168: checking X11 toolkit version" >&5
4168 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4169 echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171 cat > conftest.$ac_ext <<EOF
4172 #line 4173 "configure"
4173 #include "confdefs.h"
4174 #include <X11/Intrinsic.h>
4175 int main() {
4176 #if XtSpecificationRelease < 6
4177 fail;
4178 #endif
4180 ; return 0; }
4182 if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4183 rm -rf conftest*
4184 emacs_cv_x11_toolkit_version_6=yes
4185 else
4186 echo "configure: failed program was:" >&5
4187 cat conftest.$ac_ext >&5
4188 rm -rf conftest*
4189 emacs_cv_x11_toolkit_version_6=no
4191 rm -f conftest*
4194 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4195 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4196 echo "$ac_t""6 or newer" 1>&6
4197 cat >> confdefs.h <<\EOF
4198 #define HAVE_X11XTR6 1
4201 else
4202 echo "$ac_t""before 6" 1>&6
4205 OLDLIBS="$LIBS"
4206 if test x$HAVE_X11XTR6 = xyes; then
4207 LIBS="-lXt -lSM -lICE $LIBS"
4208 else
4209 LIBS="-lXt $LIBS"
4211 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
4212 echo "configure:4213: checking for XmuConvertStandardSelection in -lXmu" >&5
4213 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4214 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4215 echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217 ac_save_LIBS="$LIBS"
4218 LIBS="-lXmu $LIBS"
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 /* Override any gcc2 internal prototype to avoid an error. */
4223 /* We use char because int might match the return type of a gcc2
4224 builtin and then its argument prototype would still apply. */
4225 char XmuConvertStandardSelection();
4227 int main() {
4228 XmuConvertStandardSelection()
4229 ; return 0; }
4231 if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4232 rm -rf conftest*
4233 eval "ac_cv_lib_$ac_lib_var=yes"
4234 else
4235 echo "configure: failed program was:" >&5
4236 cat conftest.$ac_ext >&5
4237 rm -rf conftest*
4238 eval "ac_cv_lib_$ac_lib_var=no"
4240 rm -f conftest*
4241 LIBS="$ac_save_LIBS"
4244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4245 echo "$ac_t""yes" 1>&6
4246 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4247 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4248 cat >> confdefs.h <<EOF
4249 #define $ac_tr_lib 1
4252 LIBS="-lXmu $LIBS"
4254 else
4255 echo "$ac_t""no" 1>&6
4258 LIBS="$OLDLIBS"
4261 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4262 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
4263 echo "configure:4264: checking for Motif version 2.1" >&5
4264 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4265 echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #include <Xm/Xm.h>
4271 int main() {
4272 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4273 int x = 5;
4274 #else
4275 Motif version prior to 2.1.
4276 #endif
4277 ; return 0; }
4279 if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4280 rm -rf conftest*
4281 emacs_cv_motif_version_2_1=yes
4282 else
4283 echo "configure: failed program was:" >&5
4284 cat conftest.$ac_ext >&5
4285 rm -rf conftest*
4286 emacs_cv_motif_version_2_1=no
4288 rm -f conftest*
4291 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4292 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4293 if test $emacs_cv_motif_version_2_1 = yes; then
4294 cat >> confdefs.h <<\EOF
4295 #define HAVE_MOTIF_2_1 1
4298 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4299 echo "configure:4300: checking for XpCreateContext in -lXp" >&5
4300 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4302 echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304 ac_save_LIBS="$LIBS"
4305 LIBS="-lXp $LIBS"
4306 cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 /* Override any gcc2 internal prototype to avoid an error. */
4310 /* We use char because int might match the return type of a gcc2
4311 builtin and then its argument prototype would still apply. */
4312 char XpCreateContext();
4314 int main() {
4315 XpCreateContext()
4316 ; return 0; }
4318 if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4319 rm -rf conftest*
4320 eval "ac_cv_lib_$ac_lib_var=yes"
4321 else
4322 echo "configure: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
4324 rm -rf conftest*
4325 eval "ac_cv_lib_$ac_lib_var=no"
4327 rm -f conftest*
4328 LIBS="$ac_save_LIBS"
4331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4332 echo "$ac_t""yes" 1>&6
4333 ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4334 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4335 cat >> confdefs.h <<EOF
4336 #define $ac_tr_lib 1
4339 LIBS="-lXp $LIBS"
4341 else
4342 echo "$ac_t""no" 1>&6
4348 ### Is -lXaw3d available?
4349 HAVE_XAW3D=no
4350 if test "${HAVE_X11}" = "yes"; then
4351 if test "${USE_X_TOOLKIT}" != "none"; then
4352 old_c_flags="${CFLAGS}"
4353 CFLAGS="${LD_SWITCH_X_SITE}"
4354 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4355 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4356 echo "configure:4357: checking for X11/Xaw3d/Scrollbar.h" >&5
4357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4358 echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360 cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <X11/Xaw3d/Scrollbar.h>
4365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4366 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4368 if test -z "$ac_err"; then
4369 rm -rf conftest*
4370 eval "ac_cv_header_$ac_safe=yes"
4371 else
4372 echo "$ac_err" >&5
4373 echo "configure: failed program was:" >&5
4374 cat conftest.$ac_ext >&5
4375 rm -rf conftest*
4376 eval "ac_cv_header_$ac_safe=no"
4378 rm -f conftest*
4380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4381 echo "$ac_t""yes" 1>&6
4382 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
4383 echo "configure:4384: checking for XawScrollbarSetThumb in -lXaw3d" >&5
4384 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4385 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4386 echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388 ac_save_LIBS="$LIBS"
4389 LIBS="-lXaw3d -lX11 $LIBS"
4390 cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 /* Override any gcc2 internal prototype to avoid an error. */
4394 /* We use char because int might match the return type of a gcc2
4395 builtin and then its argument prototype would still apply. */
4396 char XawScrollbarSetThumb();
4398 int main() {
4399 XawScrollbarSetThumb()
4400 ; return 0; }
4402 if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4403 rm -rf conftest*
4404 eval "ac_cv_lib_$ac_lib_var=yes"
4405 else
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 rm -rf conftest*
4409 eval "ac_cv_lib_$ac_lib_var=no"
4411 rm -f conftest*
4412 LIBS="$ac_save_LIBS"
4415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4416 echo "$ac_t""yes" 1>&6
4417 HAVE_XAW3D=yes
4418 else
4419 echo "$ac_t""no" 1>&6
4422 else
4423 echo "$ac_t""no" 1>&6
4426 CFLAGS="${old_c_flags}"
4428 if test "${HAVE_XAW3D}" = "yes"; then
4429 cat >> confdefs.h <<\EOF
4430 #define HAVE_XAW3D 1
4438 USE_TOOLKIT_SCROLL_BARS=no
4439 if test "${with_toolkit_scroll_bars}" != "no"; then
4440 if test "${USE_X_TOOLKIT}" != "none"; then
4441 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4442 cat >> confdefs.h <<\EOF
4443 #define USE_TOOLKIT_SCROLL_BARS 1
4446 HAVE_XAW3D=no
4447 USE_TOOLKIT_SCROLL_BARS=yes
4448 elif test "${HAVE_XAW3D}" = "yes"; then
4449 cat >> confdefs.h <<\EOF
4450 #define USE_TOOLKIT_SCROLL_BARS 1
4453 USE_TOOLKIT_SCROLL_BARS=yes
4458 ### Use -lXpm if available, unless `--with-xpm=no'.
4459 HAVE_XPM=no
4460 if test "${HAVE_X11}" = "yes"; then
4461 if test "${with_xpm}" != "no"; then
4462 old_c_flags="${CFLAGS}"
4463 CFLAGS="${LD_SWITCH_X_SITE}"
4464 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4465 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
4466 echo "configure:4467: checking for X11/xpm.h" >&5
4467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4468 echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473 #include <X11/xpm.h>
4475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4476 { (eval echo configure:4477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4478 if test -z "$ac_err"; then
4479 rm -rf conftest*
4480 eval "ac_cv_header_$ac_safe=yes"
4481 else
4482 echo "$ac_err" >&5
4483 echo "configure: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
4485 rm -rf conftest*
4486 eval "ac_cv_header_$ac_safe=no"
4488 rm -f conftest*
4490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6
4492 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
4493 echo "configure:4494: checking for XpmReadFileToPixmap in -lXpm" >&5
4494 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4496 echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498 ac_save_LIBS="$LIBS"
4499 LIBS="-lXpm -lX11 $LIBS"
4500 cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4503 /* Override any gcc2 internal prototype to avoid an error. */
4504 /* We use char because int might match the return type of a gcc2
4505 builtin and then its argument prototype would still apply. */
4506 char XpmReadFileToPixmap();
4508 int main() {
4509 XpmReadFileToPixmap()
4510 ; return 0; }
4512 if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4513 rm -rf conftest*
4514 eval "ac_cv_lib_$ac_lib_var=yes"
4515 else
4516 echo "configure: failed program was:" >&5
4517 cat conftest.$ac_ext >&5
4518 rm -rf conftest*
4519 eval "ac_cv_lib_$ac_lib_var=no"
4521 rm -f conftest*
4522 LIBS="$ac_save_LIBS"
4525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4526 echo "$ac_t""yes" 1>&6
4527 HAVE_XPM=yes
4528 else
4529 echo "$ac_t""no" 1>&6
4532 else
4533 echo "$ac_t""no" 1>&6
4536 CFLAGS="${old_c_flags}"
4539 if test "${HAVE_XPM}" = "yes"; then
4540 cat >> confdefs.h <<\EOF
4541 #define HAVE_XPM 1
4547 ### Use -ljpeg if available, unless `--with-jpeg=no'.
4548 HAVE_JPEG=no
4549 if test "${HAVE_X11}" = "yes"; then
4550 if test "${with_jpeg}" != "no"; then
4551 old_c_flags="${CFLAGS}"
4552 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4553 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
4554 echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
4555 echo "configure:4556: checking for jerror.h" >&5
4556 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4557 echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <jerror.h>
4564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4565 { (eval echo configure:4566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4567 if test -z "$ac_err"; then
4568 rm -rf conftest*
4569 eval "ac_cv_header_$ac_safe=yes"
4570 else
4571 echo "$ac_err" >&5
4572 echo "configure: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 rm -rf conftest*
4575 eval "ac_cv_header_$ac_safe=no"
4577 rm -f conftest*
4579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4580 echo "$ac_t""yes" 1>&6
4581 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
4582 echo "configure:4583: checking for jpeg_destroy_compress in -ljpeg" >&5
4583 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4585 echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587 ac_save_LIBS="$LIBS"
4588 LIBS="-ljpeg -lX11 $LIBS"
4589 cat > conftest.$ac_ext <<EOF
4590 #line 4591 "configure"
4591 #include "confdefs.h"
4592 /* Override any gcc2 internal prototype to avoid an error. */
4593 /* We use char because int might match the return type of a gcc2
4594 builtin and then its argument prototype would still apply. */
4595 char jpeg_destroy_compress();
4597 int main() {
4598 jpeg_destroy_compress()
4599 ; return 0; }
4601 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4602 rm -rf conftest*
4603 eval "ac_cv_lib_$ac_lib_var=yes"
4604 else
4605 echo "configure: failed program was:" >&5
4606 cat conftest.$ac_ext >&5
4607 rm -rf conftest*
4608 eval "ac_cv_lib_$ac_lib_var=no"
4610 rm -f conftest*
4611 LIBS="$ac_save_LIBS"
4614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4615 echo "$ac_t""yes" 1>&6
4616 HAVE_JPEG=yes
4617 else
4618 echo "$ac_t""no" 1>&6
4621 else
4622 echo "$ac_t""no" 1>&6
4625 CFLAGS="${old_c_flags}"
4628 if test "${HAVE_JPEG}" = "yes"; then
4629 cat >> confdefs.h <<\EOF
4630 #define HAVE_JPEG 1
4636 ### Use -lpng if available, unless `--with-png=no'.
4637 HAVE_PNG=no
4638 if test "${HAVE_X11}" = "yes"; then
4639 if test "${with_png}" != "no"; then
4640 old_c_flags="${CFLAGS}"
4641 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4642 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4643 echo $ac_n "checking for png.h""... $ac_c" 1>&6
4644 echo "configure:4645: checking for png.h" >&5
4645 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4646 echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648 cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 #include <png.h>
4653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4654 { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4656 if test -z "$ac_err"; then
4657 rm -rf conftest*
4658 eval "ac_cv_header_$ac_safe=yes"
4659 else
4660 echo "$ac_err" >&5
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 eval "ac_cv_header_$ac_safe=no"
4666 rm -f conftest*
4668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4669 echo "$ac_t""yes" 1>&6
4670 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
4671 echo "configure:4672: checking for png_set_expand in -lpng" >&5
4672 ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4674 echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676 ac_save_LIBS="$LIBS"
4677 LIBS="-lpng -lX11 -lz -lm $LIBS"
4678 cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 /* Override any gcc2 internal prototype to avoid an error. */
4682 /* We use char because int might match the return type of a gcc2
4683 builtin and then its argument prototype would still apply. */
4684 char png_set_expand();
4686 int main() {
4687 png_set_expand()
4688 ; return 0; }
4690 if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691 rm -rf conftest*
4692 eval "ac_cv_lib_$ac_lib_var=yes"
4693 else
4694 echo "configure: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 rm -rf conftest*
4697 eval "ac_cv_lib_$ac_lib_var=no"
4699 rm -f conftest*
4700 LIBS="$ac_save_LIBS"
4703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4704 echo "$ac_t""yes" 1>&6
4705 HAVE_PNG=yes
4706 else
4707 echo "$ac_t""no" 1>&6
4710 else
4711 echo "$ac_t""no" 1>&6
4714 CFLAGS="${old_c_flags}"
4717 if test "${HAVE_PNG}" = "yes"; then
4718 cat >> confdefs.h <<\EOF
4719 #define HAVE_PNG 1
4725 ### Use -ltiff if available, unless `--with-tiff=no'.
4726 HAVE_TIFF=no
4727 if test "${HAVE_X11}" = "yes"; then
4728 if test "${with_tiff}" != "no"; then
4729 old_c_flags="${CFLAGS}"
4730 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4731 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4732 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
4733 echo "configure:4734: checking for tiffio.h" >&5
4734 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4735 echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737 cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 #include <tiffio.h>
4742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4743 { (eval echo configure:4744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4745 if test -z "$ac_err"; then
4746 rm -rf conftest*
4747 eval "ac_cv_header_$ac_safe=yes"
4748 else
4749 echo "$ac_err" >&5
4750 echo "configure: failed program was:" >&5
4751 cat conftest.$ac_ext >&5
4752 rm -rf conftest*
4753 eval "ac_cv_header_$ac_safe=no"
4755 rm -f conftest*
4757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4758 echo "$ac_t""yes" 1>&6
4759 tifflibs="-lX11 -lz -lm"
4760 # At least one tiff package requires the jpeg library.
4761 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
4762 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
4763 echo "configure:4764: checking for TIFFGetVersion in -ltiff" >&5
4764 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4766 echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768 ac_save_LIBS="$LIBS"
4769 LIBS="-ltiff $tifflibs $LIBS"
4770 cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773 /* Override any gcc2 internal prototype to avoid an error. */
4774 /* We use char because int might match the return type of a gcc2
4775 builtin and then its argument prototype would still apply. */
4776 char TIFFGetVersion();
4778 int main() {
4779 TIFFGetVersion()
4780 ; return 0; }
4782 if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783 rm -rf conftest*
4784 eval "ac_cv_lib_$ac_lib_var=yes"
4785 else
4786 echo "configure: failed program was:" >&5
4787 cat conftest.$ac_ext >&5
4788 rm -rf conftest*
4789 eval "ac_cv_lib_$ac_lib_var=no"
4791 rm -f conftest*
4792 LIBS="$ac_save_LIBS"
4795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4796 echo "$ac_t""yes" 1>&6
4797 HAVE_TIFF=yes
4798 else
4799 echo "$ac_t""no" 1>&6
4802 else
4803 echo "$ac_t""no" 1>&6
4806 CFLAGS="${old_c_flags}"
4809 if test "${HAVE_TIFF}" = "yes"; then
4810 cat >> confdefs.h <<\EOF
4811 #define HAVE_TIFF 1
4817 ### Use -lgif if available, unless `--with-gif=no'.
4818 HAVE_GIF=no
4819 if test "${HAVE_X11}" = "yes"; then
4820 if test "${with_gif}" != "no"; then
4821 old_c_flags="${CFLAGS}"
4822 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4823 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4824 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
4825 echo "configure:4826: checking for gif_lib.h" >&5
4826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4827 echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829 cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <gif_lib.h>
4834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4835 { (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4837 if test -z "$ac_err"; then
4838 rm -rf conftest*
4839 eval "ac_cv_header_$ac_safe=yes"
4840 else
4841 echo "$ac_err" >&5
4842 echo "configure: failed program was:" >&5
4843 cat conftest.$ac_ext >&5
4844 rm -rf conftest*
4845 eval "ac_cv_header_$ac_safe=no"
4847 rm -f conftest*
4849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4850 echo "$ac_t""yes" 1>&6
4851 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
4852 echo "configure:4853: checking for DGifOpen in -lungif" >&5
4853 ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
4854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4855 echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857 ac_save_LIBS="$LIBS"
4858 LIBS="-lungif -lX11 $LIBS"
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 /* Override any gcc2 internal prototype to avoid an error. */
4863 /* We use char because int might match the return type of a gcc2
4864 builtin and then its argument prototype would still apply. */
4865 char DGifOpen();
4867 int main() {
4868 DGifOpen()
4869 ; return 0; }
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872 rm -rf conftest*
4873 eval "ac_cv_lib_$ac_lib_var=yes"
4874 else
4875 echo "configure: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4877 rm -rf conftest*
4878 eval "ac_cv_lib_$ac_lib_var=no"
4880 rm -f conftest*
4881 LIBS="$ac_save_LIBS"
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4885 echo "$ac_t""yes" 1>&6
4886 HAVE_GIF=yes
4887 else
4888 echo "$ac_t""no" 1>&6
4891 else
4892 echo "$ac_t""no" 1>&6
4895 CFLAGS="${old_c_flags}"
4898 if test "${HAVE_GIF}" = "yes"; then
4899 cat >> confdefs.h <<\EOF
4900 #define HAVE_GIF 1
4906 # If netdb.h doesn't declare h_errno, we must declare it by hand.
4907 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
4908 echo "configure:4909: checking whether netdb declares h_errno" >&5
4909 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912 cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 #include <netdb.h>
4916 int main() {
4917 return h_errno;
4918 ; return 0; }
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921 rm -rf conftest*
4922 emacs_cv_netdb_declares_h_errno=yes
4923 else
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926 rm -rf conftest*
4927 emacs_cv_netdb_declares_h_errno=no
4929 rm -f conftest*
4932 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4933 if test $emacs_cv_netdb_declares_h_errno = yes; then
4934 cat >> confdefs.h <<\EOF
4935 #define HAVE_H_ERRNO 1
4940 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4941 # for constant arguments. Useless!
4942 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4943 echo "configure:4944: checking for working alloca.h" >&5
4944 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4945 echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4947 cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950 #include <alloca.h>
4951 int main() {
4952 void *p = alloca(2 * sizeof(int));
4953 ; return 0; }
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956 rm -rf conftest*
4957 ac_cv_header_alloca_h=yes
4958 else
4959 echo "configure: failed program was:" >&5
4960 cat conftest.$ac_ext >&5
4961 rm -rf conftest*
4962 ac_cv_header_alloca_h=no
4964 rm -f conftest*
4967 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4968 if test $ac_cv_header_alloca_h = yes; then
4969 cat >> confdefs.h <<\EOF
4970 #define HAVE_ALLOCA_H 1
4975 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4976 echo "configure:4977: checking for alloca" >&5
4977 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4978 echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4984 #ifdef __GNUC__
4985 # define alloca __builtin_alloca
4986 #else
4987 # ifdef _MSC_VER
4988 # include <malloc.h>
4989 # define alloca _alloca
4990 # else
4991 # if HAVE_ALLOCA_H
4992 # include <alloca.h>
4993 # else
4994 # ifdef _AIX
4995 #pragma alloca
4996 # else
4997 # ifndef alloca /* predefined by HP cc +Olibcalls */
4998 char *alloca ();
4999 # endif
5000 # endif
5001 # endif
5002 # endif
5003 #endif
5005 int main() {
5006 char *p = (char *) alloca(1);
5007 ; return 0; }
5009 if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010 rm -rf conftest*
5011 ac_cv_func_alloca_works=yes
5012 else
5013 echo "configure: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
5015 rm -rf conftest*
5016 ac_cv_func_alloca_works=no
5018 rm -f conftest*
5021 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5022 if test $ac_cv_func_alloca_works = yes; then
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_ALLOCA 1
5029 if test $ac_cv_func_alloca_works = no; then
5030 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5031 # that cause trouble. Some versions do not even contain alloca or
5032 # contain a buggy version. If you still want to use their alloca,
5033 # use ar to extract alloca.o from them instead of compiling alloca.c.
5034 ALLOCA=alloca.${ac_objext}
5035 cat >> confdefs.h <<\EOF
5036 #define C_ALLOCA 1
5040 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5041 echo "configure:5042: checking whether alloca needs Cray hooks" >&5
5042 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5043 echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045 cat > conftest.$ac_ext <<EOF
5046 #line 5047 "configure"
5047 #include "confdefs.h"
5048 #if defined(CRAY) && ! defined(CRAY2)
5049 webecray
5050 #else
5051 wenotbecray
5052 #endif
5055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5056 egrep "webecray" >/dev/null 2>&1; then
5057 rm -rf conftest*
5058 ac_cv_os_cray=yes
5059 else
5060 rm -rf conftest*
5061 ac_cv_os_cray=no
5063 rm -f conftest*
5067 echo "$ac_t""$ac_cv_os_cray" 1>&6
5068 if test $ac_cv_os_cray = yes; then
5069 for ac_func in _getb67 GETB67 getb67; do
5070 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5071 echo "configure:5072: checking for $ac_func" >&5
5072 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5073 echo $ac_n "(cached) $ac_c" 1>&6
5074 else
5075 cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079 which can conflict with char $ac_func(); below. */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error. */
5082 /* We use char because int might match the return type of a gcc2
5083 builtin and then its argument prototype would still apply. */
5084 char $ac_func();
5086 int main() {
5088 /* The GNU C library defines this for functions which it implements
5089 to always fail with ENOSYS. Some functions are actually named
5090 something starting with __ and the normal name is an alias. */
5091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5092 choke me
5093 #else
5094 $ac_func();
5095 #endif
5097 ; return 0; }
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100 rm -rf conftest*
5101 eval "ac_cv_func_$ac_func=yes"
5102 else
5103 echo "configure: failed program was:" >&5
5104 cat conftest.$ac_ext >&5
5105 rm -rf conftest*
5106 eval "ac_cv_func_$ac_func=no"
5108 rm -f conftest*
5111 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5112 echo "$ac_t""yes" 1>&6
5113 cat >> confdefs.h <<EOF
5114 #define CRAY_STACKSEG_END $ac_func
5117 break
5118 else
5119 echo "$ac_t""no" 1>&6
5122 done
5125 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5126 echo "configure:5127: checking stack direction for C alloca" >&5
5127 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5128 echo $ac_n "(cached) $ac_c" 1>&6
5129 else
5130 if test "$cross_compiling" = yes; then
5131 ac_cv_c_stack_direction=0
5132 else
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 find_stack_direction ()
5138 static char *addr = 0;
5139 auto char dummy;
5140 if (addr == 0)
5142 addr = &dummy;
5143 return find_stack_direction ();
5145 else
5146 return (&dummy > addr) ? 1 : -1;
5148 main ()
5150 exit (find_stack_direction() < 0);
5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5154 then
5155 ac_cv_c_stack_direction=1
5156 else
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5159 rm -fr conftest*
5160 ac_cv_c_stack_direction=-1
5162 rm -fr conftest*
5167 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5168 cat >> confdefs.h <<EOF
5169 #define STACK_DIRECTION $ac_cv_c_stack_direction
5175 # fmod, logb, and frexp are found in -lm on most systems.
5176 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5177 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
5178 echo "configure:5179: checking for sqrt in -lm" >&5
5179 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183 ac_save_LIBS="$LIBS"
5184 LIBS="-lm $LIBS"
5185 cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 /* Override any gcc2 internal prototype to avoid an error. */
5189 /* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5191 char sqrt();
5193 int main() {
5194 sqrt()
5195 ; return 0; }
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198 rm -rf conftest*
5199 eval "ac_cv_lib_$ac_lib_var=yes"
5200 else
5201 echo "configure: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5203 rm -rf conftest*
5204 eval "ac_cv_lib_$ac_lib_var=no"
5206 rm -f conftest*
5207 LIBS="$ac_save_LIBS"
5210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5211 echo "$ac_t""yes" 1>&6
5212 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5213 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5214 cat >> confdefs.h <<EOF
5215 #define $ac_tr_lib 1
5218 LIBS="-lm $LIBS"
5220 else
5221 echo "$ac_t""no" 1>&6
5225 # Check for mail-locking functions in a "mail" library
5226 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
5227 echo "configure:5228: checking for maillock in -lmail" >&5
5228 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5229 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5230 echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232 ac_save_LIBS="$LIBS"
5233 LIBS="-lmail $LIBS"
5234 cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5237 /* Override any gcc2 internal prototype to avoid an error. */
5238 /* We use char because int might match the return type of a gcc2
5239 builtin and then its argument prototype would still apply. */
5240 char maillock();
5242 int main() {
5243 maillock()
5244 ; return 0; }
5246 if { (eval echo configure:5247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5247 rm -rf conftest*
5248 eval "ac_cv_lib_$ac_lib_var=yes"
5249 else
5250 echo "configure: failed program was:" >&5
5251 cat conftest.$ac_ext >&5
5252 rm -rf conftest*
5253 eval "ac_cv_lib_$ac_lib_var=no"
5255 rm -f conftest*
5256 LIBS="$ac_save_LIBS"
5259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5260 echo "$ac_t""yes" 1>&6
5261 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5262 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5263 cat >> confdefs.h <<EOF
5264 #define $ac_tr_lib 1
5267 LIBS="-lmail $LIBS"
5269 else
5270 echo "$ac_t""no" 1>&6
5273 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
5274 echo "configure:5275: checking for maillock in -llockfile" >&5
5275 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5276 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5277 echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279 ac_save_LIBS="$LIBS"
5280 LIBS="-llockfile $LIBS"
5281 cat > conftest.$ac_ext <<EOF
5282 #line 5283 "configure"
5283 #include "confdefs.h"
5284 /* Override any gcc2 internal prototype to avoid an error. */
5285 /* We use char because int might match the return type of a gcc2
5286 builtin and then its argument prototype would still apply. */
5287 char maillock();
5289 int main() {
5290 maillock()
5291 ; return 0; }
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294 rm -rf conftest*
5295 eval "ac_cv_lib_$ac_lib_var=yes"
5296 else
5297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 rm -rf conftest*
5300 eval "ac_cv_lib_$ac_lib_var=no"
5302 rm -f conftest*
5303 LIBS="$ac_save_LIBS"
5306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5307 echo "$ac_t""yes" 1>&6
5308 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5309 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5310 cat >> confdefs.h <<EOF
5311 #define $ac_tr_lib 1
5314 LIBS="-llockfile $LIBS"
5316 else
5317 echo "$ac_t""no" 1>&6
5320 # If we have the shared liblockfile, assume we must use it for mail
5321 # locking (e.g. Debian). If we couldn't link against liblockfile
5322 # (no liblockfile.a installed), ensure that we don't need to.
5323 if test "$ac_cv_lib_lockfile_maillock" = no; then
5324 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5325 set dummy liblockfile.so; ac_word=$2
5326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5327 echo "configure:5328: checking for $ac_word" >&5
5328 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5329 echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331 if test -n "$liblockfile"; then
5332 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5333 else
5334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5335 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5336 for ac_dir in $ac_dummy; do
5337 test -z "$ac_dir" && ac_dir=.
5338 if test -f $ac_dir/$ac_word; then
5339 ac_cv_prog_liblockfile="yes"
5340 break
5342 done
5343 IFS="$ac_save_ifs"
5344 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
5347 liblockfile="$ac_cv_prog_liblockfile"
5348 if test -n "$liblockfile"; then
5349 echo "$ac_t""$liblockfile" 1>&6
5350 else
5351 echo "$ac_t""no" 1>&6
5354 if test $ac_cv_prog_liblockfile = yes; then
5355 { echo "configure: error: Shared liblockfile found but can't link against it.
5356 This probably means that movemail could lose mail.
5357 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
5358 else cat >> confdefs.h <<\EOF
5359 #define LIBMAIL -llockfile
5363 else :
5365 for ac_func in touchlock
5367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5368 echo "configure:5369: checking for $ac_func" >&5
5369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5370 echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372 cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375 /* System header to define __stub macros and hopefully few prototypes,
5376 which can conflict with char $ac_func(); below. */
5377 #include <assert.h>
5378 /* Override any gcc2 internal prototype to avoid an error. */
5379 /* We use char because int might match the return type of a gcc2
5380 builtin and then its argument prototype would still apply. */
5381 char $ac_func();
5383 int main() {
5385 /* The GNU C library defines this for functions which it implements
5386 to always fail with ENOSYS. Some functions are actually named
5387 something starting with __ and the normal name is an alias. */
5388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5389 choke me
5390 #else
5391 $ac_func();
5392 #endif
5394 ; return 0; }
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397 rm -rf conftest*
5398 eval "ac_cv_func_$ac_func=yes"
5399 else
5400 echo "configure: failed program was:" >&5
5401 cat conftest.$ac_ext >&5
5402 rm -rf conftest*
5403 eval "ac_cv_func_$ac_func=no"
5405 rm -f conftest*
5408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5409 echo "$ac_t""yes" 1>&6
5410 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5411 cat >> confdefs.h <<EOF
5412 #define $ac_tr_func 1
5415 else
5416 echo "$ac_t""no" 1>&6
5418 done
5420 for ac_hdr in maillock.h
5422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5424 echo "configure:5425: checking for $ac_hdr" >&5
5425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5426 echo $ac_n "(cached) $ac_c" 1>&6
5427 else
5428 cat > conftest.$ac_ext <<EOF
5429 #line 5430 "configure"
5430 #include "confdefs.h"
5431 #include <$ac_hdr>
5433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5434 { (eval echo configure:5435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436 if test -z "$ac_err"; then
5437 rm -rf conftest*
5438 eval "ac_cv_header_$ac_safe=yes"
5439 else
5440 echo "$ac_err" >&5
5441 echo "configure: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5443 rm -rf conftest*
5444 eval "ac_cv_header_$ac_safe=no"
5446 rm -f conftest*
5448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5449 echo "$ac_t""yes" 1>&6
5450 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5451 cat >> confdefs.h <<EOF
5452 #define $ac_tr_hdr 1
5455 else
5456 echo "$ac_t""no" 1>&6
5458 done
5461 for ac_func in gettimeofday gethostname getdomainname dup2 \
5462 rename closedir mkdir rmdir sysinfo \
5463 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5464 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5465 utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo \
5466 __fpending getloadavg mblen mbrlen strsignal setitimer ualarm
5468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5469 echo "configure:5470: checking for $ac_func" >&5
5470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5471 echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 /* System header to define __stub macros and hopefully few prototypes,
5477 which can conflict with char $ac_func(); below. */
5478 #include <assert.h>
5479 /* Override any gcc2 internal prototype to avoid an error. */
5480 /* We use char because int might match the return type of a gcc2
5481 builtin and then its argument prototype would still apply. */
5482 char $ac_func();
5484 int main() {
5486 /* The GNU C library defines this for functions which it implements
5487 to always fail with ENOSYS. Some functions are actually named
5488 something starting with __ and the normal name is an alias. */
5489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5490 choke me
5491 #else
5492 $ac_func();
5493 #endif
5495 ; return 0; }
5497 if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5498 rm -rf conftest*
5499 eval "ac_cv_func_$ac_func=yes"
5500 else
5501 echo "configure: failed program was:" >&5
5502 cat conftest.$ac_ext >&5
5503 rm -rf conftest*
5504 eval "ac_cv_func_$ac_func=no"
5506 rm -f conftest*
5509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5510 echo "$ac_t""yes" 1>&6
5511 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5512 cat >> confdefs.h <<EOF
5513 #define $ac_tr_func 1
5516 else
5517 echo "$ac_t""no" 1>&6
5519 done
5522 for ac_hdr in sys/time.h unistd.h
5524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5526 echo "configure:5527: checking for $ac_hdr" >&5
5527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5528 echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530 cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #include <$ac_hdr>
5535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5536 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5538 if test -z "$ac_err"; then
5539 rm -rf conftest*
5540 eval "ac_cv_header_$ac_safe=yes"
5541 else
5542 echo "$ac_err" >&5
5543 echo "configure: failed program was:" >&5
5544 cat conftest.$ac_ext >&5
5545 rm -rf conftest*
5546 eval "ac_cv_header_$ac_safe=no"
5548 rm -f conftest*
5550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5551 echo "$ac_t""yes" 1>&6
5552 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5553 cat >> confdefs.h <<EOF
5554 #define $ac_tr_hdr 1
5557 else
5558 echo "$ac_t""no" 1>&6
5560 done
5562 for ac_func in alarm
5564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5565 echo "configure:5566: checking for $ac_func" >&5
5566 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5567 echo $ac_n "(cached) $ac_c" 1>&6
5568 else
5569 cat > conftest.$ac_ext <<EOF
5570 #line 5571 "configure"
5571 #include "confdefs.h"
5572 /* System header to define __stub macros and hopefully few prototypes,
5573 which can conflict with char $ac_func(); below. */
5574 #include <assert.h>
5575 /* Override any gcc2 internal prototype to avoid an error. */
5576 /* We use char because int might match the return type of a gcc2
5577 builtin and then its argument prototype would still apply. */
5578 char $ac_func();
5580 int main() {
5582 /* The GNU C library defines this for functions which it implements
5583 to always fail with ENOSYS. Some functions are actually named
5584 something starting with __ and the normal name is an alias. */
5585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5586 choke me
5587 #else
5588 $ac_func();
5589 #endif
5591 ; return 0; }
5593 if { (eval echo configure:5594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5594 rm -rf conftest*
5595 eval "ac_cv_func_$ac_func=yes"
5596 else
5597 echo "configure: failed program was:" >&5
5598 cat conftest.$ac_ext >&5
5599 rm -rf conftest*
5600 eval "ac_cv_func_$ac_func=no"
5602 rm -f conftest*
5605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5606 echo "$ac_t""yes" 1>&6
5607 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5608 cat >> confdefs.h <<EOF
5609 #define $ac_tr_func 1
5612 else
5613 echo "$ac_t""no" 1>&6
5615 done
5617 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
5618 echo "configure:5619: checking for working mktime" >&5
5619 if eval "test \"`echo '$''{'ac_cv_func_working_mktime'+set}'`\" = set"; then
5620 echo $ac_n "(cached) $ac_c" 1>&6
5621 else
5622 if test "$cross_compiling" = yes; then
5623 ac_cv_func_working_mktime=no
5624 else
5625 cat > conftest.$ac_ext <<EOF
5626 #line 5627 "configure"
5627 #include "confdefs.h"
5628 /* Test program from Paul Eggert (eggert@twinsun.com)
5629 and Tony Leneis (tony@plaza.ds.adp.com). */
5630 #if TIME_WITH_SYS_TIME
5631 # include <sys/time.h>
5632 # include <time.h>
5633 #else
5634 # if HAVE_SYS_TIME_H
5635 # include <sys/time.h>
5636 # else
5637 # include <time.h>
5638 # endif
5639 #endif
5641 #if HAVE_UNISTD_H
5642 # include <unistd.h>
5643 #endif
5645 #if !HAVE_ALARM
5646 # define alarm(X) /* empty */
5647 #endif
5649 /* Work around redefinition to rpl_putenv by other config tests. */
5650 #undef putenv
5652 static time_t time_t_max;
5654 /* Values we'll use to set the TZ environment variable. */
5655 static const char *const tz_strings[] = {
5656 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
5657 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
5659 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5661 /* Fail if mktime fails to convert a date in the spring-forward gap.
5662 Based on a problem report from Andreas Jaeger. */
5663 static void
5664 spring_forward_gap ()
5666 /* glibc (up to about 1998-10-07) failed this test) */
5667 struct tm tm;
5669 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
5670 instead of "TZ=America/Vancouver" in order to detect the bug even
5671 on systems that don't support the Olson extension, or don't have the
5672 full zoneinfo tables installed. */
5673 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5675 tm.tm_year = 98;
5676 tm.tm_mon = 3;
5677 tm.tm_mday = 5;
5678 tm.tm_hour = 2;
5679 tm.tm_min = 0;
5680 tm.tm_sec = 0;
5681 tm.tm_isdst = -1;
5682 if (mktime (&tm) == (time_t)-1)
5683 exit (1);
5686 static void
5687 mktime_test (now)
5688 time_t now;
5690 struct tm *lt;
5691 if ((lt = localtime (&now)) && mktime (lt) != now)
5692 exit (1);
5693 now = time_t_max - now;
5694 if ((lt = localtime (&now)) && mktime (lt) != now)
5695 exit (1);
5698 static void
5699 irix_6_4_bug ()
5701 /* Based on code from Ariel Faigon. */
5702 struct tm tm;
5703 tm.tm_year = 96;
5704 tm.tm_mon = 3;
5705 tm.tm_mday = 0;
5706 tm.tm_hour = 0;
5707 tm.tm_min = 0;
5708 tm.tm_sec = 0;
5709 tm.tm_isdst = -1;
5710 mktime (&tm);
5711 if (tm.tm_mon != 2 || tm.tm_mday != 31)
5712 exit (1);
5715 static void
5716 bigtime_test (j)
5717 int j;
5719 struct tm tm;
5720 time_t now;
5721 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
5722 now = mktime (&tm);
5723 if (now != (time_t) -1)
5725 struct tm *lt = localtime (&now);
5726 if (! (lt
5727 && lt->tm_year == tm.tm_year
5728 && lt->tm_mon == tm.tm_mon
5729 && lt->tm_mday == tm.tm_mday
5730 && lt->tm_hour == tm.tm_hour
5731 && lt->tm_min == tm.tm_min
5732 && lt->tm_sec == tm.tm_sec
5733 && lt->tm_yday == tm.tm_yday
5734 && lt->tm_wday == tm.tm_wday
5735 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
5736 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
5737 exit (1);
5742 main ()
5744 time_t t, delta;
5745 int i, j;
5747 /* This test makes some buggy mktime implementations loop.
5748 Give up after 60 seconds; a mktime slower than that
5749 isn't worth using anyway. */
5750 alarm (60);
5752 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
5753 continue;
5754 time_t_max--;
5755 delta = time_t_max / 997; /* a suitable prime number */
5756 for (i = 0; i < N_STRINGS; i++)
5758 if (tz_strings[i])
5759 putenv (tz_strings[i]);
5761 for (t = 0; t <= time_t_max - delta; t += delta)
5762 mktime_test (t);
5763 mktime_test ((time_t) 60 * 60);
5764 mktime_test ((time_t) 60 * 60 * 24);
5766 for (j = 1; 0 < j; j *= 2)
5767 bigtime_test (j);
5768 bigtime_test (j - 1);
5770 irix_6_4_bug ();
5771 spring_forward_gap ();
5772 exit (0);
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5776 then
5777 ac_cv_func_working_mktime=yes
5778 else
5779 echo "configure: failed program was:" >&5
5780 cat conftest.$ac_ext >&5
5781 rm -fr conftest*
5782 ac_cv_func_working_mktime=no
5784 rm -fr conftest*
5789 echo "$ac_t""$ac_cv_func_working_mktime" 1>&6
5790 if test $ac_cv_func_working_mktime = no; then
5791 LIBOBJS="$LIBOBJS mktime.${ac_objext}"
5794 if test "$ac_cv_func_working_mktime" = no; then
5795 cat >> confdefs.h <<\EOF
5796 #define BROKEN_MKTIME 1
5801 # Check whether --enable-largefile or --disable-largefile was given.
5802 if test "${enable_largefile+set}" = set; then
5803 enableval="$enable_largefile"
5807 if test "$enable_largefile" != no; then
5809 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
5810 echo "configure:5811: checking for special C compiler options needed for large files" >&5
5811 if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
5812 echo $ac_n "(cached) $ac_c" 1>&6
5813 else
5814 ac_cv_sys_largefile_CC=no
5815 if test "$GCC" != yes; then
5816 # IRIX 6.2 and later do not support large files by default,
5817 # so use the C compiler's -n32 option if that helps.
5818 cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821 #include <sys/types.h>
5822 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5824 int main() {
5826 ; return 0; }
5828 if { (eval echo configure:5829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5830 else
5831 echo "configure: failed program was:" >&5
5832 cat conftest.$ac_ext >&5
5833 rm -rf conftest*
5834 ac_save_CC="$CC"
5835 CC="$CC -n32"
5836 cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <sys/types.h>
5840 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5842 int main() {
5844 ; return 0; }
5846 if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5847 rm -rf conftest*
5848 ac_cv_sys_largefile_CC=' -n32'
5849 else
5850 echo "configure: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5853 rm -f conftest*
5854 CC="$ac_save_CC"
5856 rm -f conftest*
5860 echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
5861 if test "$ac_cv_sys_largefile_CC" != no; then
5862 CC="$CC$ac_cv_sys_largefile_CC"
5865 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
5866 echo "configure:5867: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5867 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
5868 echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870 ac_cv_sys_file_offset_bits=no
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 #include <sys/types.h>
5875 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5879 int main() {
5881 ; return 0; }
5883 if { (eval echo configure:5884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5885 else
5886 echo "configure: failed program was:" >&5
5887 cat conftest.$ac_ext >&5
5888 rm -rf conftest*
5889 cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 #define _FILE_OFFSET_BITS 64
5893 #include <sys/types.h>
5894 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5898 int main() {
5900 ; return 0; }
5902 if { (eval echo configure:5903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5903 rm -rf conftest*
5904 ac_cv_sys_file_offset_bits=64
5905 else
5906 echo "configure: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5909 rm -f conftest*
5911 rm -f conftest*
5914 echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
5915 if test "$ac_cv_sys_file_offset_bits" != no; then
5916 cat >> confdefs.h <<EOF
5917 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5921 echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
5922 echo "configure:5923: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5923 if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
5924 echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926 ac_cv_sys_largefile_source=no
5927 cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930 #include <sys/types.h>
5931 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5933 #include <stdio.h>
5935 int main() {
5936 return !ftello;
5937 ; return 0; }
5939 if { (eval echo configure:5940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5941 else
5942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 rm -rf conftest*
5945 cat > conftest.$ac_ext <<EOF
5946 #line 5947 "configure"
5947 #include "confdefs.h"
5948 #define _LARGEFILE_SOURCE 1
5949 #include <sys/types.h>
5950 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5952 #include <stdio.h>
5954 int main() {
5955 return !ftello;
5956 ; return 0; }
5958 if { (eval echo configure:5959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5959 rm -rf conftest*
5960 ac_cv_sys_largefile_source=1
5961 else
5962 echo "configure: failed program was:" >&5
5963 cat conftest.$ac_ext >&5
5965 rm -f conftest*
5967 rm -f conftest*
5970 echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
5971 if test "$ac_cv_sys_largefile_source" != no; then
5972 cat >> confdefs.h <<EOF
5973 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5977 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
5978 echo "configure:5979: checking for _LARGE_FILES value needed for large files" >&5
5979 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982 ac_cv_sys_large_files=no
5983 cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <sys/types.h>
5987 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
5991 int main() {
5993 ; return 0; }
5995 if { (eval echo configure:5996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5997 else
5998 echo "configure: failed program was:" >&5
5999 cat conftest.$ac_ext >&5
6000 rm -rf conftest*
6001 cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 #define _LARGE_FILES 1
6005 #include <sys/types.h>
6006 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6010 int main() {
6012 ; return 0; }
6014 if { (eval echo configure:6015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6015 rm -rf conftest*
6016 ac_cv_sys_large_files=1
6017 else
6018 echo "configure: failed program was:" >&5
6019 cat conftest.$ac_ext >&5
6021 rm -f conftest*
6023 rm -f conftest*
6026 echo "$ac_t""$ac_cv_sys_large_files" 1>&6
6027 if test "$ac_cv_sys_large_files" != no; then
6028 cat >> confdefs.h <<EOF
6029 #define _LARGE_FILES $ac_cv_sys_large_files
6033 echo $ac_n "checking for _XOPEN_SOURCE value needed for large files""... $ac_c" 1>&6
6034 echo "configure:6035: checking for _XOPEN_SOURCE value needed for large files" >&5
6035 if eval "test \"`echo '$''{'ac_cv_sys_xopen_source'+set}'`\" = set"; then
6036 echo $ac_n "(cached) $ac_c" 1>&6
6037 else
6038 ac_cv_sys_xopen_source=no
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042 #include <sys/types.h>
6043 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6045 #include <stdio.h>
6047 int main() {
6048 return !ftello;
6049 ; return 0; }
6051 if { (eval echo configure:6052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6053 else
6054 echo "configure: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 rm -rf conftest*
6057 cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060 #define _XOPEN_SOURCE 500
6061 #include <sys/types.h>
6062 int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
6064 #include <stdio.h>
6066 int main() {
6067 return !ftello;
6068 ; return 0; }
6070 if { (eval echo configure:6071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6071 rm -rf conftest*
6072 ac_cv_sys_xopen_source=500
6073 else
6074 echo "configure: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6077 rm -f conftest*
6079 rm -f conftest*
6082 echo "$ac_t""$ac_cv_sys_xopen_source" 1>&6
6083 if test "$ac_cv_sys_xopen_source" != no; then
6084 cat >> confdefs.h <<EOF
6085 #define _XOPEN_SOURCE $ac_cv_sys_xopen_source
6091 for ac_func in ftello
6093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6094 echo "configure:6095: checking for $ac_func" >&5
6095 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6096 echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098 cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 /* System header to define __stub macros and hopefully few prototypes,
6102 which can conflict with char $ac_func(); below. */
6103 #include <assert.h>
6104 /* Override any gcc2 internal prototype to avoid an error. */
6105 /* We use char because int might match the return type of a gcc2
6106 builtin and then its argument prototype would still apply. */
6107 char $ac_func();
6109 int main() {
6111 /* The GNU C library defines this for functions which it implements
6112 to always fail with ENOSYS. Some functions are actually named
6113 something starting with __ and the normal name is an alias. */
6114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6115 choke me
6116 #else
6117 $ac_func();
6118 #endif
6120 ; return 0; }
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123 rm -rf conftest*
6124 eval "ac_cv_func_$ac_func=yes"
6125 else
6126 echo "configure: failed program was:" >&5
6127 cat conftest.$ac_ext >&5
6128 rm -rf conftest*
6129 eval "ac_cv_func_$ac_func=no"
6131 rm -f conftest*
6134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6135 echo "$ac_t""yes" 1>&6
6136 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6137 cat >> confdefs.h <<EOF
6138 #define $ac_tr_func 1
6141 else
6142 echo "$ac_t""no" 1>&6
6144 done
6147 # UNIX98 PTYs. AC_SYS_LARGEFILE should have defined _XOPEN_SOURCE
6148 # if we need it.
6149 for ac_func in grantpt
6151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6152 echo "configure:6153: checking for $ac_func" >&5
6153 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6154 echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156 cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 /* System header to define __stub macros and hopefully few prototypes,
6160 which can conflict with char $ac_func(); below. */
6161 #include <assert.h>
6162 /* Override any gcc2 internal prototype to avoid an error. */
6163 /* We use char because int might match the return type of a gcc2
6164 builtin and then its argument prototype would still apply. */
6165 char $ac_func();
6167 int main() {
6169 /* The GNU C library defines this for functions which it implements
6170 to always fail with ENOSYS. Some functions are actually named
6171 something starting with __ and the normal name is an alias. */
6172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6173 choke me
6174 #else
6175 $ac_func();
6176 #endif
6178 ; return 0; }
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181 rm -rf conftest*
6182 eval "ac_cv_func_$ac_func=yes"
6183 else
6184 echo "configure: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6186 rm -rf conftest*
6187 eval "ac_cv_func_$ac_func=no"
6189 rm -f conftest*
6192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6193 echo "$ac_t""yes" 1>&6
6194 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6195 cat >> confdefs.h <<EOF
6196 #define $ac_tr_func 1
6199 else
6200 echo "$ac_t""no" 1>&6
6202 done
6205 # PTY-related GNU extensions.
6206 for ac_func in getpt
6208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6209 echo "configure:6210: checking for $ac_func" >&5
6210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6211 echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 /* System header to define __stub macros and hopefully few prototypes,
6217 which can conflict with char $ac_func(); below. */
6218 #include <assert.h>
6219 /* Override any gcc2 internal prototype to avoid an error. */
6220 /* We use char because int might match the return type of a gcc2
6221 builtin and then its argument prototype would still apply. */
6222 char $ac_func();
6224 int main() {
6226 /* The GNU C library defines this for functions which it implements
6227 to always fail with ENOSYS. Some functions are actually named
6228 something starting with __ and the normal name is an alias. */
6229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6230 choke me
6231 #else
6232 $ac_func();
6233 #endif
6235 ; return 0; }
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238 rm -rf conftest*
6239 eval "ac_cv_func_$ac_func=yes"
6240 else
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -rf conftest*
6244 eval "ac_cv_func_$ac_func=no"
6246 rm -f conftest*
6249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6250 echo "$ac_t""yes" 1>&6
6251 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6252 cat >> confdefs.h <<EOF
6253 #define $ac_tr_func 1
6256 else
6257 echo "$ac_t""no" 1>&6
6259 done
6262 # Check this now, so that we will NOT find the above functions in ncurses.
6263 # That is because we have not set up to link ncurses in lib-src.
6264 # It's better to believe a function is not available
6265 # than to expect to find it in ncurses.
6266 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
6267 echo "configure:6268: checking for tparm in -lncurses" >&5
6268 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
6269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6270 echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272 ac_save_LIBS="$LIBS"
6273 LIBS="-lncurses $LIBS"
6274 cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277 /* Override any gcc2 internal prototype to avoid an error. */
6278 /* We use char because int might match the return type of a gcc2
6279 builtin and then its argument prototype would still apply. */
6280 char tparm();
6282 int main() {
6283 tparm()
6284 ; return 0; }
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287 rm -rf conftest*
6288 eval "ac_cv_lib_$ac_lib_var=yes"
6289 else
6290 echo "configure: failed program was:" >&5
6291 cat conftest.$ac_ext >&5
6292 rm -rf conftest*
6293 eval "ac_cv_lib_$ac_lib_var=no"
6295 rm -f conftest*
6296 LIBS="$ac_save_LIBS"
6299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6300 echo "$ac_t""yes" 1>&6
6301 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6302 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6303 cat >> confdefs.h <<EOF
6304 #define $ac_tr_lib 1
6307 LIBS="-lncurses $LIBS"
6309 else
6310 echo "$ac_t""no" 1>&6
6314 # These tell us which Kerberos-related libraries to use.
6315 if test "${with_kerberos+set}" = set; then
6316 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
6317 echo "configure:6318: checking for com_err in -lcom_err" >&5
6318 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
6319 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6320 echo $ac_n "(cached) $ac_c" 1>&6
6321 else
6322 ac_save_LIBS="$LIBS"
6323 LIBS="-lcom_err $LIBS"
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327 /* Override any gcc2 internal prototype to avoid an error. */
6328 /* We use char because int might match the return type of a gcc2
6329 builtin and then its argument prototype would still apply. */
6330 char com_err();
6332 int main() {
6333 com_err()
6334 ; return 0; }
6336 if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6337 rm -rf conftest*
6338 eval "ac_cv_lib_$ac_lib_var=yes"
6339 else
6340 echo "configure: failed program was:" >&5
6341 cat conftest.$ac_ext >&5
6342 rm -rf conftest*
6343 eval "ac_cv_lib_$ac_lib_var=no"
6345 rm -f conftest*
6346 LIBS="$ac_save_LIBS"
6349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6350 echo "$ac_t""yes" 1>&6
6351 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6352 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6353 cat >> confdefs.h <<EOF
6354 #define $ac_tr_lib 1
6357 LIBS="-lcom_err $LIBS"
6359 else
6360 echo "$ac_t""no" 1>&6
6363 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
6364 echo "configure:6365: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
6365 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
6366 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6367 echo $ac_n "(cached) $ac_c" 1>&6
6368 else
6369 ac_save_LIBS="$LIBS"
6370 LIBS="-lk5crypto $LIBS"
6371 cat > conftest.$ac_ext <<EOF
6372 #line 6373 "configure"
6373 #include "confdefs.h"
6374 /* Override any gcc2 internal prototype to avoid an error. */
6375 /* We use char because int might match the return type of a gcc2
6376 builtin and then its argument prototype would still apply. */
6377 char mit_des_cbc_encrypt();
6379 int main() {
6380 mit_des_cbc_encrypt()
6381 ; return 0; }
6383 if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384 rm -rf conftest*
6385 eval "ac_cv_lib_$ac_lib_var=yes"
6386 else
6387 echo "configure: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6389 rm -rf conftest*
6390 eval "ac_cv_lib_$ac_lib_var=no"
6392 rm -f conftest*
6393 LIBS="$ac_save_LIBS"
6396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6397 echo "$ac_t""yes" 1>&6
6398 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6399 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6400 cat >> confdefs.h <<EOF
6401 #define $ac_tr_lib 1
6404 LIBS="-lk5crypto $LIBS"
6406 else
6407 echo "$ac_t""no" 1>&6
6410 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
6411 echo "configure:6412: checking for mit_des_cbc_encrypt in -lcrypto" >&5
6412 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
6413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6414 echo $ac_n "(cached) $ac_c" 1>&6
6415 else
6416 ac_save_LIBS="$LIBS"
6417 LIBS="-lcrypto $LIBS"
6418 cat > conftest.$ac_ext <<EOF
6419 #line 6420 "configure"
6420 #include "confdefs.h"
6421 /* Override any gcc2 internal prototype to avoid an error. */
6422 /* We use char because int might match the return type of a gcc2
6423 builtin and then its argument prototype would still apply. */
6424 char mit_des_cbc_encrypt();
6426 int main() {
6427 mit_des_cbc_encrypt()
6428 ; return 0; }
6430 if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6431 rm -rf conftest*
6432 eval "ac_cv_lib_$ac_lib_var=yes"
6433 else
6434 echo "configure: failed program was:" >&5
6435 cat conftest.$ac_ext >&5
6436 rm -rf conftest*
6437 eval "ac_cv_lib_$ac_lib_var=no"
6439 rm -f conftest*
6440 LIBS="$ac_save_LIBS"
6443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6444 echo "$ac_t""yes" 1>&6
6445 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6446 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6447 cat >> confdefs.h <<EOF
6448 #define $ac_tr_lib 1
6451 LIBS="-lcrypto $LIBS"
6453 else
6454 echo "$ac_t""no" 1>&6
6457 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
6458 echo "configure:6459: checking for krb5_init_context in -lkrb5" >&5
6459 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
6460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6461 echo $ac_n "(cached) $ac_c" 1>&6
6462 else
6463 ac_save_LIBS="$LIBS"
6464 LIBS="-lkrb5 $LIBS"
6465 cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 /* Override any gcc2 internal prototype to avoid an error. */
6469 /* We use char because int might match the return type of a gcc2
6470 builtin and then its argument prototype would still apply. */
6471 char krb5_init_context();
6473 int main() {
6474 krb5_init_context()
6475 ; return 0; }
6477 if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6478 rm -rf conftest*
6479 eval "ac_cv_lib_$ac_lib_var=yes"
6480 else
6481 echo "configure: failed program was:" >&5
6482 cat conftest.$ac_ext >&5
6483 rm -rf conftest*
6484 eval "ac_cv_lib_$ac_lib_var=no"
6486 rm -f conftest*
6487 LIBS="$ac_save_LIBS"
6490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6491 echo "$ac_t""yes" 1>&6
6492 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6493 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6494 cat >> confdefs.h <<EOF
6495 #define $ac_tr_lib 1
6498 LIBS="-lkrb5 $LIBS"
6500 else
6501 echo "$ac_t""no" 1>&6
6504 if test "${with_kerberos5+set}" != set; then
6505 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
6506 echo "configure:6507: checking for des_cbc_encrypt in -ldes425" >&5
6507 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
6508 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6509 echo $ac_n "(cached) $ac_c" 1>&6
6510 else
6511 ac_save_LIBS="$LIBS"
6512 LIBS="-ldes425 $LIBS"
6513 cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516 /* Override any gcc2 internal prototype to avoid an error. */
6517 /* We use char because int might match the return type of a gcc2
6518 builtin and then its argument prototype would still apply. */
6519 char des_cbc_encrypt();
6521 int main() {
6522 des_cbc_encrypt()
6523 ; return 0; }
6525 if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6526 rm -rf conftest*
6527 eval "ac_cv_lib_$ac_lib_var=yes"
6528 else
6529 echo "configure: failed program was:" >&5
6530 cat conftest.$ac_ext >&5
6531 rm -rf conftest*
6532 eval "ac_cv_lib_$ac_lib_var=no"
6534 rm -f conftest*
6535 LIBS="$ac_save_LIBS"
6538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6539 echo "$ac_t""yes" 1>&6
6540 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6541 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6542 cat >> confdefs.h <<EOF
6543 #define $ac_tr_lib 1
6546 LIBS="-ldes425 $LIBS"
6548 else
6549 echo "$ac_t""no" 1>&6
6550 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
6551 echo "configure:6552: checking for des_cbc_encrypt in -ldes" >&5
6552 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
6553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556 ac_save_LIBS="$LIBS"
6557 LIBS="-ldes $LIBS"
6558 cat > conftest.$ac_ext <<EOF
6559 #line 6560 "configure"
6560 #include "confdefs.h"
6561 /* Override any gcc2 internal prototype to avoid an error. */
6562 /* We use char because int might match the return type of a gcc2
6563 builtin and then its argument prototype would still apply. */
6564 char des_cbc_encrypt();
6566 int main() {
6567 des_cbc_encrypt()
6568 ; return 0; }
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571 rm -rf conftest*
6572 eval "ac_cv_lib_$ac_lib_var=yes"
6573 else
6574 echo "configure: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 rm -rf conftest*
6577 eval "ac_cv_lib_$ac_lib_var=no"
6579 rm -f conftest*
6580 LIBS="$ac_save_LIBS"
6583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6584 echo "$ac_t""yes" 1>&6
6585 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
6586 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6587 cat >> confdefs.h <<EOF
6588 #define $ac_tr_lib 1
6591 LIBS="-ldes $LIBS"
6593 else
6594 echo "$ac_t""no" 1>&6
6599 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
6600 echo "configure:6601: checking for krb_get_cred in -lkrb4" >&5
6601 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
6602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6603 echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605 ac_save_LIBS="$LIBS"
6606 LIBS="-lkrb4 $LIBS"
6607 cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610 /* Override any gcc2 internal prototype to avoid an error. */
6611 /* We use char because int might match the return type of a gcc2
6612 builtin and then its argument prototype would still apply. */
6613 char krb_get_cred();
6615 int main() {
6616 krb_get_cred()
6617 ; return 0; }
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620 rm -rf conftest*
6621 eval "ac_cv_lib_$ac_lib_var=yes"
6622 else
6623 echo "configure: failed program was:" >&5
6624 cat conftest.$ac_ext >&5
6625 rm -rf conftest*
6626 eval "ac_cv_lib_$ac_lib_var=no"
6628 rm -f conftest*
6629 LIBS="$ac_save_LIBS"
6632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6633 echo "$ac_t""yes" 1>&6
6634 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6635 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6636 cat >> confdefs.h <<EOF
6637 #define $ac_tr_lib 1
6640 LIBS="-lkrb4 $LIBS"
6642 else
6643 echo "$ac_t""no" 1>&6
6644 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
6645 echo "configure:6646: checking for krb_get_cred in -lkrb" >&5
6646 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
6647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6648 echo $ac_n "(cached) $ac_c" 1>&6
6649 else
6650 ac_save_LIBS="$LIBS"
6651 LIBS="-lkrb $LIBS"
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error. */
6656 /* We use char because int might match the return type of a gcc2
6657 builtin and then its argument prototype would still apply. */
6658 char krb_get_cred();
6660 int main() {
6661 krb_get_cred()
6662 ; return 0; }
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6665 rm -rf conftest*
6666 eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668 echo "configure: failed program was:" >&5
6669 cat conftest.$ac_ext >&5
6670 rm -rf conftest*
6671 eval "ac_cv_lib_$ac_lib_var=no"
6673 rm -f conftest*
6674 LIBS="$ac_save_LIBS"
6677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6678 echo "$ac_t""yes" 1>&6
6679 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
6680 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6681 cat >> confdefs.h <<EOF
6682 #define $ac_tr_lib 1
6685 LIBS="-lkrb $LIBS"
6687 else
6688 echo "$ac_t""no" 1>&6
6695 if test "${with_kerberos5+set}" = set; then
6696 for ac_hdr in krb5.h
6698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_hdr" >&5
6701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6702 echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704 cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 #include <$ac_hdr>
6709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6710 { (eval echo configure:6711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6712 if test -z "$ac_err"; then
6713 rm -rf conftest*
6714 eval "ac_cv_header_$ac_safe=yes"
6715 else
6716 echo "$ac_err" >&5
6717 echo "configure: failed program was:" >&5
6718 cat conftest.$ac_ext >&5
6719 rm -rf conftest*
6720 eval "ac_cv_header_$ac_safe=no"
6722 rm -f conftest*
6724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6725 echo "$ac_t""yes" 1>&6
6726 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6727 cat >> confdefs.h <<EOF
6728 #define $ac_tr_hdr 1
6731 else
6732 echo "$ac_t""no" 1>&6
6734 done
6736 else
6737 for ac_hdr in des.h
6739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6741 echo "configure:6742: checking for $ac_hdr" >&5
6742 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6743 echo $ac_n "(cached) $ac_c" 1>&6
6744 else
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 #include <$ac_hdr>
6750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6751 { (eval echo configure:6752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6753 if test -z "$ac_err"; then
6754 rm -rf conftest*
6755 eval "ac_cv_header_$ac_safe=yes"
6756 else
6757 echo "$ac_err" >&5
6758 echo "configure: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6760 rm -rf conftest*
6761 eval "ac_cv_header_$ac_safe=no"
6763 rm -f conftest*
6765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6766 echo "$ac_t""yes" 1>&6
6767 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6768 cat >> confdefs.h <<EOF
6769 #define $ac_tr_hdr 1
6772 else
6773 echo "$ac_t""no" 1>&6
6774 for ac_hdr in kerberosIV/des.h
6776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6778 echo "configure:6779: checking for $ac_hdr" >&5
6779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6780 echo $ac_n "(cached) $ac_c" 1>&6
6781 else
6782 cat > conftest.$ac_ext <<EOF
6783 #line 6784 "configure"
6784 #include "confdefs.h"
6785 #include <$ac_hdr>
6787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6788 { (eval echo configure:6789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6790 if test -z "$ac_err"; then
6791 rm -rf conftest*
6792 eval "ac_cv_header_$ac_safe=yes"
6793 else
6794 echo "$ac_err" >&5
6795 echo "configure: failed program was:" >&5
6796 cat conftest.$ac_ext >&5
6797 rm -rf conftest*
6798 eval "ac_cv_header_$ac_safe=no"
6800 rm -f conftest*
6802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6803 echo "$ac_t""yes" 1>&6
6804 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6805 cat >> confdefs.h <<EOF
6806 #define $ac_tr_hdr 1
6809 else
6810 echo "$ac_t""no" 1>&6
6811 for ac_hdr in kerberos/des.h
6813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6815 echo "configure:6816: checking for $ac_hdr" >&5
6816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6817 echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819 cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 #include <$ac_hdr>
6824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6825 { (eval echo configure:6826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6827 if test -z "$ac_err"; then
6828 rm -rf conftest*
6829 eval "ac_cv_header_$ac_safe=yes"
6830 else
6831 echo "$ac_err" >&5
6832 echo "configure: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 rm -rf conftest*
6835 eval "ac_cv_header_$ac_safe=no"
6837 rm -f conftest*
6839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6840 echo "$ac_t""yes" 1>&6
6841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6842 cat >> confdefs.h <<EOF
6843 #define $ac_tr_hdr 1
6846 else
6847 echo "$ac_t""no" 1>&6
6849 done
6852 done
6855 done
6857 for ac_hdr in krb.h
6859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6861 echo "configure:6862: checking for $ac_hdr" >&5
6862 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6863 echo $ac_n "(cached) $ac_c" 1>&6
6864 else
6865 cat > conftest.$ac_ext <<EOF
6866 #line 6867 "configure"
6867 #include "confdefs.h"
6868 #include <$ac_hdr>
6870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6871 { (eval echo configure:6872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6873 if test -z "$ac_err"; then
6874 rm -rf conftest*
6875 eval "ac_cv_header_$ac_safe=yes"
6876 else
6877 echo "$ac_err" >&5
6878 echo "configure: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880 rm -rf conftest*
6881 eval "ac_cv_header_$ac_safe=no"
6883 rm -f conftest*
6885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6886 echo "$ac_t""yes" 1>&6
6887 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6888 cat >> confdefs.h <<EOF
6889 #define $ac_tr_hdr 1
6892 else
6893 echo "$ac_t""no" 1>&6
6894 for ac_hdr in kerberosIV/krb.h
6896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6898 echo "configure:6899: checking for $ac_hdr" >&5
6899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6900 echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902 cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 #include <$ac_hdr>
6907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6908 { (eval echo configure:6909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6910 if test -z "$ac_err"; then
6911 rm -rf conftest*
6912 eval "ac_cv_header_$ac_safe=yes"
6913 else
6914 echo "$ac_err" >&5
6915 echo "configure: failed program was:" >&5
6916 cat conftest.$ac_ext >&5
6917 rm -rf conftest*
6918 eval "ac_cv_header_$ac_safe=no"
6920 rm -f conftest*
6922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6923 echo "$ac_t""yes" 1>&6
6924 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6925 cat >> confdefs.h <<EOF
6926 #define $ac_tr_hdr 1
6929 else
6930 echo "$ac_t""no" 1>&6
6931 for ac_hdr in kerberos/krb.h
6933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6935 echo "configure:6936: checking for $ac_hdr" >&5
6936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6937 echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 #include <$ac_hdr>
6944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6945 { (eval echo configure:6946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6947 if test -z "$ac_err"; then
6948 rm -rf conftest*
6949 eval "ac_cv_header_$ac_safe=yes"
6950 else
6951 echo "$ac_err" >&5
6952 echo "configure: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 rm -rf conftest*
6955 eval "ac_cv_header_$ac_safe=no"
6957 rm -f conftest*
6959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6960 echo "$ac_t""yes" 1>&6
6961 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6962 cat >> confdefs.h <<EOF
6963 #define $ac_tr_hdr 1
6966 else
6967 echo "$ac_t""no" 1>&6
6969 done
6972 done
6975 done
6978 for ac_hdr in com_err.h
6980 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6981 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6982 echo "configure:6983: checking for $ac_hdr" >&5
6983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6984 echo $ac_n "(cached) $ac_c" 1>&6
6985 else
6986 cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989 #include <$ac_hdr>
6991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6992 { (eval echo configure:6993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6994 if test -z "$ac_err"; then
6995 rm -rf conftest*
6996 eval "ac_cv_header_$ac_safe=yes"
6997 else
6998 echo "$ac_err" >&5
6999 echo "configure: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7001 rm -rf conftest*
7002 eval "ac_cv_header_$ac_safe=no"
7004 rm -f conftest*
7006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7007 echo "$ac_t""yes" 1>&6
7008 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7009 cat >> confdefs.h <<EOF
7010 #define $ac_tr_hdr 1
7013 else
7014 echo "$ac_t""no" 1>&6
7016 done
7020 # Solaris requires -lintl if you want strerror (which calls dgettext)
7021 # to return localized messages.
7022 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
7023 echo "configure:7024: checking for dgettext in -lintl" >&5
7024 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
7025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7026 echo $ac_n "(cached) $ac_c" 1>&6
7027 else
7028 ac_save_LIBS="$LIBS"
7029 LIBS="-lintl $LIBS"
7030 cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* Override any gcc2 internal prototype to avoid an error. */
7034 /* We use char because int might match the return type of a gcc2
7035 builtin and then its argument prototype would still apply. */
7036 char dgettext();
7038 int main() {
7039 dgettext()
7040 ; return 0; }
7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7043 rm -rf conftest*
7044 eval "ac_cv_lib_$ac_lib_var=yes"
7045 else
7046 echo "configure: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7048 rm -rf conftest*
7049 eval "ac_cv_lib_$ac_lib_var=no"
7051 rm -f conftest*
7052 LIBS="$ac_save_LIBS"
7055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7056 echo "$ac_t""yes" 1>&6
7057 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7058 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7059 cat >> confdefs.h <<EOF
7060 #define $ac_tr_lib 1
7063 LIBS="-lintl $LIBS"
7065 else
7066 echo "$ac_t""no" 1>&6
7070 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
7071 echo "configure:7072: checking whether localtime caches TZ" >&5
7072 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
7073 echo $ac_n "(cached) $ac_c" 1>&6
7074 else
7075 if test x$ac_cv_func_tzset = xyes; then
7076 if test "$cross_compiling" = yes; then
7077 # If we have tzset, assume the worst when cross-compiling.
7078 emacs_cv_localtime_cache=yes
7079 else
7080 cat > conftest.$ac_ext <<EOF
7081 #line 7082 "configure"
7082 #include "confdefs.h"
7083 #include <time.h>
7084 extern char **environ;
7085 unset_TZ ()
7087 char **from, **to;
7088 for (to = from = environ; (*to = *from); from++)
7089 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
7090 to++;
7092 char TZ_GMT0[] = "TZ=GMT0";
7093 char TZ_PST8[] = "TZ=PST8";
7094 main()
7096 time_t now = time ((time_t *) 0);
7097 int hour_GMT0, hour_unset;
7098 if (putenv (TZ_GMT0) != 0)
7099 exit (1);
7100 hour_GMT0 = localtime (&now)->tm_hour;
7101 unset_TZ ();
7102 hour_unset = localtime (&now)->tm_hour;
7103 if (putenv (TZ_PST8) != 0)
7104 exit (1);
7105 if (localtime (&now)->tm_hour == hour_GMT0)
7106 exit (1);
7107 unset_TZ ();
7108 if (localtime (&now)->tm_hour != hour_unset)
7109 exit (1);
7110 exit (0);
7113 if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7114 then
7115 emacs_cv_localtime_cache=no
7116 else
7117 echo "configure: failed program was:" >&5
7118 cat conftest.$ac_ext >&5
7119 rm -fr conftest*
7120 emacs_cv_localtime_cache=yes
7122 rm -fr conftest*
7125 else
7126 # If we lack tzset, report that localtime does not cache TZ,
7127 # since we can't invalidate the cache if we don't have tzset.
7128 emacs_cv_localtime_cache=no
7131 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
7132 if test $emacs_cv_localtime_cache = yes; then
7133 cat >> confdefs.h <<\EOF
7134 #define LOCALTIME_CACHE 1
7139 if test "x$HAVE_TIMEVAL" = xyes; then
7140 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
7141 echo "configure:7142: checking whether gettimeofday can accept two arguments" >&5
7142 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
7143 echo $ac_n "(cached) $ac_c" 1>&6
7144 else
7145 cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7149 #ifdef TIME_WITH_SYS_TIME
7150 #include <sys/time.h>
7151 #include <time.h>
7152 #else
7153 #ifdef HAVE_SYS_TIME_H
7154 #include <sys/time.h>
7155 #else
7156 #include <time.h>
7157 #endif
7158 #endif
7160 int main() {
7162 struct timeval time;
7163 struct timezone dummy;
7164 gettimeofday (&time, &dummy);
7166 ; return 0; }
7168 if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7169 rm -rf conftest*
7170 emacs_cv_gettimeofday_two_arguments=yes
7171 else
7172 echo "configure: failed program was:" >&5
7173 cat conftest.$ac_ext >&5
7174 rm -rf conftest*
7175 emacs_cv_gettimeofday_two_arguments=no
7177 rm -f conftest*
7180 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
7181 if test $emacs_cv_gettimeofday_two_arguments = no; then
7182 cat >> confdefs.h <<\EOF
7183 #define GETTIMEOFDAY_ONE_ARGUMENT 1
7189 ok_so_far=yes
7190 echo $ac_n "checking for socket""... $ac_c" 1>&6
7191 echo "configure:7192: checking for socket" >&5
7192 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
7193 echo $ac_n "(cached) $ac_c" 1>&6
7194 else
7195 cat > conftest.$ac_ext <<EOF
7196 #line 7197 "configure"
7197 #include "confdefs.h"
7198 /* System header to define __stub macros and hopefully few prototypes,
7199 which can conflict with char socket(); below. */
7200 #include <assert.h>
7201 /* Override any gcc2 internal prototype to avoid an error. */
7202 /* We use char because int might match the return type of a gcc2
7203 builtin and then its argument prototype would still apply. */
7204 char socket();
7206 int main() {
7208 /* The GNU C library defines this for functions which it implements
7209 to always fail with ENOSYS. Some functions are actually named
7210 something starting with __ and the normal name is an alias. */
7211 #if defined (__stub_socket) || defined (__stub___socket)
7212 choke me
7213 #else
7214 socket();
7215 #endif
7217 ; return 0; }
7219 if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7220 rm -rf conftest*
7221 eval "ac_cv_func_socket=yes"
7222 else
7223 echo "configure: failed program was:" >&5
7224 cat conftest.$ac_ext >&5
7225 rm -rf conftest*
7226 eval "ac_cv_func_socket=no"
7228 rm -f conftest*
7231 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
7232 echo "$ac_t""yes" 1>&6
7234 else
7235 echo "$ac_t""no" 1>&6
7236 ok_so_far=no
7239 if test $ok_so_far = yes; then
7240 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
7241 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
7242 echo "configure:7243: checking for netinet/in.h" >&5
7243 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7244 echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246 cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 #include <netinet/in.h>
7251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7252 { (eval echo configure:7253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7254 if test -z "$ac_err"; then
7255 rm -rf conftest*
7256 eval "ac_cv_header_$ac_safe=yes"
7257 else
7258 echo "$ac_err" >&5
7259 echo "configure: failed program was:" >&5
7260 cat conftest.$ac_ext >&5
7261 rm -rf conftest*
7262 eval "ac_cv_header_$ac_safe=no"
7264 rm -f conftest*
7266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7267 echo "$ac_t""yes" 1>&6
7269 else
7270 echo "$ac_t""no" 1>&6
7271 ok_so_far=no
7275 if test $ok_so_far = yes; then
7276 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
7277 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
7278 echo "configure:7279: checking for arpa/inet.h" >&5
7279 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7280 echo $ac_n "(cached) $ac_c" 1>&6
7281 else
7282 cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285 #include <arpa/inet.h>
7287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7288 { (eval echo configure:7289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7290 if test -z "$ac_err"; then
7291 rm -rf conftest*
7292 eval "ac_cv_header_$ac_safe=yes"
7293 else
7294 echo "$ac_err" >&5
7295 echo "configure: failed program was:" >&5
7296 cat conftest.$ac_ext >&5
7297 rm -rf conftest*
7298 eval "ac_cv_header_$ac_safe=no"
7300 rm -f conftest*
7302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7303 echo "$ac_t""yes" 1>&6
7305 else
7306 echo "$ac_t""no" 1>&6
7307 ok_so_far=no
7311 if test $ok_so_far = yes; then
7312 cat >> confdefs.h <<\EOF
7313 #define HAVE_INET_SOCKETS 1
7318 if test -f /usr/lpp/X11/bin/smt.exp; then
7319 cat >> confdefs.h <<\EOF
7320 #define HAVE_AIX_SMT_EXP 1
7325 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
7326 echo "configure:7327: checking whether system supports dynamic ptys" >&5
7327 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
7328 echo "$ac_t""yes" 1>&6
7329 cat >> confdefs.h <<\EOF
7330 #define HAVE_DEV_PTMX 1
7333 else
7334 echo "$ac_t""no" 1>&6
7337 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7338 echo "configure:7339: checking for pid_t" >&5
7339 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7340 echo $ac_n "(cached) $ac_c" 1>&6
7341 else
7342 cat > conftest.$ac_ext <<EOF
7343 #line 7344 "configure"
7344 #include "confdefs.h"
7345 #include <sys/types.h>
7346 #if STDC_HEADERS
7347 #include <stdlib.h>
7348 #include <stddef.h>
7349 #endif
7351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7352 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7353 rm -rf conftest*
7354 ac_cv_type_pid_t=yes
7355 else
7356 rm -rf conftest*
7357 ac_cv_type_pid_t=no
7359 rm -f conftest*
7362 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7363 if test $ac_cv_type_pid_t = no; then
7364 cat >> confdefs.h <<\EOF
7365 #define pid_t int
7370 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
7371 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
7372 echo "configure:7373: checking for vfork.h" >&5
7373 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7374 echo $ac_n "(cached) $ac_c" 1>&6
7375 else
7376 cat > conftest.$ac_ext <<EOF
7377 #line 7378 "configure"
7378 #include "confdefs.h"
7379 #include <vfork.h>
7381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7382 { (eval echo configure:7383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7384 if test -z "$ac_err"; then
7385 rm -rf conftest*
7386 eval "ac_cv_header_$ac_safe=yes"
7387 else
7388 echo "$ac_err" >&5
7389 echo "configure: failed program was:" >&5
7390 cat conftest.$ac_ext >&5
7391 rm -rf conftest*
7392 eval "ac_cv_header_$ac_safe=no"
7394 rm -f conftest*
7396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7397 echo "$ac_t""yes" 1>&6
7398 cat >> confdefs.h <<\EOF
7399 #define HAVE_VFORK_H 1
7402 else
7403 echo "$ac_t""no" 1>&6
7406 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
7407 echo "configure:7408: checking for working vfork" >&5
7408 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
7409 echo $ac_n "(cached) $ac_c" 1>&6
7410 else
7411 if test "$cross_compiling" = yes; then
7412 echo $ac_n "checking for vfork""... $ac_c" 1>&6
7413 echo "configure:7414: checking for vfork" >&5
7414 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
7415 echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417 cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 /* System header to define __stub macros and hopefully few prototypes,
7421 which can conflict with char vfork(); below. */
7422 #include <assert.h>
7423 /* Override any gcc2 internal prototype to avoid an error. */
7424 /* We use char because int might match the return type of a gcc2
7425 builtin and then its argument prototype would still apply. */
7426 char vfork();
7428 int main() {
7430 /* The GNU C library defines this for functions which it implements
7431 to always fail with ENOSYS. Some functions are actually named
7432 something starting with __ and the normal name is an alias. */
7433 #if defined (__stub_vfork) || defined (__stub___vfork)
7434 choke me
7435 #else
7436 vfork();
7437 #endif
7439 ; return 0; }
7441 if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7442 rm -rf conftest*
7443 eval "ac_cv_func_vfork=yes"
7444 else
7445 echo "configure: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 rm -rf conftest*
7448 eval "ac_cv_func_vfork=no"
7450 rm -f conftest*
7453 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
7454 echo "$ac_t""yes" 1>&6
7456 else
7457 echo "$ac_t""no" 1>&6
7460 ac_cv_func_vfork_works=$ac_cv_func_vfork
7461 else
7462 cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465 /* Thanks to Paul Eggert for this test. */
7466 #include <stdio.h>
7467 #include <sys/types.h>
7468 #include <sys/stat.h>
7469 #ifdef HAVE_UNISTD_H
7470 #include <unistd.h>
7471 #endif
7472 #ifdef HAVE_VFORK_H
7473 #include <vfork.h>
7474 #endif
7475 /* On some sparc systems, changes by the child to local and incoming
7476 argument registers are propagated back to the parent.
7477 The compiler is told about this with #include <vfork.h>,
7478 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
7479 Test for this by using a static variable whose address
7480 is put into a register that is clobbered by the vfork. */
7481 static
7482 #ifdef __cplusplus
7483 sparc_address_test (int arg)
7484 #else
7485 sparc_address_test (arg) int arg;
7486 #endif
7488 static pid_t child;
7489 if (!child) {
7490 child = vfork ();
7491 if (child < 0) {
7492 perror ("vfork");
7493 _exit(2);
7495 if (!child) {
7496 arg = getpid();
7497 write(-1, "", 0);
7498 _exit (arg);
7502 main() {
7503 pid_t parent = getpid ();
7504 pid_t child;
7506 sparc_address_test ();
7508 child = vfork ();
7510 if (child == 0) {
7511 /* Here is another test for sparc vfork register problems.
7512 This test uses lots of local variables, at least
7513 as many local variables as main has allocated so far
7514 including compiler temporaries. 4 locals are enough for
7515 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
7516 A buggy compiler should reuse the register of parent
7517 for one of the local variables, since it will think that
7518 parent can't possibly be used any more in this routine.
7519 Assigning to the local variable will thus munge parent
7520 in the parent process. */
7521 pid_t
7522 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7523 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7524 /* Convince the compiler that p..p7 are live; otherwise, it might
7525 use the same hardware register for all 8 local variables. */
7526 if (p != p1 || p != p2 || p != p3 || p != p4
7527 || p != p5 || p != p6 || p != p7)
7528 _exit(1);
7530 /* On some systems (e.g. IRIX 3.3),
7531 vfork doesn't separate parent from child file descriptors.
7532 If the child closes a descriptor before it execs or exits,
7533 this munges the parent's descriptor as well.
7534 Test for this by closing stdout in the child. */
7535 _exit(close(fileno(stdout)) != 0);
7536 } else {
7537 int status;
7538 struct stat st;
7540 while (wait(&status) != child)
7542 exit(
7543 /* Was there some problem with vforking? */
7544 child < 0
7546 /* Did the child fail? (This shouldn't happen.) */
7547 || status
7549 /* Did the vfork/compiler bug occur? */
7550 || parent != getpid()
7552 /* Did the file descriptor bug occur? */
7553 || fstat(fileno(stdout), &st) != 0
7558 if { (eval echo configure:7559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7559 then
7560 ac_cv_func_vfork_works=yes
7561 else
7562 echo "configure: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7564 rm -fr conftest*
7565 ac_cv_func_vfork_works=no
7567 rm -fr conftest*
7572 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
7573 if test $ac_cv_func_vfork_works = no; then
7574 cat >> confdefs.h <<\EOF
7575 #define vfork fork
7581 # Set up the CFLAGS for real compilation, so we can substitute it.
7582 CFLAGS="$REAL_CFLAGS"
7584 #### Find out which version of Emacs this is.
7585 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
7586 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
7587 if test x"${version}" = x; then
7588 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
7591 ### Specify what sort of things we'll be editing into Makefile and config.h.
7592 ### Use configuration here uncanonicalized to avoid exceeding size limits.
7623 cat >> confdefs.h <<EOF
7624 #define EMACS_CONFIGURATION "${canonical}"
7627 cat >> confdefs.h <<EOF
7628 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
7631 cat >> confdefs.h <<EOF
7632 #define config_machfile "${machfile}"
7635 cat >> confdefs.h <<EOF
7636 #define config_opsysfile "${opsysfile}"
7639 cat >> confdefs.h <<EOF
7640 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
7643 cat >> confdefs.h <<EOF
7644 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
7647 cat >> confdefs.h <<EOF
7648 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
7651 cat >> confdefs.h <<EOF
7652 #define UNEXEC_SRC ${UNEXEC_SRC}
7656 if test "${HAVE_X_WINDOWS}" = "yes" ; then
7657 cat >> confdefs.h <<\EOF
7658 #define HAVE_X_WINDOWS 1
7662 if test "${USE_X_TOOLKIT}" != "none" ; then
7663 cat >> confdefs.h <<\EOF
7664 #define USE_X_TOOLKIT 1
7668 if test "${HAVE_X11}" = "yes" ; then
7669 cat >> confdefs.h <<\EOF
7670 #define HAVE_X11 1
7674 if test "${HAVE_XFREE386}" = "yes" ; then
7675 cat >> confdefs.h <<\EOF
7676 #define HAVE_XFREE386 1
7680 if test "${HAVE_MENUS}" = "yes" ; then
7681 cat >> confdefs.h <<\EOF
7682 #define HAVE_MENUS 1
7686 if test "${GNU_MALLOC}" = "yes" ; then
7687 cat >> confdefs.h <<\EOF
7688 #define GNU_MALLOC 1
7692 if test "${REL_ALLOC}" = "yes" ; then
7693 cat >> confdefs.h <<\EOF
7694 #define REL_ALLOC 1
7699 #### Report on what we decided to do.
7700 echo "
7701 Configured for \`${canonical}'.
7703 Where should the build process find the source code? ${srcdir}
7704 What operating system and machine description files should Emacs use?
7705 \`${opsysfile}' and \`${machfile}'
7706 What compiler should emacs be built with? ${CC} ${CFLAGS}
7707 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
7708 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
7709 What window system should Emacs use? ${window_system}
7710 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
7712 if test -n "${x_includes}"; then
7713 echo " Where do we find X Windows header files? ${x_includes}"
7714 else
7715 echo " Where do we find X Windows header files? Standard dirs"
7717 if test -n "${x_libraries}"; then
7718 echo " Where do we find X Windows libraries? ${x_libraries}"
7719 else
7720 echo " Where do we find X Windows libraries? Standard dirs"
7723 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
7724 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
7725 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
7726 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
7727 echo " Does Emacs use -lungif? ${HAVE_GIF}"
7728 echo " Does Emacs use -lpng? ${HAVE_PNG}"
7729 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
7730 echo
7732 # Remove any trailing slashes in these variables.
7733 test "${prefix}" != NONE &&
7734 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
7735 test "${exec_prefix}" != NONE &&
7736 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
7738 trap '' 1 2 15
7739 cat > confcache <<\EOF
7740 # This file is a shell script that caches the results of configure
7741 # tests run on this system so they can be shared between configure
7742 # scripts and configure runs. It is not useful on other systems.
7743 # If it contains results you don't want to keep, you may remove or edit it.
7745 # By default, configure uses ./config.cache as the cache file,
7746 # creating it if it does not exist already. You can give configure
7747 # the --cache-file=FILE option to use a different cache file; that is
7748 # what configure does when it calls configure scripts in
7749 # subdirectories, so they share the cache.
7750 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7751 # config.status only pays attention to the cache file if you give it the
7752 # --recheck option to rerun configure.
7755 # The following way of writing the cache mishandles newlines in values,
7756 # but we know of no workaround that is simple, portable, and efficient.
7757 # So, don't put newlines in cache variables' values.
7758 # Ultrix sh set writes to stderr and can't be redirected directly,
7759 # and sets the high bit in the cache file unless we assign to the vars.
7760 (set) 2>&1 |
7761 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7762 *ac_space=\ *)
7763 # `set' does not quote correctly, so add quotes (double-quote substitution
7764 # turns \\\\ into \\, and sed turns \\ into \).
7765 sed -n \
7766 -e "s/'/'\\\\''/g" \
7767 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7770 # `set' quotes correctly as required by POSIX, so do not add quotes.
7771 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7773 esac >> confcache
7774 if cmp -s $cache_file confcache; then
7776 else
7777 if test -w $cache_file; then
7778 echo "updating cache $cache_file"
7779 cat confcache > $cache_file
7780 else
7781 echo "not updating unwritable cache $cache_file"
7784 rm -f confcache
7786 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7788 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7789 # Let make expand exec_prefix.
7790 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7792 # Any assignment to VPATH causes Sun make to only execute
7793 # the first set of double-colon rules, so remove it if not needed.
7794 # If there is a colon in the path, we need to keep it.
7795 if test "x$srcdir" = x.; then
7796 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7799 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7801 DEFS=-DHAVE_CONFIG_H
7803 # Without the "./", some shells look in PATH for config.status.
7804 : ${CONFIG_STATUS=./config.status}
7806 echo creating $CONFIG_STATUS
7807 rm -f $CONFIG_STATUS
7808 cat > $CONFIG_STATUS <<EOF
7809 #! /bin/sh
7810 # Generated automatically by configure.
7811 # Run this file to recreate the current configuration.
7812 # This directory was configured as follows,
7813 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7815 # $0 $ac_configure_args
7817 # Compiler output produced by configure, useful for debugging
7818 # configure, is in ./config.log if it exists.
7820 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7821 for ac_option
7823 case "\$ac_option" in
7824 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7825 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7826 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7827 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7828 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7829 exit 0 ;;
7830 -help | --help | --hel | --he | --h)
7831 echo "\$ac_cs_usage"; exit 0 ;;
7832 *) echo "\$ac_cs_usage"; exit 1 ;;
7833 esac
7834 done
7836 ac_given_srcdir=$srcdir
7837 ac_given_INSTALL="$INSTALL"
7839 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7840 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7841 leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7843 cat >> $CONFIG_STATUS <<EOF
7845 # Protect against being on the right side of a sed subst in config.status.
7846 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7847 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7848 $ac_vpsub
7849 $extrasub
7850 s%@SHELL@%$SHELL%g
7851 s%@CFLAGS@%$CFLAGS%g
7852 s%@CPPFLAGS@%$CPPFLAGS%g
7853 s%@CXXFLAGS@%$CXXFLAGS%g
7854 s%@FFLAGS@%$FFLAGS%g
7855 s%@DEFS@%$DEFS%g
7856 s%@LDFLAGS@%$LDFLAGS%g
7857 s%@LIBS@%$LIBS%g
7858 s%@exec_prefix@%$exec_prefix%g
7859 s%@prefix@%$prefix%g
7860 s%@program_transform_name@%$program_transform_name%g
7861 s%@bindir@%$bindir%g
7862 s%@sbindir@%$sbindir%g
7863 s%@libexecdir@%$libexecdir%g
7864 s%@datadir@%$datadir%g
7865 s%@sysconfdir@%$sysconfdir%g
7866 s%@sharedstatedir@%$sharedstatedir%g
7867 s%@localstatedir@%$localstatedir%g
7868 s%@libdir@%$libdir%g
7869 s%@includedir@%$includedir%g
7870 s%@oldincludedir@%$oldincludedir%g
7871 s%@infodir@%$infodir%g
7872 s%@mandir@%$mandir%g
7873 s%@host@%$host%g
7874 s%@host_alias@%$host_alias%g
7875 s%@host_cpu@%$host_cpu%g
7876 s%@host_vendor@%$host_vendor%g
7877 s%@host_os@%$host_os%g
7878 s%@CC@%$CC%g
7879 s%@LN_S@%$LN_S%g
7880 s%@CPP@%$CPP%g
7881 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7882 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7883 s%@INSTALL_DATA@%$INSTALL_DATA%g
7884 s%@YACC@%$YACC%g
7885 s%@RANLIB@%$RANLIB%g
7886 s%@SET_MAKE@%$SET_MAKE%g
7887 s%@ALLOCA@%$ALLOCA%g
7888 s%@liblockfile@%$liblockfile%g
7889 s%@LIBOBJS@%$LIBOBJS%g
7890 s%@version@%$version%g
7891 s%@configuration@%$configuration%g
7892 s%@canonical@%$canonical%g
7893 s%@srcdir@%$srcdir%g
7894 s%@lispdir@%$lispdir%g
7895 s%@locallisppath@%$locallisppath%g
7896 s%@lisppath@%$lisppath%g
7897 s%@x_default_search_path@%$x_default_search_path%g
7898 s%@etcdir@%$etcdir%g
7899 s%@archlibdir@%$archlibdir%g
7900 s%@docdir@%$docdir%g
7901 s%@bitmapdir@%$bitmapdir%g
7902 s%@c_switch_system@%$c_switch_system%g
7903 s%@c_switch_machine@%$c_switch_machine%g
7904 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
7905 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
7906 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
7907 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
7908 s%@machfile@%$machfile%g
7909 s%@opsysfile@%$opsysfile%g
7911 CEOF
7914 cat >> $CONFIG_STATUS <<\EOF
7916 # Split the substitutions into bite-sized pieces for seds with
7917 # small command number limits, like on Digital OSF/1 and HP-UX.
7918 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7919 ac_file=1 # Number of current file.
7920 ac_beg=1 # First line for current file.
7921 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7922 ac_more_lines=:
7923 ac_sed_cmds=""
7924 while $ac_more_lines; do
7925 if test $ac_beg -gt 1; then
7926 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7927 else
7928 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7930 if test ! -s conftest.s$ac_file; then
7931 ac_more_lines=false
7932 rm -f conftest.s$ac_file
7933 else
7934 if test -z "$ac_sed_cmds"; then
7935 ac_sed_cmds="sed -f conftest.s$ac_file"
7936 else
7937 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7939 ac_file=`expr $ac_file + 1`
7940 ac_beg=$ac_end
7941 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7943 done
7944 if test -z "$ac_sed_cmds"; then
7945 ac_sed_cmds=cat
7949 cat >> $CONFIG_STATUS <<EOF
7951 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7952 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7953 leim/Makefile"}
7955 cat >> $CONFIG_STATUS <<\EOF
7956 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7957 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7958 case "$ac_file" in
7959 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7960 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7961 *) ac_file_in="${ac_file}.in" ;;
7962 esac
7964 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7966 # Remove last slash and all that follows it. Not all systems have dirname.
7967 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7968 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7969 # The file is in a subdirectory.
7970 test ! -d "$ac_dir" && mkdir "$ac_dir"
7971 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7972 # A "../" for each directory in $ac_dir_suffix.
7973 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7974 else
7975 ac_dir_suffix= ac_dots=
7978 case "$ac_given_srcdir" in
7979 .) srcdir=.
7980 if test -z "$ac_dots"; then top_srcdir=.
7981 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7982 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7983 *) # Relative path.
7984 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7985 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7986 esac
7988 case "$ac_given_INSTALL" in
7989 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7990 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7991 esac
7993 echo creating "$ac_file"
7994 rm -f "$ac_file"
7995 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7996 case "$ac_file" in
7997 *Makefile*) ac_comsub="1i\\
7998 # $configure_input" ;;
7999 *) ac_comsub= ;;
8000 esac
8002 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8003 sed -e "$ac_comsub
8004 s%@configure_input@%$configure_input%g
8005 s%@srcdir@%$srcdir%g
8006 s%@top_srcdir@%$top_srcdir%g
8007 s%@INSTALL@%$INSTALL%g
8008 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8009 fi; done
8010 rm -f conftest.s*
8012 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8013 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8015 # ac_d sets the value in "#define NAME VALUE" lines.
8016 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8017 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8018 ac_dC='\3'
8019 ac_dD='%g'
8020 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8021 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8022 ac_uB='\([ ]\)%\1#\2define\3'
8023 ac_uC=' '
8024 ac_uD='\4%g'
8025 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8026 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8027 ac_eB='$%\1#\2define\3'
8028 ac_eC=' '
8029 ac_eD='%g'
8031 if test "${CONFIG_HEADERS+set}" != set; then
8033 cat >> $CONFIG_STATUS <<EOF
8034 CONFIG_HEADERS="src/config.h:src/config.in"
8036 cat >> $CONFIG_STATUS <<\EOF
8038 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8039 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8040 case "$ac_file" in
8041 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8042 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8043 *) ac_file_in="${ac_file}.in" ;;
8044 esac
8046 echo creating $ac_file
8048 rm -f conftest.frag conftest.in conftest.out
8049 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8050 cat $ac_file_inputs > conftest.in
8054 # Transform confdefs.h into a sed script conftest.vals that substitutes
8055 # the proper values into config.h.in to produce config.h. And first:
8056 # Protect against being on the right side of a sed subst in config.status.
8057 # Protect against being in an unquoted here document in config.status.
8058 rm -f conftest.vals
8059 cat > conftest.hdr <<\EOF
8060 s/[\\&%]/\\&/g
8061 s%[\\$`]%\\&%g
8062 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8063 s%ac_d%ac_u%gp
8064 s%ac_u%ac_e%gp
8066 sed -n -f conftest.hdr confdefs.h > conftest.vals
8067 rm -f conftest.hdr
8069 # This sed command replaces #undef with comments. This is necessary, for
8070 # example, in the case of _POSIX_SOURCE, which is predefined and required
8071 # on some systems where configure will not decide to define it.
8072 cat >> conftest.vals <<\EOF
8073 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8076 # Break up conftest.vals because some shells have a limit on
8077 # the size of here documents, and old seds have small limits too.
8079 rm -f conftest.tail
8080 while :
8082 ac_lines=`grep -c . conftest.vals`
8083 # grep -c gives empty output for an empty file on some AIX systems.
8084 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8085 # Write a limited-size here document to conftest.frag.
8086 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8087 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8088 echo 'CEOF
8089 sed -f conftest.frag conftest.in > conftest.out
8090 rm -f conftest.in
8091 mv conftest.out conftest.in
8092 ' >> $CONFIG_STATUS
8093 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8094 rm -f conftest.vals
8095 mv conftest.tail conftest.vals
8096 done
8097 rm -f conftest.vals
8099 cat >> $CONFIG_STATUS <<\EOF
8100 rm -f conftest.frag conftest.h
8101 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8102 cat conftest.in >> conftest.h
8103 rm -f conftest.in
8104 if cmp -s $ac_file conftest.h 2>/dev/null; then
8105 echo "$ac_file is unchanged"
8106 rm -f conftest.h
8107 else
8108 # Remove last slash and all that follows it. Not all systems have dirname.
8109 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8110 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8111 # The file is in a subdirectory.
8112 test ! -d "$ac_dir" && mkdir "$ac_dir"
8114 rm -f $ac_file
8115 mv conftest.h $ac_file
8117 fi; done
8120 cat >> $CONFIG_STATUS <<EOF
8121 CPP="$CPP" CPPFLAGS="$CPPFLAGS"
8123 cat >> $CONFIG_STATUS <<\EOF
8126 ### Make the necessary directories, if they don't exist.
8127 for dir in etc lisp ; do
8128 test -d ${dir} || mkdir ${dir}
8129 done
8131 # Build src/Makefile from ${srcdir}/src/Makefile.c
8132 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
8133 # This must be done after src/config.h is built, since we rely on that file.
8135 # Now get this: Some word that is part of the ${srcdir} directory name
8136 # or the ${configuration} value might, just might, happen to be an
8137 # identifier like `sun4' or `i386' or something, and be predefined by
8138 # the C preprocessor to some helpful value like 1, or maybe the empty
8139 # string. Needless to say consequent macro substitutions are less
8140 # than conducive to the makefile finding the correct directory.
8141 undefs="`echo $top_srcdir $configuration $canonical |
8142 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
8143 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
8146 echo creating src/epaths.h
8147 make epaths-force
8149 echo creating lib-src/Makefile
8150 ( cd lib-src
8151 rm -f junk.c junk1.c junk2.c
8152 sed -e '/start of cpp stuff/q' \
8153 < Makefile.c > junk1.c
8154 sed -e '1,/start of cpp stuff/d'\
8155 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
8156 < Makefile.c > junk.c
8157 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
8158 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
8159 cat junk1.c junk2.c > Makefile.new
8160 rm -f junk.c junk1.c junk2.c
8161 chmod 444 Makefile.new
8162 mv -f Makefile.new Makefile
8165 echo creating src/Makefile
8166 ( cd src
8167 rm -f junk.c junk1.c junk2.c
8168 sed -e '/start of cpp stuff/q' \
8169 < Makefile.c > junk1.c
8170 sed -e '1,/start of cpp stuff/d'\
8171 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
8172 < Makefile.c > junk.c
8173 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
8174 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
8175 cat junk1.c junk2.c > Makefile.new
8176 rm -f junk.c junk1.c junk2.c
8177 chmod 444 Makefile.new
8178 mv -f Makefile.new Makefile
8181 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
8182 echo creating src/.gdbinit
8183 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
8186 # This is how we know whether to re-run configure in certain cases.
8187 touch src/config.stamp
8190 exit 0
8192 chmod +x $CONFIG_STATUS
8193 rm -fr confdefs* $ac_clean_files
8194 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1