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