]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/configure
Security-29.tar.gz
[apple/security.git] / SecuritySNACCRuntime / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.2 # 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 --with-x use the X Window System"
16
17 # Initialize some variables set by options.
18 # The variables have the same names as the options, with
19 # dashes changed to underlines.
20 build=NONE
21 cache_file=./config.cache
22 exec_prefix=NONE
23 host=NONE
24 no_create=
25 nonopt=NONE
26 no_recursion=
27 prefix=NONE
28 program_prefix=NONE
29 program_suffix=NONE
30 program_transform_name=s,x,x,
31 silent=
32 site=
33 srcdir=
34 target=NONE
35 verbose=
36 x_includes=NONE
37 x_libraries=NONE
38 bindir='${exec_prefix}/bin'
39 sbindir='${exec_prefix}/sbin'
40 libexecdir='${exec_prefix}/libexec'
41 datadir='${prefix}/share'
42 sysconfdir='${prefix}/etc'
43 sharedstatedir='${prefix}/com'
44 localstatedir='${prefix}/var'
45 libdir='${exec_prefix}/lib'
46 includedir='${prefix}/include'
47 oldincludedir='/usr/include'
48 infodir='${prefix}/info'
49 mandir='${prefix}/man'
50
51 # Initialize some other variables.
52 subdirs=
53 MFLAGS= MAKEFLAGS=
54 SHELL=${CONFIG_SHELL-/bin/sh}
55 # Maximum number of lines to put in a shell here document.
56 ac_max_here_lines=12
57
58 ac_prev=
59 for ac_option
60 do
61
62 # If the previous option needs an argument, assign it.
63 if test -n "$ac_prev"; then
64 eval "$ac_prev=\$ac_option"
65 ac_prev=
66 continue
67 fi
68
69 case "$ac_option" in
70 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71 *) ac_optarg= ;;
72 esac
73
74 # Accept the important Cygnus configure options, so we can diagnose typos.
75
76 case "$ac_option" in
77
78 -bindir | --bindir | --bindi | --bind | --bin | --bi)
79 ac_prev=bindir ;;
80 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
81 bindir="$ac_optarg" ;;
82
83 -build | --build | --buil | --bui | --bu)
84 ac_prev=build ;;
85 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 build="$ac_optarg" ;;
87
88 -cache-file | --cache-file | --cache-fil | --cache-fi \
89 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90 ac_prev=cache_file ;;
91 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
92 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
93 cache_file="$ac_optarg" ;;
94
95 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96 ac_prev=datadir ;;
97 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98 | --da=*)
99 datadir="$ac_optarg" ;;
100
101 -disable-* | --disable-*)
102 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
103 # Reject names that are not valid shell variable names.
104 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
105 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
106 fi
107 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
108 eval "enable_${ac_feature}=no" ;;
109
110 -enable-* | --enable-*)
111 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
112 # Reject names that are not valid shell variable names.
113 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
114 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115 fi
116 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
117 case "$ac_option" in
118 *=*) ;;
119 *) ac_optarg=yes ;;
120 esac
121 eval "enable_${ac_feature}='$ac_optarg'" ;;
122
123 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
124 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
125 | --exec | --exe | --ex)
126 ac_prev=exec_prefix ;;
127 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
128 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
129 | --exec=* | --exe=* | --ex=*)
130 exec_prefix="$ac_optarg" ;;
131
132 -gas | --gas | --ga | --g)
133 # Obsolete; use --with-gas.
134 with_gas=yes ;;
135
136 -help | --help | --hel | --he)
137 # Omit some internal or obsolete options to make the list less imposing.
138 # This message is too long to be a string in the A/UX 3.1 sh.
139 cat << EOF
140 Usage: configure [options] [host]
141 Options: [defaults in brackets after descriptions]
142 Configuration:
143 --cache-file=FILE cache test results in FILE
144 --help print this message
145 --no-create do not create output files
146 --quiet, --silent do not print \`checking...' messages
147 --version print the version of autoconf that created configure
148 Directory and file names:
149 --prefix=PREFIX install architecture-independent files in PREFIX
150 [$ac_default_prefix]
151 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
152 [same as prefix]
153 --bindir=DIR user executables in DIR [EPREFIX/bin]
154 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
155 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
156 --datadir=DIR read-only architecture-independent data in DIR
157 [PREFIX/share]
158 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
159 --sharedstatedir=DIR modifiable architecture-independent data in DIR
160 [PREFIX/com]
161 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
162 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
163 --includedir=DIR C header files in DIR [PREFIX/include]
164 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
165 --infodir=DIR info documentation in DIR [PREFIX/info]
166 --mandir=DIR man documentation in DIR [PREFIX/man]
167 --srcdir=DIR find the sources in DIR [configure dir or ..]
168 --program-prefix=PREFIX prepend PREFIX to installed program names
169 --program-suffix=SUFFIX append SUFFIX to installed program names
170 --program-transform-name=PROGRAM
171 run sed PROGRAM on installed program names
172 EOF
173 cat << EOF
174 Host type:
175 --build=BUILD configure for building on BUILD [BUILD=HOST]
176 --host=HOST configure for HOST [guessed]
177 --target=TARGET configure for TARGET [TARGET=HOST]
178 Features and packages:
179 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
180 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
181 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
182 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
183 --x-includes=DIR X include files are in DIR
184 --x-libraries=DIR X library files are in DIR
185 EOF
186 if test -n "$ac_help"; then
187 echo "--enable and --with options recognized:$ac_help"
188 fi
189 exit 0 ;;
190
191 -host | --host | --hos | --ho)
192 ac_prev=host ;;
193 -host=* | --host=* | --hos=* | --ho=*)
194 host="$ac_optarg" ;;
195
196 -includedir | --includedir | --includedi | --included | --include \
197 | --includ | --inclu | --incl | --inc)
198 ac_prev=includedir ;;
199 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
200 | --includ=* | --inclu=* | --incl=* | --inc=*)
201 includedir="$ac_optarg" ;;
202
203 -infodir | --infodir | --infodi | --infod | --info | --inf)
204 ac_prev=infodir ;;
205 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
206 infodir="$ac_optarg" ;;
207
208 -libdir | --libdir | --libdi | --libd)
209 ac_prev=libdir ;;
210 -libdir=* | --libdir=* | --libdi=* | --libd=*)
211 libdir="$ac_optarg" ;;
212
213 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
214 | --libexe | --libex | --libe)
215 ac_prev=libexecdir ;;
216 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
217 | --libexe=* | --libex=* | --libe=*)
218 libexecdir="$ac_optarg" ;;
219
220 -localstatedir | --localstatedir | --localstatedi | --localstated \
221 | --localstate | --localstat | --localsta | --localst \
222 | --locals | --local | --loca | --loc | --lo)
223 ac_prev=localstatedir ;;
224 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
225 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
226 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
227 localstatedir="$ac_optarg" ;;
228
229 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
230 ac_prev=mandir ;;
231 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
232 mandir="$ac_optarg" ;;
233
234 -nfp | --nfp | --nf)
235 # Obsolete; use --without-fp.
236 with_fp=no ;;
237
238 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
239 | --no-cr | --no-c)
240 no_create=yes ;;
241
242 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
243 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
244 no_recursion=yes ;;
245
246 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
247 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
248 | --oldin | --oldi | --old | --ol | --o)
249 ac_prev=oldincludedir ;;
250 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
251 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
252 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
253 oldincludedir="$ac_optarg" ;;
254
255 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
256 ac_prev=prefix ;;
257 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
258 prefix="$ac_optarg" ;;
259
260 -program-prefix | --program-prefix | --program-prefi | --program-pref \
261 | --program-pre | --program-pr | --program-p)
262 ac_prev=program_prefix ;;
263 -program-prefix=* | --program-prefix=* | --program-prefi=* \
264 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
265 program_prefix="$ac_optarg" ;;
266
267 -program-suffix | --program-suffix | --program-suffi | --program-suff \
268 | --program-suf | --program-su | --program-s)
269 ac_prev=program_suffix ;;
270 -program-suffix=* | --program-suffix=* | --program-suffi=* \
271 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
272 program_suffix="$ac_optarg" ;;
273
274 -program-transform-name | --program-transform-name \
275 | --program-transform-nam | --program-transform-na \
276 | --program-transform-n | --program-transform- \
277 | --program-transform | --program-transfor \
278 | --program-transfo | --program-transf \
279 | --program-trans | --program-tran \
280 | --progr-tra | --program-tr | --program-t)
281 ac_prev=program_transform_name ;;
282 -program-transform-name=* | --program-transform-name=* \
283 | --program-transform-nam=* | --program-transform-na=* \
284 | --program-transform-n=* | --program-transform-=* \
285 | --program-transform=* | --program-transfor=* \
286 | --program-transfo=* | --program-transf=* \
287 | --program-trans=* | --program-tran=* \
288 | --progr-tra=* | --program-tr=* | --program-t=*)
289 program_transform_name="$ac_optarg" ;;
290
291 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
292 | -silent | --silent | --silen | --sile | --sil)
293 silent=yes ;;
294
295 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
296 ac_prev=sbindir ;;
297 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
298 | --sbi=* | --sb=*)
299 sbindir="$ac_optarg" ;;
300
301 -sharedstatedir | --sharedstatedir | --sharedstatedi \
302 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
303 | --sharedst | --shareds | --shared | --share | --shar \
304 | --sha | --sh)
305 ac_prev=sharedstatedir ;;
306 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
307 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
308 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
309 | --sha=* | --sh=*)
310 sharedstatedir="$ac_optarg" ;;
311
312 -site | --site | --sit)
313 ac_prev=site ;;
314 -site=* | --site=* | --sit=*)
315 site="$ac_optarg" ;;
316
317 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
318 ac_prev=srcdir ;;
319 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
320 srcdir="$ac_optarg" ;;
321
322 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
323 | --syscon | --sysco | --sysc | --sys | --sy)
324 ac_prev=sysconfdir ;;
325 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
326 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
327 sysconfdir="$ac_optarg" ;;
328
329 -target | --target | --targe | --targ | --tar | --ta | --t)
330 ac_prev=target ;;
331 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
332 target="$ac_optarg" ;;
333
334 -v | -verbose | --verbose | --verbos | --verbo | --verb)
335 verbose=yes ;;
336
337 -version | --version | --versio | --versi | --vers)
338 echo "configure generated by autoconf version 2.13"
339 exit 0 ;;
340
341 -with-* | --with-*)
342 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
343 # Reject names that are not valid shell variable names.
344 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
345 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
346 fi
347 ac_package=`echo $ac_package| sed 's/-/_/g'`
348 case "$ac_option" in
349 *=*) ;;
350 *) ac_optarg=yes ;;
351 esac
352 eval "with_${ac_package}='$ac_optarg'" ;;
353
354 -without-* | --without-*)
355 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
356 # Reject names that are not valid shell variable names.
357 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
358 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359 fi
360 ac_package=`echo $ac_package| sed 's/-/_/g'`
361 eval "with_${ac_package}=no" ;;
362
363 --x)
364 # Obsolete; use --with-x.
365 with_x=yes ;;
366
367 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
368 | --x-incl | --x-inc | --x-in | --x-i)
369 ac_prev=x_includes ;;
370 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
371 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
372 x_includes="$ac_optarg" ;;
373
374 -x-libraries | --x-libraries | --x-librarie | --x-librari \
375 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
376 ac_prev=x_libraries ;;
377 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
378 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
379 x_libraries="$ac_optarg" ;;
380
381 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
382 ;;
383
384 *)
385 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
386 echo "configure: warning: $ac_option: invalid host type" 1>&2
387 fi
388 if test "x$nonopt" != xNONE; then
389 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
390 fi
391 nonopt="$ac_option"
392 ;;
393
394 esac
395 done
396
397 if test -n "$ac_prev"; then
398 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399 fi
400
401 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
402
403 # File descriptor usage:
404 # 0 standard input
405 # 1 file creation
406 # 2 errors and warnings
407 # 3 some systems may open it to /dev/tty
408 # 4 used on the Kubota Titan
409 # 6 checking for... messages and results
410 # 5 compiler messages saved in config.log
411 if test "$silent" = yes; then
412 exec 6>/dev/null
413 else
414 exec 6>&1
415 fi
416 exec 5>./config.log
417
418 echo "\
419 This file contains any messages produced by compilers while
420 running configure, to aid debugging if configure makes a mistake.
421 " 1>&5
422
423 # Strip out --no-create and --no-recursion so they do not pile up.
424 # Also quote any args containing shell metacharacters.
425 ac_configure_args=
426 for ac_arg
427 do
428 case "$ac_arg" in
429 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
430 | --no-cr | --no-c) ;;
431 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
432 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
433 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
434 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
435 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
436 esac
437 done
438
439 # NLS nuisances.
440 # Only set these to C if already set. These must not be set unconditionally
441 # because not all systems understand e.g. LANG=C (notably SCO).
442 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
443 # Non-C LC_CTYPE values break the ctype check.
444 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
445 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
446 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
447 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
448
449 # confdefs.h avoids OS command line length limits that DEFS can exceed.
450 rm -rf conftest* confdefs.h
451 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
452 echo > confdefs.h
453
454 # A filename unique to this package, relative to the directory that
455 # configure is in, which we can look for to find out if srcdir is correct.
456 ac_unique_file=compiler/core/snacc.c
457
458 # Find the source files, if location was not specified.
459 if test -z "$srcdir"; then
460 ac_srcdir_defaulted=yes
461 # Try the directory containing this script, then its parent.
462 ac_prog=$0
463 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
464 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465 srcdir=$ac_confdir
466 if test ! -r $srcdir/$ac_unique_file; then
467 srcdir=..
468 fi
469 else
470 ac_srcdir_defaulted=no
471 fi
472 if test ! -r $srcdir/$ac_unique_file; then
473 if test "$ac_srcdir_defaulted" = yes; then
474 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
475 else
476 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477 fi
478 fi
479 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
480
481 # Prefer explicitly selected file to automatically selected ones.
482 if test -z "$CONFIG_SITE"; then
483 if test "x$prefix" != xNONE; then
484 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
485 else
486 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487 fi
488 fi
489 for ac_site_file in $CONFIG_SITE; do
490 if test -r "$ac_site_file"; then
491 echo "loading site script $ac_site_file"
492 . "$ac_site_file"
493 fi
494 done
495
496 if test -r "$cache_file"; then
497 echo "loading cache $cache_file"
498 . $cache_file
499 else
500 echo "creating cache $cache_file"
501 > $cache_file
502 fi
503
504 ac_ext=c
505 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
506 ac_cpp='$CPP $CPPFLAGS'
507 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
508 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
509 cross_compiling=$ac_cv_prog_cc_cross
510
511 ac_exeext=
512 ac_objext=o
513 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
515 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
516 ac_n= ac_c='
517 ' ac_t=' '
518 else
519 ac_n=-n ac_c= ac_t=
520 fi
521 else
522 ac_n= ac_c='\c' ac_t=
523 fi
524
525
526
527 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
528 echo "configure:529: checking whether ${MAKE-make} sets \${MAKE}" >&5
529 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
530 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
531 echo $ac_n "(cached) $ac_c" 1>&6
532 else
533 cat > conftestmake <<\EOF
534 all:
535 @echo 'ac_maketemp="${MAKE}"'
536 EOF
537 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
538 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
539 if test -n "$ac_maketemp"; then
540 eval ac_cv_prog_make_${ac_make}_set=yes
541 else
542 eval ac_cv_prog_make_${ac_make}_set=no
543 fi
544 rm -f conftestmake
545 fi
546 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
547 echo "$ac_t""yes" 1>&6
548 SET_MAKE=
549 else
550 echo "$ac_t""no" 1>&6
551 SET_MAKE="MAKE=${MAKE-make}"
552 fi
553
554 # Extract the first word of "gcc", so it can be a program name with args.
555 set dummy gcc; ac_word=$2
556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
557 echo "configure:558: checking for $ac_word" >&5
558 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
560 else
561 if test -n "$CC"; then
562 ac_cv_prog_CC="$CC" # Let the user override the test.
563 else
564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
565 ac_dummy="$PATH"
566 for ac_dir in $ac_dummy; do
567 test -z "$ac_dir" && ac_dir=.
568 if test -f $ac_dir/$ac_word; then
569 ac_cv_prog_CC="gcc"
570 break
571 fi
572 done
573 IFS="$ac_save_ifs"
574 fi
575 fi
576 CC="$ac_cv_prog_CC"
577 if test -n "$CC"; then
578 echo "$ac_t""$CC" 1>&6
579 else
580 echo "$ac_t""no" 1>&6
581 fi
582
583 if test -z "$CC"; then
584 # Extract the first word of "cc", so it can be a program name with args.
585 set dummy cc; ac_word=$2
586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
587 echo "configure:588: checking for $ac_word" >&5
588 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
589 echo $ac_n "(cached) $ac_c" 1>&6
590 else
591 if test -n "$CC"; then
592 ac_cv_prog_CC="$CC" # Let the user override the test.
593 else
594 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
595 ac_prog_rejected=no
596 ac_dummy="$PATH"
597 for ac_dir in $ac_dummy; do
598 test -z "$ac_dir" && ac_dir=.
599 if test -f $ac_dir/$ac_word; then
600 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
601 ac_prog_rejected=yes
602 continue
603 fi
604 ac_cv_prog_CC="cc"
605 break
606 fi
607 done
608 IFS="$ac_save_ifs"
609 if test $ac_prog_rejected = yes; then
610 # We found a bogon in the path, so make sure we never use it.
611 set dummy $ac_cv_prog_CC
612 shift
613 if test $# -gt 0; then
614 # We chose a different compiler from the bogus one.
615 # However, it has the same basename, so the bogon will be chosen
616 # first if we set CC to just the basename; use the full file name.
617 shift
618 set dummy "$ac_dir/$ac_word" "$@"
619 shift
620 ac_cv_prog_CC="$@"
621 fi
622 fi
623 fi
624 fi
625 CC="$ac_cv_prog_CC"
626 if test -n "$CC"; then
627 echo "$ac_t""$CC" 1>&6
628 else
629 echo "$ac_t""no" 1>&6
630 fi
631
632 if test -z "$CC"; then
633 case "`uname -s`" in
634 *win32* | *WIN32*)
635 # Extract the first word of "cl", so it can be a program name with args.
636 set dummy cl; ac_word=$2
637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
638 echo "configure:639: checking for $ac_word" >&5
639 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
640 echo $ac_n "(cached) $ac_c" 1>&6
641 else
642 if test -n "$CC"; then
643 ac_cv_prog_CC="$CC" # Let the user override the test.
644 else
645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
646 ac_dummy="$PATH"
647 for ac_dir in $ac_dummy; do
648 test -z "$ac_dir" && ac_dir=.
649 if test -f $ac_dir/$ac_word; then
650 ac_cv_prog_CC="cl"
651 break
652 fi
653 done
654 IFS="$ac_save_ifs"
655 fi
656 fi
657 CC="$ac_cv_prog_CC"
658 if test -n "$CC"; then
659 echo "$ac_t""$CC" 1>&6
660 else
661 echo "$ac_t""no" 1>&6
662 fi
663 ;;
664 esac
665 fi
666 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
667 fi
668
669 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
670 echo "configure:671: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
671
672 ac_ext=c
673 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
674 ac_cpp='$CPP $CPPFLAGS'
675 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
676 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
677 cross_compiling=$ac_cv_prog_cc_cross
678
679 cat > conftest.$ac_ext << EOF
680
681 #line 682 "configure"
682 #include "confdefs.h"
683
684 main(){return(0);}
685 EOF
686 if { (eval echo configure:687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687 ac_cv_prog_cc_works=yes
688 # If we can't run a trivial program, we are probably using a cross compiler.
689 if (./conftest; exit) 2>/dev/null; then
690 ac_cv_prog_cc_cross=no
691 else
692 ac_cv_prog_cc_cross=yes
693 fi
694 else
695 echo "configure: failed program was:" >&5
696 cat conftest.$ac_ext >&5
697 ac_cv_prog_cc_works=no
698 fi
699 rm -fr conftest*
700 ac_ext=c
701 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
702 ac_cpp='$CPP $CPPFLAGS'
703 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
704 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
705 cross_compiling=$ac_cv_prog_cc_cross
706
707 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
708 if test $ac_cv_prog_cc_works = no; then
709 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
710 fi
711 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
712 echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
713 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
714 cross_compiling=$ac_cv_prog_cc_cross
715
716 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
717 echo "configure:718: checking whether we are using GNU C" >&5
718 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
719 echo $ac_n "(cached) $ac_c" 1>&6
720 else
721 cat > conftest.c <<EOF
722 #ifdef __GNUC__
723 yes;
724 #endif
725 EOF
726 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
727 ac_cv_prog_gcc=yes
728 else
729 ac_cv_prog_gcc=no
730 fi
731 fi
732
733 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
734
735 if test $ac_cv_prog_gcc = yes; then
736 GCC=yes
737 else
738 GCC=
739 fi
740
741 ac_test_CFLAGS="${CFLAGS+set}"
742 ac_save_CFLAGS="$CFLAGS"
743 CFLAGS=
744 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
745 echo "configure:746: checking whether ${CC-cc} accepts -g" >&5
746 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
748 else
749 echo 'void f(){}' > conftest.c
750 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
751 ac_cv_prog_cc_g=yes
752 else
753 ac_cv_prog_cc_g=no
754 fi
755 rm -f conftest*
756
757 fi
758
759 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
760 if test "$ac_test_CFLAGS" = set; then
761 CFLAGS="$ac_save_CFLAGS"
762 elif test $ac_cv_prog_cc_g = yes; then
763 if test "$GCC" = yes; then
764 CFLAGS="-g -O2"
765 else
766 CFLAGS="-g"
767 fi
768 else
769 if test "$GCC" = yes; then
770 CFLAGS="-O2"
771 else
772 CFLAGS=
773 fi
774 fi
775
776 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
777 echo "configure:778: checking for POSIXized ISC" >&5
778 if test -d /etc/conf/kconfig.d &&
779 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
780 then
781 echo "$ac_t""yes" 1>&6
782 ISC=yes # If later tests want to check for ISC.
783 cat >> confdefs.h <<\EOF
784 #define _POSIX_SOURCE 1
785 EOF
786
787 if test "$GCC" = yes; then
788 CC="$CC -posix"
789 else
790 CC="$CC -Xp"
791 fi
792 else
793 echo "$ac_t""no" 1>&6
794 ISC=
795 fi
796
797 if test -n "$GCC"; then
798
799 # hack to let X11 makedepend find .h file a little more the way gcc does:
800 echo $ac_n "checking for $CC's include path""... $ac_c" 1>&6
801 echo "configure:802: checking for $CC's include path" >&5
802 gcclibdir=`$CC -v 2>&1 | sed -n -e 's:Reading specs from \(.*\)/specs:\1:p'`
803 gxxincdir=`which gcc | sed "s/bin\/gcc//"`
804 #MKDEP_CCINC="-I$gxxincdir/lib/g++-include -I/usr/local/include -I$gcclibdir/include"
805 MKDEP_CCINC="-I/usr/local/include -I$gcclibdir/include -F/System/Library/PrivateFrameworks"
806 echo "$ac_t""$MKDEP_CCINC" 1>&6
807
808 fi
809 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
810 echo "configure:811: checking how to run the C preprocessor" >&5
811 # On Suns, sometimes $CPP names a directory.
812 if test -n "$CPP" && test -d "$CPP"; then
813 CPP=
814 fi
815 if test -z "$CPP"; then
816 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
817 echo $ac_n "(cached) $ac_c" 1>&6
818 else
819 # This must be in double quotes, not single quotes, because CPP may get
820 # substituted into the Makefile and "${CC-cc}" will confuse make.
821 CPP="${CC-cc} -E"
822 # On the NeXT, cc -E runs the code through the compiler's parser,
823 # not just through cpp.
824 cat > conftest.$ac_ext <<EOF
825 #line 826 "configure"
826 #include "confdefs.h"
827 #include <assert.h>
828 Syntax Error
829 EOF
830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
831 { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
833 if test -z "$ac_err"; then
834 :
835 else
836 echo "$ac_err" >&5
837 echo "configure: failed program was:" >&5
838 cat conftest.$ac_ext >&5
839 rm -rf conftest*
840 CPP="${CC-cc} -E -traditional-cpp"
841 cat > conftest.$ac_ext <<EOF
842 #line 843 "configure"
843 #include "confdefs.h"
844 #include <assert.h>
845 Syntax Error
846 EOF
847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
848 { (eval echo configure:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
850 if test -z "$ac_err"; then
851 :
852 else
853 echo "$ac_err" >&5
854 echo "configure: failed program was:" >&5
855 cat conftest.$ac_ext >&5
856 rm -rf conftest*
857 CPP="${CC-cc} -nologo -E"
858 cat > conftest.$ac_ext <<EOF
859 #line 860 "configure"
860 #include "confdefs.h"
861 #include <assert.h>
862 Syntax Error
863 EOF
864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
865 { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
867 if test -z "$ac_err"; then
868 :
869 else
870 echo "$ac_err" >&5
871 echo "configure: failed program was:" >&5
872 cat conftest.$ac_ext >&5
873 rm -rf conftest*
874 CPP=/lib/cpp
875 fi
876 rm -f conftest*
877 fi
878 rm -f conftest*
879 fi
880 rm -f conftest*
881 ac_cv_prog_CPP="$CPP"
882 fi
883 CPP="$ac_cv_prog_CPP"
884 else
885 ac_cv_prog_CPP="$CPP"
886 fi
887 echo "$ac_t""$CPP" 1>&6
888
889 if test $ac_cv_prog_gcc = yes; then
890 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
891 echo "configure:892: checking whether ${CC-cc} needs -traditional" >&5
892 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
893 echo $ac_n "(cached) $ac_c" 1>&6
894 else
895 ac_pattern="Autoconf.*'x'"
896 cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 #include <sgtty.h>
900 Autoconf TIOCGETP
901 EOF
902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
903 egrep "$ac_pattern" >/dev/null 2>&1; then
904 rm -rf conftest*
905 ac_cv_prog_gcc_traditional=yes
906 else
907 rm -rf conftest*
908 ac_cv_prog_gcc_traditional=no
909 fi
910 rm -f conftest*
911
912
913 if test $ac_cv_prog_gcc_traditional = no; then
914 cat > conftest.$ac_ext <<EOF
915 #line 916 "configure"
916 #include "confdefs.h"
917 #include <termio.h>
918 Autoconf TCGETA
919 EOF
920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
921 egrep "$ac_pattern" >/dev/null 2>&1; then
922 rm -rf conftest*
923 ac_cv_prog_gcc_traditional=yes
924 fi
925 rm -f conftest*
926
927 fi
928 fi
929
930 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
931 if test $ac_cv_prog_gcc_traditional = yes; then
932 CC="$CC -traditional"
933 fi
934 fi
935
936 if test "x$CC" != xcc; then
937 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
938 echo "configure:939: checking whether $CC and cc understand -c and -o together" >&5
939 else
940 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
941 echo "configure:942: checking whether cc understands -c and -o together" >&5
942 fi
943 set dummy $CC; ac_cc="`echo $2 |
944 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
945 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
946 echo $ac_n "(cached) $ac_c" 1>&6
947 else
948 echo 'foo(){}' > conftest.c
949 # Make sure it works both with $CC and with simple cc.
950 # We do the test twice because some compilers refuse to overwrite an
951 # existing .o file with -o, though they will create one.
952 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
953 if { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
954 test -f conftest.o && { (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
955 then
956 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
957 if test "x$CC" != xcc; then
958 # Test first that cc exists at all.
959 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
960 ac_try='cc -c conftest.c -o conftest.o 1>&5'
961 if { (eval echo configure:962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
962 test -f conftest.o && { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
963 then
964 # cc works too.
965 :
966 else
967 # cc exists but doesn't like -o.
968 eval ac_cv_prog_cc_${ac_cc}_c_o=no
969 fi
970 fi
971 fi
972 else
973 eval ac_cv_prog_cc_${ac_cc}_c_o=no
974 fi
975 rm -f conftest*
976
977 fi
978 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
979 echo "$ac_t""yes" 1>&6
980 else
981 echo "$ac_t""no" 1>&6
982 cat >> confdefs.h <<\EOF
983 #define NO_MINUS_C_MINUS_O 1
984 EOF
985
986 fi
987
988 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
989 echo "configure: warning: since -c and -o don't seem to work together" 1>&2
990 fi
991 echo $ac_n "checking whether ANSI or K&R style C""... $ac_c" 1>&6
992 echo "configure:993: checking whether ANSI or K&R style C" >&5
993 if test "$cross_compiling" = yes; then
994 echo "$ac_t""K&R" 1>&6
995 else
996 cat > conftest.$ac_ext <<EOF
997 #line 998 "configure"
998 #include "confdefs.h"
999 main (int argc, char **argv) { void *p; return 0; }
1000 EOF
1001 if { (eval echo configure:1002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1002 then
1003 echo "$ac_t""ANSI" 1>&6; cat >> confdefs.h <<\EOF
1004 #define __USE_ANSI_C__ 1
1005 EOF
1006
1007 else
1008 echo "configure: failed program was:" >&5
1009 cat conftest.$ac_ext >&5
1010 rm -fr conftest*
1011 echo "$ac_t""K&R" 1>&6
1012 fi
1013 rm -fr conftest*
1014 fi
1015
1016 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1017 do
1018 # Extract the first word of "$ac_prog", so it can be a program name with args.
1019 set dummy $ac_prog; ac_word=$2
1020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1021 echo "configure:1022: checking for $ac_word" >&5
1022 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1023 echo $ac_n "(cached) $ac_c" 1>&6
1024 else
1025 if test -n "$CXX"; then
1026 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1027 else
1028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1029 ac_dummy="$PATH"
1030 for ac_dir in $ac_dummy; do
1031 test -z "$ac_dir" && ac_dir=.
1032 if test -f $ac_dir/$ac_word; then
1033 ac_cv_prog_CXX="$ac_prog"
1034 break
1035 fi
1036 done
1037 IFS="$ac_save_ifs"
1038 fi
1039 fi
1040 CXX="$ac_cv_prog_CXX"
1041 if test -n "$CXX"; then
1042 echo "$ac_t""$CXX" 1>&6
1043 else
1044 echo "$ac_t""no" 1>&6
1045 fi
1046
1047 test -n "$CXX" && break
1048 done
1049 test -n "$CXX" || CXX="gcc"
1050
1051
1052 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1053 echo "configure:1054: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1054
1055 ac_ext=C
1056 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1057 ac_cpp='$CXXCPP $CPPFLAGS'
1058 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1059 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1060 cross_compiling=$ac_cv_prog_cxx_cross
1061
1062 cat > conftest.$ac_ext << EOF
1063
1064 #line 1065 "configure"
1065 #include "confdefs.h"
1066
1067 int main(){return(0);}
1068 EOF
1069 if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1070 ac_cv_prog_cxx_works=yes
1071 # If we can't run a trivial program, we are probably using a cross compiler.
1072 if (./conftest; exit) 2>/dev/null; then
1073 ac_cv_prog_cxx_cross=no
1074 else
1075 ac_cv_prog_cxx_cross=yes
1076 fi
1077 else
1078 echo "configure: failed program was:" >&5
1079 cat conftest.$ac_ext >&5
1080 ac_cv_prog_cxx_works=no
1081 fi
1082 rm -fr conftest*
1083 ac_ext=c
1084 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1085 ac_cpp='$CPP $CPPFLAGS'
1086 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1087 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1088 cross_compiling=$ac_cv_prog_cc_cross
1089
1090 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1091 if test $ac_cv_prog_cxx_works = no; then
1092 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1093 fi
1094 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1095 echo "configure:1096: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1096 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1097 cross_compiling=$ac_cv_prog_cxx_cross
1098
1099 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether we are using GNU C++" >&5
1101 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1102 echo $ac_n "(cached) $ac_c" 1>&6
1103 else
1104 cat > conftest.C <<EOF
1105 #ifdef __GNUC__
1106 yes;
1107 #endif
1108 EOF
1109 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1110 ac_cv_prog_gxx=yes
1111 else
1112 ac_cv_prog_gxx=no
1113 fi
1114 fi
1115
1116 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1117
1118 if test $ac_cv_prog_gxx = yes; then
1119 GXX=yes
1120 else
1121 GXX=
1122 fi
1123
1124 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1125 ac_save_CXXFLAGS="$CXXFLAGS"
1126 CXXFLAGS=
1127 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1128 echo "configure:1129: checking whether ${CXX-g++} accepts -g" >&5
1129 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131 else
1132 echo 'void f(){}' > conftest.cc
1133 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1134 ac_cv_prog_cxx_g=yes
1135 else
1136 ac_cv_prog_cxx_g=no
1137 fi
1138 rm -f conftest*
1139
1140 fi
1141
1142 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1143 if test "$ac_test_CXXFLAGS" = set; then
1144 CXXFLAGS="$ac_save_CXXFLAGS"
1145 elif test $ac_cv_prog_cxx_g = yes; then
1146 if test "$GXX" = yes; then
1147 CXXFLAGS="-g -O2"
1148 else
1149 CXXFLAGS="-g"
1150 fi
1151 else
1152 if test "$GXX" = yes; then
1153 CXXFLAGS="-O2"
1154 else
1155 CXXFLAGS=
1156 fi
1157 fi
1158
1159 ac_ext=C
1160 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1161 ac_cpp='$CXXCPP $CPPFLAGS'
1162 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1163 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1164 cross_compiling=$ac_cv_prog_cxx_cross
1165
1166 echo $ac_n "checking for bool built-in""... $ac_c" 1>&6
1167 echo "configure:1168: checking for bool built-in" >&5
1168 cat > conftest.$ac_ext <<EOF
1169 #line 1170 "configure"
1170 #include "confdefs.h"
1171
1172 int main() {
1173 bool b = false;
1174 ; return 0; }
1175 EOF
1176 if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1177 rm -rf conftest*
1178 cat >> confdefs.h <<\EOF
1179 #define BOOL_BUILTIN 1
1180 EOF
1181 echo "$ac_t""yes" 1>&6
1182 else
1183 echo "configure: failed program was:" >&5
1184 cat conftest.$ac_ext >&5
1185 rm -rf conftest*
1186 echo "$ac_t""no" 1>&6
1187 fi
1188 rm -f conftest*
1189 echo $ac_n "checking for variable sized automatic arrays""... $ac_c" 1>&6
1190 echo "configure:1191: checking for variable sized automatic arrays" >&5
1191 cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194
1195 int main() {
1196 int i = 42; char a[++i]; *a = i;
1197 ; return 0; }
1198 EOF
1199 if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1200 rm -rf conftest*
1201 cat >> confdefs.h <<\EOF
1202 #define HAVE_VARIABLE_SIZED_AUTOMATIC_ARRAYS 1
1203 EOF
1204 echo "$ac_t""yes" 1>&6
1205 else
1206 echo "configure: failed program was:" >&5
1207 cat conftest.$ac_ext >&5
1208 rm -rf conftest*
1209 echo "$ac_t""no" 1>&6
1210 fi
1211 rm -f conftest*
1212 echo $ac_n "checking for volatile functions""... $ac_c" 1>&6
1213 echo "configure:1214: checking for volatile functions" >&5
1214 cat > conftest.$ac_ext <<EOF
1215 #line 1216 "configure"
1216 #include "confdefs.h"
1217
1218 int main() {
1219 abort();
1220 ; return 0; }
1221 EOF
1222 if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1223 rm -rf conftest*
1224 echo "$ac_t""yes" 1>&6
1225 else
1226 echo "configure: failed program was:" >&5
1227 cat conftest.$ac_ext >&5
1228 rm -rf conftest*
1229 cat >> confdefs.h <<\EOF
1230 #define COMPILER_WITHOUT_VOLATILE_FUNCTIONS 1
1231 EOF
1232 SNACC_NOVOLAT=-novolat; echo "$ac_t""no" 1>&6
1233 fi
1234 rm -f conftest*
1235 ac_ext=c
1236 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1237 ac_cpp='$CPP $CPPFLAGS'
1238 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1239 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1240 cross_compiling=$ac_cv_prog_cc_cross
1241
1242 # Extract the first word of "flex", so it can be a program name with args.
1243 set dummy flex; ac_word=$2
1244 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1245 echo "configure:1246: checking for $ac_word" >&5
1246 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1247 echo $ac_n "(cached) $ac_c" 1>&6
1248 else
1249 if test -n "$LEX"; then
1250 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1251 else
1252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1253 ac_dummy="$PATH"
1254 for ac_dir in $ac_dummy; do
1255 test -z "$ac_dir" && ac_dir=.
1256 if test -f $ac_dir/$ac_word; then
1257 ac_cv_prog_LEX="flex"
1258 break
1259 fi
1260 done
1261 IFS="$ac_save_ifs"
1262 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1263 fi
1264 fi
1265 LEX="$ac_cv_prog_LEX"
1266 if test -n "$LEX"; then
1267 echo "$ac_t""$LEX" 1>&6
1268 else
1269 echo "$ac_t""no" 1>&6
1270 fi
1271
1272 if test -z "$LEXLIB"
1273 then
1274 case "$LEX" in
1275 flex*) ac_lib=fl ;;
1276 *) ac_lib=l ;;
1277 esac
1278 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1279 echo "configure:1280: checking for yywrap in -l$ac_lib" >&5
1280 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284 ac_save_LIBS="$LIBS"
1285 LIBS="-l$ac_lib $LIBS"
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1289 /* Override any gcc2 internal prototype to avoid an error. */
1290 /* We use char because int might match the return type of a gcc2
1291 builtin and then its argument prototype would still apply. */
1292 char yywrap();
1293
1294 int main() {
1295 yywrap()
1296 ; return 0; }
1297 EOF
1298 if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1299 rm -rf conftest*
1300 eval "ac_cv_lib_$ac_lib_var=yes"
1301 else
1302 echo "configure: failed program was:" >&5
1303 cat conftest.$ac_ext >&5
1304 rm -rf conftest*
1305 eval "ac_cv_lib_$ac_lib_var=no"
1306 fi
1307 rm -f conftest*
1308 LIBS="$ac_save_LIBS"
1309
1310 fi
1311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1312 echo "$ac_t""yes" 1>&6
1313 LEXLIB="-l$ac_lib"
1314 else
1315 echo "$ac_t""no" 1>&6
1316 fi
1317
1318 fi
1319
1320 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1321 echo "configure:1322: checking lex output file root" >&5
1322 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1323 echo $ac_n "(cached) $ac_c" 1>&6
1324 else
1325 # The minimal lex program is just a single line: %%. But some broken lexes
1326 # (Solaris, I think it was) want two %% lines, so accommodate them.
1327 echo '%%
1328 %%' | $LEX
1329 if test -f lex.yy.c; then
1330 ac_cv_prog_lex_root=lex.yy
1331 elif test -f lexyy.c; then
1332 ac_cv_prog_lex_root=lexyy
1333 else
1334 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1335 fi
1336 fi
1337
1338 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1339 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1340
1341 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1342 echo "configure:1343: checking whether yytext is a pointer" >&5
1343 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1345 else
1346 # POSIX says lex can declare yytext either as a pointer or an array; the
1347 # default is implementation-dependent. Figure out which it is, since
1348 # not all implementations provide the %pointer and %array declarations.
1349 ac_cv_prog_lex_yytext_pointer=no
1350 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1351 ac_save_LIBS="$LIBS"
1352 LIBS="$LIBS $LEXLIB"
1353 cat > conftest.$ac_ext <<EOF
1354 #line 1355 "configure"
1355 #include "confdefs.h"
1356 `cat $LEX_OUTPUT_ROOT.c`
1357 int main() {
1358
1359 ; return 0; }
1360 EOF
1361 if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1362 rm -rf conftest*
1363 ac_cv_prog_lex_yytext_pointer=yes
1364 else
1365 echo "configure: failed program was:" >&5
1366 cat conftest.$ac_ext >&5
1367 fi
1368 rm -f conftest*
1369 LIBS="$ac_save_LIBS"
1370 rm -f "${LEX_OUTPUT_ROOT}.c"
1371
1372 fi
1373
1374 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1375 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1376 cat >> confdefs.h <<\EOF
1377 #define YYTEXT_POINTER 1
1378 EOF
1379
1380 fi
1381
1382 case "$LEX" in
1383 lex)
1384 LFLAGS="-Nc10000"
1385 ;;
1386 flex)
1387 CFLAGS="$CFLAGS -DFLEX_IN_USE"
1388 esac
1389
1390
1391 # the boot strapping code in .../c-lib/ needs patch:
1392 for ac_prog in patch
1393 do
1394 # Extract the first word of "$ac_prog", so it can be a program name with args.
1395 set dummy $ac_prog; ac_word=$2
1396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1397 echo "configure:1398: checking for $ac_word" >&5
1398 if eval "test \"`echo '$''{'ac_cv_prog_PATCH'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400 else
1401 if test -n "$PATCH"; then
1402 ac_cv_prog_PATCH="$PATCH" # Let the user override the test.
1403 else
1404 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1405 ac_dummy="$PATH"
1406 for ac_dir in $ac_dummy; do
1407 test -z "$ac_dir" && ac_dir=.
1408 if test -f $ac_dir/$ac_word; then
1409 ac_cv_prog_PATCH="$ac_prog"
1410 break
1411 fi
1412 done
1413 IFS="$ac_save_ifs"
1414 fi
1415 fi
1416 PATCH="$ac_cv_prog_PATCH"
1417 if test -n "$PATCH"; then
1418 echo "$ac_t""$PATCH" 1>&6
1419 else
1420 echo "$ac_t""no" 1>&6
1421 fi
1422
1423 test -n "$PATCH" && break
1424 done
1425 test -n "$PATCH" || PATCH="false"
1426
1427 for ac_prog in 'bison -y' byacc
1428 do
1429 # Extract the first word of "$ac_prog", so it can be a program name with args.
1430 set dummy $ac_prog; ac_word=$2
1431 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1432 echo "configure:1433: checking for $ac_word" >&5
1433 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1434 echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436 if test -n "$YACC"; then
1437 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1438 else
1439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1440 ac_dummy="$PATH"
1441 for ac_dir in $ac_dummy; do
1442 test -z "$ac_dir" && ac_dir=.
1443 if test -f $ac_dir/$ac_word; then
1444 ac_cv_prog_YACC="$ac_prog"
1445 break
1446 fi
1447 done
1448 IFS="$ac_save_ifs"
1449 fi
1450 fi
1451 YACC="$ac_cv_prog_YACC"
1452 if test -n "$YACC"; then
1453 echo "$ac_t""$YACC" 1>&6
1454 else
1455 echo "$ac_t""no" 1>&6
1456 fi
1457
1458 test -n "$YACC" && break
1459 done
1460 test -n "$YACC" || YACC="yacc"
1461
1462 for ac_prog in makedepend mkdep mkdep.sh
1463 do
1464 # Extract the first word of "$ac_prog", so it can be a program name with args.
1465 set dummy $ac_prog; ac_word=$2
1466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1467 echo "configure:1468: checking for $ac_word" >&5
1468 if eval "test \"`echo '$''{'ac_cv_prog_MKDEP'+set}'`\" = set"; then
1469 echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471 if test -n "$MKDEP"; then
1472 ac_cv_prog_MKDEP="$MKDEP" # Let the user override the test.
1473 else
1474 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1475 ac_dummy="$PATH"
1476 for ac_dir in $ac_dummy; do
1477 test -z "$ac_dir" && ac_dir=.
1478 if test -f $ac_dir/$ac_word; then
1479 ac_cv_prog_MKDEP="$ac_prog"
1480 break
1481 fi
1482 done
1483 IFS="$ac_save_ifs"
1484 fi
1485 fi
1486 MKDEP="$ac_cv_prog_MKDEP"
1487 if test -n "$MKDEP"; then
1488 echo "$ac_t""$MKDEP" 1>&6
1489 else
1490 echo "$ac_t""no" 1>&6
1491 fi
1492
1493 test -n "$MKDEP" && break
1494 done
1495 test -n "$MKDEP" || MKDEP="$CC"
1496
1497 for ac_prog in ar
1498 do
1499 # Extract the first word of "$ac_prog", so it can be a program name with args.
1500 set dummy $ac_prog; ac_word=$2
1501 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1502 echo "configure:1503: checking for $ac_word" >&5
1503 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1504 echo $ac_n "(cached) $ac_c" 1>&6
1505 else
1506 if test -n "$AR"; then
1507 ac_cv_prog_AR="$AR" # Let the user override the test.
1508 else
1509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1510 ac_dummy="$PATH"
1511 for ac_dir in $ac_dummy; do
1512 test -z "$ac_dir" && ac_dir=.
1513 if test -f $ac_dir/$ac_word; then
1514 ac_cv_prog_AR="$ac_prog"
1515 break
1516 fi
1517 done
1518 IFS="$ac_save_ifs"
1519 fi
1520 fi
1521 AR="$ac_cv_prog_AR"
1522 if test -n "$AR"; then
1523 echo "$ac_t""$AR" 1>&6
1524 else
1525 echo "$ac_t""no" 1>&6
1526 fi
1527
1528 test -n "$AR" && break
1529 done
1530 test -n "$AR" || AR="ar"
1531
1532 # Extract the first word of "ranlib", so it can be a program name with args.
1533 set dummy ranlib; ac_word=$2
1534 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1535 echo "configure:1536: checking for $ac_word" >&5
1536 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1537 echo $ac_n "(cached) $ac_c" 1>&6
1538 else
1539 if test -n "$RANLIB"; then
1540 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1541 else
1542 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1543 ac_dummy="$PATH"
1544 for ac_dir in $ac_dummy; do
1545 test -z "$ac_dir" && ac_dir=.
1546 if test -f $ac_dir/$ac_word; then
1547 ac_cv_prog_RANLIB="ranlib"
1548 break
1549 fi
1550 done
1551 IFS="$ac_save_ifs"
1552 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1553 fi
1554 fi
1555 RANLIB="$ac_cv_prog_RANLIB"
1556 if test -n "$RANLIB"; then
1557 echo "$ac_t""$RANLIB" 1>&6
1558 else
1559 echo "$ac_t""no" 1>&6
1560 fi
1561
1562 ac_aux_dir=
1563 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1564 if test -f $ac_dir/install-sh; then
1565 ac_aux_dir=$ac_dir
1566 ac_install_sh="$ac_aux_dir/install-sh -c"
1567 break
1568 elif test -f $ac_dir/install.sh; then
1569 ac_aux_dir=$ac_dir
1570 ac_install_sh="$ac_aux_dir/install.sh -c"
1571 break
1572 fi
1573 done
1574 if test -z "$ac_aux_dir"; then
1575 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1576 fi
1577 ac_config_guess=$ac_aux_dir/config.guess
1578 ac_config_sub=$ac_aux_dir/config.sub
1579 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1580
1581 # Find a good install program. We prefer a C program (faster),
1582 # so one script is as good as another. But avoid the broken or
1583 # incompatible versions:
1584 # SysV /etc/install, /usr/sbin/install
1585 # SunOS /usr/etc/install
1586 # IRIX /sbin/install
1587 # AIX /bin/install
1588 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1589 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1590 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1591 # ./install, which can be erroneously created by make from ./install.sh.
1592 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1593 echo "configure:1594: checking for a BSD compatible install" >&5
1594 if test -z "$INSTALL"; then
1595 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
1597 else
1598 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1599 for ac_dir in $PATH; do
1600 # Account for people who put trailing slashes in PATH elements.
1601 case "$ac_dir/" in
1602 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1603 *)
1604 # OSF1 and SCO ODT 3.0 have their own names for install.
1605 # Don't use installbsd from OSF since it installs stuff as root
1606 # by default.
1607 for ac_prog in ginstall scoinst install; do
1608 if test -f $ac_dir/$ac_prog; then
1609 if test $ac_prog = install &&
1610 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1611 # AIX install. It has an incompatible calling convention.
1612 :
1613 else
1614 ac_cv_path_install="$ac_dir/$ac_prog -c"
1615 break 2
1616 fi
1617 fi
1618 done
1619 ;;
1620 esac
1621 done
1622 IFS="$ac_save_IFS"
1623
1624 fi
1625 if test "${ac_cv_path_install+set}" = set; then
1626 INSTALL="$ac_cv_path_install"
1627 else
1628 # As a last resort, use the slow shell script. We don't cache a
1629 # path for INSTALL within a source directory, because that will
1630 # break other packages using the cache if that directory is
1631 # removed, or if the path is relative.
1632 INSTALL="$ac_install_sh"
1633 fi
1634 fi
1635 echo "$ac_t""$INSTALL" 1>&6
1636
1637 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1638 # It thinks the first close brace ends the variable substitution.
1639 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1640
1641 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1642
1643 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1644
1645 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1646 echo "configure:1647: checking whether time.h and sys/time.h may both be included" >&5
1647 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1648 echo $ac_n "(cached) $ac_c" 1>&6
1649 else
1650 cat > conftest.$ac_ext <<EOF
1651 #line 1652 "configure"
1652 #include "confdefs.h"
1653 #include <sys/types.h>
1654 #include <sys/time.h>
1655 #include <time.h>
1656 int main() {
1657 struct tm *tp;
1658 ; return 0; }
1659 EOF
1660 if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1661 rm -rf conftest*
1662 ac_cv_header_time=yes
1663 else
1664 echo "configure: failed program was:" >&5
1665 cat conftest.$ac_ext >&5
1666 rm -rf conftest*
1667 ac_cv_header_time=no
1668 fi
1669 rm -f conftest*
1670 fi
1671
1672 echo "$ac_t""$ac_cv_header_time" 1>&6
1673 if test $ac_cv_header_time = yes; then
1674 cat >> confdefs.h <<\EOF
1675 #define TIME_WITH_SYS_TIME 1
1676 EOF
1677
1678 fi
1679
1680 ac_header_dirent=no
1681 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1682 do
1683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1684 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1685 echo "configure:1686: checking for $ac_hdr that defines DIR" >&5
1686 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689 cat > conftest.$ac_ext <<EOF
1690 #line 1691 "configure"
1691 #include "confdefs.h"
1692 #include <sys/types.h>
1693 #include <$ac_hdr>
1694 int main() {
1695 DIR *dirp = 0;
1696 ; return 0; }
1697 EOF
1698 if { (eval echo configure:1699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1699 rm -rf conftest*
1700 eval "ac_cv_header_dirent_$ac_safe=yes"
1701 else
1702 echo "configure: failed program was:" >&5
1703 cat conftest.$ac_ext >&5
1704 rm -rf conftest*
1705 eval "ac_cv_header_dirent_$ac_safe=no"
1706 fi
1707 rm -f conftest*
1708 fi
1709 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1710 echo "$ac_t""yes" 1>&6
1711 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1712 cat >> confdefs.h <<EOF
1713 #define $ac_tr_hdr 1
1714 EOF
1715 ac_header_dirent=$ac_hdr; break
1716 else
1717 echo "$ac_t""no" 1>&6
1718 fi
1719 done
1720 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1721 if test $ac_header_dirent = dirent.h; then
1722 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1723 echo "configure:1724: checking for opendir in -ldir" >&5
1724 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1725 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1726 echo $ac_n "(cached) $ac_c" 1>&6
1727 else
1728 ac_save_LIBS="$LIBS"
1729 LIBS="-ldir $LIBS"
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 /* Override any gcc2 internal prototype to avoid an error. */
1734 /* We use char because int might match the return type of a gcc2
1735 builtin and then its argument prototype would still apply. */
1736 char opendir();
1737
1738 int main() {
1739 opendir()
1740 ; return 0; }
1741 EOF
1742 if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1743 rm -rf conftest*
1744 eval "ac_cv_lib_$ac_lib_var=yes"
1745 else
1746 echo "configure: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 rm -rf conftest*
1749 eval "ac_cv_lib_$ac_lib_var=no"
1750 fi
1751 rm -f conftest*
1752 LIBS="$ac_save_LIBS"
1753
1754 fi
1755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1756 echo "$ac_t""yes" 1>&6
1757 LIBS="$LIBS -ldir"
1758 else
1759 echo "$ac_t""no" 1>&6
1760 fi
1761
1762 else
1763 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1764 echo "configure:1765: checking for opendir in -lx" >&5
1765 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768 else
1769 ac_save_LIBS="$LIBS"
1770 LIBS="-lx $LIBS"
1771 cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774 /* Override any gcc2 internal prototype to avoid an error. */
1775 /* We use char because int might match the return type of a gcc2
1776 builtin and then its argument prototype would still apply. */
1777 char opendir();
1778
1779 int main() {
1780 opendir()
1781 ; return 0; }
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784 rm -rf conftest*
1785 eval "ac_cv_lib_$ac_lib_var=yes"
1786 else
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1789 rm -rf conftest*
1790 eval "ac_cv_lib_$ac_lib_var=no"
1791 fi
1792 rm -f conftest*
1793 LIBS="$ac_save_LIBS"
1794
1795 fi
1796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1797 echo "$ac_t""yes" 1>&6
1798 LIBS="$LIBS -lx"
1799 else
1800 echo "$ac_t""no" 1>&6
1801 fi
1802
1803 fi
1804
1805 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1806 echo "configure:1807: checking for ANSI C header files" >&5
1807 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810 cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813 #include <stdlib.h>
1814 #include <stdarg.h>
1815 #include <string.h>
1816 #include <float.h>
1817 EOF
1818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1819 { (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1821 if test -z "$ac_err"; then
1822 rm -rf conftest*
1823 ac_cv_header_stdc=yes
1824 else
1825 echo "$ac_err" >&5
1826 echo "configure: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 rm -rf conftest*
1829 ac_cv_header_stdc=no
1830 fi
1831 rm -f conftest*
1832
1833 if test $ac_cv_header_stdc = yes; then
1834 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1835 cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <string.h>
1839 EOF
1840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1841 egrep "memchr" >/dev/null 2>&1; then
1842 :
1843 else
1844 rm -rf conftest*
1845 ac_cv_header_stdc=no
1846 fi
1847 rm -f conftest*
1848
1849 fi
1850
1851 if test $ac_cv_header_stdc = yes; then
1852 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1853 cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1856 #include <stdlib.h>
1857 EOF
1858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1859 egrep "free" >/dev/null 2>&1; then
1860 :
1861 else
1862 rm -rf conftest*
1863 ac_cv_header_stdc=no
1864 fi
1865 rm -f conftest*
1866
1867 fi
1868
1869 if test $ac_cv_header_stdc = yes; then
1870 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1871 if test "$cross_compiling" = yes; then
1872 :
1873 else
1874 cat > conftest.$ac_ext <<EOF
1875 #line 1876 "configure"
1876 #include "confdefs.h"
1877 #include <ctype.h>
1878 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1879 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1880 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1881 int main () { int i; for (i = 0; i < 256; i++)
1882 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1883 exit (0); }
1884
1885 EOF
1886 if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1887 then
1888 :
1889 else
1890 echo "configure: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1892 rm -fr conftest*
1893 ac_cv_header_stdc=no
1894 fi
1895 rm -fr conftest*
1896 fi
1897
1898 fi
1899 fi
1900
1901 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1902 if test $ac_cv_header_stdc = yes; then
1903 cat >> confdefs.h <<\EOF
1904 #define STDC_HEADERS 1
1905 EOF
1906
1907 fi
1908
1909 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1910 echo "configure:1911: checking for size_t" >&5
1911 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1912 echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914 cat > conftest.$ac_ext <<EOF
1915 #line 1916 "configure"
1916 #include "confdefs.h"
1917 #include <sys/types.h>
1918 #if STDC_HEADERS
1919 #include <stdlib.h>
1920 #include <stddef.h>
1921 #endif
1922 EOF
1923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1924 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1925 rm -rf conftest*
1926 ac_cv_type_size_t=yes
1927 else
1928 rm -rf conftest*
1929 ac_cv_type_size_t=no
1930 fi
1931 rm -f conftest*
1932
1933 fi
1934 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1935 if test $ac_cv_type_size_t = no; then
1936 cat >> confdefs.h <<\EOF
1937 #define size_t unsigned
1938 EOF
1939
1940 fi
1941
1942 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1943 echo "configure:1944: checking for uid_t in sys/types.h" >&5
1944 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1945 echo $ac_n "(cached) $ac_c" 1>&6
1946 else
1947 cat > conftest.$ac_ext <<EOF
1948 #line 1949 "configure"
1949 #include "confdefs.h"
1950 #include <sys/types.h>
1951 EOF
1952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1953 egrep "uid_t" >/dev/null 2>&1; then
1954 rm -rf conftest*
1955 ac_cv_type_uid_t=yes
1956 else
1957 rm -rf conftest*
1958 ac_cv_type_uid_t=no
1959 fi
1960 rm -f conftest*
1961
1962 fi
1963
1964 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1965 if test $ac_cv_type_uid_t = no; then
1966 cat >> confdefs.h <<\EOF
1967 #define uid_t int
1968 EOF
1969
1970 cat >> confdefs.h <<\EOF
1971 #define gid_t int
1972 EOF
1973
1974 fi
1975
1976 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1977 echo "configure:1978: checking for ANSI C header files" >&5
1978 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981 cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984 #include <stdlib.h>
1985 #include <stdarg.h>
1986 #include <string.h>
1987 #include <float.h>
1988 EOF
1989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1990 { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1992 if test -z "$ac_err"; then
1993 rm -rf conftest*
1994 ac_cv_header_stdc=yes
1995 else
1996 echo "$ac_err" >&5
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
1999 rm -rf conftest*
2000 ac_cv_header_stdc=no
2001 fi
2002 rm -f conftest*
2003
2004 if test $ac_cv_header_stdc = yes; then
2005 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2006 cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <string.h>
2010 EOF
2011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2012 egrep "memchr" >/dev/null 2>&1; then
2013 :
2014 else
2015 rm -rf conftest*
2016 ac_cv_header_stdc=no
2017 fi
2018 rm -f conftest*
2019
2020 fi
2021
2022 if test $ac_cv_header_stdc = yes; then
2023 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2024 cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2027 #include <stdlib.h>
2028 EOF
2029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2030 egrep "free" >/dev/null 2>&1; then
2031 :
2032 else
2033 rm -rf conftest*
2034 ac_cv_header_stdc=no
2035 fi
2036 rm -f conftest*
2037
2038 fi
2039
2040 if test $ac_cv_header_stdc = yes; then
2041 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2042 if test "$cross_compiling" = yes; then
2043 :
2044 else
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <ctype.h>
2049 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2050 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2051 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2052 int main () { int i; for (i = 0; i < 256; i++)
2053 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2054 exit (0); }
2055
2056 EOF
2057 if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2058 then
2059 :
2060 else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -fr conftest*
2064 ac_cv_header_stdc=no
2065 fi
2066 rm -fr conftest*
2067 fi
2068
2069 fi
2070 fi
2071
2072 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2073 if test $ac_cv_header_stdc = yes; then
2074 cat >> confdefs.h <<\EOF
2075 #define STDC_HEADERS 1
2076 EOF
2077
2078 fi
2079
2080 for ac_hdr in unistd.h memory.h string.h malloc.h fcntl.h
2081 do
2082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_hdr" >&5
2085 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2086 echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088 cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 #include <$ac_hdr>
2092 EOF
2093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2094 { (eval echo configure:2095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2096 if test -z "$ac_err"; then
2097 rm -rf conftest*
2098 eval "ac_cv_header_$ac_safe=yes"
2099 else
2100 echo "$ac_err" >&5
2101 echo "configure: failed program was:" >&5
2102 cat conftest.$ac_ext >&5
2103 rm -rf conftest*
2104 eval "ac_cv_header_$ac_safe=no"
2105 fi
2106 rm -f conftest*
2107 fi
2108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2109 echo "$ac_t""yes" 1>&6
2110 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2111 cat >> confdefs.h <<EOF
2112 #define $ac_tr_hdr 1
2113 EOF
2114
2115 else
2116 echo "$ac_t""no" 1>&6
2117 fi
2118 done
2119
2120 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2121 echo "configure:2122: checking for vprintf" >&5
2122 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2123 echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125 cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 /* System header to define __stub macros and hopefully few prototypes,
2129 which can conflict with char vprintf(); below. */
2130 #include <assert.h>
2131 /* Override any gcc2 internal prototype to avoid an error. */
2132 /* We use char because int might match the return type of a gcc2
2133 builtin and then its argument prototype would still apply. */
2134 char vprintf();
2135
2136 int main() {
2137
2138 /* The GNU C library defines this for functions which it implements
2139 to always fail with ENOSYS. Some functions are actually named
2140 something starting with __ and the normal name is an alias. */
2141 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2142 choke me
2143 #else
2144 vprintf();
2145 #endif
2146
2147 ; return 0; }
2148 EOF
2149 if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2150 rm -rf conftest*
2151 eval "ac_cv_func_vprintf=yes"
2152 else
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 rm -rf conftest*
2156 eval "ac_cv_func_vprintf=no"
2157 fi
2158 rm -f conftest*
2159 fi
2160
2161 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2162 echo "$ac_t""yes" 1>&6
2163 cat >> confdefs.h <<\EOF
2164 #define HAVE_VPRINTF 1
2165 EOF
2166
2167 else
2168 echo "$ac_t""no" 1>&6
2169 fi
2170
2171 if test "$ac_cv_func_vprintf" != yes; then
2172 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2173 echo "configure:2174: checking for _doprnt" >&5
2174 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177 cat > conftest.$ac_ext <<EOF
2178 #line 2179 "configure"
2179 #include "confdefs.h"
2180 /* System header to define __stub macros and hopefully few prototypes,
2181 which can conflict with char _doprnt(); below. */
2182 #include <assert.h>
2183 /* Override any gcc2 internal prototype to avoid an error. */
2184 /* We use char because int might match the return type of a gcc2
2185 builtin and then its argument prototype would still apply. */
2186 char _doprnt();
2187
2188 int main() {
2189
2190 /* The GNU C library defines this for functions which it implements
2191 to always fail with ENOSYS. Some functions are actually named
2192 something starting with __ and the normal name is an alias. */
2193 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2194 choke me
2195 #else
2196 _doprnt();
2197 #endif
2198
2199 ; return 0; }
2200 EOF
2201 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202 rm -rf conftest*
2203 eval "ac_cv_func__doprnt=yes"
2204 else
2205 echo "configure: failed program was:" >&5
2206 cat conftest.$ac_ext >&5
2207 rm -rf conftest*
2208 eval "ac_cv_func__doprnt=no"
2209 fi
2210 rm -f conftest*
2211 fi
2212
2213 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2214 echo "$ac_t""yes" 1>&6
2215 cat >> confdefs.h <<\EOF
2216 #define HAVE_DOPRNT 1
2217 EOF
2218
2219 else
2220 echo "$ac_t""no" 1>&6
2221 fi
2222
2223 fi
2224
2225 echo $ac_n "checking for working const""... $ac_c" 1>&6
2226 echo "configure:2227: checking for working const" >&5
2227 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2228 echo $ac_n "(cached) $ac_c" 1>&6
2229 else
2230 cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233
2234 int main() {
2235
2236 /* Ultrix mips cc rejects this. */
2237 typedef int charset[2]; const charset x;
2238 /* SunOS 4.1.1 cc rejects this. */
2239 char const *const *ccp;
2240 char **p;
2241 /* NEC SVR4.0.2 mips cc rejects this. */
2242 struct point {int x, y;};
2243 static struct point const zero = {0,0};
2244 /* AIX XL C 1.02.0.0 rejects this.
2245 It does not let you subtract one const X* pointer from another in an arm
2246 of an if-expression whose if-part is not a constant expression */
2247 const char *g = "string";
2248 ccp = &g + (g ? g-g : 0);
2249 /* HPUX 7.0 cc rejects these. */
2250 ++ccp;
2251 p = (char**) ccp;
2252 ccp = (char const *const *) p;
2253 { /* SCO 3.2v4 cc rejects this. */
2254 char *t;
2255 char const *s = 0 ? (char *) 0 : (char const *) 0;
2256
2257 *t++ = 0;
2258 }
2259 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2260 int x[] = {25, 17};
2261 const int *foo = &x[0];
2262 ++foo;
2263 }
2264 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2265 typedef const int *iptr;
2266 iptr p = 0;
2267 ++p;
2268 }
2269 { /* AIX XL C 1.02.0.0 rejects this saying
2270 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2271 struct s { int j; const int *ap[3]; };
2272 struct s *b; b->j = 5;
2273 }
2274 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2275 const int foo = 10;
2276 }
2277
2278 ; return 0; }
2279 EOF
2280 if { (eval echo configure:2281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2281 rm -rf conftest*
2282 ac_cv_c_const=yes
2283 else
2284 echo "configure: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 rm -rf conftest*
2287 ac_cv_c_const=no
2288 fi
2289 rm -f conftest*
2290 fi
2291
2292 echo "$ac_t""$ac_cv_c_const" 1>&6
2293 if test $ac_cv_c_const = no; then
2294 cat >> confdefs.h <<\EOF
2295 #define const
2296 EOF
2297
2298 fi
2299
2300 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2301 echo "configure:2302: checking whether byte ordering is bigendian" >&5
2302 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2303 echo $ac_n "(cached) $ac_c" 1>&6
2304 else
2305 ac_cv_c_bigendian=unknown
2306 # See if sys/param.h defines the BYTE_ORDER macro.
2307 cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <sys/types.h>
2311 #include <sys/param.h>
2312 int main() {
2313
2314 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2315 bogus endian macros
2316 #endif
2317 ; return 0; }
2318 EOF
2319 if { (eval echo configure:2320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2320 rm -rf conftest*
2321 # It does; now see whether it defined to BIG_ENDIAN or not.
2322 cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <sys/types.h>
2326 #include <sys/param.h>
2327 int main() {
2328
2329 #if BYTE_ORDER != BIG_ENDIAN
2330 not big endian
2331 #endif
2332 ; return 0; }
2333 EOF
2334 if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2335 rm -rf conftest*
2336 ac_cv_c_bigendian=yes
2337 else
2338 echo "configure: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 rm -rf conftest*
2341 ac_cv_c_bigendian=no
2342 fi
2343 rm -f conftest*
2344 else
2345 echo "configure: failed program was:" >&5
2346 cat conftest.$ac_ext >&5
2347 fi
2348 rm -f conftest*
2349 if test $ac_cv_c_bigendian = unknown; then
2350 if test "$cross_compiling" = yes; then
2351 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2352 else
2353 cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 main () {
2357 /* Are we little or big endian? From Harbison&Steele. */
2358 union
2359 {
2360 long l;
2361 char c[sizeof (long)];
2362 } u;
2363 u.l = 1;
2364 exit (u.c[sizeof (long) - 1] == 1);
2365 }
2366 EOF
2367 if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2368 then
2369 ac_cv_c_bigendian=no
2370 else
2371 echo "configure: failed program was:" >&5
2372 cat conftest.$ac_ext >&5
2373 rm -fr conftest*
2374 ac_cv_c_bigendian=yes
2375 fi
2376 rm -fr conftest*
2377 fi
2378
2379 fi
2380 fi
2381
2382 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2383 if test $ac_cv_c_bigendian = yes; then
2384 cat >> confdefs.h <<\EOF
2385 #define WORDS_BIGENDIAN 1
2386 EOF
2387
2388 fi
2389
2390 echo $ac_n "checking size of short""... $ac_c" 1>&6
2391 echo "configure:2392: checking size of short" >&5
2392 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2393 echo $ac_n "(cached) $ac_c" 1>&6
2394 else
2395 if test "$cross_compiling" = yes; then
2396 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2397 else
2398 cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 #include <stdio.h>
2402 main()
2403 {
2404 FILE *f=fopen("conftestval", "w");
2405 if (!f) exit(1);
2406 fprintf(f, "%d\n", sizeof(short));
2407 exit(0);
2408 }
2409 EOF
2410 if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2411 then
2412 ac_cv_sizeof_short=`cat conftestval`
2413 else
2414 echo "configure: failed program was:" >&5
2415 cat conftest.$ac_ext >&5
2416 rm -fr conftest*
2417 ac_cv_sizeof_short=0
2418 fi
2419 rm -fr conftest*
2420 fi
2421
2422 fi
2423 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2424 cat >> confdefs.h <<EOF
2425 #define SIZEOF_SHORT $ac_cv_sizeof_short
2426 EOF
2427
2428
2429 echo $ac_n "checking size of int""... $ac_c" 1>&6
2430 echo "configure:2431: checking size of int" >&5
2431 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2432 echo $ac_n "(cached) $ac_c" 1>&6
2433 else
2434 if test "$cross_compiling" = yes; then
2435 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2436 else
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 #include <stdio.h>
2441 main()
2442 {
2443 FILE *f=fopen("conftestval", "w");
2444 if (!f) exit(1);
2445 fprintf(f, "%d\n", sizeof(int));
2446 exit(0);
2447 }
2448 EOF
2449 if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2450 then
2451 ac_cv_sizeof_int=`cat conftestval`
2452 else
2453 echo "configure: failed program was:" >&5
2454 cat conftest.$ac_ext >&5
2455 rm -fr conftest*
2456 ac_cv_sizeof_int=0
2457 fi
2458 rm -fr conftest*
2459 fi
2460
2461 fi
2462 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2463 cat >> confdefs.h <<EOF
2464 #define SIZEOF_INT $ac_cv_sizeof_int
2465 EOF
2466
2467
2468 echo $ac_n "checking size of long""... $ac_c" 1>&6
2469 echo "configure:2470: checking size of long" >&5
2470 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473 if test "$cross_compiling" = yes; then
2474 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2475 else
2476 cat > conftest.$ac_ext <<EOF
2477 #line 2478 "configure"
2478 #include "confdefs.h"
2479 #include <stdio.h>
2480 main()
2481 {
2482 FILE *f=fopen("conftestval", "w");
2483 if (!f) exit(1);
2484 fprintf(f, "%d\n", sizeof(long));
2485 exit(0);
2486 }
2487 EOF
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2489 then
2490 ac_cv_sizeof_long=`cat conftestval`
2491 else
2492 echo "configure: failed program was:" >&5
2493 cat conftest.$ac_ext >&5
2494 rm -fr conftest*
2495 ac_cv_sizeof_long=0
2496 fi
2497 rm -fr conftest*
2498 fi
2499
2500 fi
2501 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2502 cat >> confdefs.h <<EOF
2503 #define SIZEOF_LONG $ac_cv_sizeof_long
2504 EOF
2505
2506
2507 echo $ac_n "checking size of double""... $ac_c" 1>&6
2508 echo "configure:2509: checking size of double" >&5
2509 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2510 echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512 if test "$cross_compiling" = yes; then
2513 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2514 else
2515 cat > conftest.$ac_ext <<EOF
2516 #line 2517 "configure"
2517 #include "confdefs.h"
2518 #include <stdio.h>
2519 main()
2520 {
2521 FILE *f=fopen("conftestval", "w");
2522 if (!f) exit(1);
2523 fprintf(f, "%d\n", sizeof(double));
2524 exit(0);
2525 }
2526 EOF
2527 if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2528 then
2529 ac_cv_sizeof_double=`cat conftestval`
2530 else
2531 echo "configure: failed program was:" >&5
2532 cat conftest.$ac_ext >&5
2533 rm -fr conftest*
2534 ac_cv_sizeof_double=0
2535 fi
2536 rm -fr conftest*
2537 fi
2538
2539 fi
2540 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2541 cat >> confdefs.h <<EOF
2542 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2543 EOF
2544
2545
2546 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
2547 echo "configure:2548: checking for sin in -lm" >&5
2548 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
2549 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2550 echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552 ac_save_LIBS="$LIBS"
2553 LIBS="-lm $LIBS"
2554 cat > conftest.$ac_ext <<EOF
2555 #line 2556 "configure"
2556 #include "confdefs.h"
2557 /* Override any gcc2 internal prototype to avoid an error. */
2558 /* We use char because int might match the return type of a gcc2
2559 builtin and then its argument prototype would still apply. */
2560 char sin();
2561
2562 int main() {
2563 sin()
2564 ; return 0; }
2565 EOF
2566 if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2567 rm -rf conftest*
2568 eval "ac_cv_lib_$ac_lib_var=yes"
2569 else
2570 echo "configure: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 rm -rf conftest*
2573 eval "ac_cv_lib_$ac_lib_var=no"
2574 fi
2575 rm -f conftest*
2576 LIBS="$ac_save_LIBS"
2577
2578 fi
2579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2580 echo "$ac_t""yes" 1>&6
2581 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2582 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2583 cat >> confdefs.h <<EOF
2584 #define $ac_tr_lib 1
2585 EOF
2586
2587 LIBS="-lm $LIBS"
2588
2589 else
2590 echo "$ac_t""no" 1>&6
2591 fi
2592
2593 for ac_func in isinf finite
2594 do
2595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2596 echo "configure:2597: checking for $ac_func" >&5
2597 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2598 echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600 cat > conftest.$ac_ext <<EOF
2601 #line 2602 "configure"
2602 #include "confdefs.h"
2603 /* System header to define __stub macros and hopefully few prototypes,
2604 which can conflict with char $ac_func(); below. */
2605 #include <assert.h>
2606 /* Override any gcc2 internal prototype to avoid an error. */
2607 /* We use char because int might match the return type of a gcc2
2608 builtin and then its argument prototype would still apply. */
2609 char $ac_func();
2610
2611 int main() {
2612
2613 /* The GNU C library defines this for functions which it implements
2614 to always fail with ENOSYS. Some functions are actually named
2615 something starting with __ and the normal name is an alias. */
2616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2617 choke me
2618 #else
2619 $ac_func();
2620 #endif
2621
2622 ; return 0; }
2623 EOF
2624 if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2625 rm -rf conftest*
2626 eval "ac_cv_func_$ac_func=yes"
2627 else
2628 echo "configure: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 rm -rf conftest*
2631 eval "ac_cv_func_$ac_func=no"
2632 fi
2633 rm -f conftest*
2634 fi
2635
2636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2637 echo "$ac_t""yes" 1>&6
2638 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2639 cat >> confdefs.h <<EOF
2640 #define $ac_tr_func 1
2641 EOF
2642
2643 else
2644 echo "$ac_t""no" 1>&6
2645 fi
2646 done
2647
2648 for ac_func in memset memcpy memcmp
2649 do
2650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2651 echo "configure:2652: checking for $ac_func" >&5
2652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
2654 else
2655 cat > conftest.$ac_ext <<EOF
2656 #line 2657 "configure"
2657 #include "confdefs.h"
2658 /* System header to define __stub macros and hopefully few prototypes,
2659 which can conflict with char $ac_func(); below. */
2660 #include <assert.h>
2661 /* Override any gcc2 internal prototype to avoid an error. */
2662 /* We use char because int might match the return type of a gcc2
2663 builtin and then its argument prototype would still apply. */
2664 char $ac_func();
2665
2666 int main() {
2667
2668 /* The GNU C library defines this for functions which it implements
2669 to always fail with ENOSYS. Some functions are actually named
2670 something starting with __ and the normal name is an alias. */
2671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2672 choke me
2673 #else
2674 $ac_func();
2675 #endif
2676
2677 ; return 0; }
2678 EOF
2679 if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2680 rm -rf conftest*
2681 eval "ac_cv_func_$ac_func=yes"
2682 else
2683 echo "configure: failed program was:" >&5
2684 cat conftest.$ac_ext >&5
2685 rm -rf conftest*
2686 eval "ac_cv_func_$ac_func=no"
2687 fi
2688 rm -f conftest*
2689 fi
2690
2691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2692 echo "$ac_t""yes" 1>&6
2693 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2694 cat >> confdefs.h <<EOF
2695 #define $ac_tr_func 1
2696 EOF
2697
2698 else
2699 echo "$ac_t""no" 1>&6
2700 fi
2701 done
2702
2703 # If we find X, set shell vars x_includes and x_libraries to the
2704 # paths, otherwise set no_x=yes.
2705 # Uses ac_ vars as temps to allow command line to override cache and checks.
2706 # --without-x overrides everything else, but does not touch the cache.
2707 echo $ac_n "checking for X""... $ac_c" 1>&6
2708 echo "configure:2709: checking for X" >&5
2709
2710 # Check whether --with-x or --without-x was given.
2711 if test "${with_x+set}" = set; then
2712 withval="$with_x"
2713 :
2714 fi
2715
2716 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2717 if test "x$with_x" = xno; then
2718 # The user explicitly disabled X.
2719 have_x=disabled
2720 else
2721 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2722 # Both variables are already set.
2723 have_x=yes
2724 else
2725 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2726 echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728 # One or both of the vars are not set, and there is no cached value.
2729 ac_x_includes=NO ac_x_libraries=NO
2730 rm -fr conftestdir
2731 if mkdir conftestdir; then
2732 cd conftestdir
2733 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2734 cat > Imakefile <<'EOF'
2735 acfindx:
2736 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2737 EOF
2738 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2739 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2740 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2741 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2742 for ac_extension in a so sl; do
2743 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2744 test -f $ac_im_libdir/libX11.$ac_extension; then
2745 ac_im_usrlibdir=$ac_im_libdir; break
2746 fi
2747 done
2748 # Screen out bogus values from the imake configuration. They are
2749 # bogus both because they are the default anyway, and because
2750 # using them would break gcc on systems where it needs fixed includes.
2751 case "$ac_im_incroot" in
2752 /usr/include) ;;
2753 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2754 esac
2755 case "$ac_im_usrlibdir" in
2756 /usr/lib | /lib) ;;
2757 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2758 esac
2759 fi
2760 cd ..
2761 rm -fr conftestdir
2762 fi
2763
2764 if test "$ac_x_includes" = NO; then
2765 # Guess where to find include files, by looking for this one X11 .h file.
2766 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2767
2768 # First, try using that file with no special directory specified.
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772 #include <$x_direct_test_include>
2773 EOF
2774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2775 { (eval echo configure:2776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2777 if test -z "$ac_err"; then
2778 rm -rf conftest*
2779 # We can compile using X headers with no special include directory.
2780 ac_x_includes=
2781 else
2782 echo "$ac_err" >&5
2783 echo "configure: failed program was:" >&5
2784 cat conftest.$ac_ext >&5
2785 rm -rf conftest*
2786 # Look for the header file in a standard set of common directories.
2787 # Check X11 before X11Rn because it is often a symlink to the current release.
2788 for ac_dir in \
2789 /usr/X11/include \
2790 /usr/X11R6/include \
2791 /usr/X11R5/include \
2792 /usr/X11R4/include \
2793 \
2794 /usr/include/X11 \
2795 /usr/include/X11R6 \
2796 /usr/include/X11R5 \
2797 /usr/include/X11R4 \
2798 \
2799 /usr/local/X11/include \
2800 /usr/local/X11R6/include \
2801 /usr/local/X11R5/include \
2802 /usr/local/X11R4/include \
2803 \
2804 /usr/local/include/X11 \
2805 /usr/local/include/X11R6 \
2806 /usr/local/include/X11R5 \
2807 /usr/local/include/X11R4 \
2808 \
2809 /usr/X386/include \
2810 /usr/x386/include \
2811 /usr/XFree86/include/X11 \
2812 \
2813 /usr/include \
2814 /usr/local/include \
2815 /usr/unsupported/include \
2816 /usr/athena/include \
2817 /usr/local/x11r5/include \
2818 /usr/lpp/Xamples/include \
2819 \
2820 /usr/openwin/include \
2821 /usr/openwin/share/include \
2822 ; \
2823 do
2824 if test -r "$ac_dir/$x_direct_test_include"; then
2825 ac_x_includes=$ac_dir
2826 break
2827 fi
2828 done
2829 fi
2830 rm -f conftest*
2831 fi # $ac_x_includes = NO
2832
2833 if test "$ac_x_libraries" = NO; then
2834 # Check for the libraries.
2835
2836 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2837 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2838
2839 # See if we find them without any special options.
2840 # Don't add to $LIBS permanently.
2841 ac_save_LIBS="$LIBS"
2842 LIBS="-l$x_direct_test_library $LIBS"
2843 cat > conftest.$ac_ext <<EOF
2844 #line 2845 "configure"
2845 #include "confdefs.h"
2846
2847 int main() {
2848 ${x_direct_test_function}()
2849 ; return 0; }
2850 EOF
2851 if { (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2852 rm -rf conftest*
2853 LIBS="$ac_save_LIBS"
2854 # We can link X programs with no special library path.
2855 ac_x_libraries=
2856 else
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 LIBS="$ac_save_LIBS"
2861 # First see if replacing the include by lib works.
2862 # Check X11 before X11Rn because it is often a symlink to the current release.
2863 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2864 /usr/X11/lib \
2865 /usr/X11R6/lib \
2866 /usr/X11R5/lib \
2867 /usr/X11R4/lib \
2868 \
2869 /usr/lib/X11 \
2870 /usr/lib/X11R6 \
2871 /usr/lib/X11R5 \
2872 /usr/lib/X11R4 \
2873 \
2874 /usr/local/X11/lib \
2875 /usr/local/X11R6/lib \
2876 /usr/local/X11R5/lib \
2877 /usr/local/X11R4/lib \
2878 \
2879 /usr/local/lib/X11 \
2880 /usr/local/lib/X11R6 \
2881 /usr/local/lib/X11R5 \
2882 /usr/local/lib/X11R4 \
2883 \
2884 /usr/X386/lib \
2885 /usr/x386/lib \
2886 /usr/XFree86/lib/X11 \
2887 \
2888 /usr/lib \
2889 /usr/local/lib \
2890 /usr/unsupported/lib \
2891 /usr/athena/lib \
2892 /usr/local/x11r5/lib \
2893 /usr/lpp/Xamples/lib \
2894 /lib/usr/lib/X11 \
2895 \
2896 /usr/openwin/lib \
2897 /usr/openwin/share/lib \
2898 ; \
2899 do
2900 for ac_extension in a so sl; do
2901 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2902 ac_x_libraries=$ac_dir
2903 break 2
2904 fi
2905 done
2906 done
2907 fi
2908 rm -f conftest*
2909 fi # $ac_x_libraries = NO
2910
2911 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2912 # Didn't find X anywhere. Cache the known absence of X.
2913 ac_cv_have_x="have_x=no"
2914 else
2915 # Record where we found X for the cache.
2916 ac_cv_have_x="have_x=yes \
2917 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2918 fi
2919 fi
2920 fi
2921 eval "$ac_cv_have_x"
2922 fi # $with_x != no
2923
2924 if test "$have_x" != yes; then
2925 echo "$ac_t""$have_x" 1>&6
2926 no_x=yes
2927 else
2928 # If each of the values was on the command line, it overrides each guess.
2929 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2930 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2931 # Update the cache value to reflect the command line values.
2932 ac_cv_have_x="have_x=yes \
2933 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2934 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2935 fi
2936
2937 if test "$no_x" = yes; then
2938 # Not all programs may use this symbol, but it does not hurt to define it.
2939 cat >> confdefs.h <<\EOF
2940 #define X_DISPLAY_MISSING 1
2941 EOF
2942
2943 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2944 else
2945 if test -n "$x_includes"; then
2946 X_CFLAGS="$X_CFLAGS -I$x_includes"
2947 fi
2948
2949 # It would also be nice to do this for all -L options, not just this one.
2950 if test -n "$x_libraries"; then
2951 X_LIBS="$X_LIBS -L$x_libraries"
2952 # For Solaris; some versions of Sun CC require a space after -R and
2953 # others require no space. Words are not sufficient . . . .
2954 case "`(uname -sr) 2>/dev/null`" in
2955 "SunOS 5"*)
2956 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2957 echo "configure:2958: checking whether -R must be followed by a space" >&5
2958 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2959 cat > conftest.$ac_ext <<EOF
2960 #line 2961 "configure"
2961 #include "confdefs.h"
2962
2963 int main() {
2964
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2968 rm -rf conftest*
2969 ac_R_nospace=yes
2970 else
2971 echo "configure: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 rm -rf conftest*
2974 ac_R_nospace=no
2975 fi
2976 rm -f conftest*
2977 if test $ac_R_nospace = yes; then
2978 echo "$ac_t""no" 1>&6
2979 X_LIBS="$X_LIBS -R$x_libraries"
2980 else
2981 LIBS="$ac_xsave_LIBS -R $x_libraries"
2982 cat > conftest.$ac_ext <<EOF
2983 #line 2984 "configure"
2984 #include "confdefs.h"
2985
2986 int main() {
2987
2988 ; return 0; }
2989 EOF
2990 if { (eval echo configure:2991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2991 rm -rf conftest*
2992 ac_R_space=yes
2993 else
2994 echo "configure: failed program was:" >&5
2995 cat conftest.$ac_ext >&5
2996 rm -rf conftest*
2997 ac_R_space=no
2998 fi
2999 rm -f conftest*
3000 if test $ac_R_space = yes; then
3001 echo "$ac_t""yes" 1>&6
3002 X_LIBS="$X_LIBS -R $x_libraries"
3003 else
3004 echo "$ac_t""neither works" 1>&6
3005 fi
3006 fi
3007 LIBS="$ac_xsave_LIBS"
3008 esac
3009 fi
3010
3011 # Check for system-dependent libraries X programs must link with.
3012 # Do this before checking for the system-independent R6 libraries
3013 # (-lICE), since we may need -lsocket or whatever for X linking.
3014
3015 if test "$ISC" = yes; then
3016 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3017 else
3018 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3019 # libraries were built with DECnet support. And karl@cs.umb.edu says
3020 # the Alpha needs dnet_stub (dnet does not exist).
3021 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3022 echo "configure:3023: checking for dnet_ntoa in -ldnet" >&5
3023 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3025 echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027 ac_save_LIBS="$LIBS"
3028 LIBS="-ldnet $LIBS"
3029 cat > conftest.$ac_ext <<EOF
3030 #line 3031 "configure"
3031 #include "confdefs.h"
3032 /* Override any gcc2 internal prototype to avoid an error. */
3033 /* We use char because int might match the return type of a gcc2
3034 builtin and then its argument prototype would still apply. */
3035 char dnet_ntoa();
3036
3037 int main() {
3038 dnet_ntoa()
3039 ; return 0; }
3040 EOF
3041 if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3042 rm -rf conftest*
3043 eval "ac_cv_lib_$ac_lib_var=yes"
3044 else
3045 echo "configure: failed program was:" >&5
3046 cat conftest.$ac_ext >&5
3047 rm -rf conftest*
3048 eval "ac_cv_lib_$ac_lib_var=no"
3049 fi
3050 rm -f conftest*
3051 LIBS="$ac_save_LIBS"
3052
3053 fi
3054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3055 echo "$ac_t""yes" 1>&6
3056 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3057 else
3058 echo "$ac_t""no" 1>&6
3059 fi
3060
3061 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3062 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3063 echo "configure:3064: checking for dnet_ntoa in -ldnet_stub" >&5
3064 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3066 echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068 ac_save_LIBS="$LIBS"
3069 LIBS="-ldnet_stub $LIBS"
3070 cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 /* Override any gcc2 internal prototype to avoid an error. */
3074 /* We use char because int might match the return type of a gcc2
3075 builtin and then its argument prototype would still apply. */
3076 char dnet_ntoa();
3077
3078 int main() {
3079 dnet_ntoa()
3080 ; return 0; }
3081 EOF
3082 if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3083 rm -rf conftest*
3084 eval "ac_cv_lib_$ac_lib_var=yes"
3085 else
3086 echo "configure: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 rm -rf conftest*
3089 eval "ac_cv_lib_$ac_lib_var=no"
3090 fi
3091 rm -f conftest*
3092 LIBS="$ac_save_LIBS"
3093
3094 fi
3095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3096 echo "$ac_t""yes" 1>&6
3097 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3098 else
3099 echo "$ac_t""no" 1>&6
3100 fi
3101
3102 fi
3103
3104 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3105 # to get the SysV transport functions.
3106 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3107 # needs -lnsl.
3108 # The nsl library prevents programs from opening the X display
3109 # on Irix 5.2, according to dickey@clark.net.
3110 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3111 echo "configure:3112: checking for gethostbyname" >&5
3112 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3113 echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115 cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118 /* System header to define __stub macros and hopefully few prototypes,
3119 which can conflict with char gethostbyname(); below. */
3120 #include <assert.h>
3121 /* Override any gcc2 internal prototype to avoid an error. */
3122 /* We use char because int might match the return type of a gcc2
3123 builtin and then its argument prototype would still apply. */
3124 char gethostbyname();
3125
3126 int main() {
3127
3128 /* The GNU C library defines this for functions which it implements
3129 to always fail with ENOSYS. Some functions are actually named
3130 something starting with __ and the normal name is an alias. */
3131 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3132 choke me
3133 #else
3134 gethostbyname();
3135 #endif
3136
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3140 rm -rf conftest*
3141 eval "ac_cv_func_gethostbyname=yes"
3142 else
3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3145 rm -rf conftest*
3146 eval "ac_cv_func_gethostbyname=no"
3147 fi
3148 rm -f conftest*
3149 fi
3150
3151 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3152 echo "$ac_t""yes" 1>&6
3153 :
3154 else
3155 echo "$ac_t""no" 1>&6
3156 fi
3157
3158 if test $ac_cv_func_gethostbyname = no; then
3159 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3160 echo "configure:3161: checking for gethostbyname in -lnsl" >&5
3161 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3163 echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165 ac_save_LIBS="$LIBS"
3166 LIBS="-lnsl $LIBS"
3167 cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 /* Override any gcc2 internal prototype to avoid an error. */
3171 /* We use char because int might match the return type of a gcc2
3172 builtin and then its argument prototype would still apply. */
3173 char gethostbyname();
3174
3175 int main() {
3176 gethostbyname()
3177 ; return 0; }
3178 EOF
3179 if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3180 rm -rf conftest*
3181 eval "ac_cv_lib_$ac_lib_var=yes"
3182 else
3183 echo "configure: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3185 rm -rf conftest*
3186 eval "ac_cv_lib_$ac_lib_var=no"
3187 fi
3188 rm -f conftest*
3189 LIBS="$ac_save_LIBS"
3190
3191 fi
3192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3193 echo "$ac_t""yes" 1>&6
3194 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3195 else
3196 echo "$ac_t""no" 1>&6
3197 fi
3198
3199 fi
3200
3201 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3202 # socket/setsockopt and other routines are undefined under SCO ODT
3203 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3204 # on later versions), says simon@lia.di.epfl.ch: it contains
3205 # gethostby* variants that don't use the nameserver (or something).
3206 # -lsocket must be given before -lnsl if both are needed.
3207 # We assume that if connect needs -lnsl, so does gethostbyname.
3208 echo $ac_n "checking for connect""... $ac_c" 1>&6
3209 echo "configure:3210: checking for connect" >&5
3210 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3211 echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213 cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 /* System header to define __stub macros and hopefully few prototypes,
3217 which can conflict with char connect(); below. */
3218 #include <assert.h>
3219 /* Override any gcc2 internal prototype to avoid an error. */
3220 /* We use char because int might match the return type of a gcc2
3221 builtin and then its argument prototype would still apply. */
3222 char connect();
3223
3224 int main() {
3225
3226 /* The GNU C library defines this for functions which it implements
3227 to always fail with ENOSYS. Some functions are actually named
3228 something starting with __ and the normal name is an alias. */
3229 #if defined (__stub_connect) || defined (__stub___connect)
3230 choke me
3231 #else
3232 connect();
3233 #endif
3234
3235 ; return 0; }
3236 EOF
3237 if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3238 rm -rf conftest*
3239 eval "ac_cv_func_connect=yes"
3240 else
3241 echo "configure: failed program was:" >&5
3242 cat conftest.$ac_ext >&5
3243 rm -rf conftest*
3244 eval "ac_cv_func_connect=no"
3245 fi
3246 rm -f conftest*
3247 fi
3248
3249 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3250 echo "$ac_t""yes" 1>&6
3251 :
3252 else
3253 echo "$ac_t""no" 1>&6
3254 fi
3255
3256 if test $ac_cv_func_connect = no; then
3257 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3258 echo "configure:3259: checking for connect in -lsocket" >&5
3259 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3261 echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263 ac_save_LIBS="$LIBS"
3264 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 /* Override any gcc2 internal prototype to avoid an error. */
3269 /* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3271 char connect();
3272
3273 int main() {
3274 connect()
3275 ; return 0; }
3276 EOF
3277 if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3278 rm -rf conftest*
3279 eval "ac_cv_lib_$ac_lib_var=yes"
3280 else
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3283 rm -rf conftest*
3284 eval "ac_cv_lib_$ac_lib_var=no"
3285 fi
3286 rm -f conftest*
3287 LIBS="$ac_save_LIBS"
3288
3289 fi
3290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3291 echo "$ac_t""yes" 1>&6
3292 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3293 else
3294 echo "$ac_t""no" 1>&6
3295 fi
3296
3297 fi
3298
3299 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3300 echo $ac_n "checking for remove""... $ac_c" 1>&6
3301 echo "configure:3302: checking for remove" >&5
3302 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3303 echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 /* System header to define __stub macros and hopefully few prototypes,
3309 which can conflict with char remove(); below. */
3310 #include <assert.h>
3311 /* Override any gcc2 internal prototype to avoid an error. */
3312 /* We use char because int might match the return type of a gcc2
3313 builtin and then its argument prototype would still apply. */
3314 char remove();
3315
3316 int main() {
3317
3318 /* The GNU C library defines this for functions which it implements
3319 to always fail with ENOSYS. Some functions are actually named
3320 something starting with __ and the normal name is an alias. */
3321 #if defined (__stub_remove) || defined (__stub___remove)
3322 choke me
3323 #else
3324 remove();
3325 #endif
3326
3327 ; return 0; }
3328 EOF
3329 if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3330 rm -rf conftest*
3331 eval "ac_cv_func_remove=yes"
3332 else
3333 echo "configure: failed program was:" >&5
3334 cat conftest.$ac_ext >&5
3335 rm -rf conftest*
3336 eval "ac_cv_func_remove=no"
3337 fi
3338 rm -f conftest*
3339 fi
3340
3341 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3342 echo "$ac_t""yes" 1>&6
3343 :
3344 else
3345 echo "$ac_t""no" 1>&6
3346 fi
3347
3348 if test $ac_cv_func_remove = no; then
3349 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3350 echo "configure:3351: checking for remove in -lposix" >&5
3351 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3352 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3353 echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355 ac_save_LIBS="$LIBS"
3356 LIBS="-lposix $LIBS"
3357 cat > conftest.$ac_ext <<EOF
3358 #line 3359 "configure"
3359 #include "confdefs.h"
3360 /* Override any gcc2 internal prototype to avoid an error. */
3361 /* We use char because int might match the return type of a gcc2
3362 builtin and then its argument prototype would still apply. */
3363 char remove();
3364
3365 int main() {
3366 remove()
3367 ; return 0; }
3368 EOF
3369 if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3370 rm -rf conftest*
3371 eval "ac_cv_lib_$ac_lib_var=yes"
3372 else
3373 echo "configure: failed program was:" >&5
3374 cat conftest.$ac_ext >&5
3375 rm -rf conftest*
3376 eval "ac_cv_lib_$ac_lib_var=no"
3377 fi
3378 rm -f conftest*
3379 LIBS="$ac_save_LIBS"
3380
3381 fi
3382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3383 echo "$ac_t""yes" 1>&6
3384 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3385 else
3386 echo "$ac_t""no" 1>&6
3387 fi
3388
3389 fi
3390
3391 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3392 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3393 echo "configure:3394: checking for shmat" >&5
3394 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3395 echo $ac_n "(cached) $ac_c" 1>&6
3396 else
3397 cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 /* System header to define __stub macros and hopefully few prototypes,
3401 which can conflict with char shmat(); below. */
3402 #include <assert.h>
3403 /* Override any gcc2 internal prototype to avoid an error. */
3404 /* We use char because int might match the return type of a gcc2
3405 builtin and then its argument prototype would still apply. */
3406 char shmat();
3407
3408 int main() {
3409
3410 /* The GNU C library defines this for functions which it implements
3411 to always fail with ENOSYS. Some functions are actually named
3412 something starting with __ and the normal name is an alias. */
3413 #if defined (__stub_shmat) || defined (__stub___shmat)
3414 choke me
3415 #else
3416 shmat();
3417 #endif
3418
3419 ; return 0; }
3420 EOF
3421 if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3422 rm -rf conftest*
3423 eval "ac_cv_func_shmat=yes"
3424 else
3425 echo "configure: failed program was:" >&5
3426 cat conftest.$ac_ext >&5
3427 rm -rf conftest*
3428 eval "ac_cv_func_shmat=no"
3429 fi
3430 rm -f conftest*
3431 fi
3432
3433 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3434 echo "$ac_t""yes" 1>&6
3435 :
3436 else
3437 echo "$ac_t""no" 1>&6
3438 fi
3439
3440 if test $ac_cv_func_shmat = no; then
3441 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3442 echo "configure:3443: checking for shmat in -lipc" >&5
3443 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3445 echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447 ac_save_LIBS="$LIBS"
3448 LIBS="-lipc $LIBS"
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 /* Override any gcc2 internal prototype to avoid an error. */
3453 /* We use char because int might match the return type of a gcc2
3454 builtin and then its argument prototype would still apply. */
3455 char shmat();
3456
3457 int main() {
3458 shmat()
3459 ; return 0; }
3460 EOF
3461 if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3462 rm -rf conftest*
3463 eval "ac_cv_lib_$ac_lib_var=yes"
3464 else
3465 echo "configure: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3467 rm -rf conftest*
3468 eval "ac_cv_lib_$ac_lib_var=no"
3469 fi
3470 rm -f conftest*
3471 LIBS="$ac_save_LIBS"
3472
3473 fi
3474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3475 echo "$ac_t""yes" 1>&6
3476 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3477 else
3478 echo "$ac_t""no" 1>&6
3479 fi
3480
3481 fi
3482 fi
3483
3484 # Check for libraries that X11R6 Xt/Xaw programs need.
3485 ac_save_LDFLAGS="$LDFLAGS"
3486 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3487 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3488 # check for ICE first), but we must link in the order -lSM -lICE or
3489 # we get undefined symbols. So assume we have SM if we have ICE.
3490 # These have to be linked with before -lX11, unlike the other
3491 # libraries we check for below, so use a different variable.
3492 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3493 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3494 echo "configure:3495: checking for IceConnectionNumber in -lICE" >&5
3495 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3497 echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499 ac_save_LIBS="$LIBS"
3500 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3501 cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 /* Override any gcc2 internal prototype to avoid an error. */
3505 /* We use char because int might match the return type of a gcc2
3506 builtin and then its argument prototype would still apply. */
3507 char IceConnectionNumber();
3508
3509 int main() {
3510 IceConnectionNumber()
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514 rm -rf conftest*
3515 eval "ac_cv_lib_$ac_lib_var=yes"
3516 else
3517 echo "configure: failed program was:" >&5
3518 cat conftest.$ac_ext >&5
3519 rm -rf conftest*
3520 eval "ac_cv_lib_$ac_lib_var=no"
3521 fi
3522 rm -f conftest*
3523 LIBS="$ac_save_LIBS"
3524
3525 fi
3526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3527 echo "$ac_t""yes" 1>&6
3528 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3529 else
3530 echo "$ac_t""no" 1>&6
3531 fi
3532
3533 LDFLAGS="$ac_save_LDFLAGS"
3534
3535 fi
3536
3537 for ac_prog in tclsh
3538 do
3539 # Extract the first word of "$ac_prog", so it can be a program name with args.
3540 set dummy $ac_prog; ac_word=$2
3541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3542 echo "configure:3543: checking for $ac_word" >&5
3543 if eval "test \"`echo '$''{'ac_cv_prog_TCLSH'+set}'`\" = set"; then
3544 echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546 if test -n "$TCLSH"; then
3547 ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test.
3548 else
3549 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3550 ac_dummy="$PATH"
3551 for ac_dir in $ac_dummy; do
3552 test -z "$ac_dir" && ac_dir=.
3553 if test -f $ac_dir/$ac_word; then
3554 ac_cv_prog_TCLSH="$ac_prog"
3555 break
3556 fi
3557 done
3558 IFS="$ac_save_ifs"
3559 fi
3560 fi
3561 TCLSH="$ac_cv_prog_TCLSH"
3562 if test -n "$TCLSH"; then
3563 echo "$ac_t""$TCLSH" 1>&6
3564 else
3565 echo "$ac_t""no" 1>&6
3566 fi
3567
3568 test -n "$TCLSH" && break
3569 done
3570 test -n "$TCLSH" || TCLSH="false"
3571
3572 if test "$TCLSH" != false; then
3573 ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
3574 echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
3575 echo "configure:3576: checking for tcl.h" >&5
3576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3577 echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <tcl.h>
3583 EOF
3584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3585 { (eval echo configure:3586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3587 if test -z "$ac_err"; then
3588 rm -rf conftest*
3589 eval "ac_cv_header_$ac_safe=yes"
3590 else
3591 echo "$ac_err" >&5
3592 echo "configure: failed program was:" >&5
3593 cat conftest.$ac_ext >&5
3594 rm -rf conftest*
3595 eval "ac_cv_header_$ac_safe=no"
3596 fi
3597 rm -f conftest*
3598 fi
3599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3600 echo "$ac_t""yes" 1>&6
3601 echo $ac_n "checking for ldopen in -lld""... $ac_c" 1>&6
3602 echo "configure:3603: checking for ldopen in -lld" >&5
3603 ac_lib_var=`echo ld'_'ldopen | sed 'y%./+-%__p_%'`
3604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607 ac_save_LIBS="$LIBS"
3608 LIBS="-lld $LIBS"
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 /* Override any gcc2 internal prototype to avoid an error. */
3613 /* We use char because int might match the return type of a gcc2
3614 builtin and then its argument prototype would still apply. */
3615 char ldopen();
3616
3617 int main() {
3618 ldopen()
3619 ; return 0; }
3620 EOF
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3622 rm -rf conftest*
3623 eval "ac_cv_lib_$ac_lib_var=yes"
3624 else
3625 echo "configure: failed program was:" >&5
3626 cat conftest.$ac_ext >&5
3627 rm -rf conftest*
3628 eval "ac_cv_lib_$ac_lib_var=no"
3629 fi
3630 rm -f conftest*
3631 LIBS="$ac_save_LIBS"
3632
3633 fi
3634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3635 echo "$ac_t""yes" 1>&6
3636 TCLOTHERLIBS=-lld
3637 else
3638 echo "$ac_t""no" 1>&6
3639 fi
3640
3641 echo $ac_n "checking for Tcl_CreateInterp in -ltcl""... $ac_c" 1>&6
3642 echo "configure:3643: checking for Tcl_CreateInterp in -ltcl" >&5
3643 ac_lib_var=`echo tcl'_'Tcl_CreateInterp | sed 'y%./+-%__p_%'`
3644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3645 echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647 ac_save_LIBS="$LIBS"
3648 LIBS="-ltcl $TCLOTHERLIBS -lm $LIBS"
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 /* Override any gcc2 internal prototype to avoid an error. */
3653 /* We use char because int might match the return type of a gcc2
3654 builtin and then its argument prototype would still apply. */
3655 char Tcl_CreateInterp();
3656
3657 int main() {
3658 Tcl_CreateInterp()
3659 ; return 0; }
3660 EOF
3661 if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3662 rm -rf conftest*
3663 eval "ac_cv_lib_$ac_lib_var=yes"
3664 else
3665 echo "configure: failed program was:" >&5
3666 cat conftest.$ac_ext >&5
3667 rm -rf conftest*
3668 eval "ac_cv_lib_$ac_lib_var=no"
3669 fi
3670 rm -f conftest*
3671 LIBS="$ac_save_LIBS"
3672
3673 fi
3674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3675 echo "$ac_t""yes" 1>&6
3676 saveCFLAGS="$CFLAGS"
3677 CFLAGS="$CFLAGS $X_CFLAGS"
3678 echo $ac_n "checking for Tk_CreateWindow in -ltk""... $ac_c" 1>&6
3679 echo "configure:3680: checking for Tk_CreateWindow in -ltk" >&5
3680 ac_lib_var=`echo tk'_'Tk_CreateWindow | sed 'y%./+-%__p_%'`
3681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3682 echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684 ac_save_LIBS="$LIBS"
3685 LIBS="-ltk -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
3686 cat > conftest.$ac_ext <<EOF
3687 #line 3688 "configure"
3688 #include "confdefs.h"
3689 /* Override any gcc2 internal prototype to avoid an error. */
3690 /* We use char because int might match the return type of a gcc2
3691 builtin and then its argument prototype would still apply. */
3692 char Tk_CreateWindow();
3693
3694 int main() {
3695 Tk_CreateWindow()
3696 ; return 0; }
3697 EOF
3698 if { (eval echo configure:3699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3699 rm -rf conftest*
3700 eval "ac_cv_lib_$ac_lib_var=yes"
3701 else
3702 echo "configure: failed program was:" >&5
3703 cat conftest.$ac_ext >&5
3704 rm -rf conftest*
3705 eval "ac_cv_lib_$ac_lib_var=no"
3706 fi
3707 rm -f conftest*
3708 LIBS="$ac_save_LIBS"
3709
3710 fi
3711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3712 echo "$ac_t""yes" 1>&6
3713 cat >> confdefs.h <<\EOF
3714 #define HAVE_TCL 1
3715 EOF
3716
3717 TCLLIBS="-ltk -ltcl $TCLOTHERLIBS"
3718 ac_ext=C
3719 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3720 ac_cpp='$CXXCPP $CPPFLAGS'
3721 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3722 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3723 cross_compiling=$ac_cv_prog_cxx_cross
3724
3725 echo $ac_n "checking for Tree_Init in -lTkTree""... $ac_c" 1>&6
3726 echo "configure:3727: checking for Tree_Init in -lTkTree" >&5
3727 ac_lib_var=`echo TkTree'_'Tree_Init | sed 'y%./+-%__p_%'`
3728 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731 ac_save_LIBS="$LIBS"
3732 LIBS="-lTkTree -lTkTree -ltk -ltcl $TCLOTHERLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
3733 cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736 /* Override any gcc2 internal prototype to avoid an error. */
3737 #ifdef __cplusplus
3738 extern "C"
3739 #endif
3740 /* We use char because int might match the return type of a gcc2
3741 builtin and then its argument prototype would still apply. */
3742 char Tree_Init();
3743
3744 int main() {
3745 Tree_Init()
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749 rm -rf conftest*
3750 eval "ac_cv_lib_$ac_lib_var=yes"
3751 else
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3754 rm -rf conftest*
3755 eval "ac_cv_lib_$ac_lib_var=no"
3756 fi
3757 rm -f conftest*
3758 LIBS="$ac_save_LIBS"
3759
3760 fi
3761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3762 echo "$ac_t""yes" 1>&6
3763 TREELIBS="-lTkTree"
3764 else
3765 echo "$ac_t""no" 1>&6
3766 echo "$ac_t""tcl/tk libs found, but tree widget is missing" 1>&6
3767 fi
3768
3769 ac_ext=c
3770 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3771 ac_cpp='$CPP $CPPFLAGS'
3772 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3773 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3774 cross_compiling=$ac_cv_prog_cc_cross
3775
3776 else
3777 echo "$ac_t""no" 1>&6
3778 echo "$ac_t""tcl lib found, but tk lib is missing" 1>&6
3779 fi
3780
3781 CFLAGS="$saveCFLAGS"
3782 else
3783 echo "$ac_t""no" 1>&6
3784 echo "$ac_t""tcl library not found" 1>&6
3785 fi
3786
3787 else
3788 echo "$ac_t""no" 1>&6
3789 fi
3790
3791 fi
3792
3793
3794 for ac_prog in latex
3795 do
3796 # Extract the first word of "$ac_prog", so it can be a program name with args.
3797 set dummy $ac_prog; ac_word=$2
3798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $ac_word" >&5
3800 if eval "test \"`echo '$''{'ac_cv_prog_LATEX'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803 if test -n "$LATEX"; then
3804 ac_cv_prog_LATEX="$LATEX" # Let the user override the test.
3805 else
3806 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3807 ac_dummy="$PATH"
3808 for ac_dir in $ac_dummy; do
3809 test -z "$ac_dir" && ac_dir=.
3810 if test -f $ac_dir/$ac_word; then
3811 ac_cv_prog_LATEX="$ac_prog"
3812 break
3813 fi
3814 done
3815 IFS="$ac_save_ifs"
3816 fi
3817 fi
3818 LATEX="$ac_cv_prog_LATEX"
3819 if test -n "$LATEX"; then
3820 echo "$ac_t""$LATEX" 1>&6
3821 else
3822 echo "$ac_t""no" 1>&6
3823 fi
3824
3825 test -n "$LATEX" && break
3826 done
3827 test -n "$LATEX" || LATEX="false"
3828
3829 for ac_prog in bibtex
3830 do
3831 # Extract the first word of "$ac_prog", so it can be a program name with args.
3832 set dummy $ac_prog; ac_word=$2
3833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3834 echo "configure:3835: checking for $ac_word" >&5
3835 if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX'+set}'`\" = set"; then
3836 echo $ac_n "(cached) $ac_c" 1>&6
3837 else
3838 if test -n "$BIBTEX"; then
3839 ac_cv_prog_BIBTEX="$BIBTEX" # Let the user override the test.
3840 else
3841 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3842 ac_dummy="$PATH"
3843 for ac_dir in $ac_dummy; do
3844 test -z "$ac_dir" && ac_dir=.
3845 if test -f $ac_dir/$ac_word; then
3846 ac_cv_prog_BIBTEX="$ac_prog"
3847 break
3848 fi
3849 done
3850 IFS="$ac_save_ifs"
3851 fi
3852 fi
3853 BIBTEX="$ac_cv_prog_BIBTEX"
3854 if test -n "$BIBTEX"; then
3855 echo "$ac_t""$BIBTEX" 1>&6
3856 else
3857 echo "$ac_t""no" 1>&6
3858 fi
3859
3860 test -n "$BIBTEX" && break
3861 done
3862 test -n "$BIBTEX" || BIBTEX="false"
3863
3864 for ac_prog in dvips
3865 do
3866 # Extract the first word of "$ac_prog", so it can be a program name with args.
3867 set dummy $ac_prog; ac_word=$2
3868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3869 echo "configure:3870: checking for $ac_word" >&5
3870 if eval "test \"`echo '$''{'ac_cv_prog_DVIPS'+set}'`\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873 if test -n "$DVIPS"; then
3874 ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test.
3875 else
3876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3877 ac_dummy="$PATH"
3878 for ac_dir in $ac_dummy; do
3879 test -z "$ac_dir" && ac_dir=.
3880 if test -f $ac_dir/$ac_word; then
3881 ac_cv_prog_DVIPS="$ac_prog"
3882 break
3883 fi
3884 done
3885 IFS="$ac_save_ifs"
3886 fi
3887 fi
3888 DVIPS="$ac_cv_prog_DVIPS"
3889 if test -n "$DVIPS"; then
3890 echo "$ac_t""$DVIPS" 1>&6
3891 else
3892 echo "$ac_t""no" 1>&6
3893 fi
3894
3895 test -n "$DVIPS" && break
3896 done
3897 test -n "$DVIPS" || DVIPS="false"
3898
3899 for ac_prog in detex2 detex
3900 do
3901 # Extract the first word of "$ac_prog", so it can be a program name with args.
3902 set dummy $ac_prog; ac_word=$2
3903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3904 echo "configure:3905: checking for $ac_word" >&5
3905 if eval "test \"`echo '$''{'ac_cv_prog_DETEX'+set}'`\" = set"; then
3906 echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908 if test -n "$DETEX"; then
3909 ac_cv_prog_DETEX="$DETEX" # Let the user override the test.
3910 else
3911 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3912 ac_dummy="$PATH"
3913 for ac_dir in $ac_dummy; do
3914 test -z "$ac_dir" && ac_dir=.
3915 if test -f $ac_dir/$ac_word; then
3916 ac_cv_prog_DETEX="$ac_prog"
3917 break
3918 fi
3919 done
3920 IFS="$ac_save_ifs"
3921 fi
3922 fi
3923 DETEX="$ac_cv_prog_DETEX"
3924 if test -n "$DETEX"; then
3925 echo "$ac_t""$DETEX" 1>&6
3926 else
3927 echo "$ac_t""no" 1>&6
3928 fi
3929
3930 test -n "$DETEX" && break
3931 done
3932 test -n "$DETEX" || DETEX="false"
3933
3934 for ac_prog in ghostview gs
3935 do
3936 # Extract the first word of "$ac_prog", so it can be a program name with args.
3937 set dummy $ac_prog; ac_word=$2
3938 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3939 echo "configure:3940: checking for $ac_word" >&5
3940 if eval "test \"`echo '$''{'ac_cv_prog_PSPREVIEW'+set}'`\" = set"; then
3941 echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943 if test -n "$PSPREVIEW"; then
3944 ac_cv_prog_PSPREVIEW="$PSPREVIEW" # Let the user override the test.
3945 else
3946 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3947 ac_dummy="$PATH"
3948 for ac_dir in $ac_dummy; do
3949 test -z "$ac_dir" && ac_dir=.
3950 if test -f $ac_dir/$ac_word; then
3951 ac_cv_prog_PSPREVIEW="$ac_prog"
3952 break
3953 fi
3954 done
3955 IFS="$ac_save_ifs"
3956 fi
3957 fi
3958 PSPREVIEW="$ac_cv_prog_PSPREVIEW"
3959 if test -n "$PSPREVIEW"; then
3960 echo "$ac_t""$PSPREVIEW" 1>&6
3961 else
3962 echo "$ac_t""no" 1>&6
3963 fi
3964
3965 test -n "$PSPREVIEW" && break
3966 done
3967 test -n "$PSPREVIEW" || PSPREVIEW="true"
3968
3969 for ac_prog in psbook
3970 do
3971 # Extract the first word of "$ac_prog", so it can be a program name with args.
3972 set dummy $ac_prog; ac_word=$2
3973 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3974 echo "configure:3975: checking for $ac_word" >&5
3975 if eval "test \"`echo '$''{'ac_cv_prog_PSBOOK'+set}'`\" = set"; then
3976 echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978 if test -n "$PSBOOK"; then
3979 ac_cv_prog_PSBOOK="$PSBOOK" # Let the user override the test.
3980 else
3981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3982 ac_dummy="$PATH"
3983 for ac_dir in $ac_dummy; do
3984 test -z "$ac_dir" && ac_dir=.
3985 if test -f $ac_dir/$ac_word; then
3986 ac_cv_prog_PSBOOK="$ac_prog"
3987 break
3988 fi
3989 done
3990 IFS="$ac_save_ifs"
3991 fi
3992 fi
3993 PSBOOK="$ac_cv_prog_PSBOOK"
3994 if test -n "$PSBOOK"; then
3995 echo "$ac_t""$PSBOOK" 1>&6
3996 else
3997 echo "$ac_t""no" 1>&6
3998 fi
3999
4000 test -n "$PSBOOK" && break
4001 done
4002 test -n "$PSBOOK" || PSBOOK="false"
4003
4004 for ac_prog in psnup
4005 do
4006 # Extract the first word of "$ac_prog", so it can be a program name with args.
4007 set dummy $ac_prog; ac_word=$2
4008 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4009 echo "configure:4010: checking for $ac_word" >&5
4010 if eval "test \"`echo '$''{'ac_cv_prog_PSNUP'+set}'`\" = set"; then
4011 echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013 if test -n "$PSNUP"; then
4014 ac_cv_prog_PSNUP="$PSNUP" # Let the user override the test.
4015 else
4016 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4017 ac_dummy="$PATH"
4018 for ac_dir in $ac_dummy; do
4019 test -z "$ac_dir" && ac_dir=.
4020 if test -f $ac_dir/$ac_word; then
4021 ac_cv_prog_PSNUP="$ac_prog"
4022 break
4023 fi
4024 done
4025 IFS="$ac_save_ifs"
4026 fi
4027 fi
4028 PSNUP="$ac_cv_prog_PSNUP"
4029 if test -n "$PSNUP"; then
4030 echo "$ac_t""$PSNUP" 1>&6
4031 else
4032 echo "$ac_t""no" 1>&6
4033 fi
4034
4035 test -n "$PSNUP" && break
4036 done
4037 test -n "$PSNUP" || PSNUP="false"
4038
4039 for ac_prog in ispell spell
4040 do
4041 # Extract the first word of "$ac_prog", so it can be a program name with args.
4042 set dummy $ac_prog; ac_word=$2
4043 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4044 echo "configure:4045: checking for $ac_word" >&5
4045 if eval "test \"`echo '$''{'ac_cv_prog_SPELL'+set}'`\" = set"; then
4046 echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048 if test -n "$SPELL"; then
4049 ac_cv_prog_SPELL="$SPELL" # Let the user override the test.
4050 else
4051 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4052 ac_dummy="$PATH"
4053 for ac_dir in $ac_dummy; do
4054 test -z "$ac_dir" && ac_dir=.
4055 if test -f $ac_dir/$ac_word; then
4056 ac_cv_prog_SPELL="$ac_prog"
4057 break
4058 fi
4059 done
4060 IFS="$ac_save_ifs"
4061 fi
4062 fi
4063 SPELL="$ac_cv_prog_SPELL"
4064 if test -n "$SPELL"; then
4065 echo "$ac_t""$SPELL" 1>&6
4066 else
4067 echo "$ac_t""no" 1>&6
4068 fi
4069
4070 test -n "$SPELL" && break
4071 done
4072 test -n "$SPELL" || SPELL="spell"
4073
4074 trap '' 1 2 15
4075 cat > confcache <<\EOF
4076 # This file is a shell script that caches the results of configure
4077 # tests run on this system so they can be shared between configure
4078 # scripts and configure runs. It is not useful on other systems.
4079 # If it contains results you don't want to keep, you may remove or edit it.
4080 #
4081 # By default, configure uses ./config.cache as the cache file,
4082 # creating it if it does not exist already. You can give configure
4083 # the --cache-file=FILE option to use a different cache file; that is
4084 # what configure does when it calls configure scripts in
4085 # subdirectories, so they share the cache.
4086 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4087 # config.status only pays attention to the cache file if you give it the
4088 # --recheck option to rerun configure.
4089 #
4090 EOF
4091 # The following way of writing the cache mishandles newlines in values,
4092 # but we know of no workaround that is simple, portable, and efficient.
4093 # So, don't put newlines in cache variables' values.
4094 # Ultrix sh set writes to stderr and can't be redirected directly,
4095 # and sets the high bit in the cache file unless we assign to the vars.
4096 (set) 2>&1 |
4097 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4098 *ac_space=\ *)
4099 # `set' does not quote correctly, so add quotes (double-quote substitution
4100 # turns \\\\ into \\, and sed turns \\ into \).
4101 sed -n \
4102 -e "s/'/'\\\\''/g" \
4103 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4104 ;;
4105 *)
4106 # `set' quotes correctly as required by POSIX, so do not add quotes.
4107 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4108 ;;
4109 esac >> confcache
4110 if cmp -s $cache_file confcache; then
4111 :
4112 else
4113 if test -w $cache_file; then
4114 echo "updating cache $cache_file"
4115 cat confcache > $cache_file
4116 else
4117 echo "not updating unwritable cache $cache_file"
4118 fi
4119 fi
4120 rm -f confcache
4121
4122 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4123
4124 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4125 # Let make expand exec_prefix.
4126 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4127
4128 # Any assignment to VPATH causes Sun make to only execute
4129 # the first set of double-colon rules, so remove it if not needed.
4130 # If there is a colon in the path, we need to keep it.
4131 if test "x$srcdir" = x.; then
4132 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4133 fi
4134
4135 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4136
4137 DEFS=-DHAVE_CONFIG_H
4138
4139 # Without the "./", some shells look in PATH for config.status.
4140 : ${CONFIG_STATUS=./config.status}
4141
4142 echo creating $CONFIG_STATUS
4143 rm -f $CONFIG_STATUS
4144 cat > $CONFIG_STATUS <<EOF
4145 #! /bin/sh
4146 # Generated automatically by configure.
4147 # Run this file to recreate the current configuration.
4148 # This directory was configured as follows,
4149 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4150 #
4151 # $0 $ac_configure_args
4152 #
4153 # Compiler output produced by configure, useful for debugging
4154 # configure, is in ./config.log if it exists.
4155
4156 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4157 for ac_option
4158 do
4159 case "\$ac_option" in
4160 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4161 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4162 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4163 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4164 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4165 exit 0 ;;
4166 -help | --help | --hel | --he | --h)
4167 echo "\$ac_cs_usage"; exit 0 ;;
4168 *) echo "\$ac_cs_usage"; exit 1 ;;
4169 esac
4170 done
4171
4172 ac_given_srcdir=$srcdir
4173 ac_given_INSTALL="$INSTALL"
4174
4175 trap 'rm -fr `echo "makehead config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4176 EOF
4177 cat >> $CONFIG_STATUS <<EOF
4178
4179 # Protect against being on the right side of a sed subst in config.status.
4180 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4181 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4182 $ac_vpsub
4183 $extrasub
4184 s%@SHELL@%$SHELL%g
4185 s%@CFLAGS@%$CFLAGS%g
4186 s%@CPPFLAGS@%$CPPFLAGS%g
4187 s%@CXXFLAGS@%$CXXFLAGS%g
4188 s%@FFLAGS@%$FFLAGS%g
4189 s%@DEFS@%$DEFS%g
4190 s%@LDFLAGS@%$LDFLAGS%g
4191 s%@LIBS@%$LIBS%g
4192 s%@exec_prefix@%$exec_prefix%g
4193 s%@prefix@%$prefix%g
4194 s%@program_transform_name@%$program_transform_name%g
4195 s%@bindir@%$bindir%g
4196 s%@sbindir@%$sbindir%g
4197 s%@libexecdir@%$libexecdir%g
4198 s%@datadir@%$datadir%g
4199 s%@sysconfdir@%$sysconfdir%g
4200 s%@sharedstatedir@%$sharedstatedir%g
4201 s%@localstatedir@%$localstatedir%g
4202 s%@libdir@%$libdir%g
4203 s%@includedir@%$includedir%g
4204 s%@oldincludedir@%$oldincludedir%g
4205 s%@infodir@%$infodir%g
4206 s%@mandir@%$mandir%g
4207 s%@SET_MAKE@%$SET_MAKE%g
4208 s%@CC@%$CC%g
4209 s%@MKDEP_CCINC@%$MKDEP_CCINC%g
4210 s%@CPP@%$CPP%g
4211 s%@CXX@%$CXX%g
4212 s%@SNACC_NOVOLAT@%$SNACC_NOVOLAT%g
4213 s%@LEX@%$LEX%g
4214 s%@LEXLIB@%$LEXLIB%g
4215 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
4216 s%@LFLAGS@%$LFLAGS%g
4217 s%@PATCH@%$PATCH%g
4218 s%@YACC@%$YACC%g
4219 s%@MKDEP@%$MKDEP%g
4220 s%@AR@%$AR%g
4221 s%@RANLIB@%$RANLIB%g
4222 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4223 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4224 s%@INSTALL_DATA@%$INSTALL_DATA%g
4225 s%@X_CFLAGS@%$X_CFLAGS%g
4226 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4227 s%@X_LIBS@%$X_LIBS%g
4228 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4229 s%@TCLSH@%$TCLSH%g
4230 s%@TCLLIBS@%$TCLLIBS%g
4231 s%@TREELIBS@%$TREELIBS%g
4232 s%@LATEX@%$LATEX%g
4233 s%@BIBTEX@%$BIBTEX%g
4234 s%@DVIPS@%$DVIPS%g
4235 s%@DETEX@%$DETEX%g
4236 s%@PSPREVIEW@%$PSPREVIEW%g
4237 s%@PSBOOK@%$PSBOOK%g
4238 s%@PSNUP@%$PSNUP%g
4239 s%@SPELL@%$SPELL%g
4240
4241 CEOF
4242 EOF
4243
4244 cat >> $CONFIG_STATUS <<\EOF
4245
4246 # Split the substitutions into bite-sized pieces for seds with
4247 # small command number limits, like on Digital OSF/1 and HP-UX.
4248 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4249 ac_file=1 # Number of current file.
4250 ac_beg=1 # First line for current file.
4251 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4252 ac_more_lines=:
4253 ac_sed_cmds=""
4254 while $ac_more_lines; do
4255 if test $ac_beg -gt 1; then
4256 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4257 else
4258 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4259 fi
4260 if test ! -s conftest.s$ac_file; then
4261 ac_more_lines=false
4262 rm -f conftest.s$ac_file
4263 else
4264 if test -z "$ac_sed_cmds"; then
4265 ac_sed_cmds="sed -f conftest.s$ac_file"
4266 else
4267 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4268 fi
4269 ac_file=`expr $ac_file + 1`
4270 ac_beg=$ac_end
4271 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4272 fi
4273 done
4274 if test -z "$ac_sed_cmds"; then
4275 ac_sed_cmds=cat
4276 fi
4277 EOF
4278
4279 cat >> $CONFIG_STATUS <<EOF
4280
4281 CONFIG_FILES=\${CONFIG_FILES-"makehead"}
4282 EOF
4283 cat >> $CONFIG_STATUS <<\EOF
4284 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4285 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4286 case "$ac_file" in
4287 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4288 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4289 *) ac_file_in="${ac_file}.in" ;;
4290 esac
4291
4292 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4293
4294 # Remove last slash and all that follows it. Not all systems have dirname.
4295 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4296 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4297 # The file is in a subdirectory.
4298 test ! -d "$ac_dir" && mkdir "$ac_dir"
4299 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4300 # A "../" for each directory in $ac_dir_suffix.
4301 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4302 else
4303 ac_dir_suffix= ac_dots=
4304 fi
4305
4306 case "$ac_given_srcdir" in
4307 .) srcdir=.
4308 if test -z "$ac_dots"; then top_srcdir=.
4309 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4310 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4311 *) # Relative path.
4312 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4313 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4314 esac
4315
4316 case "$ac_given_INSTALL" in
4317 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4318 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4319 esac
4320
4321 echo creating "$ac_file"
4322 rm -f "$ac_file"
4323 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4324 case "$ac_file" in
4325 *Makefile*) ac_comsub="1i\\
4326 # $configure_input" ;;
4327 *) ac_comsub= ;;
4328 esac
4329
4330 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4331 sed -e "$ac_comsub
4332 s%@configure_input@%$configure_input%g
4333 s%@srcdir@%$srcdir%g
4334 s%@top_srcdir@%$top_srcdir%g
4335 s%@INSTALL@%$INSTALL%g
4336 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4337 fi; done
4338 rm -f conftest.s*
4339
4340 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4341 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4342 #
4343 # ac_d sets the value in "#define NAME VALUE" lines.
4344 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4345 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4346 ac_dC='\3'
4347 ac_dD='%g'
4348 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4349 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4350 ac_uB='\([ ]\)%\1#\2define\3'
4351 ac_uC=' '
4352 ac_uD='\4%g'
4353 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4354 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4355 ac_eB='$%\1#\2define\3'
4356 ac_eC=' '
4357 ac_eD='%g'
4358
4359 if test "${CONFIG_HEADERS+set}" != set; then
4360 EOF
4361 cat >> $CONFIG_STATUS <<EOF
4362 CONFIG_HEADERS="config.h"
4363 EOF
4364 cat >> $CONFIG_STATUS <<\EOF
4365 fi
4366 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4367 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4368 case "$ac_file" in
4369 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4370 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4371 *) ac_file_in="${ac_file}.in" ;;
4372 esac
4373
4374 echo creating $ac_file
4375
4376 rm -f conftest.frag conftest.in conftest.out
4377 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4378 cat $ac_file_inputs > conftest.in
4379
4380 EOF
4381
4382 # Transform confdefs.h into a sed script conftest.vals that substitutes
4383 # the proper values into config.h.in to produce config.h. And first:
4384 # Protect against being on the right side of a sed subst in config.status.
4385 # Protect against being in an unquoted here document in config.status.
4386 rm -f conftest.vals
4387 cat > conftest.hdr <<\EOF
4388 s/[\\&%]/\\&/g
4389 s%[\\$`]%\\&%g
4390 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4391 s%ac_d%ac_u%gp
4392 s%ac_u%ac_e%gp
4393 EOF
4394 sed -n -f conftest.hdr confdefs.h > conftest.vals
4395 rm -f conftest.hdr
4396
4397 # This sed command replaces #undef with comments. This is necessary, for
4398 # example, in the case of _POSIX_SOURCE, which is predefined and required
4399 # on some systems where configure will not decide to define it.
4400 cat >> conftest.vals <<\EOF
4401 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4402 EOF
4403
4404 # Break up conftest.vals because some shells have a limit on
4405 # the size of here documents, and old seds have small limits too.
4406
4407 rm -f conftest.tail
4408 while :
4409 do
4410 ac_lines=`grep -c . conftest.vals`
4411 # grep -c gives empty output for an empty file on some AIX systems.
4412 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4413 # Write a limited-size here document to conftest.frag.
4414 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4415 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4416 echo 'CEOF
4417 sed -f conftest.frag conftest.in > conftest.out
4418 rm -f conftest.in
4419 mv conftest.out conftest.in
4420 ' >> $CONFIG_STATUS
4421 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4422 rm -f conftest.vals
4423 mv conftest.tail conftest.vals
4424 done
4425 rm -f conftest.vals
4426
4427 cat >> $CONFIG_STATUS <<\EOF
4428 rm -f conftest.frag conftest.h
4429 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4430 cat conftest.in >> conftest.h
4431 rm -f conftest.in
4432 if cmp -s $ac_file conftest.h 2>/dev/null; then
4433 echo "$ac_file is unchanged"
4434 rm -f conftest.h
4435 else
4436 # Remove last slash and all that follows it. Not all systems have dirname.
4437 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4438 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4439 # The file is in a subdirectory.
4440 test ! -d "$ac_dir" && mkdir "$ac_dir"
4441 fi
4442 rm -f $ac_file
4443 mv conftest.h $ac_file
4444 fi
4445 fi; done
4446
4447 EOF
4448 cat >> $CONFIG_STATUS <<EOF
4449
4450 EOF
4451 cat >> $CONFIG_STATUS <<\EOF
4452 date > stamp-h
4453 exit 0
4454 EOF
4455 chmod +x $CONFIG_STATUS
4456 rm -fr confdefs* $ac_clean_files
4457 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4458