(kill-comment): Fixed by rewriting it with syntax-tables rather than regexps
[emacs.git] / configure
blob3850689c87c256d947ea80dc42bddb74be72bef1
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 don't use Motif or Xaw3d scroll bars"
38 ac_help="$ac_help
39 --with-x use the X Window System"
41 # Initialize some variables set by options.
42 # The variables have the same names as the options, with
43 # dashes changed to underlines.
44 build=NONE
45 cache_file=./config.cache
46 exec_prefix=NONE
47 host=NONE
48 no_create=
49 nonopt=NONE
50 no_recursion=
51 prefix=NONE
52 program_prefix=NONE
53 program_suffix=NONE
54 program_transform_name=s,x,x,
55 silent=
56 site=
57 srcdir=
58 target=NONE
59 verbose=
60 x_includes=NONE
61 x_libraries=NONE
62 bindir='${exec_prefix}/bin'
63 sbindir='${exec_prefix}/sbin'
64 libexecdir='${exec_prefix}/libexec'
65 datadir='${prefix}/share'
66 sysconfdir='${prefix}/etc'
67 sharedstatedir='${prefix}/com'
68 localstatedir='${prefix}/var'
69 libdir='${exec_prefix}/lib'
70 includedir='${prefix}/include'
71 oldincludedir='/usr/include'
72 infodir='${prefix}/info'
73 mandir='${prefix}/man'
75 # Initialize some other variables.
76 subdirs=
77 MFLAGS= MAKEFLAGS=
78 SHELL=${CONFIG_SHELL-/bin/sh}
79 # Maximum number of lines to put in a shell here document.
80 ac_max_here_lines=12
82 ac_prev=
83 for ac_option
86 # If the previous option needs an argument, assign it.
87 if test -n "$ac_prev"; then
88 eval "$ac_prev=\$ac_option"
89 ac_prev=
90 continue
93 case "$ac_option" in
94 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95 *) ac_optarg= ;;
96 esac
98 # Accept the important Cygnus configure options, so we can diagnose typos.
100 case "$ac_option" in
102 -bindir | --bindir | --bindi | --bind | --bin | --bi)
103 ac_prev=bindir ;;
104 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105 bindir="$ac_optarg" ;;
107 -build | --build | --buil | --bui | --bu)
108 ac_prev=build ;;
109 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110 build="$ac_optarg" ;;
112 -cache-file | --cache-file | --cache-fil | --cache-fi \
113 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114 ac_prev=cache_file ;;
115 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117 cache_file="$ac_optarg" ;;
119 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
120 ac_prev=datadir ;;
121 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
122 | --da=*)
123 datadir="$ac_optarg" ;;
125 -disable-* | --disable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 eval "enable_${ac_feature}=no" ;;
134 -enable-* | --enable-*)
135 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
136 # Reject names that are not valid shell variable names.
137 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
138 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
141 case "$ac_option" in
142 *=*) ;;
143 *) ac_optarg=yes ;;
144 esac
145 eval "enable_${ac_feature}='$ac_optarg'" ;;
147 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149 | --exec | --exe | --ex)
150 ac_prev=exec_prefix ;;
151 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153 | --exec=* | --exe=* | --ex=*)
154 exec_prefix="$ac_optarg" ;;
156 -gas | --gas | --ga | --g)
157 # Obsolete; use --with-gas.
158 with_gas=yes ;;
160 -help | --help | --hel | --he)
161 # Omit some internal or obsolete options to make the list less imposing.
162 # This message is too long to be a string in the A/UX 3.1 sh.
163 cat << EOF
164 Usage: configure [options] [host]
165 Options: [defaults in brackets after descriptions]
166 Configuration:
167 --cache-file=FILE cache test results in FILE
168 --help print this message
169 --no-create do not create output files
170 --quiet, --silent do not print \`checking...' messages
171 --version print the version of autoconf that created configure
172 Directory and file names:
173 --prefix=PREFIX install architecture-independent files in PREFIX
174 [$ac_default_prefix]
175 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
176 [same as prefix]
177 --bindir=DIR user executables in DIR [EPREFIX/bin]
178 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
179 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
180 --datadir=DIR read-only architecture-independent data in DIR
181 [PREFIX/share]
182 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
183 --sharedstatedir=DIR modifiable architecture-independent data in DIR
184 [PREFIX/com]
185 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
186 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
187 --includedir=DIR C header files in DIR [PREFIX/include]
188 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
189 --infodir=DIR info documentation in DIR [PREFIX/info]
190 --mandir=DIR man documentation in DIR [PREFIX/man]
191 --srcdir=DIR find the sources in DIR [configure dir or ..]
192 --program-prefix=PREFIX prepend PREFIX to installed program names
193 --program-suffix=SUFFIX append SUFFIX to installed program names
194 --program-transform-name=PROGRAM
195 run sed PROGRAM on installed program names
197 cat << EOF
198 Host type:
199 --build=BUILD configure for building on BUILD [BUILD=HOST]
200 --host=HOST configure for HOST [guessed]
201 --target=TARGET configure for TARGET [TARGET=HOST]
202 Features and packages:
203 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
204 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
205 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
206 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
207 --x-includes=DIR X include files are in DIR
208 --x-libraries=DIR X library files are in DIR
210 if test -n "$ac_help"; then
211 echo "--enable and --with options recognized:$ac_help"
213 exit 0 ;;
215 -host | --host | --hos | --ho)
216 ac_prev=host ;;
217 -host=* | --host=* | --hos=* | --ho=*)
218 host="$ac_optarg" ;;
220 -includedir | --includedir | --includedi | --included | --include \
221 | --includ | --inclu | --incl | --inc)
222 ac_prev=includedir ;;
223 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
224 | --includ=* | --inclu=* | --incl=* | --inc=*)
225 includedir="$ac_optarg" ;;
227 -infodir | --infodir | --infodi | --infod | --info | --inf)
228 ac_prev=infodir ;;
229 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
230 infodir="$ac_optarg" ;;
232 -libdir | --libdir | --libdi | --libd)
233 ac_prev=libdir ;;
234 -libdir=* | --libdir=* | --libdi=* | --libd=*)
235 libdir="$ac_optarg" ;;
237 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
238 | --libexe | --libex | --libe)
239 ac_prev=libexecdir ;;
240 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
241 | --libexe=* | --libex=* | --libe=*)
242 libexecdir="$ac_optarg" ;;
244 -localstatedir | --localstatedir | --localstatedi | --localstated \
245 | --localstate | --localstat | --localsta | --localst \
246 | --locals | --local | --loca | --loc | --lo)
247 ac_prev=localstatedir ;;
248 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
249 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
250 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
251 localstatedir="$ac_optarg" ;;
253 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
254 ac_prev=mandir ;;
255 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
256 mandir="$ac_optarg" ;;
258 -nfp | --nfp | --nf)
259 # Obsolete; use --without-fp.
260 with_fp=no ;;
262 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
263 | --no-cr | --no-c)
264 no_create=yes ;;
266 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
267 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
268 no_recursion=yes ;;
270 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
271 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
272 | --oldin | --oldi | --old | --ol | --o)
273 ac_prev=oldincludedir ;;
274 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
275 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
276 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
277 oldincludedir="$ac_optarg" ;;
279 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
280 ac_prev=prefix ;;
281 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
282 prefix="$ac_optarg" ;;
284 -program-prefix | --program-prefix | --program-prefi | --program-pref \
285 | --program-pre | --program-pr | --program-p)
286 ac_prev=program_prefix ;;
287 -program-prefix=* | --program-prefix=* | --program-prefi=* \
288 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
289 program_prefix="$ac_optarg" ;;
291 -program-suffix | --program-suffix | --program-suffi | --program-suff \
292 | --program-suf | --program-su | --program-s)
293 ac_prev=program_suffix ;;
294 -program-suffix=* | --program-suffix=* | --program-suffi=* \
295 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
296 program_suffix="$ac_optarg" ;;
298 -program-transform-name | --program-transform-name \
299 | --program-transform-nam | --program-transform-na \
300 | --program-transform-n | --program-transform- \
301 | --program-transform | --program-transfor \
302 | --program-transfo | --program-transf \
303 | --program-trans | --program-tran \
304 | --progr-tra | --program-tr | --program-t)
305 ac_prev=program_transform_name ;;
306 -program-transform-name=* | --program-transform-name=* \
307 | --program-transform-nam=* | --program-transform-na=* \
308 | --program-transform-n=* | --program-transform-=* \
309 | --program-transform=* | --program-transfor=* \
310 | --program-transfo=* | --program-transf=* \
311 | --program-trans=* | --program-tran=* \
312 | --progr-tra=* | --program-tr=* | --program-t=*)
313 program_transform_name="$ac_optarg" ;;
315 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
316 | -silent | --silent | --silen | --sile | --sil)
317 silent=yes ;;
319 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
320 ac_prev=sbindir ;;
321 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
322 | --sbi=* | --sb=*)
323 sbindir="$ac_optarg" ;;
325 -sharedstatedir | --sharedstatedir | --sharedstatedi \
326 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
327 | --sharedst | --shareds | --shared | --share | --shar \
328 | --sha | --sh)
329 ac_prev=sharedstatedir ;;
330 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
331 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
332 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
333 | --sha=* | --sh=*)
334 sharedstatedir="$ac_optarg" ;;
336 -site | --site | --sit)
337 ac_prev=site ;;
338 -site=* | --site=* | --sit=*)
339 site="$ac_optarg" ;;
341 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
342 ac_prev=srcdir ;;
343 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
344 srcdir="$ac_optarg" ;;
346 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
347 | --syscon | --sysco | --sysc | --sys | --sy)
348 ac_prev=sysconfdir ;;
349 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
350 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
351 sysconfdir="$ac_optarg" ;;
353 -target | --target | --targe | --targ | --tar | --ta | --t)
354 ac_prev=target ;;
355 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
356 target="$ac_optarg" ;;
358 -v | -verbose | --verbose | --verbos | --verbo | --verb)
359 verbose=yes ;;
361 -version | --version | --versio | --versi | --vers)
362 echo "configure generated by autoconf version 2.13"
363 exit 0 ;;
365 -with-* | --with-*)
366 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
367 # Reject names that are not valid shell variable names.
368 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
372 case "$ac_option" in
373 *=*) ;;
374 *) ac_optarg=yes ;;
375 esac
376 eval "with_${ac_package}='$ac_optarg'" ;;
378 -without-* | --without-*)
379 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
380 # Reject names that are not valid shell variable names.
381 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
382 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
384 ac_package=`echo $ac_package| sed 's/-/_/g'`
385 eval "with_${ac_package}=no" ;;
387 --x)
388 # Obsolete; use --with-x.
389 with_x=yes ;;
391 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
392 | --x-incl | --x-inc | --x-in | --x-i)
393 ac_prev=x_includes ;;
394 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
395 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
396 x_includes="$ac_optarg" ;;
398 -x-libraries | --x-libraries | --x-librarie | --x-librari \
399 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
400 ac_prev=x_libraries ;;
401 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
402 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
403 x_libraries="$ac_optarg" ;;
405 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
410 echo "configure: warning: $ac_option: invalid host type" 1>&2
412 if test "x$nonopt" != xNONE; then
413 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
415 nonopt="$ac_option"
418 esac
419 done
421 if test -n "$ac_prev"; then
422 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427 # File descriptor usage:
428 # 0 standard input
429 # 1 file creation
430 # 2 errors and warnings
431 # 3 some systems may open it to /dev/tty
432 # 4 used on the Kubota Titan
433 # 6 checking for... messages and results
434 # 5 compiler messages saved in config.log
435 if test "$silent" = yes; then
436 exec 6>/dev/null
437 else
438 exec 6>&1
440 exec 5>./config.log
442 echo "\
443 This file contains any messages produced by compilers while
444 running configure, to aid debugging if configure makes a mistake.
445 " 1>&5
447 # Strip out --no-create and --no-recursion so they do not pile up.
448 # Also quote any args containing shell metacharacters.
449 ac_configure_args=
450 for ac_arg
452 case "$ac_arg" in
453 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
454 | --no-cr | --no-c) ;;
455 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
456 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
457 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
458 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
459 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
460 esac
461 done
463 # NLS nuisances.
464 # Only set these to C if already set. These must not be set unconditionally
465 # because not all systems understand e.g. LANG=C (notably SCO).
466 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
467 # Non-C LC_CTYPE values break the ctype check.
468 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
469 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
470 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
471 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
473 # confdefs.h avoids OS command line length limits that DEFS can exceed.
474 rm -rf conftest* confdefs.h
475 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
476 echo > confdefs.h
478 # A filename unique to this package, relative to the directory that
479 # configure is in, which we can look for to find out if srcdir is correct.
480 ac_unique_file=src/lisp.h
482 # Find the source files, if location was not specified.
483 if test -z "$srcdir"; then
484 ac_srcdir_defaulted=yes
485 # Try the directory containing this script, then its parent.
486 ac_prog=$0
487 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
488 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
489 srcdir=$ac_confdir
490 if test ! -r $srcdir/$ac_unique_file; then
491 srcdir=..
493 else
494 ac_srcdir_defaulted=no
496 if test ! -r $srcdir/$ac_unique_file; then
497 if test "$ac_srcdir_defaulted" = yes; then
498 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
499 else
500 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
505 # Prefer explicitly selected file to automatically selected ones.
506 if test -z "$CONFIG_SITE"; then
507 if test "x$prefix" != xNONE; then
508 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
509 else
510 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
513 for ac_site_file in $CONFIG_SITE; do
514 if test -r "$ac_site_file"; then
515 echo "loading site script $ac_site_file"
516 . "$ac_site_file"
518 done
520 if test -r "$cache_file"; then
521 echo "loading cache $cache_file"
522 . $cache_file
523 else
524 echo "creating cache $cache_file"
525 > $cache_file
528 ac_ext=c
529 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
530 ac_cpp='$CPP $CPPFLAGS'
531 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
532 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
533 cross_compiling=$ac_cv_prog_cc_cross
535 ac_exeext=
536 ac_objext=o
537 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
538 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
539 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
540 ac_n= ac_c='
541 ' ac_t=' '
542 else
543 ac_n=-n ac_c= ac_t=
545 else
546 ac_n= ac_c='\c' ac_t=
552 lispdir='${datadir}/emacs/${version}/lisp'
553 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
554 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
555 lisppath='${locallisppath}:${lispdir}'
556 etcdir='${datadir}/emacs/${version}/etc'
557 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
558 docdir='${datadir}/emacs/${version}/etc'
560 # Check whether --with-gcc or --without-gcc was given.
561 if test "${with_gcc+set}" = set; then
562 withval="$with_gcc"
566 # Check whether --with-pop or --without-pop was given.
567 if test "${with_pop+set}" = set; then
568 withval="$with_pop"
569 if test "$withval" = yes; then
570 cat >> confdefs.h <<\EOF
571 #define MAIL_USE_POP 1
574 else :
576 else
577 cat >> confdefs.h <<\EOF
578 #define MAIL_USE_POP 1
583 # Check whether --with-kerberos or --without-kerberos was given.
584 if test "${with_kerberos+set}" = set; then
585 withval="$with_kerberos"
586 cat >> confdefs.h <<\EOF
587 #define KERBEROS 1
592 # Check whether --with-kerberos5 or --without-kerberos5 was given.
593 if test "${with_kerberos5+set}" = set; then
594 withval="$with_kerberos5"
595 if test "${with_kerberos5+set}" = set; then
596 if test "${with_kerberos+set}" != set; then
597 with_kerberos=yes
598 cat >> confdefs.h <<\EOF
599 #define KERBEROS 1
604 cat >> confdefs.h <<\EOF
605 #define KERBEROS5 1
610 # Check whether --with-hesiod or --without-hesiod was given.
611 if test "${with_hesiod+set}" = set; then
612 withval="$with_hesiod"
613 cat >> confdefs.h <<\EOF
614 #define HESIOD 1
619 # Check whether --with-x-toolkit or --without-x-toolkit was given.
620 if test "${with_x_toolkit+set}" = set; then
621 withval="$with_x_toolkit"
622 case "${withval}" in
623 y | ye | yes ) val=athena ;;
624 n | no ) val=no ;;
625 l | lu | luc | luci | lucid ) val=lucid ;;
626 a | at | ath | athe | athen | athena ) val=athena ;;
627 m | mo | mot | moti | motif ) val=motif ;;
629 { echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
630 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
631 Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
633 esac
634 with_x_toolkit=$val
638 # Check whether --with-xpm or --without-xpm was given.
639 if test "${with_xpm+set}" = set; then
640 withval="$with_xpm"
644 # Check whether --with-jpeg or --without-jpeg was given.
645 if test "${with_jpeg+set}" = set; then
646 withval="$with_jpeg"
650 # Check whether --with-tiff or --without-tiff was given.
651 if test "${with_tiff+set}" = set; then
652 withval="$with_tiff"
656 # Check whether --with-gif or --without-gif was given.
657 if test "${with_gif+set}" = set; then
658 withval="$with_gif"
662 # Check whether --with-png or --without-png was given.
663 if test "${with_png+set}" = set; then
664 withval="$with_png"
668 # Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
669 if test "${with_toolkit_scroll_bars+set}" = set; then
670 withval="$with_toolkit_scroll_bars"
675 #### Make srcdir absolute, if it isn't already. It's important to
676 #### avoid running the path through pwd unnecessary, since pwd can
677 #### give you automounter prefixes, which can go away. We do all this
678 #### so Emacs can find its files when run uninstalled.
679 case "${srcdir}" in
680 /* ) ;;
682 ## We may be able to use the $PWD environment variable to make this
683 ## absolute. But sometimes PWD is inaccurate.
684 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
685 unset CDPATH
686 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
687 then
688 srcdir="$PWD"
689 else
690 srcdir="`(cd ${srcdir}; pwd)`"
693 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
694 esac
696 #### Check if the source directory already has a configured system in it.
697 if test `pwd` != `(cd ${srcdir} && pwd)` \
698 && test -f "${srcdir}/src/config.h" ; then
699 echo "configure: warning: The directory tree \`${srcdir}' is being used
700 as a build directory right now; it has been configured in its own
701 right. To configure in another directory as well, you MUST
702 use GNU make. If you do not have GNU make, then you must
703 now do \`make distclean' in ${srcdir},
704 and then run $0 again." 1>&2
706 extrasub='/^VPATH[ ]*=/c\
707 vpath %.c $(srcdir)\
708 vpath %.h $(srcdir)\
709 vpath %.y $(srcdir)\
710 vpath %.l $(srcdir)\
711 vpath %.s $(srcdir)\
712 vpath %.in $(srcdir)\
713 vpath %.texi $(srcdir)'
716 #### Given the configuration name, set machfile and opsysfile to the
717 #### names of the m/*.h and s/*.h files we should use.
719 ### Canonicalize the configuration name.
721 ac_aux_dir=
722 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
723 if test -f $ac_dir/install-sh; then
724 ac_aux_dir=$ac_dir
725 ac_install_sh="$ac_aux_dir/install-sh -c"
726 break
727 elif test -f $ac_dir/install.sh; then
728 ac_aux_dir=$ac_dir
729 ac_install_sh="$ac_aux_dir/install.sh -c"
730 break
732 done
733 if test -z "$ac_aux_dir"; then
734 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
736 ac_config_guess=$ac_aux_dir/config.guess
737 ac_config_sub=$ac_aux_dir/config.sub
738 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
741 # Make sure we can run config.sub.
742 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
743 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
746 echo $ac_n "checking host system type""... $ac_c" 1>&6
747 echo "configure:748: checking host system type" >&5
749 host_alias=$host
750 case "$host_alias" in
751 NONE)
752 case $nonopt in
753 NONE)
754 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
755 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
756 fi ;;
757 *) host_alias=$nonopt ;;
758 esac ;;
759 esac
761 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
762 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
763 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
764 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
765 echo "$ac_t""$host" 1>&6
767 canonical=$host
768 configuration=$host_alias
771 ### If you add support for a new configuration, add code to this
772 ### switch statement to recognize your configuration name and select
773 ### the appropriate operating system and machine description files.
775 ### You would hope that you could choose an m/*.h file pretty much
776 ### based on the machine portion of the configuration name, and an s-
777 ### file based on the operating system portion. However, it turns out
778 ### that each m/*.h file is pretty manufacturer-specific - for
779 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
780 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
781 ### machines. So we basically have to have a special case for each
782 ### configuration name.
784 ### As far as handling version numbers on operating systems is
785 ### concerned, make sure things will fail in a fixable way. If
786 ### /etc/MACHINES doesn't say anything about version numbers, be
787 ### prepared to handle anything reasonably. If version numbers
788 ### matter, be sure /etc/MACHINES says something about it.
790 ### Eric Raymond says we should accept strings like "sysvr4" to mean
791 ### "System V Release 4"; he writes, "The old convention encouraged
792 ### confusion between `system' and `release' levels'."
794 machine='' opsys='' unported=no
795 case "${canonical}" in
797 ## NetBSD ports
798 *-*-netbsd* )
799 opsys=netbsd
800 case "${canonical}" in
801 alpha*-*-netbsd*) machine=alpha ;;
802 i[3456]86-*-netbsd*) machine=intel386 ;;
803 m68k-*-netbsd*)
804 # This is somewhat bogus.
805 machine=hp9000s300 ;;
806 powerpc-apple-netbsd*) machine=macppc ;;
807 mips-*-netbsd*) machine=pmax ;;
808 ns32k-*-netbsd*) machine=ns32000 ;;
809 sparc-*-netbsd*) machine=sparc ;;
810 vax-*-netbsd*) machine=vax ;;
811 esac
814 ## OpenBSD ports
815 *-*-openbsd* )
816 opsys=openbsd
817 case "${canonical}" in
818 alpha*-*-openbsd*) machine=alpha ;;
819 i386-*-openbsd*) machine=intel386 ;;
820 m68k-*-openbsd*) machine=hp9000s300 ;;
821 mipsel-*-openbsd*) machine=pmax ;;
822 ns32k-*-openbsd*) machine=ns32000 ;;
823 sparc-*-openbsd*) machine=sparc ;;
824 vax-*-openbsd*) machine=vax ;;
825 esac
828 ## Acorn RISCiX:
829 arm-acorn-riscix1.1* )
830 machine=acorn opsys=riscix1-1
832 arm-acorn-riscix1.2* | arm-acorn-riscix )
833 ## This name is riscix12 instead of riscix1.2
834 ## to avoid a file name conflict on MSDOS.
835 machine=acorn opsys=riscix12
838 ## BSDI ports
839 *-*-bsdi* )
840 opsys=bsdi
841 case "${canonical}" in
842 i[345]86-*-bsdi*) machine=intel386 ;;
843 sparc-*-bsdi*) machine=sparc ;;
844 powerpc-*-bsdi*) machine=powerpc ;;
845 esac
846 case "${canonical}" in
847 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
848 *-*-bsdi2.0* ) opsys=bsdos2 ;;
849 *-*-bsdi2* ) opsys=bsdos2-1 ;;
850 *-*-bsdi3* ) opsys=bsdos3 ;;
851 *-*-bsdi4* ) opsys=bsdos4 ;;
852 esac
855 ## Alliant machines
856 ## Strictly speaking, we need the version of the alliant operating
857 ## system to choose the right machine file, but currently the
858 ## configuration name doesn't tell us enough to choose the right
859 ## one; we need to give alliants their own operating system name to
860 ## do this right. When someone cares, they can help us.
861 fx80-alliant-* )
862 machine=alliant4 opsys=bsd4-2
864 i860-alliant-* )
865 machine=alliant-2800 opsys=bsd4-3
868 ## Alpha (DEC) machines.
869 alpha*-dec-osf* )
870 machine=alpha opsys=osf1
871 # This is needed to find X11R6.1 libraries for certain tests.
872 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
873 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
876 alpha*-*-linux-gnu* )
877 machine=alpha opsys=gnu-linux
880 ## Altos 3068
881 m68*-altos-sysv* )
882 machine=altos opsys=usg5-2
885 ## Amdahl UTS
886 580-amdahl-sysv* )
887 machine=amdahl opsys=usg5-2-2
890 ## Apollo, Domain/OS
891 m68*-apollo-* )
892 machine=apollo opsys=bsd4-3
895 ## AT&T 3b2, 3b5, 3b15, 3b20
896 we32k-att-sysv* )
897 machine=att3b opsys=usg5-2-2
900 ## AT&T 3b1 - The Mighty Unix PC!
901 m68*-att-sysv* )
902 machine=7300 opsys=usg5-2-2
905 ## Bull dpx20
906 rs6000-bull-bosx* )
907 machine=ibmrs6000 opsys=aix3-2
910 ## Bull dpx2
911 m68*-bull-sysv3* )
912 machine=dpx2 opsys=usg5-3
915 ## Bull sps7
916 m68*-bull-sysv2* )
917 machine=sps7 opsys=usg5-2
920 ## CCI 5/32, 6/32 -- see "Tahoe".
922 ## Celerity
923 ## I don't know what configuration name to use for this; config.sub
924 ## doesn't seem to know anything about it. Hey, Celerity users, get
925 ## in touch with us!
926 celerity-celerity-bsd* )
927 machine=celerity opsys=bsd4-2
930 ## Clipper
931 ## What operating systems does this chip run that Emacs has been
932 ## tested on?
933 clipper-* )
934 machine=clipper
935 ## We'll use the catch-all code at the bottom to guess the
936 ## operating system.
939 ## Convex
940 *-convex-bsd* | *-convex-convexos* )
941 machine=convex opsys=bsd4-3
942 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
943 NON_GNU_CPP="cc -E -P"
946 ## Cubix QBx/386
947 i[3456]86-cubix-sysv* )
948 machine=intel386 opsys=usg5-3
951 ## Cydra 5
952 cydra*-cydrome-sysv* )
953 machine=cydra5 opsys=usg5-3
956 ## Data General AViiON Machines
957 ## DG changed naming conventions with the release of 5.4.4.10, they
958 ## dropped the initial 5.4 but left the intervening R. Because of the
959 ## R this shouldn't conflict with older versions of the OS (which I
960 ## think were named like dgux4.*). In addition, DG new AViiONs series
961 ## uses either Motorola M88k or Intel Pentium CPUs.
962 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
963 machine=aviion opsys=dgux4
965 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
966 ## This name is dgux5-4-3 instead of dgux5-4r3
967 ## to avoid a file name conflict on MSDOS.
968 machine=aviion opsys=dgux5-4-3
970 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
971 machine=aviion opsys=dgux5-4r2
973 m88k-dg-dgux* )
974 machine=aviion opsys=dgux
977 ## Data General AViiON Intel (x86) Machines
978 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
979 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
980 i[345]86-dg-dguxR4* )
981 machine=aviion-intel opsys=dgux4
984 ## DECstations
985 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
986 machine=pmax opsys=bsd4-2
988 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
989 machine=pmax opsys=bsd4-3
991 mips-dec-ultrix* )
992 machine=pmax opsys=ultrix4-3
994 mips-dec-osf* )
995 machine=pmax opsys=osf1
997 mips-dec-mach_bsd4.3* )
998 machine=pmax opsys=mach-bsd4-3
1001 ## Motorola Delta machines
1002 m68k-motorola-sysv* | m68000-motorola-sysv* )
1003 machine=delta opsys=usg5-3
1004 if test -z "`type gnucc | grep 'not found'`"
1005 then
1006 if test -s /etc/167config
1007 then CC="gnucc -m68040"
1008 else CC="gnucc -m68881"
1010 else
1011 if test -z "`type gcc | grep 'not found'`"
1012 then CC=gcc
1013 else CC=cc
1017 m88k-motorola-sysv4* )
1018 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1019 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1020 # I hope there are not other 4.0 versions for this machine
1021 # which really need usg5-4 instead.
1022 machine=delta88k opsys=usg5-4-2
1024 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1025 machine=delta88k opsys=usg5-3
1028 ## Dual machines
1029 m68*-dual-sysv* )
1030 machine=dual opsys=usg5-2
1032 m68*-dual-uniplus* )
1033 machine=dual opsys=unipl5-2
1036 ## Elxsi 6400
1037 elxsi-elxsi-sysv* )
1038 machine=elxsi opsys=usg5-2
1041 ## Encore machines
1042 ns16k-encore-bsd* )
1043 machine=ns16000 opsys=umax
1046 ## The GEC 93 - apparently, this port isn't really finished yet.
1048 ## Gould Power Node and NP1
1049 pn-gould-bsd4.2* )
1050 machine=gould opsys=bsd4-2
1052 pn-gould-bsd4.3* )
1053 machine=gould opsys=bsd4-3
1055 np1-gould-bsd* )
1056 machine=gould-np1 opsys=bsd4-3
1059 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1060 ## as far as Emacs is concerned).
1061 m88k-harris-cxux* )
1062 # Build needs to be different on 7.0 and later releases
1063 case "`uname -r`" in
1064 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1065 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1066 esac
1067 NON_GNU_CPP="/lib/cpp"
1069 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1070 m68k-harris-cxux* )
1071 machine=nh3000 opsys=cxux
1073 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1074 powerpc-harris-powerunix )
1075 machine=nh6000 opsys=powerunix
1076 NON_GNU_CPP="cc -Xo -E -P"
1078 ## SR2001/SR2201 running HI-UX/MPP
1079 hppa1.1-hitachi-hiuxmpp* )
1080 machine=sr2k opsys=hiuxmpp
1082 ## Honeywell XPS100
1083 xps*-honeywell-sysv* )
1084 machine=xps100 opsys=usg5-2
1087 ## HP 9000 series 200 or 300
1088 m68*-hp-bsd* )
1089 machine=hp9000s300 opsys=bsd4-3
1091 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1092 m68*-hp-hpux* )
1093 case "`uname -r`" in
1094 ## Someone's system reports A.B8.05 for this.
1095 ## I wonder what other possibilities there are.
1096 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1097 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1098 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1099 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1100 *) machine=hp9000s300 opsys=hpux ;;
1101 esac
1104 ## HP 9000 series 700 and 800, running HP/UX
1105 hppa*-hp-hpux7* )
1106 machine=hp800 opsys=hpux
1108 hppa*-hp-hpux8* )
1109 machine=hp800 opsys=hpux8
1111 hppa*-hp-hpux9shr* )
1112 machine=hp800 opsys=hpux9shr
1114 hppa*-hp-hpux9* )
1115 machine=hp800 opsys=hpux9
1117 hppa*-hp-hpux1[0-9]* )
1118 machine=hp800 opsys=hpux10
1121 ## HP 9000 series 700 and 800, running HP/UX
1122 hppa*-hp-hpux* )
1123 ## Cross-compilation? Nah!
1124 case "`uname -r`" in
1125 ## Someone's system reports A.B8.05 for this.
1126 ## I wonder what other possibilities there are.
1127 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1128 *.08.* ) machine=hp800 opsys=hpux8 ;;
1129 *.09.* ) machine=hp800 opsys=hpux9 ;;
1130 *) machine=hp800 opsys=hpux10 ;;
1131 esac
1133 hppa*-*-nextstep* )
1134 machine=hp800 opsys=nextstep
1137 ## Orion machines
1138 orion-orion-bsd* )
1139 machine=orion opsys=bsd4-2
1141 clipper-orion-bsd* )
1142 machine=orion105 opsys=bsd4-2
1145 ## IBM machines
1146 i[3456]86-ibm-aix1.1* )
1147 machine=ibmps2-aix opsys=usg5-2-2
1149 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1150 machine=ibmps2-aix opsys=usg5-3
1152 i370-ibm-aix*)
1153 machine=ibm370aix opsys=usg5-3
1155 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1156 machine=ibmrs6000 opsys=aix3-1
1158 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1159 machine=ibmrs6000 opsys=aix3-2-5
1161 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1162 machine=ibmrs6000 opsys=aix4-1
1164 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1165 machine=ibmrs6000 opsys=aix4-2
1167 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1168 machine=ibmrs6000 opsys=aix4
1170 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1171 machine=ibmrs6000 opsys=aix4-1
1173 rs6000-ibm-aix* | powerpc-ibm-aix* )
1174 machine=ibmrs6000 opsys=aix3-2
1176 romp-ibm-bsd4.3* )
1177 machine=ibmrt opsys=bsd4-3
1179 romp-ibm-bsd4.2* )
1180 machine=ibmrt opsys=bsd4-2
1182 romp-ibm-aos4.3* )
1183 machine=ibmrt opsys=bsd4-3
1185 romp-ibm-aos4.2* )
1186 machine=ibmrt opsys=bsd4-2
1188 romp-ibm-aos* )
1189 machine=ibmrt opsys=bsd4-3
1191 romp-ibm-bsd* )
1192 machine=ibmrt opsys=bsd4-3
1194 romp-ibm-aix* )
1195 machine=ibmrt-aix opsys=usg5-2-2
1198 ## Integrated Solutions `Optimum V'
1199 m68*-isi-bsd4.2* )
1200 machine=isi-ov opsys=bsd4-2
1202 m68*-isi-bsd4.3* )
1203 machine=isi-ov opsys=bsd4-3
1206 ## Intel 386 machines where we do care about the manufacturer
1207 i[3456]86-intsys-sysv* )
1208 machine=is386 opsys=usg5-2-2
1211 ## Prime EXL
1212 i[3456]86-prime-sysv* )
1213 machine=i386 opsys=usg5-3
1216 ## Sequent Symmetry running Dynix
1217 i[3456]86-sequent-bsd* )
1218 machine=symmetry opsys=bsd4-3
1221 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1222 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1223 machine=sequent-ptx opsys=ptx4
1224 NON_GNU_CPP=/lib/cpp
1227 ## Sequent Symmetry running DYNIX/ptx
1228 ## Use the old cpp rather than the newer ANSI one.
1229 i[3456]86-sequent-ptx* )
1230 machine=sequent-ptx opsys=ptx
1231 NON_GNU_CPP="/lib/cpp"
1234 ## ncr machine running svr4.3.
1235 i[3456]86-ncr-sysv4.3 )
1236 machine=ncr386 opsys=usg5-4-3
1239 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1240 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1241 i[3456]86-ncr-sysv* )
1242 machine=ncr386 opsys=usg5-4-2
1245 ## Intel Paragon OSF/1
1246 i860-intel-osf1* )
1247 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1250 ## Intel 860
1251 i860-*-sysv4* )
1252 machine=i860 opsys=usg5-4
1253 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1254 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1257 ## Masscomp machines
1258 m68*-masscomp-rtu* )
1259 machine=masscomp opsys=rtu
1262 ## Megatest machines
1263 m68*-megatest-bsd* )
1264 machine=mega68 opsys=bsd4-2
1267 ## Workstations sold by MIPS
1268 ## This is not necessarily all workstations using the MIPS processor -
1269 ## Irises are produced by SGI, and DECstations by DEC.
1271 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1272 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1273 ## it gives for choosing between the alternatives seems to be "Use
1274 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1275 ## the BSD world." I'll assume that these are instructions for
1276 ## handling two odd situations, and that every other situation
1277 ## should use mips.h and usg5-2-2, they being listed first.
1278 mips-mips-usg* )
1279 machine=mips4
1280 ## Fall through to the general code at the bottom to decide on the OS.
1282 mips-mips-riscos4* )
1283 machine=mips4 opsys=bsd4-3
1284 NON_GNU_CC="cc -systype bsd43"
1285 NON_GNU_CPP="cc -systype bsd43 -E"
1287 mips-mips-riscos5* )
1288 machine=mips4 opsys=riscos5
1289 NON_GNU_CC="cc -systype bsd43"
1290 NON_GNU_CPP="cc -systype bsd43 -E"
1292 mips-mips-bsd* )
1293 machine=mips opsys=bsd4-3
1295 mips-mips-* )
1296 machine=mips opsys=usg5-2-2
1299 ## NeXT
1300 m68*-next-* | m68k-*-nextstep* )
1301 machine=m68k opsys=nextstep
1304 ## The complete machine from National Semiconductor
1305 ns32k-ns-genix* )
1306 machine=ns32000 opsys=usg5-2
1309 ## NCR machines
1310 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1311 machine=tower32 opsys=usg5-2-2
1313 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1314 machine=tower32v3 opsys=usg5-3
1317 ## NEC EWS4800
1318 mips-nec-sysv4*)
1319 machine=ews4800 opsys=ux4800
1322 ## Nixdorf Targon 31
1323 m68*-nixdorf-sysv* )
1324 machine=targon31 opsys=usg5-2-2
1327 ## Nu (TI or LMI)
1328 m68*-nu-sysv* )
1329 machine=nu opsys=usg5-2
1332 ## Plexus
1333 m68*-plexus-sysv* )
1334 machine=plexus opsys=usg5-2
1337 ## PowerPC reference platform
1338 powerpcle-*-solaris2* )
1339 machine=prep
1340 opsys=sol2-5
1343 ## Pyramid machines
1344 ## I don't really have any idea what sort of processor the Pyramid has,
1345 ## so I'm assuming it is its own architecture.
1346 pyramid-pyramid-bsd* )
1347 machine=pyramid opsys=bsd4-2
1350 ## Sequent Balance
1351 ns32k-sequent-bsd4.2* )
1352 machine=sequent opsys=bsd4-2
1354 ns32k-sequent-bsd4.3* )
1355 machine=sequent opsys=bsd4-3
1358 ## Siemens Nixdorf
1359 mips-siemens-sysv* | mips-sni-sysv*)
1360 machine=mips-siemens opsys=usg5-4
1361 NON_GNU_CC=/usr/ccs/bin/cc
1362 NON_GNU_CPP=/usr/ccs/lib/cpp
1365 ## Silicon Graphics machines
1366 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1367 m68*-sgi-iris3.5* )
1368 machine=irist opsys=iris3-5
1370 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1371 machine=irist opsys=iris3-6
1373 ## Iris 4D
1374 mips-sgi-irix3* )
1375 machine=iris4d opsys=irix3-3
1377 mips-sgi-irix4* )
1378 machine=iris4d opsys=irix4-0
1380 mips-sgi-irix6.5 )
1381 machine=iris4d opsys=irix6-5
1382 # Without defining _LANGUAGE_C, things get masked out in the headers
1383 # so that, for instance, grepping for `free' in stdlib.h fails and
1384 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
1385 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1386 NON_GCC_TEST_OPTIONS="-n32 -G0 -D_LANGUAGE_C"
1388 mips-sgi-irix6* )
1389 machine=iris4d opsys=irix6-0
1390 # It's not clear whether -D_LANGUAGE_C is necessary as for 6.5,
1391 # but presumably it does no harm.
1392 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
1393 NON_GCC_TEST_OPTIONS=-32
1395 mips-sgi-irix5.[01]* )
1396 machine=iris4d opsys=irix5-0
1398 mips-sgi-irix5* | mips-sgi-irix* )
1399 machine=iris4d opsys=irix5-2
1402 ## SONY machines
1403 m68*-sony-bsd4.2* )
1404 machine=news opsys=bsd4-2
1406 m68*-sony-bsd4.3* )
1407 machine=news opsys=bsd4-3
1409 m68*-sony-newsos3* | m68*-sony-news3*)
1410 machine=news opsys=bsd4-3
1412 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1413 machine=news-risc opsys=bsd4-3
1415 mips-sony-newsos6* )
1416 machine=news-r6 opsys=newsos6
1418 mips-sony-news* )
1419 machine=news-risc opsys=newsos5
1422 ## Stride
1423 m68*-stride-sysv* )
1424 machine=stride opsys=usg5-2
1427 ## Suns
1428 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1429 machine=sparc opsys=gnu-linux
1432 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1433 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1434 | rs6000-*-solaris2*)
1435 case "${canonical}" in
1436 m68*-sunos1* ) machine=sun1 ;;
1437 m68*-sunos2* ) machine=sun2 ;;
1438 m68* ) machine=sun3 ;;
1439 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1440 i[3456]86-*-* ) machine=intel386 ;;
1441 powerpcle* ) machine=powerpcle ;;
1442 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1443 sparc* ) machine=sparc ;;
1444 * ) unported=yes ;;
1445 esac
1446 case "${canonical}" in
1447 ## The Sun386 didn't get past 4.0.
1448 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1449 *-sunos4.0* ) opsys=sunos4-0 ;;
1450 *-sunos4.1.[3-9]*noshare )
1451 ## This name is sunos413 instead of sunos4-1-3
1452 ## to avoid a file name conflict on MSDOS.
1453 opsys=sunos413
1454 NON_GNU_CPP=/usr/lib/cpp
1455 NON_GCC_TEST_OPTIONS=-Bstatic
1456 GCC_TEST_OPTIONS=-static
1458 *-sunos4.1.[3-9]* | *-sunos4shr*)
1459 opsys=sunos4shr
1460 NON_GNU_CPP=/usr/lib/cpp
1462 *-sunos4* | *-sunos )
1463 opsys=sunos4-1
1464 NON_GCC_TEST_OPTIONS=-Bstatic
1465 GCC_TEST_OPTIONS=-static
1467 *-sunos5.3* | *-solaris2.3* )
1468 opsys=sol2-3
1469 NON_GNU_CPP=/usr/ccs/lib/cpp
1471 *-sunos5.4* | *-solaris2.4* )
1472 opsys=sol2-4
1473 NON_GNU_CPP=/usr/ccs/lib/cpp
1474 RANLIB="ar -ts"
1476 *-sunos5.5* | *-solaris2.5* )
1477 opsys=sol2-5
1478 NON_GNU_CPP=/usr/ccs/lib/cpp
1479 RANLIB="ar -ts"
1481 *-sunos5* | *-solaris* )
1482 opsys=sol2-5
1483 NON_GNU_CPP=/usr/ccs/lib/cpp
1485 * ) opsys=bsd4-2 ;;
1486 esac
1487 ## Watch out for a compiler that we know will not work.
1488 case "${canonical}" in
1489 *-solaris* | *-sunos5* )
1490 if [ "x$CC" = x/usr/ucb/cc ]; then
1491 ## /usr/ucb/cc doesn't work;
1492 ## we should find some other compiler that does work.
1493 unset CC
1496 *) ;;
1497 esac
1499 sparc-*-nextstep* )
1500 machine=sparc opsys=nextstep
1503 ## Tadpole 68k
1504 m68*-tadpole-sysv* )
1505 machine=tad68k opsys=usg5-3
1508 ## Tahoe machines
1509 tahoe-tahoe-bsd4.2* )
1510 machine=tahoe opsys=bsd4-2
1512 tahoe-tahoe-bsd4.3* )
1513 machine=tahoe opsys=bsd4-3
1516 ## Tandem Integrity S2
1517 mips-tandem-sysv* )
1518 machine=tandem-s2 opsys=usg5-3
1521 ## Tektronix XD88
1522 m88k-tektronix-sysv3* )
1523 machine=tekxd88 opsys=usg5-3
1526 ## Tektronix 16000 box (6130?)
1527 ns16k-tektronix-bsd* )
1528 machine=ns16000 opsys=bsd4-2
1530 ## Tektronix 4300
1531 ## src/m/tek4300.h hints that this is a m68k machine.
1532 m68*-tektronix-bsd* )
1533 machine=tek4300 opsys=bsd4-3
1536 ## Titan P2 or P3
1537 ## We seem to have lost the machine-description file titan.h!
1538 titan-titan-sysv* )
1539 machine=titan opsys=usg5-3
1542 ## Ustation E30 (SS5E)
1543 m68*-unisys-uniplus* )
1544 machine=ustation opsystem=unipl5-2
1547 ## Vaxen.
1548 vax-dec-* )
1549 machine=vax
1550 case "${canonical}" in
1551 *-bsd4.1* ) opsys=bsd4-1 ;;
1552 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1553 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1554 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1555 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1556 *-vms* ) opsys=vms ;;
1557 * ) unported=yes
1558 esac
1561 ## Whitechapel MG1
1562 ns16k-whitechapel-* )
1563 machine=mg1
1564 ## We don't know what sort of OS runs on these; we'll let the
1565 ## operating system guessing code below try.
1568 ## Wicat
1569 m68*-wicat-sysv* )
1570 machine=wicat opsys=usg5-2
1573 ## Intel 386 machines where we don't care about the manufacturer
1574 i[3456]86-*-* )
1575 machine=intel386
1576 case "${canonical}" in
1577 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1578 *-isc2.2* ) opsys=isc2-2 ;;
1579 *-isc4.0* ) opsys=isc4-0 ;;
1580 *-isc4.* ) opsys=isc4-1
1581 GCC_TEST_OPTIONS=-posix
1582 NON_GCC_TEST_OPTIONS=-Xp
1584 *-isc* ) opsys=isc3-0 ;;
1585 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1586 *-esix* ) opsys=esix ;;
1587 *-xenix* ) opsys=xenix ;;
1588 *-linux-gnu* ) opsys=gnu-linux ;;
1589 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1590 *-sco3.2v5* ) opsys=sco5
1591 NON_GNU_CPP=/lib/cpp
1592 # Prevent -belf from being passed to $CPP.
1593 # /lib/cpp does not accept it.
1594 OVERRIDE_CPPFLAGS=" "
1596 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1597 *-386bsd* ) opsys=386bsd ;;
1598 *-freebsd* ) opsys=freebsd ;;
1599 *-nextstep* ) opsys=nextstep ;;
1600 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1601 esac
1604 ## m68k Linux-based GNU system
1605 m68k-*-linux-gnu* )
1606 machine=m68k opsys=gnu-linux
1609 ## Mips Linux-based GNU system
1610 mips-*-linux-gnu* )
1611 machine=mips opsys=gnu-linux
1614 ## UXP/DS
1615 sparc-fujitsu-sysv4* )
1616 machine=sparc opsys=uxpds
1617 NON_GNU_CPP=/usr/ccs/lib/cpp
1618 RANLIB="ar -ts"
1621 ## UXP/V
1622 f301-fujitsu-uxpv4.1)
1623 machine=f301 opsys=uxpv
1627 unported=yes
1629 esac
1631 ### If the code above didn't choose an operating system, just choose
1632 ### an operating system based on the configuration name. You really
1633 ### only want to use this when you have no idea what the right
1634 ### operating system is; if you know what operating systems a machine
1635 ### runs, it's cleaner to make it explicit in the case statement
1636 ### above.
1637 if test x"${opsys}" = x; then
1638 case "${canonical}" in
1639 *-gnu* ) opsys=gnu ;;
1640 *-bsd4.[01] ) opsys=bsd4-1 ;;
1641 *-bsd4.2 ) opsys=bsd4-2 ;;
1642 *-bsd4.3 ) opsys=bsd4-3 ;;
1643 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1644 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1645 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1646 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1647 *-sysv4.2uw* ) opsys=unixware ;;
1648 *-sysv4.1* | *-sysvr4.1* )
1649 NON_GNU_CPP=/usr/lib/cpp
1650 opsys=usg5-4 ;;
1651 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1652 if [ x$NON_GNU_CPP = x ]; then
1653 if [ -f /usr/ccs/lib/cpp ]; then
1654 NON_GNU_CPP=/usr/ccs/lib/cpp
1655 else
1656 NON_GNU_CPP=/lib/cpp
1659 opsys=usg5-4-2 ;;
1660 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1662 unported=yes
1664 esac
1667 if test "x$RANLIB" = x; then
1668 RANLIB=ranlib
1672 if test $unported = yes; then
1673 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1674 Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1677 machfile="m/${machine}.h"
1678 opsysfile="s/${opsys}.h"
1681 #### Choose a compiler.
1682 test -n "$CC" && cc_specified=yes
1684 # Save the value of CFLAGS that the user specified.
1685 SPECIFIED_CFLAGS="$CFLAGS"
1687 case ${with_gcc} in
1688 "yes" ) CC="gcc" GCC=yes ;;
1689 "no" ) : ${CC=cc} ;;
1690 * ) # Extract the first word of "gcc", so it can be a program name with args.
1691 set dummy gcc; ac_word=$2
1692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1693 echo "configure:1694: checking for $ac_word" >&5
1694 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1695 echo $ac_n "(cached) $ac_c" 1>&6
1696 else
1697 if test -n "$CC"; then
1698 ac_cv_prog_CC="$CC" # Let the user override the test.
1699 else
1700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1701 ac_dummy="$PATH"
1702 for ac_dir in $ac_dummy; do
1703 test -z "$ac_dir" && ac_dir=.
1704 if test -f $ac_dir/$ac_word; then
1705 ac_cv_prog_CC="gcc"
1706 break
1708 done
1709 IFS="$ac_save_ifs"
1712 CC="$ac_cv_prog_CC"
1713 if test -n "$CC"; then
1714 echo "$ac_t""$CC" 1>&6
1715 else
1716 echo "$ac_t""no" 1>&6
1719 if test -z "$CC"; then
1720 # Extract the first word of "cc", so it can be a program name with args.
1721 set dummy cc; ac_word=$2
1722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1723 echo "configure:1724: checking for $ac_word" >&5
1724 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727 if test -n "$CC"; then
1728 ac_cv_prog_CC="$CC" # Let the user override the test.
1729 else
1730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1731 ac_prog_rejected=no
1732 ac_dummy="$PATH"
1733 for ac_dir in $ac_dummy; do
1734 test -z "$ac_dir" && ac_dir=.
1735 if test -f $ac_dir/$ac_word; then
1736 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1737 ac_prog_rejected=yes
1738 continue
1740 ac_cv_prog_CC="cc"
1741 break
1743 done
1744 IFS="$ac_save_ifs"
1745 if test $ac_prog_rejected = yes; then
1746 # We found a bogon in the path, so make sure we never use it.
1747 set dummy $ac_cv_prog_CC
1748 shift
1749 if test $# -gt 0; then
1750 # We chose a different compiler from the bogus one.
1751 # However, it has the same basename, so the bogon will be chosen
1752 # first if we set CC to just the basename; use the full file name.
1753 shift
1754 set dummy "$ac_dir/$ac_word" "$@"
1755 shift
1756 ac_cv_prog_CC="$@"
1761 CC="$ac_cv_prog_CC"
1762 if test -n "$CC"; then
1763 echo "$ac_t""$CC" 1>&6
1764 else
1765 echo "$ac_t""no" 1>&6
1768 if test -z "$CC"; then
1769 case "`uname -s`" in
1770 *win32* | *WIN32*)
1771 # Extract the first word of "cl", so it can be a program name with args.
1772 set dummy cl; ac_word=$2
1773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1774 echo "configure:1775: checking for $ac_word" >&5
1775 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778 if test -n "$CC"; then
1779 ac_cv_prog_CC="$CC" # Let the user override the test.
1780 else
1781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1782 ac_dummy="$PATH"
1783 for ac_dir in $ac_dummy; do
1784 test -z "$ac_dir" && ac_dir=.
1785 if test -f $ac_dir/$ac_word; then
1786 ac_cv_prog_CC="cl"
1787 break
1789 done
1790 IFS="$ac_save_ifs"
1793 CC="$ac_cv_prog_CC"
1794 if test -n "$CC"; then
1795 echo "$ac_t""$CC" 1>&6
1796 else
1797 echo "$ac_t""no" 1>&6
1800 esac
1802 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1805 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1806 echo "configure:1807: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1808 ac_ext=c
1809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1810 ac_cpp='$CPP $CPPFLAGS'
1811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1813 cross_compiling=$ac_cv_prog_cc_cross
1815 cat > conftest.$ac_ext << EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1820 main(){return(0);}
1822 if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1823 ac_cv_prog_cc_works=yes
1824 # If we can't run a trivial program, we are probably using a cross compiler.
1825 if (./conftest; exit) 2>/dev/null; then
1826 ac_cv_prog_cc_cross=no
1827 else
1828 ac_cv_prog_cc_cross=yes
1830 else
1831 echo "configure: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
1833 ac_cv_prog_cc_works=no
1835 rm -fr conftest*
1836 ac_ext=c
1837 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1838 ac_cpp='$CPP $CPPFLAGS'
1839 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1840 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1841 cross_compiling=$ac_cv_prog_cc_cross
1843 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1844 if test $ac_cv_prog_cc_works = no; then
1845 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1847 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1848 echo "configure:1849: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1849 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1850 cross_compiling=$ac_cv_prog_cc_cross
1852 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1853 echo "configure:1854: checking whether we are using GNU C" >&5
1854 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1855 echo $ac_n "(cached) $ac_c" 1>&6
1856 else
1857 cat > conftest.c <<EOF
1858 #ifdef __GNUC__
1859 yes;
1860 #endif
1862 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1863 ac_cv_prog_gcc=yes
1864 else
1865 ac_cv_prog_gcc=no
1869 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1871 if test $ac_cv_prog_gcc = yes; then
1872 GCC=yes
1873 else
1874 GCC=
1877 ac_test_CFLAGS="${CFLAGS+set}"
1878 ac_save_CFLAGS="$CFLAGS"
1879 CFLAGS=
1880 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1881 echo "configure:1882: checking whether ${CC-cc} accepts -g" >&5
1882 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1883 echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885 echo 'void f(){}' > conftest.c
1886 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1887 ac_cv_prog_cc_g=yes
1888 else
1889 ac_cv_prog_cc_g=no
1891 rm -f conftest*
1895 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1896 if test "$ac_test_CFLAGS" = set; then
1897 CFLAGS="$ac_save_CFLAGS"
1898 elif test $ac_cv_prog_cc_g = yes; then
1899 if test "$GCC" = yes; then
1900 CFLAGS="-g -O2"
1901 else
1902 CFLAGS="-g"
1904 else
1905 if test "$GCC" = yes; then
1906 CFLAGS="-O2"
1907 else
1908 CFLAGS=
1912 esac
1914 # On Suns, sometimes $CPP names a directory.
1915 if test -n "$CPP" && test -d "$CPP"; then
1916 CPP=
1919 #### Some systems specify a CPP to use unless we are using GCC.
1920 #### Now that we know whether we are using GCC, we can decide whether
1921 #### to use that one.
1922 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1923 then
1924 CPP="$NON_GNU_CPP"
1927 #### Some systems specify a CC to use unless we are using GCC.
1928 #### Now that we know whether we are using GCC, we can decide whether
1929 #### to use that one.
1930 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1931 test x$cc_specified != xyes
1932 then
1933 CC="$NON_GNU_CC"
1936 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1937 then
1938 CC="$CC $GCC_TEST_OPTIONS"
1941 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1942 then
1943 CC="$CC $NON_GCC_TEST_OPTIONS"
1946 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1947 then
1948 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1951 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1952 then
1953 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1956 #### Some other nice autoconf tests. If you add a test here which
1957 #### should make an entry in src/config.h, don't forget to add an
1958 #### #undef clause to src/config.h.in for autoconf to modify.
1960 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether ln -s works" >&5
1962 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965 rm -f conftestdata
1966 if ln -s X conftestdata 2>/dev/null
1967 then
1968 rm -f conftestdata
1969 ac_cv_prog_LN_S="ln -s"
1970 else
1971 ac_cv_prog_LN_S=ln
1974 LN_S="$ac_cv_prog_LN_S"
1975 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1976 echo "$ac_t""yes" 1>&6
1977 else
1978 echo "$ac_t""no" 1>&6
1981 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1982 echo "configure:1983: checking how to run the C preprocessor" >&5
1983 # On Suns, sometimes $CPP names a directory.
1984 if test -n "$CPP" && test -d "$CPP"; then
1985 CPP=
1987 if test -z "$CPP"; then
1988 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1989 echo $ac_n "(cached) $ac_c" 1>&6
1990 else
1991 # This must be in double quotes, not single quotes, because CPP may get
1992 # substituted into the Makefile and "${CC-cc}" will confuse make.
1993 CPP="${CC-cc} -E"
1994 # On the NeXT, cc -E runs the code through the compiler's parser,
1995 # not just through cpp.
1996 cat > conftest.$ac_ext <<EOF
1997 #line 1998 "configure"
1998 #include "confdefs.h"
1999 #include <assert.h>
2000 Syntax Error
2002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2003 { (eval echo configure:2004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2005 if test -z "$ac_err"; then
2007 else
2008 echo "$ac_err" >&5
2009 echo "configure: failed program was:" >&5
2010 cat conftest.$ac_ext >&5
2011 rm -rf conftest*
2012 CPP="${CC-cc} -E -traditional-cpp"
2013 cat > conftest.$ac_ext <<EOF
2014 #line 2015 "configure"
2015 #include "confdefs.h"
2016 #include <assert.h>
2017 Syntax Error
2019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2020 { (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2022 if test -z "$ac_err"; then
2024 else
2025 echo "$ac_err" >&5
2026 echo "configure: failed program was:" >&5
2027 cat conftest.$ac_ext >&5
2028 rm -rf conftest*
2029 CPP="${CC-cc} -nologo -E"
2030 cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033 #include <assert.h>
2034 Syntax Error
2036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2037 { (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2039 if test -z "$ac_err"; then
2041 else
2042 echo "$ac_err" >&5
2043 echo "configure: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 rm -rf conftest*
2046 CPP=/lib/cpp
2048 rm -f conftest*
2050 rm -f conftest*
2052 rm -f conftest*
2053 ac_cv_prog_CPP="$CPP"
2055 CPP="$ac_cv_prog_CPP"
2056 else
2057 ac_cv_prog_CPP="$CPP"
2059 echo "$ac_t""$CPP" 1>&6
2061 # Find a good install program. We prefer a C program (faster),
2062 # so one script is as good as another. But avoid the broken or
2063 # incompatible versions:
2064 # SysV /etc/install, /usr/sbin/install
2065 # SunOS /usr/etc/install
2066 # IRIX /sbin/install
2067 # AIX /bin/install
2068 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2069 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2070 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2071 # ./install, which can be erroneously created by make from ./install.sh.
2072 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2073 echo "configure:2074: checking for a BSD compatible install" >&5
2074 if test -z "$INSTALL"; then
2075 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2076 echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2079 for ac_dir in $PATH; do
2080 # Account for people who put trailing slashes in PATH elements.
2081 case "$ac_dir/" in
2082 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2084 # OSF1 and SCO ODT 3.0 have their own names for install.
2085 # Don't use installbsd from OSF since it installs stuff as root
2086 # by default.
2087 for ac_prog in ginstall scoinst install; do
2088 if test -f $ac_dir/$ac_prog; then
2089 if test $ac_prog = install &&
2090 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2091 # AIX install. It has an incompatible calling convention.
2093 else
2094 ac_cv_path_install="$ac_dir/$ac_prog -c"
2095 break 2
2098 done
2100 esac
2101 done
2102 IFS="$ac_save_IFS"
2105 if test "${ac_cv_path_install+set}" = set; then
2106 INSTALL="$ac_cv_path_install"
2107 else
2108 # As a last resort, use the slow shell script. We don't cache a
2109 # path for INSTALL within a source directory, because that will
2110 # break other packages using the cache if that directory is
2111 # removed, or if the path is relative.
2112 INSTALL="$ac_install_sh"
2115 echo "$ac_t""$INSTALL" 1>&6
2117 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2118 # It thinks the first close brace ends the variable substitution.
2119 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2121 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2123 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2125 for ac_prog in 'bison -y' byacc
2127 # Extract the first word of "$ac_prog", so it can be a program name with args.
2128 set dummy $ac_prog; ac_word=$2
2129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2130 echo "configure:2131: checking for $ac_word" >&5
2131 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2132 echo $ac_n "(cached) $ac_c" 1>&6
2133 else
2134 if test -n "$YACC"; then
2135 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2136 else
2137 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2138 ac_dummy="$PATH"
2139 for ac_dir in $ac_dummy; do
2140 test -z "$ac_dir" && ac_dir=.
2141 if test -f $ac_dir/$ac_word; then
2142 ac_cv_prog_YACC="$ac_prog"
2143 break
2145 done
2146 IFS="$ac_save_ifs"
2149 YACC="$ac_cv_prog_YACC"
2150 if test -n "$YACC"; then
2151 echo "$ac_t""$YACC" 1>&6
2152 else
2153 echo "$ac_t""no" 1>&6
2156 test -n "$YACC" && break
2157 done
2158 test -n "$YACC" || YACC="yacc"
2161 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2162 echo "configure:2163: checking for AIX" >&5
2163 cat > conftest.$ac_ext <<EOF
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166 #ifdef _AIX
2168 #endif
2171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2172 egrep "yes" >/dev/null 2>&1; then
2173 rm -rf conftest*
2174 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2175 #define _ALL_SOURCE 1
2178 else
2179 rm -rf conftest*
2180 echo "$ac_t""no" 1>&6
2182 rm -f conftest*
2186 # Sound support for GNU/Linux and the free BSDs.
2187 for ac_hdr in machine/soundcard.h sys/soundcard.h
2189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_hdr" >&5
2192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 #include <$ac_hdr>
2200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2201 { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2203 if test -z "$ac_err"; then
2204 rm -rf conftest*
2205 eval "ac_cv_header_$ac_safe=yes"
2206 else
2207 echo "$ac_err" >&5
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_header_$ac_safe=no"
2213 rm -f conftest*
2215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2216 echo "$ac_t""yes" 1>&6
2217 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2218 cat >> confdefs.h <<EOF
2219 #define $ac_tr_hdr 1
2222 else
2223 echo "$ac_t""no" 1>&6
2225 done
2228 for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2229 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2230 termcap.h stdio_ext.h
2232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2234 echo "configure:2235: checking for $ac_hdr" >&5
2235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2236 echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238 cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2241 #include <$ac_hdr>
2243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2244 { (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2247 rm -rf conftest*
2248 eval "ac_cv_header_$ac_safe=yes"
2249 else
2250 echo "$ac_err" >&5
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2253 rm -rf conftest*
2254 eval "ac_cv_header_$ac_safe=no"
2256 rm -f conftest*
2258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2259 echo "$ac_t""yes" 1>&6
2260 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2261 cat >> confdefs.h <<EOF
2262 #define $ac_tr_hdr 1
2265 else
2266 echo "$ac_t""no" 1>&6
2268 done
2270 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2271 echo "configure:2272: checking for ANSI C header files" >&5
2272 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2274 else
2275 cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 #include <stdlib.h>
2279 #include <stdarg.h>
2280 #include <string.h>
2281 #include <float.h>
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287 rm -rf conftest*
2288 ac_cv_header_stdc=yes
2289 else
2290 echo "$ac_err" >&5
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293 rm -rf conftest*
2294 ac_cv_header_stdc=no
2296 rm -f conftest*
2298 if test $ac_cv_header_stdc = yes; then
2299 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2300 cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 #include <string.h>
2305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2306 egrep "memchr" >/dev/null 2>&1; then
2308 else
2309 rm -rf conftest*
2310 ac_cv_header_stdc=no
2312 rm -f conftest*
2316 if test $ac_cv_header_stdc = yes; then
2317 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <stdlib.h>
2323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324 egrep "free" >/dev/null 2>&1; then
2326 else
2327 rm -rf conftest*
2328 ac_cv_header_stdc=no
2330 rm -f conftest*
2334 if test $ac_cv_header_stdc = yes; then
2335 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2336 if test "$cross_compiling" = yes; then
2338 else
2339 cat > conftest.$ac_ext <<EOF
2340 #line 2341 "configure"
2341 #include "confdefs.h"
2342 #include <ctype.h>
2343 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2344 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2345 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2346 int main () { int i; for (i = 0; i < 256; i++)
2347 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2348 exit (0); }
2351 if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2352 then
2354 else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357 rm -fr conftest*
2358 ac_cv_header_stdc=no
2360 rm -fr conftest*
2366 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2367 if test $ac_cv_header_stdc = yes; then
2368 cat >> confdefs.h <<\EOF
2369 #define STDC_HEADERS 1
2374 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2375 echo "configure:2376: checking whether time.h and sys/time.h may both be included" >&5
2376 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2377 echo $ac_n "(cached) $ac_c" 1>&6
2378 else
2379 cat > conftest.$ac_ext <<EOF
2380 #line 2381 "configure"
2381 #include "confdefs.h"
2382 #include <sys/types.h>
2383 #include <sys/time.h>
2384 #include <time.h>
2385 int main() {
2386 struct tm *tp;
2387 ; return 0; }
2389 if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2390 rm -rf conftest*
2391 ac_cv_header_time=yes
2392 else
2393 echo "configure: failed program was:" >&5
2394 cat conftest.$ac_ext >&5
2395 rm -rf conftest*
2396 ac_cv_header_time=no
2398 rm -f conftest*
2401 echo "$ac_t""$ac_cv_header_time" 1>&6
2402 if test $ac_cv_header_time = yes; then
2403 cat >> confdefs.h <<\EOF
2404 #define TIME_WITH_SYS_TIME 1
2409 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2410 echo "configure:2411: checking for sys_siglist declaration in signal.h or unistd.h" >&5
2411 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 cat > conftest.$ac_ext <<EOF
2415 #line 2416 "configure"
2416 #include "confdefs.h"
2417 #include <sys/types.h>
2418 #include <signal.h>
2419 /* NetBSD declares sys_siglist in unistd.h. */
2420 #ifdef HAVE_UNISTD_H
2421 #include <unistd.h>
2422 #endif
2423 int main() {
2424 char *msg = *(sys_siglist + 1);
2425 ; return 0; }
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428 rm -rf conftest*
2429 ac_cv_decl_sys_siglist=yes
2430 else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 ac_cv_decl_sys_siglist=no
2436 rm -f conftest*
2439 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2440 if test $ac_cv_decl_sys_siglist = yes; then
2441 cat >> confdefs.h <<\EOF
2442 #define SYS_SIGLIST_DECLARED 1
2448 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
2449 echo "configure:2450: checking for struct utimbuf" >&5
2450 if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2451 echo $ac_n "(cached) $ac_c" 1>&6
2452 else
2453 cat > conftest.$ac_ext <<EOF
2454 #line 2455 "configure"
2455 #include "confdefs.h"
2456 #ifdef TIME_WITH_SYS_TIME
2457 #include <sys/time.h>
2458 #include <time.h>
2459 #else
2460 #ifdef HAVE_SYS_TIME_H
2461 #include <sys/time.h>
2462 #else
2463 #include <time.h>
2464 #endif
2465 #endif
2466 #ifdef HAVE_UTIME_H
2467 #include <utime.h>
2468 #endif
2469 int main() {
2470 static struct utimbuf x; x.actime = x.modtime;
2471 ; return 0; }
2473 if { (eval echo configure:2474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2474 rm -rf conftest*
2475 emacs_cv_struct_utimbuf=yes
2476 else
2477 echo "configure: failed program was:" >&5
2478 cat conftest.$ac_ext >&5
2479 rm -rf conftest*
2480 emacs_cv_struct_utimbuf=no
2482 rm -f conftest*
2485 echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2486 if test $emacs_cv_struct_utimbuf = yes; then
2487 cat >> confdefs.h <<\EOF
2488 #define HAVE_STRUCT_UTIMBUF 1
2493 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2494 echo "configure:2495: checking return type of signal handlers" >&5
2495 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2496 echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 #include <sys/types.h>
2502 #include <signal.h>
2503 #ifdef signal
2504 #undef signal
2505 #endif
2506 #ifdef __cplusplus
2507 extern "C" void (*signal (int, void (*)(int)))(int);
2508 #else
2509 void (*signal ()) ();
2510 #endif
2512 int main() {
2513 int i;
2514 ; return 0; }
2516 if { (eval echo configure:2517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2517 rm -rf conftest*
2518 ac_cv_type_signal=void
2519 else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 rm -rf conftest*
2523 ac_cv_type_signal=int
2525 rm -f conftest*
2528 echo "$ac_t""$ac_cv_type_signal" 1>&6
2529 cat >> confdefs.h <<EOF
2530 #define RETSIGTYPE $ac_cv_type_signal
2535 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
2536 echo "configure:2537: checking for struct timeval" >&5
2537 if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2538 echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540 cat > conftest.$ac_ext <<EOF
2541 #line 2542 "configure"
2542 #include "confdefs.h"
2543 #ifdef TIME_WITH_SYS_TIME
2544 #include <sys/time.h>
2545 #include <time.h>
2546 #else
2547 #ifdef HAVE_SYS_TIME_H
2548 #include <sys/time.h>
2549 #else
2550 #include <time.h>
2551 #endif
2552 #endif
2553 int main() {
2554 static struct timeval x; x.tv_sec = x.tv_usec;
2555 ; return 0; }
2557 if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2558 rm -rf conftest*
2559 emacs_cv_struct_timeval=yes
2560 else
2561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 rm -rf conftest*
2564 emacs_cv_struct_timeval=no
2566 rm -f conftest*
2569 echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2570 HAVE_TIMEVAL=$emacs_cv_struct_timeval
2571 if test $emacs_cv_struct_timeval = yes; then
2572 cat >> confdefs.h <<\EOF
2573 #define HAVE_TIMEVAL 1
2578 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2579 echo "configure:2580: checking whether struct tm is in sys/time.h or time.h" >&5
2580 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2581 echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583 cat > conftest.$ac_ext <<EOF
2584 #line 2585 "configure"
2585 #include "confdefs.h"
2586 #include <sys/types.h>
2587 #include <time.h>
2588 int main() {
2589 struct tm *tp; tp->tm_sec;
2590 ; return 0; }
2592 if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2593 rm -rf conftest*
2594 ac_cv_struct_tm=time.h
2595 else
2596 echo "configure: failed program was:" >&5
2597 cat conftest.$ac_ext >&5
2598 rm -rf conftest*
2599 ac_cv_struct_tm=sys/time.h
2601 rm -f conftest*
2604 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2605 if test $ac_cv_struct_tm = sys/time.h; then
2606 cat >> confdefs.h <<\EOF
2607 #define TM_IN_SYS_TIME 1
2612 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2613 echo "configure:2614: checking for tm_zone in struct tm" >&5
2614 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2615 echo $ac_n "(cached) $ac_c" 1>&6
2616 else
2617 cat > conftest.$ac_ext <<EOF
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620 #include <sys/types.h>
2621 #include <$ac_cv_struct_tm>
2622 int main() {
2623 struct tm tm; tm.tm_zone;
2624 ; return 0; }
2626 if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2627 rm -rf conftest*
2628 ac_cv_struct_tm_zone=yes
2629 else
2630 echo "configure: failed program was:" >&5
2631 cat conftest.$ac_ext >&5
2632 rm -rf conftest*
2633 ac_cv_struct_tm_zone=no
2635 rm -f conftest*
2638 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2639 if test "$ac_cv_struct_tm_zone" = yes; then
2640 cat >> confdefs.h <<\EOF
2641 #define HAVE_TM_ZONE 1
2644 else
2645 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2646 echo "configure:2647: checking for tzname" >&5
2647 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2648 echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650 cat > conftest.$ac_ext <<EOF
2651 #line 2652 "configure"
2652 #include "confdefs.h"
2653 #include <time.h>
2654 #ifndef tzname /* For SGI. */
2655 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2656 #endif
2657 int main() {
2658 atoi(*tzname);
2659 ; return 0; }
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2662 rm -rf conftest*
2663 ac_cv_var_tzname=yes
2664 else
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2667 rm -rf conftest*
2668 ac_cv_var_tzname=no
2670 rm -f conftest*
2673 echo "$ac_t""$ac_cv_var_tzname" 1>&6
2674 if test $ac_cv_var_tzname = yes; then
2675 cat >> confdefs.h <<\EOF
2676 #define HAVE_TZNAME 1
2682 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2683 echo "configure:2684: checking for tm_gmtoff in struct tm" >&5
2684 if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
2685 echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687 cat > conftest.$ac_ext <<EOF
2688 #line 2689 "configure"
2689 #include "confdefs.h"
2690 #include <time.h>
2691 int main() {
2692 struct tm t; t.tm_gmtoff = 0
2693 ; return 0; }
2695 if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2696 rm -rf conftest*
2697 emacs_cv_tm_gmtoff=yes
2698 else
2699 echo "configure: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
2701 rm -rf conftest*
2702 emacs_cv_tm_gmtoff=no
2704 rm -f conftest*
2707 echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
2708 if test $emacs_cv_tm_gmtoff = yes; then
2709 cat >> confdefs.h <<\EOF
2710 #define HAVE_TM_GMTOFF 1
2715 echo $ac_n "checking for working const""... $ac_c" 1>&6
2716 echo "configure:2717: checking for working const" >&5
2717 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2718 echo $ac_n "(cached) $ac_c" 1>&6
2719 else
2720 cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2724 int main() {
2726 /* Ultrix mips cc rejects this. */
2727 typedef int charset[2]; const charset x;
2728 /* SunOS 4.1.1 cc rejects this. */
2729 char const *const *ccp;
2730 char **p;
2731 /* NEC SVR4.0.2 mips cc rejects this. */
2732 struct point {int x, y;};
2733 static struct point const zero = {0,0};
2734 /* AIX XL C 1.02.0.0 rejects this.
2735 It does not let you subtract one const X* pointer from another in an arm
2736 of an if-expression whose if-part is not a constant expression */
2737 const char *g = "string";
2738 ccp = &g + (g ? g-g : 0);
2739 /* HPUX 7.0 cc rejects these. */
2740 ++ccp;
2741 p = (char**) ccp;
2742 ccp = (char const *const *) p;
2743 { /* SCO 3.2v4 cc rejects this. */
2744 char *t;
2745 char const *s = 0 ? (char *) 0 : (char const *) 0;
2747 *t++ = 0;
2749 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2750 int x[] = {25, 17};
2751 const int *foo = &x[0];
2752 ++foo;
2754 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2755 typedef const int *iptr;
2756 iptr p = 0;
2757 ++p;
2759 { /* AIX XL C 1.02.0.0 rejects this saying
2760 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2761 struct s { int j; const int *ap[3]; };
2762 struct s *b; b->j = 5;
2764 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2765 const int foo = 10;
2768 ; return 0; }
2770 if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2771 rm -rf conftest*
2772 ac_cv_c_const=yes
2773 else
2774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
2776 rm -rf conftest*
2777 ac_cv_c_const=no
2779 rm -f conftest*
2782 echo "$ac_t""$ac_cv_c_const" 1>&6
2783 if test $ac_cv_c_const = no; then
2784 cat >> confdefs.h <<\EOF
2785 #define const
2791 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2792 echo "configure:2793: checking whether ${MAKE-make} sets \${MAKE}" >&5
2793 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2794 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2795 echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797 cat > conftestmake <<\EOF
2798 all:
2799 @echo 'ac_maketemp="${MAKE}"'
2801 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2802 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2803 if test -n "$ac_maketemp"; then
2804 eval ac_cv_prog_make_${ac_make}_set=yes
2805 else
2806 eval ac_cv_prog_make_${ac_make}_set=no
2808 rm -f conftestmake
2810 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2811 echo "$ac_t""yes" 1>&6
2812 SET_MAKE=
2813 else
2814 echo "$ac_t""no" 1>&6
2815 SET_MAKE="MAKE=${MAKE-make}"
2819 echo $ac_n "checking for long file names""... $ac_c" 1>&6
2820 echo "configure:2821: checking for long file names" >&5
2821 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824 ac_cv_sys_long_file_names=yes
2825 # Test for long file names in all the places we know might matter:
2826 # . the current directory, where building will happen
2827 # $prefix/lib where we will be installing things
2828 # $exec_prefix/lib likewise
2829 # eval it to expand exec_prefix.
2830 # $TMPDIR if set, where it might want to write temporary files
2831 # if $TMPDIR is not set:
2832 # /tmp where it might want to write temporary files
2833 # /var/tmp likewise
2834 # /usr/tmp likewise
2835 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2836 ac_tmpdirs="$TMPDIR"
2837 else
2838 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2840 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2841 test -d $ac_dir || continue
2842 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2843 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
2844 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
2845 val=`cat $ac_dir/conftest9012345 2>/dev/null`
2846 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
2847 ac_cv_sys_long_file_names=no
2848 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2849 break
2851 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2852 done
2855 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
2856 if test $ac_cv_sys_long_file_names = yes; then
2857 cat >> confdefs.h <<\EOF
2858 #define HAVE_LONG_FILE_NAMES 1
2864 #### Choose a window system.
2866 # If we find X, set shell vars x_includes and x_libraries to the
2867 # paths, otherwise set no_x=yes.
2868 # Uses ac_ vars as temps to allow command line to override cache and checks.
2869 # --without-x overrides everything else, but does not touch the cache.
2870 echo $ac_n "checking for X""... $ac_c" 1>&6
2871 echo "configure:2872: checking for X" >&5
2873 # Check whether --with-x or --without-x was given.
2874 if test "${with_x+set}" = set; then
2875 withval="$with_x"
2879 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2880 if test "x$with_x" = xno; then
2881 # The user explicitly disabled X.
2882 have_x=disabled
2883 else
2884 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2885 # Both variables are already set.
2886 have_x=yes
2887 else
2888 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2889 echo $ac_n "(cached) $ac_c" 1>&6
2890 else
2891 # One or both of the vars are not set, and there is no cached value.
2892 ac_x_includes=NO ac_x_libraries=NO
2893 rm -fr conftestdir
2894 if mkdir conftestdir; then
2895 cd conftestdir
2896 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2897 cat > Imakefile <<'EOF'
2898 acfindx:
2899 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2901 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2902 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2903 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2904 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2905 for ac_extension in a so sl; do
2906 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2907 test -f $ac_im_libdir/libX11.$ac_extension; then
2908 ac_im_usrlibdir=$ac_im_libdir; break
2910 done
2911 # Screen out bogus values from the imake configuration. They are
2912 # bogus both because they are the default anyway, and because
2913 # using them would break gcc on systems where it needs fixed includes.
2914 case "$ac_im_incroot" in
2915 /usr/include) ;;
2916 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2917 esac
2918 case "$ac_im_usrlibdir" in
2919 /usr/lib | /lib) ;;
2920 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2921 esac
2923 cd ..
2924 rm -fr conftestdir
2927 if test "$ac_x_includes" = NO; then
2928 # Guess where to find include files, by looking for this one X11 .h file.
2929 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2931 # First, try using that file with no special directory specified.
2932 cat > conftest.$ac_ext <<EOF
2933 #line 2934 "configure"
2934 #include "confdefs.h"
2935 #include <$x_direct_test_include>
2937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2938 { (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2940 if test -z "$ac_err"; then
2941 rm -rf conftest*
2942 # We can compile using X headers with no special include directory.
2943 ac_x_includes=
2944 else
2945 echo "$ac_err" >&5
2946 echo "configure: failed program was:" >&5
2947 cat conftest.$ac_ext >&5
2948 rm -rf conftest*
2949 # Look for the header file in a standard set of common directories.
2950 # Check X11 before X11Rn because it is often a symlink to the current release.
2951 for ac_dir in \
2952 /usr/X11/include \
2953 /usr/X11R6/include \
2954 /usr/X11R5/include \
2955 /usr/X11R4/include \
2957 /usr/include/X11 \
2958 /usr/include/X11R6 \
2959 /usr/include/X11R5 \
2960 /usr/include/X11R4 \
2962 /usr/local/X11/include \
2963 /usr/local/X11R6/include \
2964 /usr/local/X11R5/include \
2965 /usr/local/X11R4/include \
2967 /usr/local/include/X11 \
2968 /usr/local/include/X11R6 \
2969 /usr/local/include/X11R5 \
2970 /usr/local/include/X11R4 \
2972 /usr/X386/include \
2973 /usr/x386/include \
2974 /usr/XFree86/include/X11 \
2976 /usr/include \
2977 /usr/local/include \
2978 /usr/unsupported/include \
2979 /usr/athena/include \
2980 /usr/local/x11r5/include \
2981 /usr/lpp/Xamples/include \
2983 /usr/openwin/include \
2984 /usr/openwin/share/include \
2987 if test -r "$ac_dir/$x_direct_test_include"; then
2988 ac_x_includes=$ac_dir
2989 break
2991 done
2993 rm -f conftest*
2994 fi # $ac_x_includes = NO
2996 if test "$ac_x_libraries" = NO; then
2997 # Check for the libraries.
2999 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3000 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3002 # See if we find them without any special options.
3003 # Don't add to $LIBS permanently.
3004 ac_save_LIBS="$LIBS"
3005 LIBS="-l$x_direct_test_library $LIBS"
3006 cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3010 int main() {
3011 ${x_direct_test_function}()
3012 ; return 0; }
3014 if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3015 rm -rf conftest*
3016 LIBS="$ac_save_LIBS"
3017 # We can link X programs with no special library path.
3018 ac_x_libraries=
3019 else
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3022 rm -rf conftest*
3023 LIBS="$ac_save_LIBS"
3024 # First see if replacing the include by lib works.
3025 # Check X11 before X11Rn because it is often a symlink to the current release.
3026 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3027 /usr/X11/lib \
3028 /usr/X11R6/lib \
3029 /usr/X11R5/lib \
3030 /usr/X11R4/lib \
3032 /usr/lib/X11 \
3033 /usr/lib/X11R6 \
3034 /usr/lib/X11R5 \
3035 /usr/lib/X11R4 \
3037 /usr/local/X11/lib \
3038 /usr/local/X11R6/lib \
3039 /usr/local/X11R5/lib \
3040 /usr/local/X11R4/lib \
3042 /usr/local/lib/X11 \
3043 /usr/local/lib/X11R6 \
3044 /usr/local/lib/X11R5 \
3045 /usr/local/lib/X11R4 \
3047 /usr/X386/lib \
3048 /usr/x386/lib \
3049 /usr/XFree86/lib/X11 \
3051 /usr/lib \
3052 /usr/local/lib \
3053 /usr/unsupported/lib \
3054 /usr/athena/lib \
3055 /usr/local/x11r5/lib \
3056 /usr/lpp/Xamples/lib \
3057 /lib/usr/lib/X11 \
3059 /usr/openwin/lib \
3060 /usr/openwin/share/lib \
3063 for ac_extension in a so sl; do
3064 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3065 ac_x_libraries=$ac_dir
3066 break 2
3068 done
3069 done
3071 rm -f conftest*
3072 fi # $ac_x_libraries = NO
3074 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3075 # Didn't find X anywhere. Cache the known absence of X.
3076 ac_cv_have_x="have_x=no"
3077 else
3078 # Record where we found X for the cache.
3079 ac_cv_have_x="have_x=yes \
3080 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3084 eval "$ac_cv_have_x"
3085 fi # $with_x != no
3087 if test "$have_x" != yes; then
3088 echo "$ac_t""$have_x" 1>&6
3089 no_x=yes
3090 else
3091 # If each of the values was on the command line, it overrides each guess.
3092 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3093 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3094 # Update the cache value to reflect the command line values.
3095 ac_cv_have_x="have_x=yes \
3096 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3097 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3100 if test "$no_x" = yes; then
3101 window_system=none
3102 else
3103 window_system=x11
3106 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3107 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3108 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3109 x_default_search_path=""
3110 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3111 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3112 ${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3113 ${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3114 ${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3115 if test x"${x_default_search_path}" = x; then
3116 x_default_search_path=${x_search_path}
3117 else
3118 x_default_search_path="${x_search_path}:${x_default_search_path}"
3120 done
3122 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3123 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3126 if test x"${x_includes}" = x; then
3127 bitmapdir=/usr/include/X11/bitmaps
3128 else
3129 # accumulate include directories that have X11 bitmap subdirectories
3130 bmd_acc="dummyval"
3131 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3132 if test -d "${bmd}/X11/bitmaps"; then
3133 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3135 if test -d "${bmd}/bitmaps"; then
3136 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3138 done
3139 if test ${bmd_acc} != "dummyval"; then
3140 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3144 case "${window_system}" in
3145 x11 )
3146 HAVE_X_WINDOWS=yes
3147 HAVE_X11=yes
3148 case "${with_x_toolkit}" in
3149 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3150 motif ) USE_X_TOOLKIT=MOTIF ;;
3151 no ) USE_X_TOOLKIT=none ;;
3152 * ) USE_X_TOOLKIT=maybe ;;
3153 esac
3155 none )
3156 HAVE_X_WINDOWS=no
3157 HAVE_X11=no
3158 USE_X_TOOLKIT=none
3160 esac
3162 ### If we're using X11, we should use the X menu package.
3163 HAVE_MENUS=no
3164 case ${HAVE_X11} in
3165 yes ) HAVE_MENUS=yes ;;
3166 esac
3168 if test "${opsys}" = "hpux9"; then
3169 case "${x_libraries}" in
3170 *X11R4* )
3171 opsysfile="s/hpux9-x11r4.h"
3173 esac
3176 if test "${opsys}" = "hpux9shr"; then
3177 case "${x_libraries}" in
3178 *X11R4* )
3179 opsysfile="s/hpux9shxr4.h"
3181 esac
3184 #### Extract some information from the operating system and machine files.
3186 echo "checking the machine- and system-dependent files to find out
3187 - which libraries the lib-src programs will want, and
3188 - whether the GNU malloc routines are usable" 1>&6
3189 echo "configure:3190: checking the machine- and system-dependent files to find out
3190 - which libraries the lib-src programs will want, and
3191 - whether the GNU malloc routines are usable" >&5
3193 ### First figure out CFLAGS (which we use for running the compiler here)
3194 ### and REAL_CFLAGS (which we use for real compilation).
3195 ### The two are the same except on a few systems, where they are made
3196 ### different to work around various lossages. For example,
3197 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3198 ### as implying static linking.
3200 ### If the CFLAGS env var is specified, we use that value
3201 ### instead of the default.
3203 ### It's not important that this name contain the PID; you can't run
3204 ### two configures in the same directory and have anything work
3205 ### anyway.
3206 tempcname="conftest.c"
3208 echo '
3209 #include "'${srcdir}'/src/'${opsysfile}'"
3210 #include "'${srcdir}'/src/'${machfile}'"
3211 #ifndef LIBS_MACHINE
3212 #define LIBS_MACHINE
3213 #endif
3214 #ifndef LIBS_SYSTEM
3215 #define LIBS_SYSTEM
3216 #endif
3217 #ifndef C_SWITCH_SYSTEM
3218 #define C_SWITCH_SYSTEM
3219 #endif
3220 #ifndef C_SWITCH_MACHINE
3221 #define C_SWITCH_MACHINE
3222 #endif
3223 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3224 configure___ c_switch_system=C_SWITCH_SYSTEM
3225 configure___ c_switch_machine=C_SWITCH_MACHINE
3227 #ifndef LIB_X11_LIB
3228 #define LIB_X11_LIB -lX11
3229 #endif
3231 #ifndef LIBX11_MACHINE
3232 #define LIBX11_MACHINE
3233 #endif
3235 #ifndef LIBX11_SYSTEM
3236 #define LIBX11_SYSTEM
3237 #endif
3238 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3240 #ifdef UNEXEC
3241 configure___ unexec=UNEXEC
3242 #else
3243 configure___ unexec=unexec.o
3244 #endif
3246 #ifdef SYSTEM_MALLOC
3247 configure___ system_malloc=yes
3248 #else
3249 configure___ system_malloc=no
3250 #endif
3252 #ifndef C_DEBUG_SWITCH
3253 #define C_DEBUG_SWITCH -g
3254 #endif
3256 #ifndef C_OPTIMIZE_SWITCH
3257 #define C_OPTIMIZE_SWITCH -O
3258 #endif
3260 #ifndef LD_SWITCH_MACHINE
3261 #define LD_SWITCH_MACHINE
3262 #endif
3264 #ifndef LD_SWITCH_SYSTEM
3265 #define LD_SWITCH_SYSTEM
3266 #endif
3268 #ifndef LD_SWITCH_X_SITE_AUX
3269 #define LD_SWITCH_X_SITE_AUX
3270 #endif
3272 configure___ ld_switch_system=LD_SWITCH_SYSTEM
3273 configure___ ld_switch_machine=LD_SWITCH_MACHINE
3275 #ifdef THIS_IS_CONFIGURE
3277 /* Get the CFLAGS for tests in configure. */
3278 #ifdef __GNUC__
3279 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3280 #else
3281 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3282 #endif
3284 #else /* not THIS_IS_CONFIGURE */
3286 /* Get the CFLAGS for real compilation. */
3287 #ifdef __GNUC__
3288 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3289 #else
3290 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3291 #endif
3293 #endif /* not THIS_IS_CONFIGURE */
3294 ' > ${tempcname}
3296 # The value of CPP is a quoted variable reference, so we need to do this
3297 # to get its actual value...
3298 CPP=`eval "echo $CPP"`
3299 eval `${CPP} -Isrc ${tempcname} \
3300 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3301 if test "x$SPECIFIED_CFLAGS" = x; then
3302 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3303 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3304 else
3305 REAL_CFLAGS="$CFLAGS"
3307 rm ${tempcname}
3309 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3311 ### Compute the unexec source name from the object name.
3312 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3314 # Do the opsystem or machine files prohibit the use of the GNU malloc?
3315 # Assume not, until told otherwise.
3316 GNU_MALLOC=yes
3317 doug_lea_malloc=yes
3318 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3319 echo "configure:3320: checking for malloc_get_state" >&5
3320 if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3321 echo $ac_n "(cached) $ac_c" 1>&6
3322 else
3323 cat > conftest.$ac_ext <<EOF
3324 #line 3325 "configure"
3325 #include "confdefs.h"
3326 /* System header to define __stub macros and hopefully few prototypes,
3327 which can conflict with char malloc_get_state(); below. */
3328 #include <assert.h>
3329 /* Override any gcc2 internal prototype to avoid an error. */
3330 /* We use char because int might match the return type of a gcc2
3331 builtin and then its argument prototype would still apply. */
3332 char malloc_get_state();
3334 int main() {
3336 /* The GNU C library defines this for functions which it implements
3337 to always fail with ENOSYS. Some functions are actually named
3338 something starting with __ and the normal name is an alias. */
3339 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3340 choke me
3341 #else
3342 malloc_get_state();
3343 #endif
3345 ; return 0; }
3347 if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3348 rm -rf conftest*
3349 eval "ac_cv_func_malloc_get_state=yes"
3350 else
3351 echo "configure: failed program was:" >&5
3352 cat conftest.$ac_ext >&5
3353 rm -rf conftest*
3354 eval "ac_cv_func_malloc_get_state=no"
3356 rm -f conftest*
3359 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3360 echo "$ac_t""yes" 1>&6
3362 else
3363 echo "$ac_t""no" 1>&6
3364 doug_lea_malloc=no
3367 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3368 echo "configure:3369: checking for malloc_set_state" >&5
3369 if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 /* System header to define __stub macros and hopefully few prototypes,
3376 which can conflict with char malloc_set_state(); below. */
3377 #include <assert.h>
3378 /* Override any gcc2 internal prototype to avoid an error. */
3379 /* We use char because int might match the return type of a gcc2
3380 builtin and then its argument prototype would still apply. */
3381 char malloc_set_state();
3383 int main() {
3385 /* The GNU C library defines this for functions which it implements
3386 to always fail with ENOSYS. Some functions are actually named
3387 something starting with __ and the normal name is an alias. */
3388 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3389 choke me
3390 #else
3391 malloc_set_state();
3392 #endif
3394 ; return 0; }
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3397 rm -rf conftest*
3398 eval "ac_cv_func_malloc_set_state=yes"
3399 else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 eval "ac_cv_func_malloc_set_state=no"
3405 rm -f conftest*
3408 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3409 echo "$ac_t""yes" 1>&6
3411 else
3412 echo "$ac_t""no" 1>&6
3413 doug_lea_malloc=no
3416 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3417 echo "configure:3418: checking whether __after_morecore_hook exists" >&5
3418 if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3419 echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421 cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 extern void (* __after_morecore_hook)();
3425 int main() {
3426 __after_morecore_hook = 0
3427 ; return 0; }
3429 if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3430 rm -rf conftest*
3431 emacs_cv_var___after_morecore_hook=yes
3432 else
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 emacs_cv_var___after_morecore_hook=no
3438 rm -f conftest*
3441 echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3442 if test $emacs_cv_var___after_morecore_hook = no; then
3443 doug_lea_malloc=no
3445 if test "${system_malloc}" = "yes"; then
3446 GNU_MALLOC=no
3447 GNU_MALLOC_reason="
3448 (The GNU allocators don't work with this system configuration.)"
3450 if test "$doug_lea_malloc" = "yes" ; then
3451 if test "$GNU_MALLOC" = yes ; then
3452 GNU_MALLOC_reason="
3453 (Using Doug Lea's new malloc from the GNU C Library.)"
3455 cat >> confdefs.h <<\EOF
3456 #define DOUG_LEA_MALLOC 1
3461 if test x"${REL_ALLOC}" = x; then
3462 REL_ALLOC=${GNU_MALLOC}
3465 LISP_FLOAT_TYPE=yes
3468 #### Add the libraries to LIBS and check for some functions.
3470 if test x"${OVERRIDE_CPPFLAGS}" != x; then
3471 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3472 else
3473 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3476 LIBS="$libsrc_libs $LIBS"
3478 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3479 echo "configure:3480: checking for dnet_ntoa in -ldnet" >&5
3480 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3481 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3482 echo $ac_n "(cached) $ac_c" 1>&6
3483 else
3484 ac_save_LIBS="$LIBS"
3485 LIBS="-ldnet $LIBS"
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 /* Override any gcc2 internal prototype to avoid an error. */
3490 /* We use char because int might match the return type of a gcc2
3491 builtin and then its argument prototype would still apply. */
3492 char dnet_ntoa();
3494 int main() {
3495 dnet_ntoa()
3496 ; return 0; }
3498 if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3499 rm -rf conftest*
3500 eval "ac_cv_lib_$ac_lib_var=yes"
3501 else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3504 rm -rf conftest*
3505 eval "ac_cv_lib_$ac_lib_var=no"
3507 rm -f conftest*
3508 LIBS="$ac_save_LIBS"
3511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3512 echo "$ac_t""yes" 1>&6
3513 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3514 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3515 cat >> confdefs.h <<EOF
3516 #define $ac_tr_lib 1
3519 LIBS="-ldnet $LIBS"
3521 else
3522 echo "$ac_t""no" 1>&6
3526 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
3527 echo "configure:3528: checking for main in -lXbsd" >&5
3528 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 ac_save_LIBS="$LIBS"
3533 LIBS="-lXbsd $LIBS"
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3538 int main() {
3539 main()
3540 ; return 0; }
3542 if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3543 rm -rf conftest*
3544 eval "ac_cv_lib_$ac_lib_var=yes"
3545 else
3546 echo "configure: failed program was:" >&5
3547 cat conftest.$ac_ext >&5
3548 rm -rf conftest*
3549 eval "ac_cv_lib_$ac_lib_var=no"
3551 rm -f conftest*
3552 LIBS="$ac_save_LIBS"
3555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3556 echo "$ac_t""yes" 1>&6
3557 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3558 else
3559 echo "$ac_t""no" 1>&6
3563 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
3564 echo "configure:3565: checking for cma_open in -lpthreads" >&5
3565 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3567 echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569 ac_save_LIBS="$LIBS"
3570 LIBS="-lpthreads $LIBS"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574 /* Override any gcc2 internal prototype to avoid an error. */
3575 /* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3577 char cma_open();
3579 int main() {
3580 cma_open()
3581 ; return 0; }
3583 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3584 rm -rf conftest*
3585 eval "ac_cv_lib_$ac_lib_var=yes"
3586 else
3587 echo "configure: failed program was:" >&5
3588 cat conftest.$ac_ext >&5
3589 rm -rf conftest*
3590 eval "ac_cv_lib_$ac_lib_var=no"
3592 rm -f conftest*
3593 LIBS="$ac_save_LIBS"
3596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3597 echo "$ac_t""yes" 1>&6
3598 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3599 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3600 cat >> confdefs.h <<EOF
3601 #define $ac_tr_lib 1
3604 LIBS="-lpthreads $LIBS"
3606 else
3607 echo "$ac_t""no" 1>&6
3611 echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
3612 echo "configure:3613: checking for XFree86 in /usr/X386" >&5
3613 if test -d /usr/X386/include; then
3614 HAVE_XFREE386=yes
3615 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3616 else
3617 HAVE_XFREE386=no
3619 echo "$ac_t""$HAVE_XFREE386" 1>&6
3621 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3622 # for the tests that follow. We set it back to REAL_CFLAGS later on.
3624 if test "${HAVE_X11}" = "yes"; then
3625 DEFS="$C_SWITCH_X_SITE $DEFS"
3626 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3627 LIBS="$LIBX $LIBS"
3628 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3630 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3631 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3632 # but it's more convenient here to set LD_RUN_PATH
3633 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3634 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3635 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3636 export LD_RUN_PATH
3639 if test "${opsys}" = "gnu-linux"; then
3640 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
3641 echo "configure:3642: checking whether X on GNU/Linux needs -b to link" >&5
3642 cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3646 int main() {
3647 XOpenDisplay ("foo");
3648 ; return 0; }
3650 if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3651 rm -rf conftest*
3652 xlinux_first_failure=no
3653 else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 xlinux_first_failure=yes
3659 rm -f conftest*
3660 if test "${xlinux_first_failure}" = "yes"; then
3661 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3662 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3663 OLD_CPPFLAGS="$CPPFLAGS"
3664 OLD_LIBS="$LIBS"
3665 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3666 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3667 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3668 LIBS="$LIBS -b i486-linuxaout"
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3673 int main() {
3674 XOpenDisplay ("foo");
3675 ; return 0; }
3677 if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3678 rm -rf conftest*
3679 xlinux_second_failure=no
3680 else
3681 echo "configure: failed program was:" >&5
3682 cat conftest.$ac_ext >&5
3683 rm -rf conftest*
3684 xlinux_second_failure=yes
3686 rm -f conftest*
3687 if test "${xlinux_second_failure}" = "yes"; then
3688 # If we get the same failure with -b, there is no use adding -b.
3689 # So take it out. This plays safe.
3690 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3691 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3692 CPPFLAGS="$OLD_CPPFLAGS"
3693 LIBS="$OLD_LIBS"
3694 echo "$ac_t""no" 1>&6
3695 else
3696 echo "$ac_t""yes" 1>&6
3698 else
3699 echo "$ac_t""no" 1>&6
3703 for ac_func in XrmSetDatabase XScreenResourceString \
3704 XScreenNumberOfScreen XSetWMProtocols
3706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3707 echo "configure:3708: checking for $ac_func" >&5
3708 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 /* System header to define __stub macros and hopefully few prototypes,
3715 which can conflict with char $ac_func(); below. */
3716 #include <assert.h>
3717 /* Override any gcc2 internal prototype to avoid an error. */
3718 /* We use char because int might match the return type of a gcc2
3719 builtin and then its argument prototype would still apply. */
3720 char $ac_func();
3722 int main() {
3724 /* The GNU C library defines this for functions which it implements
3725 to always fail with ENOSYS. Some functions are actually named
3726 something starting with __ and the normal name is an alias. */
3727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3728 choke me
3729 #else
3730 $ac_func();
3731 #endif
3733 ; return 0; }
3735 if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3736 rm -rf conftest*
3737 eval "ac_cv_func_$ac_func=yes"
3738 else
3739 echo "configure: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 rm -rf conftest*
3742 eval "ac_cv_func_$ac_func=no"
3744 rm -f conftest*
3747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3748 echo "$ac_t""yes" 1>&6
3749 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3750 cat >> confdefs.h <<EOF
3751 #define $ac_tr_func 1
3754 else
3755 echo "$ac_t""no" 1>&6
3757 done
3761 if test "${window_system}" = "x11"; then
3762 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
3763 echo "configure:3764: checking X11 version 6" >&5
3764 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
3765 echo $ac_n "(cached) $ac_c" 1>&6
3766 else
3767 cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 #include <X11/Xlib.h>
3771 int main() {
3772 #if XlibSpecificationRelease < 6
3773 fail;
3774 #endif
3776 ; return 0; }
3778 if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3779 rm -rf conftest*
3780 emacs_cv_x11_version_6=yes
3781 else
3782 echo "configure: failed program was:" >&5
3783 cat conftest.$ac_ext >&5
3784 rm -rf conftest*
3785 emacs_cv_x11_version_6=no
3787 rm -f conftest*
3790 if test $emacs_cv_x11_version_6 = yes; then
3791 echo "$ac_t""6 or newer" 1>&6
3792 cat >> confdefs.h <<\EOF
3793 #define HAVE_X11R6 1
3796 else
3797 echo "$ac_t""before 6" 1>&6
3801 if test "${window_system}" = "x11"; then
3802 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
3803 echo "configure:3804: checking X11 version 5" >&5
3804 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
3805 echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807 cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 #include <X11/Xlib.h>
3811 int main() {
3812 #if XlibSpecificationRelease < 5
3813 fail;
3814 #endif
3816 ; return 0; }
3818 if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3819 rm -rf conftest*
3820 emacs_cv_x11_version_5=yes
3821 else
3822 echo "configure: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
3824 rm -rf conftest*
3825 emacs_cv_x11_version_5=no
3827 rm -f conftest*
3830 if test $emacs_cv_x11_version_5 = yes; then
3831 echo "$ac_t""5 or newer" 1>&6
3832 HAVE_X11R5=yes
3833 cat >> confdefs.h <<\EOF
3834 #define HAVE_X11R5 1
3837 else
3838 HAVE_X11R5=no
3839 echo "$ac_t""before 5" 1>&6
3843 if test x"${USE_X_TOOLKIT}" = xmaybe; then
3844 if test x"${HAVE_X11R5}" = xyes; then
3845 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
3846 echo "configure:3847: checking X11 version 5 with Xaw" >&5
3847 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3854 #include <X11/Intrinsic.h>
3855 #include <X11/Xaw/Simple.h>
3856 int main() {
3858 ; return 0; }
3860 if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3861 rm -rf conftest*
3862 emacs_cv_x11_version_5_with_xaw=yes
3863 else
3864 echo "configure: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3866 rm -rf conftest*
3867 emacs_cv_x11_version_5_with_xaw=no
3869 rm -f conftest*
3872 if test $emacs_cv_x11_version_5_with_xaw = yes; then
3873 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
3874 USE_X_TOOLKIT=LUCID
3875 else
3876 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
3877 USE_X_TOOLKIT=none
3879 else
3880 USE_X_TOOLKIT=none
3884 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
3886 if test "${USE_X_TOOLKIT}" != "none"; then
3887 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
3888 echo "configure:3889: checking X11 toolkit version" >&5
3889 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
3890 echo $ac_n "(cached) $ac_c" 1>&6
3891 else
3892 cat > conftest.$ac_ext <<EOF
3893 #line 3894 "configure"
3894 #include "confdefs.h"
3895 #include <X11/Intrinsic.h>
3896 int main() {
3897 #if XtSpecificationRelease < 6
3898 fail;
3899 #endif
3901 ; return 0; }
3903 if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3904 rm -rf conftest*
3905 emacs_cv_x11_toolkit_version_6=yes
3906 else
3907 echo "configure: failed program was:" >&5
3908 cat conftest.$ac_ext >&5
3909 rm -rf conftest*
3910 emacs_cv_x11_toolkit_version_6=no
3912 rm -f conftest*
3915 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
3916 if test $emacs_cv_x11_toolkit_version_6 = yes; then
3917 echo "$ac_t""6 or newer" 1>&6
3918 cat >> confdefs.h <<\EOF
3919 #define HAVE_X11XTR6 1
3922 else
3923 echo "$ac_t""before 6" 1>&6
3926 OLDLIBS="$LIBS"
3927 if test x$HAVE_X11XTR6 = xyes; then
3928 LIBS="-lXt -lSM -lICE $LIBS"
3929 else
3930 LIBS="-lXt $LIBS"
3932 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
3933 echo "configure:3934: checking for XmuConvertStandardSelection in -lXmu" >&5
3934 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
3935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3936 echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938 ac_save_LIBS="$LIBS"
3939 LIBS="-lXmu $LIBS"
3940 cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943 /* Override any gcc2 internal prototype to avoid an error. */
3944 /* We use char because int might match the return type of a gcc2
3945 builtin and then its argument prototype would still apply. */
3946 char XmuConvertStandardSelection();
3948 int main() {
3949 XmuConvertStandardSelection()
3950 ; return 0; }
3952 if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3953 rm -rf conftest*
3954 eval "ac_cv_lib_$ac_lib_var=yes"
3955 else
3956 echo "configure: failed program was:" >&5
3957 cat conftest.$ac_ext >&5
3958 rm -rf conftest*
3959 eval "ac_cv_lib_$ac_lib_var=no"
3961 rm -f conftest*
3962 LIBS="$ac_save_LIBS"
3965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3966 echo "$ac_t""yes" 1>&6
3967 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3968 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3969 cat >> confdefs.h <<EOF
3970 #define $ac_tr_lib 1
3973 LIBS="-lXmu $LIBS"
3975 else
3976 echo "$ac_t""no" 1>&6
3979 LIBS="$OLDLIBS"
3982 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
3983 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
3984 echo "configure:3985: checking for Motif version 2.1" >&5
3985 if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
3986 echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <Xm/Xm.h>
3992 int main() {
3993 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
3994 int x = 5;
3995 #else
3996 Motif version prior to 2.1.
3997 #endif
3998 ; return 0; }
4000 if { (eval echo configure:4001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4001 rm -rf conftest*
4002 emacs_cv_motif_version_2_1=yes
4003 else
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006 rm -rf conftest*
4007 emacs_cv_motif_version_2_1=no
4009 rm -f conftest*
4012 echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4013 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4014 if test $emacs_cv_motif_version_2_1 = yes; then
4015 cat >> confdefs.h <<\EOF
4016 #define HAVE_MOTIF_2_1 1
4019 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
4020 echo "configure:4021: checking for XpCreateContext in -lXp" >&5
4021 ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4022 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4023 echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025 ac_save_LIBS="$LIBS"
4026 LIBS="-lXp $LIBS"
4027 cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 /* Override any gcc2 internal prototype to avoid an error. */
4031 /* We use char because int might match the return type of a gcc2
4032 builtin and then its argument prototype would still apply. */
4033 char XpCreateContext();
4035 int main() {
4036 XpCreateContext()
4037 ; return 0; }
4039 if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4040 rm -rf conftest*
4041 eval "ac_cv_lib_$ac_lib_var=yes"
4042 else
4043 echo "configure: failed program was:" >&5
4044 cat conftest.$ac_ext >&5
4045 rm -rf conftest*
4046 eval "ac_cv_lib_$ac_lib_var=no"
4048 rm -f conftest*
4049 LIBS="$ac_save_LIBS"
4052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4053 echo "$ac_t""yes" 1>&6
4054 ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4055 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4056 cat >> confdefs.h <<EOF
4057 #define $ac_tr_lib 1
4060 LIBS="-lXp $LIBS"
4062 else
4063 echo "$ac_t""no" 1>&6
4069 ### Is -lXaw3d available?
4070 HAVE_XAW3D=no
4071 if test "${HAVE_X11}" = "yes"; then
4072 if test "${USE_X_TOOLKIT}" != "none"; then
4073 old_c_flags="${CFLAGS}"
4074 CFLAGS="${LD_SWITCH_X_SITE}"
4075 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4076 echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
4077 echo "configure:4078: checking for X11/Xaw3d/Scrollbar.h" >&5
4078 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4079 echo $ac_n "(cached) $ac_c" 1>&6
4080 else
4081 cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 #include <X11/Xaw3d/Scrollbar.h>
4086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4087 { (eval echo configure:4088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4089 if test -z "$ac_err"; then
4090 rm -rf conftest*
4091 eval "ac_cv_header_$ac_safe=yes"
4092 else
4093 echo "$ac_err" >&5
4094 echo "configure: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 rm -rf conftest*
4097 eval "ac_cv_header_$ac_safe=no"
4099 rm -f conftest*
4101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4102 echo "$ac_t""yes" 1>&6
4103 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
4104 echo "configure:4105: checking for XawScrollbarSetThumb in -lXaw3d" >&5
4105 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109 ac_save_LIBS="$LIBS"
4110 LIBS="-lXaw3d -lX11 $LIBS"
4111 cat > conftest.$ac_ext <<EOF
4112 #line 4113 "configure"
4113 #include "confdefs.h"
4114 /* Override any gcc2 internal prototype to avoid an error. */
4115 /* We use char because int might match the return type of a gcc2
4116 builtin and then its argument prototype would still apply. */
4117 char XawScrollbarSetThumb();
4119 int main() {
4120 XawScrollbarSetThumb()
4121 ; return 0; }
4123 if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4124 rm -rf conftest*
4125 eval "ac_cv_lib_$ac_lib_var=yes"
4126 else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129 rm -rf conftest*
4130 eval "ac_cv_lib_$ac_lib_var=no"
4132 rm -f conftest*
4133 LIBS="$ac_save_LIBS"
4136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4137 echo "$ac_t""yes" 1>&6
4138 HAVE_XAW3D=yes
4139 else
4140 echo "$ac_t""no" 1>&6
4143 else
4144 echo "$ac_t""no" 1>&6
4147 CFLAGS="${old_c_flags}"
4149 if test "${HAVE_XAW3D}" = "yes"; then
4150 cat >> confdefs.h <<\EOF
4151 #define HAVE_XAW3D 1
4159 USE_TOOLKIT_SCROLL_BARS=no
4160 if test "${with_toolkit_scroll_bars}" != "no"; then
4161 if test "${USE_X_TOOLKIT}" != "none"; then
4162 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4163 cat >> confdefs.h <<\EOF
4164 #define USE_TOOLKIT_SCROLL_BARS 1
4167 HAVE_XAW3D=no
4168 USE_TOOLKIT_SCROLL_BARS=yes
4169 elif test "${HAVE_XAW3D}" = "yes"; then
4170 cat >> confdefs.h <<\EOF
4171 #define USE_TOOLKIT_SCROLL_BARS 1
4174 USE_TOOLKIT_SCROLL_BARS=yes
4179 ### Use -lXpm if available, unless `--with-xpm=no'.
4180 HAVE_XPM=no
4181 if test "${HAVE_X11}" = "yes"; then
4182 if test "${with_xpm}" != "no"; then
4183 old_c_flags="${CFLAGS}"
4184 CFLAGS="${LD_SWITCH_X_SITE}"
4185 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4186 echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
4187 echo "configure:4188: checking for X11/xpm.h" >&5
4188 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4189 echo $ac_n "(cached) $ac_c" 1>&6
4190 else
4191 cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4194 #include <X11/xpm.h>
4196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4197 { (eval echo configure:4198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4199 if test -z "$ac_err"; then
4200 rm -rf conftest*
4201 eval "ac_cv_header_$ac_safe=yes"
4202 else
4203 echo "$ac_err" >&5
4204 echo "configure: failed program was:" >&5
4205 cat conftest.$ac_ext >&5
4206 rm -rf conftest*
4207 eval "ac_cv_header_$ac_safe=no"
4209 rm -f conftest*
4211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4212 echo "$ac_t""yes" 1>&6
4213 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
4214 echo "configure:4215: checking for XpmReadFileToPixmap in -lXpm" >&5
4215 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4217 echo $ac_n "(cached) $ac_c" 1>&6
4218 else
4219 ac_save_LIBS="$LIBS"
4220 LIBS="-lXpm -lX11 $LIBS"
4221 cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 /* Override any gcc2 internal prototype to avoid an error. */
4225 /* We use char because int might match the return type of a gcc2
4226 builtin and then its argument prototype would still apply. */
4227 char XpmReadFileToPixmap();
4229 int main() {
4230 XpmReadFileToPixmap()
4231 ; return 0; }
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234 rm -rf conftest*
4235 eval "ac_cv_lib_$ac_lib_var=yes"
4236 else
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 rm -rf conftest*
4240 eval "ac_cv_lib_$ac_lib_var=no"
4242 rm -f conftest*
4243 LIBS="$ac_save_LIBS"
4246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4247 echo "$ac_t""yes" 1>&6
4248 HAVE_XPM=yes
4249 else
4250 echo "$ac_t""no" 1>&6
4253 else
4254 echo "$ac_t""no" 1>&6
4257 CFLAGS="${old_c_flags}"
4260 if test "${HAVE_XPM}" = "yes"; then
4261 cat >> confdefs.h <<\EOF
4262 #define HAVE_XPM 1
4268 ### Use -ljpeg if available, unless `--with-jpeg=no'.
4269 HAVE_JPEG=no
4270 if test "${HAVE_X11}" = "yes"; then
4271 if test "${with_jpeg}" != "no"; then
4272 old_c_flags="${CFLAGS}"
4273 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4274 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
4275 echo "configure:4276: checking for jpeg_destroy_compress in -ljpeg" >&5
4276 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4278 echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280 ac_save_LIBS="$LIBS"
4281 LIBS="-ljpeg -lX11 $LIBS"
4282 cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4285 /* Override any gcc2 internal prototype to avoid an error. */
4286 /* We use char because int might match the return type of a gcc2
4287 builtin and then its argument prototype would still apply. */
4288 char jpeg_destroy_compress();
4290 int main() {
4291 jpeg_destroy_compress()
4292 ; return 0; }
4294 if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4295 rm -rf conftest*
4296 eval "ac_cv_lib_$ac_lib_var=yes"
4297 else
4298 echo "configure: failed program was:" >&5
4299 cat conftest.$ac_ext >&5
4300 rm -rf conftest*
4301 eval "ac_cv_lib_$ac_lib_var=no"
4303 rm -f conftest*
4304 LIBS="$ac_save_LIBS"
4307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4308 echo "$ac_t""yes" 1>&6
4309 HAVE_JPEG=yes
4310 else
4311 echo "$ac_t""no" 1>&6
4314 CFLAGS="${old_c_flags}"
4317 if test "${HAVE_JPEG}" = "yes"; then
4318 cat >> confdefs.h <<\EOF
4319 #define HAVE_JPEG 1
4325 ### Use -lpng if available, unless `--with-png=no'.
4326 HAVE_PNG=no
4327 if test "${HAVE_X11}" = "yes"; then
4328 if test "${with_png}" != "no"; then
4329 old_c_flags="${CFLAGS}"
4330 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4331 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4332 echo $ac_n "checking for png.h""... $ac_c" 1>&6
4333 echo "configure:4334: checking for png.h" >&5
4334 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4335 echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337 cat > conftest.$ac_ext <<EOF
4338 #line 4339 "configure"
4339 #include "confdefs.h"
4340 #include <png.h>
4342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4343 { (eval echo configure:4344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4345 if test -z "$ac_err"; then
4346 rm -rf conftest*
4347 eval "ac_cv_header_$ac_safe=yes"
4348 else
4349 echo "$ac_err" >&5
4350 echo "configure: failed program was:" >&5
4351 cat conftest.$ac_ext >&5
4352 rm -rf conftest*
4353 eval "ac_cv_header_$ac_safe=no"
4355 rm -f conftest*
4357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4358 echo "$ac_t""yes" 1>&6
4359 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
4360 echo "configure:4361: checking for png_set_expand in -lpng" >&5
4361 ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4363 echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365 ac_save_LIBS="$LIBS"
4366 LIBS="-lpng -lX11 -lz -lm $LIBS"
4367 cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 /* Override any gcc2 internal prototype to avoid an error. */
4371 /* We use char because int might match the return type of a gcc2
4372 builtin and then its argument prototype would still apply. */
4373 char png_set_expand();
4375 int main() {
4376 png_set_expand()
4377 ; return 0; }
4379 if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4380 rm -rf conftest*
4381 eval "ac_cv_lib_$ac_lib_var=yes"
4382 else
4383 echo "configure: failed program was:" >&5
4384 cat conftest.$ac_ext >&5
4385 rm -rf conftest*
4386 eval "ac_cv_lib_$ac_lib_var=no"
4388 rm -f conftest*
4389 LIBS="$ac_save_LIBS"
4392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4393 echo "$ac_t""yes" 1>&6
4394 HAVE_PNG=yes
4395 else
4396 echo "$ac_t""no" 1>&6
4399 else
4400 echo "$ac_t""no" 1>&6
4403 CFLAGS="${old_c_flags}"
4406 if test "${HAVE_PNG}" = "yes"; then
4407 cat >> confdefs.h <<\EOF
4408 #define HAVE_PNG 1
4414 ### Use -ltiff if available, unless `--with-tiff=no'.
4415 HAVE_TIFF=no
4416 if test "${HAVE_X11}" = "yes"; then
4417 if test "${with_tiff}" != "no"; then
4418 old_c_flags="${CFLAGS}"
4419 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4420 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4421 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
4422 echo "configure:4423: checking for tiffio.h" >&5
4423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4424 echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426 cat > conftest.$ac_ext <<EOF
4427 #line 4428 "configure"
4428 #include "confdefs.h"
4429 #include <tiffio.h>
4431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4432 { (eval echo configure:4433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4434 if test -z "$ac_err"; then
4435 rm -rf conftest*
4436 eval "ac_cv_header_$ac_safe=yes"
4437 else
4438 echo "$ac_err" >&5
4439 echo "configure: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
4441 rm -rf conftest*
4442 eval "ac_cv_header_$ac_safe=no"
4444 rm -f conftest*
4446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4447 echo "$ac_t""yes" 1>&6
4448 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
4449 echo "configure:4450: checking for TIFFGetVersion in -ltiff" >&5
4450 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4452 echo $ac_n "(cached) $ac_c" 1>&6
4453 else
4454 ac_save_LIBS="$LIBS"
4455 LIBS="-ltiff -lX11 -lm $LIBS"
4456 cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 /* Override any gcc2 internal prototype to avoid an error. */
4460 /* We use char because int might match the return type of a gcc2
4461 builtin and then its argument prototype would still apply. */
4462 char TIFFGetVersion();
4464 int main() {
4465 TIFFGetVersion()
4466 ; return 0; }
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4469 rm -rf conftest*
4470 eval "ac_cv_lib_$ac_lib_var=yes"
4471 else
4472 echo "configure: failed program was:" >&5
4473 cat conftest.$ac_ext >&5
4474 rm -rf conftest*
4475 eval "ac_cv_lib_$ac_lib_var=no"
4477 rm -f conftest*
4478 LIBS="$ac_save_LIBS"
4481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4482 echo "$ac_t""yes" 1>&6
4483 HAVE_TIFF=yes
4484 else
4485 echo "$ac_t""no" 1>&6
4488 else
4489 echo "$ac_t""no" 1>&6
4492 CFLAGS="${old_c_flags}"
4495 if test "${HAVE_TIFF}" = "yes"; then
4496 cat >> confdefs.h <<\EOF
4497 #define HAVE_TIFF 1
4503 ### Use -lgif if available, unless `--with-gif=no'.
4504 HAVE_GIF=no
4505 if test "${HAVE_X11}" = "yes"; then
4506 if test "${with_gif}" != "no"; then
4507 old_c_flags="${CFLAGS}"
4508 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4509 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4510 echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
4511 echo "configure:4512: checking for gif_lib.h" >&5
4512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 #include <gif_lib.h>
4520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4521 { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4523 if test -z "$ac_err"; then
4524 rm -rf conftest*
4525 eval "ac_cv_header_$ac_safe=yes"
4526 else
4527 echo "$ac_err" >&5
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 rm -rf conftest*
4531 eval "ac_cv_header_$ac_safe=no"
4533 rm -f conftest*
4535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4536 echo "$ac_t""yes" 1>&6
4537 echo $ac_n "checking for DGifOpenFileName in -lungif""... $ac_c" 1>&6
4538 echo "configure:4539: checking for DGifOpenFileName in -lungif" >&5
4539 ac_lib_var=`echo ungif'_'DGifOpenFileName | sed 'y%./+-%__p_%'`
4540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4541 echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543 ac_save_LIBS="$LIBS"
4544 LIBS="-lungif -lX11 $LIBS"
4545 cat > conftest.$ac_ext <<EOF
4546 #line 4547 "configure"
4547 #include "confdefs.h"
4548 /* Override any gcc2 internal prototype to avoid an error. */
4549 /* We use char because int might match the return type of a gcc2
4550 builtin and then its argument prototype would still apply. */
4551 char DGifOpenFileName();
4553 int main() {
4554 DGifOpenFileName()
4555 ; return 0; }
4557 if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4558 rm -rf conftest*
4559 eval "ac_cv_lib_$ac_lib_var=yes"
4560 else
4561 echo "configure: failed program was:" >&5
4562 cat conftest.$ac_ext >&5
4563 rm -rf conftest*
4564 eval "ac_cv_lib_$ac_lib_var=no"
4566 rm -f conftest*
4567 LIBS="$ac_save_LIBS"
4570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4571 echo "$ac_t""yes" 1>&6
4572 HAVE_GIF=yes
4573 else
4574 echo "$ac_t""no" 1>&6
4577 else
4578 echo "$ac_t""no" 1>&6
4581 CFLAGS="${old_c_flags}"
4584 if test "${HAVE_GIF}" = "yes"; then
4585 cat >> confdefs.h <<\EOF
4586 #define HAVE_GIF 1
4592 # If netdb.h doesn't declare h_errno, we must declare it by hand.
4593 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
4594 echo "configure:4595: checking whether netdb declares h_errno" >&5
4595 if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
4596 echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 #include <netdb.h>
4602 int main() {
4603 return h_errno;
4604 ; return 0; }
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607 rm -rf conftest*
4608 emacs_cv_netdb_declares_h_errno=yes
4609 else
4610 echo "configure: failed program was:" >&5
4611 cat conftest.$ac_ext >&5
4612 rm -rf conftest*
4613 emacs_cv_netdb_declares_h_errno=no
4615 rm -f conftest*
4618 echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4619 if test $emacs_cv_netdb_declares_h_errno = yes; then
4620 cat >> confdefs.h <<\EOF
4621 #define HAVE_H_ERRNO 1
4626 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4627 # for constant arguments. Useless!
4628 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4629 echo "configure:4630: checking for working alloca.h" >&5
4630 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <alloca.h>
4637 int main() {
4638 char *p = alloca(2 * sizeof(int));
4639 ; return 0; }
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642 rm -rf conftest*
4643 ac_cv_header_alloca_h=yes
4644 else
4645 echo "configure: failed program was:" >&5
4646 cat conftest.$ac_ext >&5
4647 rm -rf conftest*
4648 ac_cv_header_alloca_h=no
4650 rm -f conftest*
4653 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4654 if test $ac_cv_header_alloca_h = yes; then
4655 cat >> confdefs.h <<\EOF
4656 #define HAVE_ALLOCA_H 1
4661 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4662 echo "configure:4663: checking for alloca" >&5
4663 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4670 #ifdef __GNUC__
4671 # define alloca __builtin_alloca
4672 #else
4673 # ifdef _MSC_VER
4674 # include <malloc.h>
4675 # define alloca _alloca
4676 # else
4677 # if HAVE_ALLOCA_H
4678 # include <alloca.h>
4679 # else
4680 # ifdef _AIX
4681 #pragma alloca
4682 # else
4683 # ifndef alloca /* predefined by HP cc +Olibcalls */
4684 char *alloca ();
4685 # endif
4686 # endif
4687 # endif
4688 # endif
4689 #endif
4691 int main() {
4692 char *p = (char *) alloca(1);
4693 ; return 0; }
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696 rm -rf conftest*
4697 ac_cv_func_alloca_works=yes
4698 else
4699 echo "configure: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 rm -rf conftest*
4702 ac_cv_func_alloca_works=no
4704 rm -f conftest*
4707 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4708 if test $ac_cv_func_alloca_works = yes; then
4709 cat >> confdefs.h <<\EOF
4710 #define HAVE_ALLOCA 1
4715 if test $ac_cv_func_alloca_works = no; then
4716 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4717 # that cause trouble. Some versions do not even contain alloca or
4718 # contain a buggy version. If you still want to use their alloca,
4719 # use ar to extract alloca.o from them instead of compiling alloca.c.
4720 ALLOCA=alloca.${ac_objext}
4721 cat >> confdefs.h <<\EOF
4722 #define C_ALLOCA 1
4726 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4727 echo "configure:4728: checking whether alloca needs Cray hooks" >&5
4728 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4729 echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 #if defined(CRAY) && ! defined(CRAY2)
4735 webecray
4736 #else
4737 wenotbecray
4738 #endif
4741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4742 egrep "webecray" >/dev/null 2>&1; then
4743 rm -rf conftest*
4744 ac_cv_os_cray=yes
4745 else
4746 rm -rf conftest*
4747 ac_cv_os_cray=no
4749 rm -f conftest*
4753 echo "$ac_t""$ac_cv_os_cray" 1>&6
4754 if test $ac_cv_os_cray = yes; then
4755 for ac_func in _getb67 GETB67 getb67; do
4756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4757 echo "configure:4758: checking for $ac_func" >&5
4758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4759 echo $ac_n "(cached) $ac_c" 1>&6
4760 else
4761 cat > conftest.$ac_ext <<EOF
4762 #line 4763 "configure"
4763 #include "confdefs.h"
4764 /* System header to define __stub macros and hopefully few prototypes,
4765 which can conflict with char $ac_func(); below. */
4766 #include <assert.h>
4767 /* Override any gcc2 internal prototype to avoid an error. */
4768 /* We use char because int might match the return type of a gcc2
4769 builtin and then its argument prototype would still apply. */
4770 char $ac_func();
4772 int main() {
4774 /* The GNU C library defines this for functions which it implements
4775 to always fail with ENOSYS. Some functions are actually named
4776 something starting with __ and the normal name is an alias. */
4777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4778 choke me
4779 #else
4780 $ac_func();
4781 #endif
4783 ; return 0; }
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786 rm -rf conftest*
4787 eval "ac_cv_func_$ac_func=yes"
4788 else
4789 echo "configure: failed program was:" >&5
4790 cat conftest.$ac_ext >&5
4791 rm -rf conftest*
4792 eval "ac_cv_func_$ac_func=no"
4794 rm -f conftest*
4797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4798 echo "$ac_t""yes" 1>&6
4799 cat >> confdefs.h <<EOF
4800 #define CRAY_STACKSEG_END $ac_func
4803 break
4804 else
4805 echo "$ac_t""no" 1>&6
4808 done
4811 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4812 echo "configure:4813: checking stack direction for C alloca" >&5
4813 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816 if test "$cross_compiling" = yes; then
4817 ac_cv_c_stack_direction=0
4818 else
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 find_stack_direction ()
4824 static char *addr = 0;
4825 auto char dummy;
4826 if (addr == 0)
4828 addr = &dummy;
4829 return find_stack_direction ();
4831 else
4832 return (&dummy > addr) ? 1 : -1;
4834 main ()
4836 exit (find_stack_direction() < 0);
4839 if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4840 then
4841 ac_cv_c_stack_direction=1
4842 else
4843 echo "configure: failed program was:" >&5
4844 cat conftest.$ac_ext >&5
4845 rm -fr conftest*
4846 ac_cv_c_stack_direction=-1
4848 rm -fr conftest*
4853 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4854 cat >> confdefs.h <<EOF
4855 #define STACK_DIRECTION $ac_cv_c_stack_direction
4861 # fmod, logb, and frexp are found in -lm on most systems.
4862 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
4863 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
4864 echo "configure:4865: checking for sqrt in -lm" >&5
4865 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
4866 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4867 echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869 ac_save_LIBS="$LIBS"
4870 LIBS="-lm $LIBS"
4871 cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874 /* Override any gcc2 internal prototype to avoid an error. */
4875 /* We use char because int might match the return type of a gcc2
4876 builtin and then its argument prototype would still apply. */
4877 char sqrt();
4879 int main() {
4880 sqrt()
4881 ; return 0; }
4883 if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4884 rm -rf conftest*
4885 eval "ac_cv_lib_$ac_lib_var=yes"
4886 else
4887 echo "configure: failed program was:" >&5
4888 cat conftest.$ac_ext >&5
4889 rm -rf conftest*
4890 eval "ac_cv_lib_$ac_lib_var=no"
4892 rm -f conftest*
4893 LIBS="$ac_save_LIBS"
4896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4897 echo "$ac_t""yes" 1>&6
4898 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4899 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4900 cat >> confdefs.h <<EOF
4901 #define $ac_tr_lib 1
4904 LIBS="-lm $LIBS"
4906 else
4907 echo "$ac_t""no" 1>&6
4911 # Check for mail-locking functions in a "mail" library
4912 echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
4913 echo "configure:4914: checking for maillock in -lmail" >&5
4914 ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
4915 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4916 echo $ac_n "(cached) $ac_c" 1>&6
4917 else
4918 ac_save_LIBS="$LIBS"
4919 LIBS="-lmail $LIBS"
4920 cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4923 /* Override any gcc2 internal prototype to avoid an error. */
4924 /* We use char because int might match the return type of a gcc2
4925 builtin and then its argument prototype would still apply. */
4926 char maillock();
4928 int main() {
4929 maillock()
4930 ; return 0; }
4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4933 rm -rf conftest*
4934 eval "ac_cv_lib_$ac_lib_var=yes"
4935 else
4936 echo "configure: failed program was:" >&5
4937 cat conftest.$ac_ext >&5
4938 rm -rf conftest*
4939 eval "ac_cv_lib_$ac_lib_var=no"
4941 rm -f conftest*
4942 LIBS="$ac_save_LIBS"
4945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4946 echo "$ac_t""yes" 1>&6
4947 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4948 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_lib 1
4953 LIBS="-lmail $LIBS"
4955 else
4956 echo "$ac_t""no" 1>&6
4959 echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
4960 echo "configure:4961: checking for maillock in -llockfile" >&5
4961 ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
4962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4963 echo $ac_n "(cached) $ac_c" 1>&6
4964 else
4965 ac_save_LIBS="$LIBS"
4966 LIBS="-llockfile $LIBS"
4967 cat > conftest.$ac_ext <<EOF
4968 #line 4969 "configure"
4969 #include "confdefs.h"
4970 /* Override any gcc2 internal prototype to avoid an error. */
4971 /* We use char because int might match the return type of a gcc2
4972 builtin and then its argument prototype would still apply. */
4973 char maillock();
4975 int main() {
4976 maillock()
4977 ; return 0; }
4979 if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4980 rm -rf conftest*
4981 eval "ac_cv_lib_$ac_lib_var=yes"
4982 else
4983 echo "configure: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 rm -rf conftest*
4986 eval "ac_cv_lib_$ac_lib_var=no"
4988 rm -f conftest*
4989 LIBS="$ac_save_LIBS"
4992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4993 echo "$ac_t""yes" 1>&6
4994 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4995 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4996 cat >> confdefs.h <<EOF
4997 #define $ac_tr_lib 1
5000 LIBS="-llockfile $LIBS"
5002 else
5003 echo "$ac_t""no" 1>&6
5006 # If we have the shared liblockfile, assume we must use it for mail
5007 # locking (e.g. Debian). If we couldn't link against liblockfile
5008 # (no liblockfile.a installed), ensure that we don't need to.
5009 if test "$ac_cv_lib_lockfile_maillock" = no; then
5010 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5011 set dummy liblockfile.so; ac_word=$2
5012 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5013 echo "configure:5014: checking for $ac_word" >&5
5014 if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5015 echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017 if test -n "$liblockfile"; then
5018 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5019 else
5020 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5021 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5022 for ac_dir in $ac_dummy; do
5023 test -z "$ac_dir" && ac_dir=.
5024 if test -f $ac_dir/$ac_word; then
5025 ac_cv_prog_liblockfile="yes"
5026 break
5028 done
5029 IFS="$ac_save_ifs"
5030 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
5033 liblockfile="$ac_cv_prog_liblockfile"
5034 if test -n "$liblockfile"; then
5035 echo "$ac_t""$liblockfile" 1>&6
5036 else
5037 echo "$ac_t""no" 1>&6
5040 if test $ac_cv_prog_liblockfile = yes; then
5041 { echo "configure: error: Shared liblockfile found but can't link against it.
5042 This probably means that movemail could lose mail.
5043 There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
5044 else cat >> confdefs.h <<\EOF
5045 #define LIBMAIL -llockfile
5049 else :
5051 for ac_func in touchlock
5053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5054 echo "configure:5055: checking for $ac_func" >&5
5055 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5056 echo $ac_n "(cached) $ac_c" 1>&6
5057 else
5058 cat > conftest.$ac_ext <<EOF
5059 #line 5060 "configure"
5060 #include "confdefs.h"
5061 /* System header to define __stub macros and hopefully few prototypes,
5062 which can conflict with char $ac_func(); below. */
5063 #include <assert.h>
5064 /* Override any gcc2 internal prototype to avoid an error. */
5065 /* We use char because int might match the return type of a gcc2
5066 builtin and then its argument prototype would still apply. */
5067 char $ac_func();
5069 int main() {
5071 /* The GNU C library defines this for functions which it implements
5072 to always fail with ENOSYS. Some functions are actually named
5073 something starting with __ and the normal name is an alias. */
5074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5075 choke me
5076 #else
5077 $ac_func();
5078 #endif
5080 ; return 0; }
5082 if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5083 rm -rf conftest*
5084 eval "ac_cv_func_$ac_func=yes"
5085 else
5086 echo "configure: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
5088 rm -rf conftest*
5089 eval "ac_cv_func_$ac_func=no"
5091 rm -f conftest*
5094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5095 echo "$ac_t""yes" 1>&6
5096 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5097 cat >> confdefs.h <<EOF
5098 #define $ac_tr_func 1
5101 else
5102 echo "$ac_t""no" 1>&6
5104 done
5106 for ac_hdr in maillock.h
5108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5110 echo "configure:5111: checking for $ac_hdr" >&5
5111 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5112 echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 #include <$ac_hdr>
5119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5120 { (eval echo configure:5121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5122 if test -z "$ac_err"; then
5123 rm -rf conftest*
5124 eval "ac_cv_header_$ac_safe=yes"
5125 else
5126 echo "$ac_err" >&5
5127 echo "configure: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
5129 rm -rf conftest*
5130 eval "ac_cv_header_$ac_safe=no"
5132 rm -f conftest*
5134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5135 echo "$ac_t""yes" 1>&6
5136 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5137 cat >> confdefs.h <<EOF
5138 #define $ac_tr_hdr 1
5141 else
5142 echo "$ac_t""no" 1>&6
5144 done
5147 for ac_func in gettimeofday gethostname getdomainname dup2 \
5148 rename closedir mkdir rmdir sysinfo \
5149 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5150 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5151 utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo \
5152 __fpending ftello getloadavg mblen mbrlen strsignal
5154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5155 echo "configure:5156: checking for $ac_func" >&5
5156 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5157 echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159 cat > conftest.$ac_ext <<EOF
5160 #line 5161 "configure"
5161 #include "confdefs.h"
5162 /* System header to define __stub macros and hopefully few prototypes,
5163 which can conflict with char $ac_func(); below. */
5164 #include <assert.h>
5165 /* Override any gcc2 internal prototype to avoid an error. */
5166 /* We use char because int might match the return type of a gcc2
5167 builtin and then its argument prototype would still apply. */
5168 char $ac_func();
5170 int main() {
5172 /* The GNU C library defines this for functions which it implements
5173 to always fail with ENOSYS. Some functions are actually named
5174 something starting with __ and the normal name is an alias. */
5175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5176 choke me
5177 #else
5178 $ac_func();
5179 #endif
5181 ; return 0; }
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184 rm -rf conftest*
5185 eval "ac_cv_func_$ac_func=yes"
5186 else
5187 echo "configure: failed program was:" >&5
5188 cat conftest.$ac_ext >&5
5189 rm -rf conftest*
5190 eval "ac_cv_func_$ac_func=no"
5192 rm -f conftest*
5195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5196 echo "$ac_t""yes" 1>&6
5197 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5198 cat >> confdefs.h <<EOF
5199 #define $ac_tr_func 1
5202 else
5203 echo "$ac_t""no" 1>&6
5205 done
5208 # Check this now, so that we will NOT find the above functions in ncurses.
5209 # That is because we have not set up to link ncurses in lib-src.
5210 # It's better to believe a function is not available
5211 # than to expect to find it in ncurses.
5212 echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
5213 echo "configure:5214: checking for tparm in -lncurses" >&5
5214 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
5215 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5216 echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218 ac_save_LIBS="$LIBS"
5219 LIBS="-lncurses $LIBS"
5220 cat > conftest.$ac_ext <<EOF
5221 #line 5222 "configure"
5222 #include "confdefs.h"
5223 /* Override any gcc2 internal prototype to avoid an error. */
5224 /* We use char because int might match the return type of a gcc2
5225 builtin and then its argument prototype would still apply. */
5226 char tparm();
5228 int main() {
5229 tparm()
5230 ; return 0; }
5232 if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5233 rm -rf conftest*
5234 eval "ac_cv_lib_$ac_lib_var=yes"
5235 else
5236 echo "configure: failed program was:" >&5
5237 cat conftest.$ac_ext >&5
5238 rm -rf conftest*
5239 eval "ac_cv_lib_$ac_lib_var=no"
5241 rm -f conftest*
5242 LIBS="$ac_save_LIBS"
5245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5246 echo "$ac_t""yes" 1>&6
5247 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5248 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5249 cat >> confdefs.h <<EOF
5250 #define $ac_tr_lib 1
5253 LIBS="-lncurses $LIBS"
5255 else
5256 echo "$ac_t""no" 1>&6
5260 # These tell us which Kerberos-related libraries to use.
5261 if test "${with_kerberos+set}" = set; then
5262 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
5263 echo "configure:5264: checking for com_err in -lcom_err" >&5
5264 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
5265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5266 echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268 ac_save_LIBS="$LIBS"
5269 LIBS="-lcom_err $LIBS"
5270 cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273 /* Override any gcc2 internal prototype to avoid an error. */
5274 /* We use char because int might match the return type of a gcc2
5275 builtin and then its argument prototype would still apply. */
5276 char com_err();
5278 int main() {
5279 com_err()
5280 ; return 0; }
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5283 rm -rf conftest*
5284 eval "ac_cv_lib_$ac_lib_var=yes"
5285 else
5286 echo "configure: failed program was:" >&5
5287 cat conftest.$ac_ext >&5
5288 rm -rf conftest*
5289 eval "ac_cv_lib_$ac_lib_var=no"
5291 rm -f conftest*
5292 LIBS="$ac_save_LIBS"
5295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5296 echo "$ac_t""yes" 1>&6
5297 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5298 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5299 cat >> confdefs.h <<EOF
5300 #define $ac_tr_lib 1
5303 LIBS="-lcom_err $LIBS"
5305 else
5306 echo "$ac_t""no" 1>&6
5309 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
5310 echo "configure:5311: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
5311 ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5312 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5313 echo $ac_n "(cached) $ac_c" 1>&6
5314 else
5315 ac_save_LIBS="$LIBS"
5316 LIBS="-lk5crypto $LIBS"
5317 cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 /* Override any gcc2 internal prototype to avoid an error. */
5321 /* We use char because int might match the return type of a gcc2
5322 builtin and then its argument prototype would still apply. */
5323 char mit_des_cbc_encrypt();
5325 int main() {
5326 mit_des_cbc_encrypt()
5327 ; return 0; }
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330 rm -rf conftest*
5331 eval "ac_cv_lib_$ac_lib_var=yes"
5332 else
5333 echo "configure: failed program was:" >&5
5334 cat conftest.$ac_ext >&5
5335 rm -rf conftest*
5336 eval "ac_cv_lib_$ac_lib_var=no"
5338 rm -f conftest*
5339 LIBS="$ac_save_LIBS"
5342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5343 echo "$ac_t""yes" 1>&6
5344 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5345 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5346 cat >> confdefs.h <<EOF
5347 #define $ac_tr_lib 1
5350 LIBS="-lk5crypto $LIBS"
5352 else
5353 echo "$ac_t""no" 1>&6
5356 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
5357 echo "configure:5358: checking for mit_des_cbc_encrypt in -lcrypto" >&5
5358 ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5360 echo $ac_n "(cached) $ac_c" 1>&6
5361 else
5362 ac_save_LIBS="$LIBS"
5363 LIBS="-lcrypto $LIBS"
5364 cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367 /* Override any gcc2 internal prototype to avoid an error. */
5368 /* We use char because int might match the return type of a gcc2
5369 builtin and then its argument prototype would still apply. */
5370 char mit_des_cbc_encrypt();
5372 int main() {
5373 mit_des_cbc_encrypt()
5374 ; return 0; }
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377 rm -rf conftest*
5378 eval "ac_cv_lib_$ac_lib_var=yes"
5379 else
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
5382 rm -rf conftest*
5383 eval "ac_cv_lib_$ac_lib_var=no"
5385 rm -f conftest*
5386 LIBS="$ac_save_LIBS"
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5391 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5392 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5393 cat >> confdefs.h <<EOF
5394 #define $ac_tr_lib 1
5397 LIBS="-lcrypto $LIBS"
5399 else
5400 echo "$ac_t""no" 1>&6
5403 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
5404 echo "configure:5405: checking for krb5_init_context in -lkrb5" >&5
5405 ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
5406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5407 echo $ac_n "(cached) $ac_c" 1>&6
5408 else
5409 ac_save_LIBS="$LIBS"
5410 LIBS="-lkrb5 $LIBS"
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 /* Override any gcc2 internal prototype to avoid an error. */
5415 /* We use char because int might match the return type of a gcc2
5416 builtin and then its argument prototype would still apply. */
5417 char krb5_init_context();
5419 int main() {
5420 krb5_init_context()
5421 ; return 0; }
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424 rm -rf conftest*
5425 eval "ac_cv_lib_$ac_lib_var=yes"
5426 else
5427 echo "configure: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
5429 rm -rf conftest*
5430 eval "ac_cv_lib_$ac_lib_var=no"
5432 rm -f conftest*
5433 LIBS="$ac_save_LIBS"
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5437 echo "$ac_t""yes" 1>&6
5438 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5439 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5440 cat >> confdefs.h <<EOF
5441 #define $ac_tr_lib 1
5444 LIBS="-lkrb5 $LIBS"
5446 else
5447 echo "$ac_t""no" 1>&6
5450 if test "${with_kerberos5+set}" != set; then
5451 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
5452 echo "configure:5453: checking for des_cbc_encrypt in -ldes425" >&5
5453 ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
5454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5455 echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457 ac_save_LIBS="$LIBS"
5458 LIBS="-ldes425 $LIBS"
5459 cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* Override any gcc2 internal prototype to avoid an error. */
5463 /* We use char because int might match the return type of a gcc2
5464 builtin and then its argument prototype would still apply. */
5465 char des_cbc_encrypt();
5467 int main() {
5468 des_cbc_encrypt()
5469 ; return 0; }
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472 rm -rf conftest*
5473 eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 rm -rf conftest*
5478 eval "ac_cv_lib_$ac_lib_var=no"
5480 rm -f conftest*
5481 LIBS="$ac_save_LIBS"
5484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5485 echo "$ac_t""yes" 1>&6
5486 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5487 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5488 cat >> confdefs.h <<EOF
5489 #define $ac_tr_lib 1
5492 LIBS="-ldes425 $LIBS"
5494 else
5495 echo "$ac_t""no" 1>&6
5496 echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
5497 echo "configure:5498: checking for des_cbc_encrypt in -ldes" >&5
5498 ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
5499 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502 ac_save_LIBS="$LIBS"
5503 LIBS="-ldes $LIBS"
5504 cat > conftest.$ac_ext <<EOF
5505 #line 5506 "configure"
5506 #include "confdefs.h"
5507 /* Override any gcc2 internal prototype to avoid an error. */
5508 /* We use char because int might match the return type of a gcc2
5509 builtin and then its argument prototype would still apply. */
5510 char des_cbc_encrypt();
5512 int main() {
5513 des_cbc_encrypt()
5514 ; return 0; }
5516 if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5517 rm -rf conftest*
5518 eval "ac_cv_lib_$ac_lib_var=yes"
5519 else
5520 echo "configure: failed program was:" >&5
5521 cat conftest.$ac_ext >&5
5522 rm -rf conftest*
5523 eval "ac_cv_lib_$ac_lib_var=no"
5525 rm -f conftest*
5526 LIBS="$ac_save_LIBS"
5529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5530 echo "$ac_t""yes" 1>&6
5531 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
5532 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5533 cat >> confdefs.h <<EOF
5534 #define $ac_tr_lib 1
5537 LIBS="-ldes $LIBS"
5539 else
5540 echo "$ac_t""no" 1>&6
5545 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
5546 echo "configure:5547: checking for krb_get_cred in -lkrb4" >&5
5547 ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
5548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5549 echo $ac_n "(cached) $ac_c" 1>&6
5550 else
5551 ac_save_LIBS="$LIBS"
5552 LIBS="-lkrb4 $LIBS"
5553 cat > conftest.$ac_ext <<EOF
5554 #line 5555 "configure"
5555 #include "confdefs.h"
5556 /* Override any gcc2 internal prototype to avoid an error. */
5557 /* We use char because int might match the return type of a gcc2
5558 builtin and then its argument prototype would still apply. */
5559 char krb_get_cred();
5561 int main() {
5562 krb_get_cred()
5563 ; return 0; }
5565 if { (eval echo configure:5566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5566 rm -rf conftest*
5567 eval "ac_cv_lib_$ac_lib_var=yes"
5568 else
5569 echo "configure: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
5571 rm -rf conftest*
5572 eval "ac_cv_lib_$ac_lib_var=no"
5574 rm -f conftest*
5575 LIBS="$ac_save_LIBS"
5578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5579 echo "$ac_t""yes" 1>&6
5580 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5581 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5582 cat >> confdefs.h <<EOF
5583 #define $ac_tr_lib 1
5586 LIBS="-lkrb4 $LIBS"
5588 else
5589 echo "$ac_t""no" 1>&6
5590 echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
5591 echo "configure:5592: checking for krb_get_cred in -lkrb" >&5
5592 ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
5593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5594 echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596 ac_save_LIBS="$LIBS"
5597 LIBS="-lkrb $LIBS"
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* Override any gcc2 internal prototype to avoid an error. */
5602 /* We use char because int might match the return type of a gcc2
5603 builtin and then its argument prototype would still apply. */
5604 char krb_get_cred();
5606 int main() {
5607 krb_get_cred()
5608 ; return 0; }
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611 rm -rf conftest*
5612 eval "ac_cv_lib_$ac_lib_var=yes"
5613 else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -rf conftest*
5617 eval "ac_cv_lib_$ac_lib_var=no"
5619 rm -f conftest*
5620 LIBS="$ac_save_LIBS"
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5624 echo "$ac_t""yes" 1>&6
5625 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
5626 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5627 cat >> confdefs.h <<EOF
5628 #define $ac_tr_lib 1
5631 LIBS="-lkrb $LIBS"
5633 else
5634 echo "$ac_t""no" 1>&6
5641 if test "${with_kerberos5+set}" = set; then
5642 for ac_hdr in krb5.h
5644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5646 echo "configure:5647: checking for $ac_hdr" >&5
5647 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5648 echo $ac_n "(cached) $ac_c" 1>&6
5649 else
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653 #include <$ac_hdr>
5655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5656 { (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5658 if test -z "$ac_err"; then
5659 rm -rf conftest*
5660 eval "ac_cv_header_$ac_safe=yes"
5661 else
5662 echo "$ac_err" >&5
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -rf conftest*
5666 eval "ac_cv_header_$ac_safe=no"
5668 rm -f conftest*
5670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5671 echo "$ac_t""yes" 1>&6
5672 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5673 cat >> confdefs.h <<EOF
5674 #define $ac_tr_hdr 1
5677 else
5678 echo "$ac_t""no" 1>&6
5680 done
5682 else
5683 for ac_hdr in des.h
5685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5687 echo "configure:5688: checking for $ac_hdr" >&5
5688 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5689 echo $ac_n "(cached) $ac_c" 1>&6
5690 else
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 #include <$ac_hdr>
5696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5697 { (eval echo configure:5698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5699 if test -z "$ac_err"; then
5700 rm -rf conftest*
5701 eval "ac_cv_header_$ac_safe=yes"
5702 else
5703 echo "$ac_err" >&5
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5706 rm -rf conftest*
5707 eval "ac_cv_header_$ac_safe=no"
5709 rm -f conftest*
5711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5712 echo "$ac_t""yes" 1>&6
5713 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5714 cat >> confdefs.h <<EOF
5715 #define $ac_tr_hdr 1
5718 else
5719 echo "$ac_t""no" 1>&6
5720 for ac_hdr in kerberosIV/des.h
5722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5724 echo "configure:5725: checking for $ac_hdr" >&5
5725 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5726 echo $ac_n "(cached) $ac_c" 1>&6
5727 else
5728 cat > conftest.$ac_ext <<EOF
5729 #line 5730 "configure"
5730 #include "confdefs.h"
5731 #include <$ac_hdr>
5733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5734 { (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5736 if test -z "$ac_err"; then
5737 rm -rf conftest*
5738 eval "ac_cv_header_$ac_safe=yes"
5739 else
5740 echo "$ac_err" >&5
5741 echo "configure: failed program was:" >&5
5742 cat conftest.$ac_ext >&5
5743 rm -rf conftest*
5744 eval "ac_cv_header_$ac_safe=no"
5746 rm -f conftest*
5748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5749 echo "$ac_t""yes" 1>&6
5750 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5751 cat >> confdefs.h <<EOF
5752 #define $ac_tr_hdr 1
5755 else
5756 echo "$ac_t""no" 1>&6
5757 for ac_hdr in kerberos/des.h
5759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_hdr" >&5
5762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5763 echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 #include <$ac_hdr>
5770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5771 { (eval echo configure:5772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5773 if test -z "$ac_err"; then
5774 rm -rf conftest*
5775 eval "ac_cv_header_$ac_safe=yes"
5776 else
5777 echo "$ac_err" >&5
5778 echo "configure: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 rm -rf conftest*
5781 eval "ac_cv_header_$ac_safe=no"
5783 rm -f conftest*
5785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5786 echo "$ac_t""yes" 1>&6
5787 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5788 cat >> confdefs.h <<EOF
5789 #define $ac_tr_hdr 1
5792 else
5793 echo "$ac_t""no" 1>&6
5795 done
5798 done
5801 done
5803 for ac_hdr in krb.h
5805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5806 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5807 echo "configure:5808: checking for $ac_hdr" >&5
5808 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5809 echo $ac_n "(cached) $ac_c" 1>&6
5810 else
5811 cat > conftest.$ac_ext <<EOF
5812 #line 5813 "configure"
5813 #include "confdefs.h"
5814 #include <$ac_hdr>
5816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5817 { (eval echo configure:5818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5819 if test -z "$ac_err"; then
5820 rm -rf conftest*
5821 eval "ac_cv_header_$ac_safe=yes"
5822 else
5823 echo "$ac_err" >&5
5824 echo "configure: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 rm -rf conftest*
5827 eval "ac_cv_header_$ac_safe=no"
5829 rm -f conftest*
5831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5832 echo "$ac_t""yes" 1>&6
5833 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5834 cat >> confdefs.h <<EOF
5835 #define $ac_tr_hdr 1
5838 else
5839 echo "$ac_t""no" 1>&6
5840 for ac_hdr in kerberosIV/krb.h
5842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5844 echo "configure:5845: checking for $ac_hdr" >&5
5845 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5846 echo $ac_n "(cached) $ac_c" 1>&6
5847 else
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851 #include <$ac_hdr>
5853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5854 { (eval echo configure:5855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5856 if test -z "$ac_err"; then
5857 rm -rf conftest*
5858 eval "ac_cv_header_$ac_safe=yes"
5859 else
5860 echo "$ac_err" >&5
5861 echo "configure: failed program was:" >&5
5862 cat conftest.$ac_ext >&5
5863 rm -rf conftest*
5864 eval "ac_cv_header_$ac_safe=no"
5866 rm -f conftest*
5868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5869 echo "$ac_t""yes" 1>&6
5870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5871 cat >> confdefs.h <<EOF
5872 #define $ac_tr_hdr 1
5875 else
5876 echo "$ac_t""no" 1>&6
5877 for ac_hdr in kerberos/krb.h
5879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5881 echo "configure:5882: checking for $ac_hdr" >&5
5882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5883 echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885 cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 #include <$ac_hdr>
5890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5891 { (eval echo configure:5892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5893 if test -z "$ac_err"; then
5894 rm -rf conftest*
5895 eval "ac_cv_header_$ac_safe=yes"
5896 else
5897 echo "$ac_err" >&5
5898 echo "configure: failed program was:" >&5
5899 cat conftest.$ac_ext >&5
5900 rm -rf conftest*
5901 eval "ac_cv_header_$ac_safe=no"
5903 rm -f conftest*
5905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5906 echo "$ac_t""yes" 1>&6
5907 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5908 cat >> confdefs.h <<EOF
5909 #define $ac_tr_hdr 1
5912 else
5913 echo "$ac_t""no" 1>&6
5915 done
5918 done
5921 done
5924 for ac_hdr in com_err.h
5926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5928 echo "configure:5929: checking for $ac_hdr" >&5
5929 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5930 echo $ac_n "(cached) $ac_c" 1>&6
5931 else
5932 cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 #include <$ac_hdr>
5937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5938 { (eval echo configure:5939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5940 if test -z "$ac_err"; then
5941 rm -rf conftest*
5942 eval "ac_cv_header_$ac_safe=yes"
5943 else
5944 echo "$ac_err" >&5
5945 echo "configure: failed program was:" >&5
5946 cat conftest.$ac_ext >&5
5947 rm -rf conftest*
5948 eval "ac_cv_header_$ac_safe=no"
5950 rm -f conftest*
5952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5953 echo "$ac_t""yes" 1>&6
5954 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5955 cat >> confdefs.h <<EOF
5956 #define $ac_tr_hdr 1
5959 else
5960 echo "$ac_t""no" 1>&6
5962 done
5966 # Solaris requires -lintl if you want strerror (which calls dgettext)
5967 # to return localized messages.
5968 echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
5969 echo "configure:5970: checking for dgettext in -lintl" >&5
5970 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
5971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5972 echo $ac_n "(cached) $ac_c" 1>&6
5973 else
5974 ac_save_LIBS="$LIBS"
5975 LIBS="-lintl $LIBS"
5976 cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5979 /* Override any gcc2 internal prototype to avoid an error. */
5980 /* We use char because int might match the return type of a gcc2
5981 builtin and then its argument prototype would still apply. */
5982 char dgettext();
5984 int main() {
5985 dgettext()
5986 ; return 0; }
5988 if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5989 rm -rf conftest*
5990 eval "ac_cv_lib_$ac_lib_var=yes"
5991 else
5992 echo "configure: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5994 rm -rf conftest*
5995 eval "ac_cv_lib_$ac_lib_var=no"
5997 rm -f conftest*
5998 LIBS="$ac_save_LIBS"
6001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6002 echo "$ac_t""yes" 1>&6
6003 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6004 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6005 cat >> confdefs.h <<EOF
6006 #define $ac_tr_lib 1
6009 LIBS="-lintl $LIBS"
6011 else
6012 echo "$ac_t""no" 1>&6
6016 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
6017 echo "configure:6018: checking whether localtime caches TZ" >&5
6018 if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
6019 echo $ac_n "(cached) $ac_c" 1>&6
6020 else
6021 if test x$ac_cv_func_tzset = xyes; then
6022 if test "$cross_compiling" = yes; then
6023 # If we have tzset, assume the worst when cross-compiling.
6024 emacs_cv_localtime_cache=yes
6025 else
6026 cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029 #include <time.h>
6030 extern char **environ;
6031 unset_TZ ()
6033 char **from, **to;
6034 for (to = from = environ; (*to = *from); from++)
6035 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
6036 to++;
6038 char TZ_GMT0[] = "TZ=GMT0";
6039 char TZ_PST8[] = "TZ=PST8";
6040 main()
6042 time_t now = time ((time_t *) 0);
6043 int hour_GMT0, hour_unset;
6044 if (putenv (TZ_GMT0) != 0)
6045 exit (1);
6046 hour_GMT0 = localtime (&now)->tm_hour;
6047 unset_TZ ();
6048 hour_unset = localtime (&now)->tm_hour;
6049 if (putenv (TZ_PST8) != 0)
6050 exit (1);
6051 if (localtime (&now)->tm_hour == hour_GMT0)
6052 exit (1);
6053 unset_TZ ();
6054 if (localtime (&now)->tm_hour != hour_unset)
6055 exit (1);
6056 exit (0);
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6060 then
6061 emacs_cv_localtime_cache=no
6062 else
6063 echo "configure: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 rm -fr conftest*
6066 emacs_cv_localtime_cache=yes
6068 rm -fr conftest*
6071 else
6072 # If we lack tzset, report that localtime does not cache TZ,
6073 # since we can't invalidate the cache if we don't have tzset.
6074 emacs_cv_localtime_cache=no
6077 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
6078 if test $emacs_cv_localtime_cache = yes; then
6079 cat >> confdefs.h <<\EOF
6080 #define LOCALTIME_CACHE 1
6085 if test "x$HAVE_TIMEVAL" = xyes; then
6086 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
6087 echo "configure:6088: checking whether gettimeofday can accept two arguments" >&5
6088 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
6089 echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6095 #ifdef TIME_WITH_SYS_TIME
6096 #include <sys/time.h>
6097 #include <time.h>
6098 #else
6099 #ifdef HAVE_SYS_TIME_H
6100 #include <sys/time.h>
6101 #else
6102 #include <time.h>
6103 #endif
6104 #endif
6106 int main() {
6108 struct timeval time;
6109 struct timezone dummy;
6110 gettimeofday (&time, &dummy);
6112 ; return 0; }
6114 if { (eval echo configure:6115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6115 rm -rf conftest*
6116 emacs_cv_gettimeofday_two_arguments=yes
6117 else
6118 echo "configure: failed program was:" >&5
6119 cat conftest.$ac_ext >&5
6120 rm -rf conftest*
6121 emacs_cv_gettimeofday_two_arguments=no
6123 rm -f conftest*
6126 echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
6127 if test $emacs_cv_gettimeofday_two_arguments = no; then
6128 cat >> confdefs.h <<\EOF
6129 #define GETTIMEOFDAY_ONE_ARGUMENT 1
6135 ok_so_far=yes
6136 echo $ac_n "checking for socket""... $ac_c" 1>&6
6137 echo "configure:6138: checking for socket" >&5
6138 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
6139 echo $ac_n "(cached) $ac_c" 1>&6
6140 else
6141 cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 /* System header to define __stub macros and hopefully few prototypes,
6145 which can conflict with char socket(); below. */
6146 #include <assert.h>
6147 /* Override any gcc2 internal prototype to avoid an error. */
6148 /* We use char because int might match the return type of a gcc2
6149 builtin and then its argument prototype would still apply. */
6150 char socket();
6152 int main() {
6154 /* The GNU C library defines this for functions which it implements
6155 to always fail with ENOSYS. Some functions are actually named
6156 something starting with __ and the normal name is an alias. */
6157 #if defined (__stub_socket) || defined (__stub___socket)
6158 choke me
6159 #else
6160 socket();
6161 #endif
6163 ; return 0; }
6165 if { (eval echo configure:6166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6166 rm -rf conftest*
6167 eval "ac_cv_func_socket=yes"
6168 else
6169 echo "configure: failed program was:" >&5
6170 cat conftest.$ac_ext >&5
6171 rm -rf conftest*
6172 eval "ac_cv_func_socket=no"
6174 rm -f conftest*
6177 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
6178 echo "$ac_t""yes" 1>&6
6180 else
6181 echo "$ac_t""no" 1>&6
6182 ok_so_far=no
6185 if test $ok_so_far = yes; then
6186 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
6187 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
6188 echo "configure:6189: checking for netinet/in.h" >&5
6189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6190 echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192 cat > conftest.$ac_ext <<EOF
6193 #line 6194 "configure"
6194 #include "confdefs.h"
6195 #include <netinet/in.h>
6197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6198 { (eval echo configure:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6200 if test -z "$ac_err"; then
6201 rm -rf conftest*
6202 eval "ac_cv_header_$ac_safe=yes"
6203 else
6204 echo "$ac_err" >&5
6205 echo "configure: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 rm -rf conftest*
6208 eval "ac_cv_header_$ac_safe=no"
6210 rm -f conftest*
6212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6213 echo "$ac_t""yes" 1>&6
6215 else
6216 echo "$ac_t""no" 1>&6
6217 ok_so_far=no
6221 if test $ok_so_far = yes; then
6222 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
6223 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
6224 echo "configure:6225: checking for arpa/inet.h" >&5
6225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6226 echo $ac_n "(cached) $ac_c" 1>&6
6227 else
6228 cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231 #include <arpa/inet.h>
6233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6234 { (eval echo configure:6235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6236 if test -z "$ac_err"; then
6237 rm -rf conftest*
6238 eval "ac_cv_header_$ac_safe=yes"
6239 else
6240 echo "$ac_err" >&5
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -rf conftest*
6244 eval "ac_cv_header_$ac_safe=no"
6246 rm -f conftest*
6248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6249 echo "$ac_t""yes" 1>&6
6251 else
6252 echo "$ac_t""no" 1>&6
6253 ok_so_far=no
6257 if test $ok_so_far = yes; then
6258 cat >> confdefs.h <<\EOF
6259 #define HAVE_INET_SOCKETS 1
6264 if test -f /usr/lpp/X11/bin/smt.exp; then
6265 cat >> confdefs.h <<\EOF
6266 #define HAVE_AIX_SMT_EXP 1
6271 echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
6272 echo "configure:6273: checking whether system supports dynamic ptys" >&5
6273 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
6274 echo "$ac_t""yes" 1>&6
6275 cat >> confdefs.h <<\EOF
6276 #define HAVE_DEV_PTMX 1
6279 else
6280 echo "$ac_t""no" 1>&6
6283 # Set up the CFLAGS for real compilation, so we can substitute it.
6284 CFLAGS="$REAL_CFLAGS"
6286 #### Find out which version of Emacs this is.
6287 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
6288 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
6289 if test x"${version}" = x; then
6290 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
6293 ### Specify what sort of things we'll be editing into Makefile and config.h.
6294 ### Use configuration here uncanonicalized to avoid exceeding size limits.
6326 cat >> confdefs.h <<EOF
6327 #define EMACS_CONFIGURATION "${canonical}"
6330 cat >> confdefs.h <<EOF
6331 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
6334 cat >> confdefs.h <<EOF
6335 #define config_machfile "${machfile}"
6338 cat >> confdefs.h <<EOF
6339 #define config_opsysfile "${opsysfile}"
6342 cat >> confdefs.h <<EOF
6343 #define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
6346 cat >> confdefs.h <<EOF
6347 #define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
6350 cat >> confdefs.h <<EOF
6351 #define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
6354 cat >> confdefs.h <<EOF
6355 #define UNEXEC_SRC ${UNEXEC_SRC}
6359 if test "${HAVE_X_WINDOWS}" = "yes" ; then
6360 cat >> confdefs.h <<\EOF
6361 #define HAVE_X_WINDOWS 1
6365 if test "${USE_X_TOOLKIT}" != "none" ; then
6366 cat >> confdefs.h <<\EOF
6367 #define USE_X_TOOLKIT 1
6371 if test "${HAVE_X11}" = "yes" ; then
6372 cat >> confdefs.h <<\EOF
6373 #define HAVE_X11 1
6377 if test "${HAVE_XFREE386}" = "yes" ; then
6378 cat >> confdefs.h <<\EOF
6379 #define HAVE_XFREE386 1
6383 if test "${HAVE_MENUS}" = "yes" ; then
6384 cat >> confdefs.h <<\EOF
6385 #define HAVE_MENUS 1
6389 if test "${GNU_MALLOC}" = "yes" ; then
6390 cat >> confdefs.h <<\EOF
6391 #define GNU_MALLOC 1
6395 if test "${REL_ALLOC}" = "yes" ; then
6396 cat >> confdefs.h <<\EOF
6397 #define REL_ALLOC 1
6401 if test "${LISP_FLOAT_TYPE}" = "yes" ; then
6402 cat >> confdefs.h <<\EOF
6403 #define LISP_FLOAT_TYPE 1
6408 #### Report on what we decided to do.
6409 echo "
6410 Configured for \`${canonical}'.
6412 Where should the build process find the source code? ${srcdir}
6413 What operating system and machine description files should Emacs use?
6414 \`${opsysfile}' and \`${machfile}'
6415 What compiler should emacs be built with? ${CC} ${CFLAGS}
6416 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
6417 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
6418 What window system should Emacs use? ${window_system}
6419 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
6421 if test -n "${x_includes}"; then
6422 echo " Where do we find X Windows header files? ${x_includes}"
6423 else
6424 echo " Where do we find X Windows header files? Standard dirs"
6426 if test -n "${x_libraries}"; then
6427 echo " Where do we find X Windows libraries? ${x_libraries}"
6428 else
6429 echo " Where do we find X Windows libraries? Standard dirs"
6432 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
6433 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
6434 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
6435 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
6436 echo " Does Emacs use -lungif? ${HAVE_GIF}"
6437 echo " Does Emacs use -lpng? ${HAVE_PNG}"
6438 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
6439 echo
6441 # Remove any trailing slashes in these variables.
6442 test "${prefix}" != NONE &&
6443 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
6444 test "${exec_prefix}" != NONE &&
6445 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
6447 trap '' 1 2 15
6448 cat > confcache <<\EOF
6449 # This file is a shell script that caches the results of configure
6450 # tests run on this system so they can be shared between configure
6451 # scripts and configure runs. It is not useful on other systems.
6452 # If it contains results you don't want to keep, you may remove or edit it.
6454 # By default, configure uses ./config.cache as the cache file,
6455 # creating it if it does not exist already. You can give configure
6456 # the --cache-file=FILE option to use a different cache file; that is
6457 # what configure does when it calls configure scripts in
6458 # subdirectories, so they share the cache.
6459 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6460 # config.status only pays attention to the cache file if you give it the
6461 # --recheck option to rerun configure.
6464 # The following way of writing the cache mishandles newlines in values,
6465 # but we know of no workaround that is simple, portable, and efficient.
6466 # So, don't put newlines in cache variables' values.
6467 # Ultrix sh set writes to stderr and can't be redirected directly,
6468 # and sets the high bit in the cache file unless we assign to the vars.
6469 (set) 2>&1 |
6470 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6471 *ac_space=\ *)
6472 # `set' does not quote correctly, so add quotes (double-quote substitution
6473 # turns \\\\ into \\, and sed turns \\ into \).
6474 sed -n \
6475 -e "s/'/'\\\\''/g" \
6476 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6479 # `set' quotes correctly as required by POSIX, so do not add quotes.
6480 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6482 esac >> confcache
6483 if cmp -s $cache_file confcache; then
6485 else
6486 if test -w $cache_file; then
6487 echo "updating cache $cache_file"
6488 cat confcache > $cache_file
6489 else
6490 echo "not updating unwritable cache $cache_file"
6493 rm -f confcache
6495 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6497 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6498 # Let make expand exec_prefix.
6499 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6501 # Any assignment to VPATH causes Sun make to only execute
6502 # the first set of double-colon rules, so remove it if not needed.
6503 # If there is a colon in the path, we need to keep it.
6504 if test "x$srcdir" = x.; then
6505 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6508 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6510 DEFS=-DHAVE_CONFIG_H
6512 # Without the "./", some shells look in PATH for config.status.
6513 : ${CONFIG_STATUS=./config.status}
6515 echo creating $CONFIG_STATUS
6516 rm -f $CONFIG_STATUS
6517 cat > $CONFIG_STATUS <<EOF
6518 #! /bin/sh
6519 # Generated automatically by configure.
6520 # Run this file to recreate the current configuration.
6521 # This directory was configured as follows,
6522 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6524 # $0 $ac_configure_args
6526 # Compiler output produced by configure, useful for debugging
6527 # configure, is in ./config.log if it exists.
6529 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6530 for ac_option
6532 case "\$ac_option" in
6533 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6534 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6535 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6536 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6537 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6538 exit 0 ;;
6539 -help | --help | --hel | --he | --h)
6540 echo "\$ac_cs_usage"; exit 0 ;;
6541 *) echo "\$ac_cs_usage"; exit 1 ;;
6542 esac
6543 done
6545 ac_given_srcdir=$srcdir
6546 ac_given_INSTALL="$INSTALL"
6548 trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
6549 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
6550 leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6552 cat >> $CONFIG_STATUS <<EOF
6554 # Protect against being on the right side of a sed subst in config.status.
6555 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6556 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6557 $ac_vpsub
6558 $extrasub
6559 s%@SHELL@%$SHELL%g
6560 s%@CFLAGS@%$CFLAGS%g
6561 s%@CPPFLAGS@%$CPPFLAGS%g
6562 s%@CXXFLAGS@%$CXXFLAGS%g
6563 s%@FFLAGS@%$FFLAGS%g
6564 s%@DEFS@%$DEFS%g
6565 s%@LDFLAGS@%$LDFLAGS%g
6566 s%@LIBS@%$LIBS%g
6567 s%@exec_prefix@%$exec_prefix%g
6568 s%@prefix@%$prefix%g
6569 s%@program_transform_name@%$program_transform_name%g
6570 s%@bindir@%$bindir%g
6571 s%@sbindir@%$sbindir%g
6572 s%@libexecdir@%$libexecdir%g
6573 s%@datadir@%$datadir%g
6574 s%@sysconfdir@%$sysconfdir%g
6575 s%@sharedstatedir@%$sharedstatedir%g
6576 s%@localstatedir@%$localstatedir%g
6577 s%@libdir@%$libdir%g
6578 s%@includedir@%$includedir%g
6579 s%@oldincludedir@%$oldincludedir%g
6580 s%@infodir@%$infodir%g
6581 s%@mandir@%$mandir%g
6582 s%@host@%$host%g
6583 s%@host_alias@%$host_alias%g
6584 s%@host_cpu@%$host_cpu%g
6585 s%@host_vendor@%$host_vendor%g
6586 s%@host_os@%$host_os%g
6587 s%@CC@%$CC%g
6588 s%@LN_S@%$LN_S%g
6589 s%@CPP@%$CPP%g
6590 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6591 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6592 s%@INSTALL_DATA@%$INSTALL_DATA%g
6593 s%@YACC@%$YACC%g
6594 s%@SET_MAKE@%$SET_MAKE%g
6595 s%@ALLOCA@%$ALLOCA%g
6596 s%@liblockfile@%$liblockfile%g
6597 s%@version@%$version%g
6598 s%@configuration@%$configuration%g
6599 s%@canonical@%$canonical%g
6600 s%@srcdir@%$srcdir%g
6601 s%@lispdir@%$lispdir%g
6602 s%@locallisppath@%$locallisppath%g
6603 s%@lisppath@%$lisppath%g
6604 s%@x_default_search_path@%$x_default_search_path%g
6605 s%@etcdir@%$etcdir%g
6606 s%@archlibdir@%$archlibdir%g
6607 s%@docdir@%$docdir%g
6608 s%@bitmapdir@%$bitmapdir%g
6609 s%@c_switch_system@%$c_switch_system%g
6610 s%@c_switch_machine@%$c_switch_machine%g
6611 s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
6612 s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
6613 s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
6614 s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
6615 s%@machfile@%$machfile%g
6616 s%@opsysfile@%$opsysfile%g
6617 s%@RANLIB@%$RANLIB%g
6619 CEOF
6622 cat >> $CONFIG_STATUS <<\EOF
6624 # Split the substitutions into bite-sized pieces for seds with
6625 # small command number limits, like on Digital OSF/1 and HP-UX.
6626 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6627 ac_file=1 # Number of current file.
6628 ac_beg=1 # First line for current file.
6629 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6630 ac_more_lines=:
6631 ac_sed_cmds=""
6632 while $ac_more_lines; do
6633 if test $ac_beg -gt 1; then
6634 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6635 else
6636 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6638 if test ! -s conftest.s$ac_file; then
6639 ac_more_lines=false
6640 rm -f conftest.s$ac_file
6641 else
6642 if test -z "$ac_sed_cmds"; then
6643 ac_sed_cmds="sed -f conftest.s$ac_file"
6644 else
6645 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6647 ac_file=`expr $ac_file + 1`
6648 ac_beg=$ac_end
6649 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6651 done
6652 if test -z "$ac_sed_cmds"; then
6653 ac_sed_cmds=cat
6657 cat >> $CONFIG_STATUS <<EOF
6659 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
6660 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
6661 leim/Makefile"}
6663 cat >> $CONFIG_STATUS <<\EOF
6664 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6665 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6666 case "$ac_file" in
6667 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6668 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6669 *) ac_file_in="${ac_file}.in" ;;
6670 esac
6672 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6674 # Remove last slash and all that follows it. Not all systems have dirname.
6675 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6676 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6677 # The file is in a subdirectory.
6678 test ! -d "$ac_dir" && mkdir "$ac_dir"
6679 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6680 # A "../" for each directory in $ac_dir_suffix.
6681 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6682 else
6683 ac_dir_suffix= ac_dots=
6686 case "$ac_given_srcdir" in
6687 .) srcdir=.
6688 if test -z "$ac_dots"; then top_srcdir=.
6689 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6690 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6691 *) # Relative path.
6692 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6693 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6694 esac
6696 case "$ac_given_INSTALL" in
6697 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6698 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6699 esac
6701 echo creating "$ac_file"
6702 rm -f "$ac_file"
6703 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6704 case "$ac_file" in
6705 *Makefile*) ac_comsub="1i\\
6706 # $configure_input" ;;
6707 *) ac_comsub= ;;
6708 esac
6710 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6711 sed -e "$ac_comsub
6712 s%@configure_input@%$configure_input%g
6713 s%@srcdir@%$srcdir%g
6714 s%@top_srcdir@%$top_srcdir%g
6715 s%@INSTALL@%$INSTALL%g
6716 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6717 fi; done
6718 rm -f conftest.s*
6720 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6721 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6723 # ac_d sets the value in "#define NAME VALUE" lines.
6724 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6725 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6726 ac_dC='\3'
6727 ac_dD='%g'
6728 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6729 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6730 ac_uB='\([ ]\)%\1#\2define\3'
6731 ac_uC=' '
6732 ac_uD='\4%g'
6733 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6734 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6735 ac_eB='$%\1#\2define\3'
6736 ac_eC=' '
6737 ac_eD='%g'
6739 if test "${CONFIG_HEADERS+set}" != set; then
6741 cat >> $CONFIG_STATUS <<EOF
6742 CONFIG_HEADERS="src/config.h:src/config.in"
6744 cat >> $CONFIG_STATUS <<\EOF
6746 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6747 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6748 case "$ac_file" in
6749 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6750 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6751 *) ac_file_in="${ac_file}.in" ;;
6752 esac
6754 echo creating $ac_file
6756 rm -f conftest.frag conftest.in conftest.out
6757 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6758 cat $ac_file_inputs > conftest.in
6762 # Transform confdefs.h into a sed script conftest.vals that substitutes
6763 # the proper values into config.h.in to produce config.h. And first:
6764 # Protect against being on the right side of a sed subst in config.status.
6765 # Protect against being in an unquoted here document in config.status.
6766 rm -f conftest.vals
6767 cat > conftest.hdr <<\EOF
6768 s/[\\&%]/\\&/g
6769 s%[\\$`]%\\&%g
6770 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6771 s%ac_d%ac_u%gp
6772 s%ac_u%ac_e%gp
6774 sed -n -f conftest.hdr confdefs.h > conftest.vals
6775 rm -f conftest.hdr
6777 # This sed command replaces #undef with comments. This is necessary, for
6778 # example, in the case of _POSIX_SOURCE, which is predefined and required
6779 # on some systems where configure will not decide to define it.
6780 cat >> conftest.vals <<\EOF
6781 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6784 # Break up conftest.vals because some shells have a limit on
6785 # the size of here documents, and old seds have small limits too.
6787 rm -f conftest.tail
6788 while :
6790 ac_lines=`grep -c . conftest.vals`
6791 # grep -c gives empty output for an empty file on some AIX systems.
6792 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6793 # Write a limited-size here document to conftest.frag.
6794 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6795 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6796 echo 'CEOF
6797 sed -f conftest.frag conftest.in > conftest.out
6798 rm -f conftest.in
6799 mv conftest.out conftest.in
6800 ' >> $CONFIG_STATUS
6801 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6802 rm -f conftest.vals
6803 mv conftest.tail conftest.vals
6804 done
6805 rm -f conftest.vals
6807 cat >> $CONFIG_STATUS <<\EOF
6808 rm -f conftest.frag conftest.h
6809 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6810 cat conftest.in >> conftest.h
6811 rm -f conftest.in
6812 if cmp -s $ac_file conftest.h 2>/dev/null; then
6813 echo "$ac_file is unchanged"
6814 rm -f conftest.h
6815 else
6816 # Remove last slash and all that follows it. Not all systems have dirname.
6817 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6818 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6819 # The file is in a subdirectory.
6820 test ! -d "$ac_dir" && mkdir "$ac_dir"
6822 rm -f $ac_file
6823 mv conftest.h $ac_file
6825 fi; done
6828 cat >> $CONFIG_STATUS <<EOF
6829 CPP="$CPP" CPPFLAGS="$CPPFLAGS"
6831 cat >> $CONFIG_STATUS <<\EOF
6834 ### Make the necessary directories, if they don't exist.
6835 for dir in etc lisp ; do
6836 test -d ${dir} || mkdir ${dir}
6837 done
6839 # Build src/Makefile from ${srcdir}/src/Makefile.c
6840 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
6841 # This must be done after src/config.h is built, since we rely on that file.
6843 # Now get this: Some word that is part of the ${srcdir} directory name
6844 # or the ${configuration} value might, just might, happen to be an
6845 # identifier like `sun4' or `i386' or something, and be predefined by
6846 # the C preprocessor to some helpful value like 1, or maybe the empty
6847 # string. Needless to say consequent macro substitutions are less
6848 # than conducive to the makefile finding the correct directory.
6849 undefs="`echo $top_srcdir $configuration $canonical |
6850 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
6851 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
6854 echo creating src/epaths.h
6855 make epaths-force
6857 echo creating lib-src/Makefile
6858 ( cd lib-src
6859 rm -f junk.c junk1.c junk2.c
6860 sed -e '/start of cpp stuff/q' \
6861 < Makefile.c > junk1.c
6862 sed -e '1,/start of cpp stuff/d'\
6863 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
6864 < Makefile.c > junk.c
6865 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
6866 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
6867 cat junk1.c junk2.c > Makefile.new
6868 rm -f junk.c junk1.c junk2.c
6869 chmod 444 Makefile.new
6870 mv -f Makefile.new Makefile
6873 echo creating src/Makefile
6874 ( cd src
6875 rm -f junk.c junk1.c junk2.c
6876 sed -e '/start of cpp stuff/q' \
6877 < Makefile.c > junk1.c
6878 sed -e '1,/start of cpp stuff/d'\
6879 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
6880 < Makefile.c > junk.c
6881 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
6882 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
6883 cat junk1.c junk2.c > Makefile.new
6884 rm -f junk.c junk1.c junk2.c
6885 chmod 444 Makefile.new
6886 mv -f Makefile.new Makefile
6889 if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
6890 echo creating src/.gdbinit
6891 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
6894 # This is how we know whether to re-run configure in certain cases.
6895 touch src/config.stamp
6898 exit 0
6900 chmod +x $CONFIG_STATUS
6901 rm -fr confdefs* $ac_clean_files
6902 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1