Debian Codegraph @

configure

raw
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-debug Produce an executable with debugging symbols"
16 ac_help="$ac_help
17 --enable-pedantic Enable -pedantic (and -ansi for C) when compiling"
18 ac_help="$ac_help
19 --enable-profile Produce a profiled executable"
20 ac_help="$ac_help
21 --with-x use the X Window System"
22 ac_help="$ac_help
23 --disable-sdl Disable detction and use of SDL"
24 ac_help="$ac_help
25 --with-sdl-prefix=PFX Prefix where SDL is installed (optional)"
26 ac_help="$ac_help
27 --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)"
28 ac_help="$ac_help
29 --disable-sdltest Do not try to compile and run a test SDL program"
30 ac_help="$ac_help
31 --enable-stencil-buffer Use if your hardware has a stencil buffer"
32 ac_help="$ac_help
33 --with-data-dir=PATH Default abe data directory"
34
35 # Initialize some variables set by options.
36 # The variables have the same names as the options, with
37 # dashes changed to underlines.
38 build=NONE
39 cache_file=./config.cache
40 exec_prefix=NONE
41 host=NONE
42 no_create=
43 nonopt=NONE
44 no_recursion=
45 prefix=NONE
46 program_prefix=NONE
47 program_suffix=NONE
48 program_transform_name=s,x,x,
49 silent=
50 site=
51 srcdir=
52 target=NONE
53 verbose=
54 x_includes=NONE
55 x_libraries=NONE
56 bindir='${exec_prefix}/bin'
57 sbindir='${exec_prefix}/sbin'
58 libexecdir='${exec_prefix}/libexec'
59 datadir='${prefix}/share'
60 sysconfdir='${prefix}/etc'
61 sharedstatedir='${prefix}/com'
62 localstatedir='${prefix}/var'
63 libdir='${exec_prefix}/lib'
64 includedir='${prefix}/include'
65 oldincludedir='/usr/include'
66 infodir='${prefix}/info'
67 mandir='${prefix}/man'
68
69 # Initialize some other variables.
70 subdirs=
71 MFLAGS= MAKEFLAGS=
72 SHELL=${CONFIG_SHELL-/bin/sh}
73 # Maximum number of lines to put in a shell here document.
74 ac_max_here_lines=12
75
76 ac_prev=
77 for ac_option
78 do
79
80 # If the previous option needs an argument, assign it.
81 if test -n "$ac_prev"; then
82 eval "$ac_prev=\$ac_option"
83 ac_prev=
84 continue
85 fi
86
87 case "$ac_option" in
88 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89 *) ac_optarg= ;;
90 esac
91
92 # Accept the important Cygnus configure options, so we can diagnose typos.
93
94 case "$ac_option" in
95
96 -bindir | --bindir | --bindi | --bind | --bin | --bi)
97 ac_prev=bindir ;;
98 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
99 bindir="$ac_optarg" ;;
100
101 -build | --build | --buil | --bui | --bu)
102 ac_prev=build ;;
103 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
104 build="$ac_optarg" ;;
105
106 -cache-file | --cache-file | --cache-fil | --cache-fi \
107 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
108 ac_prev=cache_file ;;
109 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
110 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
111 cache_file="$ac_optarg" ;;
112
113 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
114 ac_prev=datadir ;;
115 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
116 | --da=*)
117 datadir="$ac_optarg" ;;
118
119 -disable-* | --disable-*)
120 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
121 # Reject names that are not valid shell variable names.
122 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
123 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124 fi
125 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126 eval "enable_${ac_feature}=no" ;;
127
128 -enable-* | --enable-*)
129 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
130 # Reject names that are not valid shell variable names.
131 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
132 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133 fi
134 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135 case "$ac_option" in
136 *=*) ;;
137 *) ac_optarg=yes ;;
138 esac
139 eval "enable_${ac_feature}='$ac_optarg'" ;;
140
141 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
142 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
143 | --exec | --exe | --ex)
144 ac_prev=exec_prefix ;;
145 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
146 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
147 | --exec=* | --exe=* | --ex=*)
148 exec_prefix="$ac_optarg" ;;
149
150 -gas | --gas | --ga | --g)
151 # Obsolete; use --with-gas.
152 with_gas=yes ;;
153
154 -help | --help | --hel | --he)
155 # Omit some internal or obsolete options to make the list less imposing.
156 # This message is too long to be a string in the A/UX 3.1 sh.
157 cat << EOF
158 Usage: configure [options] [host]
159 Options: [defaults in brackets after descriptions]
160 Configuration:
161 --cache-file=FILE cache test results in FILE
162 --help print this message
163 --no-create do not create output files
164 --quiet, --silent do not print \`checking...' messages
165 --version print the version of autoconf that created configure
166 Directory and file names:
167 --prefix=PREFIX install architecture-independent files in PREFIX
168 [$ac_default_prefix]
169 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
170 [same as prefix]
171 --bindir=DIR user executables in DIR [EPREFIX/bin]
172 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
173 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
174 --datadir=DIR read-only architecture-independent data in DIR
175 [PREFIX/share]
176 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
177 --sharedstatedir=DIR modifiable architecture-independent data in DIR
178 [PREFIX/com]
179 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
180 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
181 --includedir=DIR C header files in DIR [PREFIX/include]
182 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
183 --infodir=DIR info documentation in DIR [PREFIX/info]
184 --mandir=DIR man documentation in DIR [PREFIX/man]
185 --srcdir=DIR find the sources in DIR [configure dir or ..]
186 --program-prefix=PREFIX prepend PREFIX to installed program names
187 --program-suffix=SUFFIX append SUFFIX to installed program names
188 --program-transform-name=PROGRAM
189 run sed PROGRAM on installed program names
190 EOF
191 cat << EOF
192 Host type:
193 --build=BUILD configure for building on BUILD [BUILD=HOST]
194 --host=HOST configure for HOST [guessed]
195 --target=TARGET configure for TARGET [TARGET=HOST]
196 Features and packages:
197 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
198 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
199 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
200 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
201 --x-includes=DIR X include files are in DIR
202 --x-libraries=DIR X library files are in DIR
203 EOF
204 if test -n "$ac_help"; then
205 echo "--enable and --with options recognized:$ac_help"
206 fi
207 exit 0 ;;
208
209 -host | --host | --hos | --ho)
210 ac_prev=host ;;
211 -host=* | --host=* | --hos=* | --ho=*)
212 host="$ac_optarg" ;;
213
214 -includedir | --includedir | --includedi | --included | --include \
215 | --includ | --inclu | --incl | --inc)
216 ac_prev=includedir ;;
217 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
218 | --includ=* | --inclu=* | --incl=* | --inc=*)
219 includedir="$ac_optarg" ;;
220
221 -infodir | --infodir | --infodi | --infod | --info | --inf)
222 ac_prev=infodir ;;
223 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
224 infodir="$ac_optarg" ;;
225
226 -libdir | --libdir | --libdi | --libd)
227 ac_prev=libdir ;;
228 -libdir=* | --libdir=* | --libdi=* | --libd=*)
229 libdir="$ac_optarg" ;;
230
231 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
232 | --libexe | --libex | --libe)
233 ac_prev=libexecdir ;;
234 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
235 | --libexe=* | --libex=* | --libe=*)
236 libexecdir="$ac_optarg" ;;
237
238 -localstatedir | --localstatedir | --localstatedi | --localstated \
239 | --localstate | --localstat | --localsta | --localst \
240 | --locals | --local | --loca | --loc | --lo)
241 ac_prev=localstatedir ;;
242 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
243 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
244 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
245 localstatedir="$ac_optarg" ;;
246
247 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
248 ac_prev=mandir ;;
249 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
250 mandir="$ac_optarg" ;;
251
252 -nfp | --nfp | --nf)
253 # Obsolete; use --without-fp.
254 with_fp=no ;;
255
256 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
257 | --no-cr | --no-c)
258 no_create=yes ;;
259
260 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
261 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
262 no_recursion=yes ;;
263
264 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
265 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
266 | --oldin | --oldi | --old | --ol | --o)
267 ac_prev=oldincludedir ;;
268 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
269 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
270 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
271 oldincludedir="$ac_optarg" ;;
272
273 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
274 ac_prev=prefix ;;
275 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
276 prefix="$ac_optarg" ;;
277
278 -program-prefix | --program-prefix | --program-prefi | --program-pref \
279 | --program-pre | --program-pr | --program-p)
280 ac_prev=program_prefix ;;
281 -program-prefix=* | --program-prefix=* | --program-prefi=* \
282 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
283 program_prefix="$ac_optarg" ;;
284
285 -program-suffix | --program-suffix | --program-suffi | --program-suff \
286 | --program-suf | --program-su | --program-s)
287 ac_prev=program_suffix ;;
288 -program-suffix=* | --program-suffix=* | --program-suffi=* \
289 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
290 program_suffix="$ac_optarg" ;;
291
292 -program-transform-name | --program-transform-name \
293 | --program-transform-nam | --program-transform-na \
294 | --program-transform-n | --program-transform- \
295 | --program-transform | --program-transfor \
296 | --program-transfo | --program-transf \
297 | --program-trans | --program-tran \
298 | --progr-tra | --program-tr | --program-t)
299 ac_prev=program_transform_name ;;
300 -program-transform-name=* | --program-transform-name=* \
301 | --program-transform-nam=* | --program-transform-na=* \
302 | --program-transform-n=* | --program-transform-=* \
303 | --program-transform=* | --program-transfor=* \
304 | --program-transfo=* | --program-transf=* \
305 | --program-trans=* | --program-tran=* \
306 | --progr-tra=* | --program-tr=* | --program-t=*)
307 program_transform_name="$ac_optarg" ;;
308
309 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
310 | -silent | --silent | --silen | --sile | --sil)
311 silent=yes ;;
312
313 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
314 ac_prev=sbindir ;;
315 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
316 | --sbi=* | --sb=*)
317 sbindir="$ac_optarg" ;;
318
319 -sharedstatedir | --sharedstatedir | --sharedstatedi \
320 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
321 | --sharedst | --shareds | --shared | --share | --shar \
322 | --sha | --sh)
323 ac_prev=sharedstatedir ;;
324 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
325 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
326 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
327 | --sha=* | --sh=*)
328 sharedstatedir="$ac_optarg" ;;
329
330 -site | --site | --sit)
331 ac_prev=site ;;
332 -site=* | --site=* | --sit=*)
333 site="$ac_optarg" ;;
334
335 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
336 ac_prev=srcdir ;;
337 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
338 srcdir="$ac_optarg" ;;
339
340 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
341 | --syscon | --sysco | --sysc | --sys | --sy)
342 ac_prev=sysconfdir ;;
343 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
344 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
345 sysconfdir="$ac_optarg" ;;
346
347 -target | --target | --targe | --targ | --tar | --ta | --t)
348 ac_prev=target ;;
349 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
350 target="$ac_optarg" ;;
351
352 -v | -verbose | --verbose | --verbos | --verbo | --verb)
353 verbose=yes ;;
354
355 -version | --version | --versio | --versi | --vers)
356 echo "configure generated by autoconf version 2.13"
357 exit 0 ;;
358
359 -with-* | --with-*)
360 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
361 # Reject names that are not valid shell variable names.
362 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
363 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364 fi
365 ac_package=`echo $ac_package| sed 's/-/_/g'`
366 case "$ac_option" in
367 *=*) ;;
368 *) ac_optarg=yes ;;
369 esac
370 eval "with_${ac_package}='$ac_optarg'" ;;
371
372 -without-* | --without-*)
373 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
374 # Reject names that are not valid shell variable names.
375 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
376 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377 fi
378 ac_package=`echo $ac_package| sed 's/-/_/g'`
379 eval "with_${ac_package}=no" ;;
380
381 --x)
382 # Obsolete; use --with-x.
383 with_x=yes ;;
384
385 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
386 | --x-incl | --x-inc | --x-in | --x-i)
387 ac_prev=x_includes ;;
388 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
389 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
390 x_includes="$ac_optarg" ;;
391
392 -x-libraries | --x-libraries | --x-librarie | --x-librari \
393 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
394 ac_prev=x_libraries ;;
395 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
396 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
397 x_libraries="$ac_optarg" ;;
398
399 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
400 ;;
401
402 *)
403 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
404 echo "configure: warning: $ac_option: invalid host type" 1>&2
405 fi
406 if test "x$nonopt" != xNONE; then
407 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
408 fi
409 nonopt="$ac_option"
410 ;;
411
412 esac
413 done
414
415 if test -n "$ac_prev"; then
416 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
417 fi
418
419 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
420
421 # File descriptor usage:
422 # 0 standard input
423 # 1 file creation
424 # 2 errors and warnings
425 # 3 some systems may open it to /dev/tty
426 # 4 used on the Kubota Titan
427 # 6 checking for... messages and results
428 # 5 compiler messages saved in config.log
429 if test "$silent" = yes; then
430 exec 6>/dev/null
431 else
432 exec 6>&1
433 fi
434 exec 5>./config.log
435
436 echo "\
437 This file contains any messages produced by compilers while
438 running configure, to aid debugging if configure makes a mistake.
439 " 1>&5
440
441 # Strip out --no-create and --no-recursion so they do not pile up.
442 # Also quote any args containing shell metacharacters.
443 ac_configure_args=
444 for ac_arg
445 do
446 case "$ac_arg" in
447 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
448 | --no-cr | --no-c) ;;
449 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
450 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
451 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
452 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
453 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
454 esac
455 done
456
457 # NLS nuisances.
458 # Only set these to C if already set. These must not be set unconditionally
459 # because not all systems understand e.g. LANG=C (notably SCO).
460 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
461 # Non-C LC_CTYPE values break the ctype check.
462 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
463 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
464 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
465 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
466
467 # confdefs.h avoids OS command line length limits that DEFS can exceed.
468 rm -rf conftest* confdefs.h
469 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
470 echo > confdefs.h
471
472 # A filename unique to this package, relative to the directory that
473 # configure is in, which we can look for to find out if srcdir is correct.
474 ac_unique_file=src/Common.h
475
476 # Find the source files, if location was not specified.
477 if test -z "$srcdir"; then
478 ac_srcdir_defaulted=yes
479 # Try the directory containing this script, then its parent.
480 ac_prog=$0
481 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
482 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
483 srcdir=$ac_confdir
484 if test ! -r $srcdir/$ac_unique_file; then
485 srcdir=..
486 fi
487 else
488 ac_srcdir_defaulted=no
489 fi
490 if test ! -r $srcdir/$ac_unique_file; then
491 if test "$ac_srcdir_defaulted" = yes; then
492 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
493 else
494 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
495 fi
496 fi
497 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
498
499 # Prefer explicitly selected file to automatically selected ones.
500 if test -z "$CONFIG_SITE"; then
501 if test "x$prefix" != xNONE; then
502 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
503 else
504 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
505 fi
506 fi
507 for ac_site_file in $CONFIG_SITE; do
508 if test -r "$ac_site_file"; then
509 echo "loading site script $ac_site_file"
510 . "$ac_site_file"
511 fi
512 done
513
514 if test -r "$cache_file"; then
515 echo "loading cache $cache_file"
516 . $cache_file
517 else
518 echo "creating cache $cache_file"
519 > $cache_file
520 fi
521
522 ac_ext=c
523 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
524 ac_cpp='$CPP $CPPFLAGS'
525 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
526 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
527 cross_compiling=$ac_cv_prog_cc_cross
528
529 ac_exeext=
530 ac_objext=o
531 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
532 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
533 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
534 ac_n= ac_c='
535 ' ac_t=' '
536 else
537 ac_n=-n ac_c= ac_t=
538 fi
539 else
540 ac_n= ac_c='\c' ac_t=
541 fi
542
543
544 ac_aux_dir=
545 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
546 if test -f $ac_dir/install-sh; then
547 ac_aux_dir=$ac_dir
548 ac_install_sh="$ac_aux_dir/install-sh -c"
549 break
550 elif test -f $ac_dir/install.sh; then
551 ac_aux_dir=$ac_dir
552 ac_install_sh="$ac_aux_dir/install.sh -c"
553 break
554 fi
555 done
556 if test -z "$ac_aux_dir"; then
557 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
558 fi
559 ac_config_guess=$ac_aux_dir/config.guess
560 ac_config_sub=$ac_aux_dir/config.sub
561 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
562
563 am__api_version="1.4"
564 # Find a good install program. We prefer a C program (faster),
565 # so one script is as good as another. But avoid the broken or
566 # incompatible versions:
567 # SysV /etc/install, /usr/sbin/install
568 # SunOS /usr/etc/install
569 # IRIX /sbin/install
570 # AIX /bin/install
571 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
572 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
573 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
574 # ./install, which can be erroneously created by make from ./install.sh.
575 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
576 echo "configure:577: checking for a BSD compatible install" >&5
577 if test -z "$INSTALL"; then
578 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
579 echo $ac_n "(cached) $ac_c" 1>&6
580 else
581 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
582 for ac_dir in $PATH; do
583 # Account for people who put trailing slashes in PATH elements.
584 case "$ac_dir/" in
585 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
586 *)
587 # OSF1 and SCO ODT 3.0 have their own names for install.
588 # Don't use installbsd from OSF since it installs stuff as root
589 # by default.
590 for ac_prog in ginstall scoinst install; do
591 if test -f $ac_dir/$ac_prog; then
592 if test $ac_prog = install &&
593 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
594 # AIX install. It has an incompatible calling convention.
595 :
596 else
597 ac_cv_path_install="$ac_dir/$ac_prog -c"
598 break 2
599 fi
600 fi
601 done
602 ;;
603 esac
604 done
605 IFS="$ac_save_IFS"
606
607 fi
608 if test "${ac_cv_path_install+set}" = set; then
609 INSTALL="$ac_cv_path_install"
610 else
611 # As a last resort, use the slow shell script. We don't cache a
612 # path for INSTALL within a source directory, because that will
613 # break other packages using the cache if that directory is
614 # removed, or if the path is relative.
615 INSTALL="$ac_install_sh"
616 fi
617 fi
618 echo "$ac_t""$INSTALL" 1>&6
619
620 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
621 # It thinks the first close brace ends the variable substitution.
622 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
623
624 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
625
626 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
627
628 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
629 echo "configure:630: checking whether build environment is sane" >&5
630 # Just in case
631 sleep 1
632 echo timestamp > conftestfile
633 # Do `set' in a subshell so we don't clobber the current shell's
634 # arguments. Must try -L first in case configure is actually a
635 # symlink; some systems play weird games with the mod time of symlinks
636 # (eg FreeBSD returns the mod time of the symlink's containing
637 # directory).
638 if (
639 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
640 if test "$*" = "X"; then
641 # -L didn't work.
642 set X `ls -t $srcdir/configure conftestfile`
643 fi
644 if test "$*" != "X $srcdir/configure conftestfile" \
645 && test "$*" != "X conftestfile $srcdir/configure"; then
646
647 # If neither matched, then we have a broken ls. This can happen
648 # if, for instance, CONFIG_SHELL is bash and it inherits a
649 # broken ls alias from the environment. This has actually
650 # happened. Such a system could not be considered "sane".
651 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
652 alias in your environment" 1>&2; exit 1; }
653 fi
654
655 test "$2" = conftestfile
656 )
657 then
658 # Ok.
659 :
660 else
661 { echo "configure: error: newly created file is older than distributed files!
662 Check your system clock" 1>&2; exit 1; }
663 fi
664 rm -f conftest*
665 echo "$ac_t""yes" 1>&6
666 if test "$program_transform_name" = s,x,x,; then
667 program_transform_name=
668 else
669 # Double any \ or $. echo might interpret backslashes.
670 cat <<\EOF_SED > conftestsed
671 s,\\,\\\\,g; s,\$,$$,g
672 EOF_SED
673 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
674 rm -f conftestsed
675 fi
676 test "$program_prefix" != NONE &&
677 program_transform_name="s,^,${program_prefix},; $program_transform_name"
678 # Use a double $ so make ignores it.
679 test "$program_suffix" != NONE &&
680 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
681
682 # sed with no file args requires a program.
683 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
684
685 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
686 echo "configure:687: checking whether ${MAKE-make} sets \${MAKE}" >&5
687 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
688 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
689 echo $ac_n "(cached) $ac_c" 1>&6
690 else
691 cat > conftestmake <<\EOF
692 all:
693 @echo 'ac_maketemp="${MAKE}"'
694 EOF
695 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
696 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
697 if test -n "$ac_maketemp"; then
698 eval ac_cv_prog_make_${ac_make}_set=yes
699 else
700 eval ac_cv_prog_make_${ac_make}_set=no
701 fi
702 rm -f conftestmake
703 fi
704 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
705 echo "$ac_t""yes" 1>&6
706 SET_MAKE=
707 else
708 echo "$ac_t""no" 1>&6
709 SET_MAKE="MAKE=${MAKE-make}"
710 fi
711
712
713 PACKAGE=abe
714
715 VERSION="0.61"
716
717 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
718 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
719 fi
720 cat >> confdefs.h <<EOF
721 #define PACKAGE "$PACKAGE"
722 EOF
723
724 cat >> confdefs.h <<EOF
725 #define VERSION "$VERSION"
726 EOF
727
728
729
730 missing_dir=`cd $ac_aux_dir && pwd`
731 echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
732 echo "configure:733: checking for working aclocal-${am__api_version}" >&5
733 # Run test in a subshell; some versions of sh will print an error if
734 # an executable is not found, even if stderr is redirected.
735 # Redirect stdin to placate older versions of autoconf. Sigh.
736 if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
737 ACLOCAL=aclocal-${am__api_version}
738 echo "$ac_t""found" 1>&6
739 else
740 ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
741 echo "$ac_t""missing" 1>&6
742 fi
743
744 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
745 echo "configure:746: checking for working autoconf" >&5
746 # Run test in a subshell; some versions of sh will print an error if
747 # an executable is not found, even if stderr is redirected.
748 # Redirect stdin to placate older versions of autoconf. Sigh.
749 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
750 AUTOCONF=autoconf
751 echo "$ac_t""found" 1>&6
752 else
753 AUTOCONF="$missing_dir/missing autoconf"
754 echo "$ac_t""missing" 1>&6
755 fi
756
757 echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
758 echo "configure:759: checking for working automake-${am__api_version}" >&5
759 # Run test in a subshell; some versions of sh will print an error if
760 # an executable is not found, even if stderr is redirected.
761 # Redirect stdin to placate older versions of autoconf. Sigh.
762 if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
763 AUTOMAKE=automake-${am__api_version}
764 echo "$ac_t""found" 1>&6
765 else
766 AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
767 echo "$ac_t""missing" 1>&6
768 fi
769
770 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
771 echo "configure:772: checking for working autoheader" >&5
772 # Run test in a subshell; some versions of sh will print an error if
773 # an executable is not found, even if stderr is redirected.
774 # Redirect stdin to placate older versions of autoconf. Sigh.
775 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
776 AUTOHEADER=autoheader
777 echo "$ac_t""found" 1>&6
778 else
779 AUTOHEADER="$missing_dir/missing autoheader"
780 echo "$ac_t""missing" 1>&6
781 fi
782
783 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
784 echo "configure:785: checking for working makeinfo" >&5
785 # Run test in a subshell; some versions of sh will print an error if
786 # an executable is not found, even if stderr is redirected.
787 # Redirect stdin to placate older versions of autoconf. Sigh.
788 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
789 MAKEINFO=makeinfo
790 echo "$ac_t""found" 1>&6
791 else
792 MAKEINFO="$missing_dir/missing makeinfo"
793 echo "$ac_t""missing" 1>&6
794 fi
795
796
797
798
799
800
801
802 # Make sure we can run config.sub.
803 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
804 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
805 fi
806
807 echo $ac_n "checking host system type""... $ac_c" 1>&6
808 echo "configure:809: checking host system type" >&5
809
810 host_alias=$host
811 case "$host_alias" in
812 NONE)
813 case $nonopt in
814 NONE)
815 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
816 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
817 fi ;;
818 *) host_alias=$nonopt ;;
819 esac ;;
820 esac
821
822 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
823 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
824 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
825 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
826 echo "$ac_t""$host" 1>&6
827
828
829 if test "x${CFLAGS-notset}" = "xnotset" ; then
830 export CFLAGS
831 CFLAGS=""
832 fi
833 # Extract the first word of "gcc", so it can be a program name with args.
834 set dummy gcc; ac_word=$2
835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
836 echo "configure:837: checking for $ac_word" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
839 else
840 if test -n "$CC"; then
841 ac_cv_prog_CC="$CC" # Let the user override the test.
842 else
843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
844 ac_dummy="$PATH"
845 for ac_dir in $ac_dummy; do
846 test -z "$ac_dir" && ac_dir=.
847 if test -f $ac_dir/$ac_word; then
848 ac_cv_prog_CC="gcc"
849 break
850 fi
851 done
852 IFS="$ac_save_ifs"
853 fi
854 fi
855 CC="$ac_cv_prog_CC"
856 if test -n "$CC"; then
857 echo "$ac_t""$CC" 1>&6
858 else
859 echo "$ac_t""no" 1>&6
860 fi
861
862 if test -z "$CC"; then
863 # Extract the first word of "cc", so it can be a program name with args.
864 set dummy cc; ac_word=$2
865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
866 echo "configure:867: checking for $ac_word" >&5
867 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
868 echo $ac_n "(cached) $ac_c" 1>&6
869 else
870 if test -n "$CC"; then
871 ac_cv_prog_CC="$CC" # Let the user override the test.
872 else
873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
874 ac_prog_rejected=no
875 ac_dummy="$PATH"
876 for ac_dir in $ac_dummy; do
877 test -z "$ac_dir" && ac_dir=.
878 if test -f $ac_dir/$ac_word; then
879 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
880 ac_prog_rejected=yes
881 continue
882 fi
883 ac_cv_prog_CC="cc"
884 break
885 fi
886 done
887 IFS="$ac_save_ifs"
888 if test $ac_prog_rejected = yes; then
889 # We found a bogon in the path, so make sure we never use it.
890 set dummy $ac_cv_prog_CC
891 shift
892 if test $# -gt 0; then
893 # We chose a different compiler from the bogus one.
894 # However, it has the same basename, so the bogon will be chosen
895 # first if we set CC to just the basename; use the full file name.
896 shift
897 set dummy "$ac_dir/$ac_word" "$@"
898 shift
899 ac_cv_prog_CC="$@"
900 fi
901 fi
902 fi
903 fi
904 CC="$ac_cv_prog_CC"
905 if test -n "$CC"; then
906 echo "$ac_t""$CC" 1>&6
907 else
908 echo "$ac_t""no" 1>&6
909 fi
910
911 if test -z "$CC"; then
912 case "`uname -s`" in
913 *win32* | *WIN32*)
914 # Extract the first word of "cl", so it can be a program name with args.
915 set dummy cl; ac_word=$2
916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
917 echo "configure:918: checking for $ac_word" >&5
918 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
919 echo $ac_n "(cached) $ac_c" 1>&6
920 else
921 if test -n "$CC"; then
922 ac_cv_prog_CC="$CC" # Let the user override the test.
923 else
924 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
925 ac_dummy="$PATH"
926 for ac_dir in $ac_dummy; do
927 test -z "$ac_dir" && ac_dir=.
928 if test -f $ac_dir/$ac_word; then
929 ac_cv_prog_CC="cl"
930 break
931 fi
932 done
933 IFS="$ac_save_ifs"
934 fi
935 fi
936 CC="$ac_cv_prog_CC"
937 if test -n "$CC"; then
938 echo "$ac_t""$CC" 1>&6
939 else
940 echo "$ac_t""no" 1>&6
941 fi
942 ;;
943 esac
944 fi
945 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
946 fi
947
948 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
949 echo "configure:950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
950
951 ac_ext=c
952 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
953 ac_cpp='$CPP $CPPFLAGS'
954 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
955 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
956 cross_compiling=$ac_cv_prog_cc_cross
957
958 cat > conftest.$ac_ext << EOF
959
960 #line 961 "configure"
961 #include "confdefs.h"
962
963 main(){return(0);}
964 EOF
965 if { (eval echo configure:966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
966 ac_cv_prog_cc_works=yes
967 # If we can't run a trivial program, we are probably using a cross compiler.
968 if (./conftest; exit) 2>/dev/null; then
969 ac_cv_prog_cc_cross=no
970 else
971 ac_cv_prog_cc_cross=yes
972 fi
973 else
974 echo "configure: failed program was:" >&5
975 cat conftest.$ac_ext >&5
976 ac_cv_prog_cc_works=no
977 fi
978 rm -fr conftest*
979 ac_ext=c
980 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
981 ac_cpp='$CPP $CPPFLAGS'
982 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
983 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
984 cross_compiling=$ac_cv_prog_cc_cross
985
986 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
987 if test $ac_cv_prog_cc_works = no; then
988 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
989 fi
990 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
991 echo "configure:992: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
992 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
993 cross_compiling=$ac_cv_prog_cc_cross
994
995 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
996 echo "configure:997: checking whether we are using GNU C" >&5
997 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
998 echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000 cat > conftest.c <<EOF
1001 #ifdef __GNUC__
1002 yes;
1003 #endif
1004 EOF
1005 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1006 ac_cv_prog_gcc=yes
1007 else
1008 ac_cv_prog_gcc=no
1009 fi
1010 fi
1011
1012 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1013
1014 if test $ac_cv_prog_gcc = yes; then
1015 GCC=yes
1016 else
1017 GCC=
1018 fi
1019
1020 ac_test_CFLAGS="${CFLAGS+set}"
1021 ac_save_CFLAGS="$CFLAGS"
1022 CFLAGS=
1023 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1024 echo "configure:1025: checking whether ${CC-cc} accepts -g" >&5
1025 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1026 echo $ac_n "(cached) $ac_c" 1>&6
1027 else
1028 echo 'void f(){}' > conftest.c
1029 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1030 ac_cv_prog_cc_g=yes
1031 else
1032 ac_cv_prog_cc_g=no
1033 fi
1034 rm -f conftest*
1035
1036 fi
1037
1038 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1039 if test "$ac_test_CFLAGS" = set; then
1040 CFLAGS="$ac_save_CFLAGS"
1041 elif test $ac_cv_prog_cc_g = yes; then
1042 if test "$GCC" = yes; then
1043 CFLAGS="-g -O2"
1044 else
1045 CFLAGS="-g"
1046 fi
1047 else
1048 if test "$GCC" = yes; then
1049 CFLAGS="-O2"
1050 else
1051 CFLAGS=
1052 fi
1053 fi
1054
1055
1056 if test "x${CXXFLAGS-notset}" = "xnotset" ; then
1057 export CXXFLAGS
1058 CXXFLAGS=""
1059 fi
1060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1061 do
1062 # Extract the first word of "$ac_prog", so it can be a program name with args.
1063 set dummy $ac_prog; ac_word=$2
1064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1065 echo "configure:1066: checking for $ac_word" >&5
1066 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1067 echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069 if test -n "$CXX"; then
1070 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1071 else
1072 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1073 ac_dummy="$PATH"
1074 for ac_dir in $ac_dummy; do
1075 test -z "$ac_dir" && ac_dir=.
1076 if test -f $ac_dir/$ac_word; then
1077 ac_cv_prog_CXX="$ac_prog"
1078 break
1079 fi
1080 done
1081 IFS="$ac_save_ifs"
1082 fi
1083 fi
1084 CXX="$ac_cv_prog_CXX"
1085 if test -n "$CXX"; then
1086 echo "$ac_t""$CXX" 1>&6
1087 else
1088 echo "$ac_t""no" 1>&6
1089 fi
1090
1091 test -n "$CXX" && break
1092 done
1093 test -n "$CXX" || CXX="gcc"
1094
1095
1096 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1097 echo "configure:1098: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1098
1099 ac_ext=C
1100 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1101 ac_cpp='$CXXCPP $CPPFLAGS'
1102 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1103 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1104 cross_compiling=$ac_cv_prog_cxx_cross
1105
1106 cat > conftest.$ac_ext << EOF
1107
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110
1111 int main(){return(0);}
1112 EOF
1113 if { (eval echo configure:1114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1114 ac_cv_prog_cxx_works=yes
1115 # If we can't run a trivial program, we are probably using a cross compiler.
1116 if (./conftest; exit) 2>/dev/null; then
1117 ac_cv_prog_cxx_cross=no
1118 else
1119 ac_cv_prog_cxx_cross=yes
1120 fi
1121 else
1122 echo "configure: failed program was:" >&5
1123 cat conftest.$ac_ext >&5
1124 ac_cv_prog_cxx_works=no
1125 fi
1126 rm -fr conftest*
1127 ac_ext=c
1128 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1129 ac_cpp='$CPP $CPPFLAGS'
1130 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1131 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1132 cross_compiling=$ac_cv_prog_cc_cross
1133
1134 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1135 if test $ac_cv_prog_cxx_works = no; then
1136 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1137 fi
1138 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1139 echo "configure:1140: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1140 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1141 cross_compiling=$ac_cv_prog_cxx_cross
1142
1143 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1144 echo "configure:1145: checking whether we are using GNU C++" >&5
1145 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1146 echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148 cat > conftest.C <<EOF
1149 #ifdef __GNUC__
1150 yes;
1151 #endif
1152 EOF
1153 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1154 ac_cv_prog_gxx=yes
1155 else
1156 ac_cv_prog_gxx=no
1157 fi
1158 fi
1159
1160 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1161
1162 if test $ac_cv_prog_gxx = yes; then
1163 GXX=yes
1164 else
1165 GXX=
1166 fi
1167
1168 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1169 ac_save_CXXFLAGS="$CXXFLAGS"
1170 CXXFLAGS=
1171 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1172 echo "configure:1173: checking whether ${CXX-g++} accepts -g" >&5
1173 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1174 echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176 echo 'void f(){}' > conftest.cc
1177 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1178 ac_cv_prog_cxx_g=yes
1179 else
1180 ac_cv_prog_cxx_g=no
1181 fi
1182 rm -f conftest*
1183
1184 fi
1185
1186 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1187 if test "$ac_test_CXXFLAGS" = set; then
1188 CXXFLAGS="$ac_save_CXXFLAGS"
1189 elif test $ac_cv_prog_cxx_g = yes; then
1190 if test "$GXX" = yes; then
1191 CXXFLAGS="-g -O2"
1192 else
1193 CXXFLAGS="-g"
1194 fi
1195 else
1196 if test "$GXX" = yes; then
1197 CXXFLAGS="-O2"
1198 else
1199 CXXFLAGS=
1200 fi
1201 fi
1202
1203
1204 # Extract the first word of "ranlib", so it can be a program name with args.
1205 set dummy ranlib; ac_word=$2
1206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1207 echo "configure:1208: checking for $ac_word" >&5
1208 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1209 echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211 if test -n "$RANLIB"; then
1212 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1213 else
1214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1215 ac_dummy="$PATH"
1216 for ac_dir in $ac_dummy; do
1217 test -z "$ac_dir" && ac_dir=.
1218 if test -f $ac_dir/$ac_word; then
1219 ac_cv_prog_RANLIB="ranlib"
1220 break
1221 fi
1222 done
1223 IFS="$ac_save_ifs"
1224 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1225 fi
1226 fi
1227 RANLIB="$ac_cv_prog_RANLIB"
1228 if test -n "$RANLIB"; then
1229 echo "$ac_t""$RANLIB" 1>&6
1230 else
1231 echo "$ac_t""no" 1>&6
1232 fi
1233
1234
1235
1236 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1237 echo "configure:1238: checking whether ${MAKE-make} sets \${MAKE}" >&5
1238 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1239 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1240 echo $ac_n "(cached) $ac_c" 1>&6
1241 else
1242 cat > conftestmake <<\EOF
1243 all:
1244 @echo 'ac_maketemp="${MAKE}"'
1245 EOF
1246 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1247 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1248 if test -n "$ac_maketemp"; then
1249 eval ac_cv_prog_make_${ac_make}_set=yes
1250 else
1251 eval ac_cv_prog_make_${ac_make}_set=no
1252 fi
1253 rm -f conftestmake
1254 fi
1255 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1256 echo "$ac_t""yes" 1>&6
1257 SET_MAKE=
1258 else
1259 echo "$ac_t""no" 1>&6
1260 SET_MAKE="MAKE=${MAKE-make}"
1261 fi
1262
1263
1264 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1265 echo "configure:1266: checking how to run the C preprocessor" >&5
1266 # On Suns, sometimes $CPP names a directory.
1267 if test -n "$CPP" && test -d "$CPP"; then
1268 CPP=
1269 fi
1270 if test -z "$CPP"; then
1271 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1272 echo $ac_n "(cached) $ac_c" 1>&6
1273 else
1274 # This must be in double quotes, not single quotes, because CPP may get
1275 # substituted into the Makefile and "${CC-cc}" will confuse make.
1276 CPP="${CC-cc} -E"
1277 # On the NeXT, cc -E runs the code through the compiler's parser,
1278 # not just through cpp.
1279 cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 #include <assert.h>
1283 Syntax Error
1284 EOF
1285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1286 { (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1288 if test -z "$ac_err"; then
1289 :
1290 else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
1295 CPP="${CC-cc} -E -traditional-cpp"
1296 cat > conftest.$ac_ext <<EOF
1297 #line 1298 "configure"
1298 #include "confdefs.h"
1299 #include <assert.h>
1300 Syntax Error
1301 EOF
1302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1303 { (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1305 if test -z "$ac_err"; then
1306 :
1307 else
1308 echo "$ac_err" >&5
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 rm -rf conftest*
1312 CPP="${CC-cc} -nologo -E"
1313 cat > conftest.$ac_ext <<EOF
1314 #line 1315 "configure"
1315 #include "confdefs.h"
1316 #include <assert.h>
1317 Syntax Error
1318 EOF
1319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1320 { (eval echo configure:1321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1322 if test -z "$ac_err"; then
1323 :
1324 else
1325 echo "$ac_err" >&5
1326 echo "configure: failed program was:" >&5
1327 cat conftest.$ac_ext >&5
1328 rm -rf conftest*
1329 CPP=/lib/cpp
1330 fi
1331 rm -f conftest*
1332 fi
1333 rm -f conftest*
1334 fi
1335 rm -f conftest*
1336 ac_cv_prog_CPP="$CPP"
1337 fi
1338 CPP="$ac_cv_prog_CPP"
1339 else
1340 ac_cv_prog_CPP="$CPP"
1341 fi
1342 echo "$ac_t""$CPP" 1>&6
1343
1344 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1345 echo "configure:1346: checking for ANSI C header files" >&5
1346 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349 cat > conftest.$ac_ext <<EOF
1350 #line 1351 "configure"
1351 #include "confdefs.h"
1352 #include <stdlib.h>
1353 #include <stdarg.h>
1354 #include <string.h>
1355 #include <float.h>
1356 EOF
1357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1358 { (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1360 if test -z "$ac_err"; then
1361 rm -rf conftest*
1362 ac_cv_header_stdc=yes
1363 else
1364 echo "$ac_err" >&5
1365 echo "configure: failed program was:" >&5
1366 cat conftest.$ac_ext >&5
1367 rm -rf conftest*
1368 ac_cv_header_stdc=no
1369 fi
1370 rm -f conftest*
1371
1372 if test $ac_cv_header_stdc = yes; then
1373 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1374 cat > conftest.$ac_ext <<EOF
1375 #line 1376 "configure"
1376 #include "confdefs.h"
1377 #include <string.h>
1378 EOF
1379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1380 egrep "memchr" >/dev/null 2>&1; then
1381 :
1382 else
1383 rm -rf conftest*
1384 ac_cv_header_stdc=no
1385 fi
1386 rm -f conftest*
1387
1388 fi
1389
1390 if test $ac_cv_header_stdc = yes; then
1391 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395 #include <stdlib.h>
1396 EOF
1397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1398 egrep "free" >/dev/null 2>&1; then
1399 :
1400 else
1401 rm -rf conftest*
1402 ac_cv_header_stdc=no
1403 fi
1404 rm -f conftest*
1405
1406 fi
1407
1408 if test $ac_cv_header_stdc = yes; then
1409 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1410 if test "$cross_compiling" = yes; then
1411 :
1412 else
1413 cat > conftest.$ac_ext <<EOF
1414 #line 1415 "configure"
1415 #include "confdefs.h"
1416 #include <ctype.h>
1417 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1418 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1419 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1420 int main () { int i; for (i = 0; i < 256; i++)
1421 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1422 exit (0); }
1423
1424 EOF
1425 if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1426 then
1427 :
1428 else
1429 echo "configure: failed program was:" >&5
1430 cat conftest.$ac_ext >&5
1431 rm -fr conftest*
1432 ac_cv_header_stdc=no
1433 fi
1434 rm -fr conftest*
1435 fi
1436
1437 fi
1438 fi
1439
1440 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1441 if test $ac_cv_header_stdc = yes; then
1442 cat >> confdefs.h <<\EOF
1443 #define STDC_HEADERS 1
1444 EOF
1445
1446 fi
1447
1448 for ac_hdr in sys/time.h unistd.h
1449 do
1450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1452 echo "configure:1453: checking for $ac_hdr" >&5
1453 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1454 echo $ac_n "(cached) $ac_c" 1>&6
1455 else
1456 cat > conftest.$ac_ext <<EOF
1457 #line 1458 "configure"
1458 #include "confdefs.h"
1459 #include <$ac_hdr>
1460 EOF
1461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1462 { (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1464 if test -z "$ac_err"; then
1465 rm -rf conftest*
1466 eval "ac_cv_header_$ac_safe=yes"
1467 else
1468 echo "$ac_err" >&5
1469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
1471 rm -rf conftest*
1472 eval "ac_cv_header_$ac_safe=no"
1473 fi
1474 rm -f conftest*
1475 fi
1476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1477 echo "$ac_t""yes" 1>&6
1478 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1479 cat >> confdefs.h <<EOF
1480 #define $ac_tr_hdr 1
1481 EOF
1482
1483 else
1484 echo "$ac_t""no" 1>&6
1485 fi
1486 done
1487
1488
1489 echo $ac_n "checking for working const""... $ac_c" 1>&6
1490 echo "configure:1491: checking for working const" >&5
1491 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494 cat > conftest.$ac_ext <<EOF
1495 #line 1496 "configure"
1496 #include "confdefs.h"
1497
1498 int main() {
1499
1500 /* Ultrix mips cc rejects this. */
1501 typedef int charset[2]; const charset x;
1502 /* SunOS 4.1.1 cc rejects this. */
1503 char const *const *ccp;
1504 char **p;
1505 /* NEC SVR4.0.2 mips cc rejects this. */
1506 struct point {int x, y;};
1507 static struct point const zero = {0,0};
1508 /* AIX XL C 1.02.0.0 rejects this.
1509 It does not let you subtract one const X* pointer from another in an arm
1510 of an if-expression whose if-part is not a constant expression */
1511 const char *g = "string";
1512 ccp = &g + (g ? g-g : 0);
1513 /* HPUX 7.0 cc rejects these. */
1514 ++ccp;
1515 p = (char**) ccp;
1516 ccp = (char const *const *) p;
1517 { /* SCO 3.2v4 cc rejects this. */
1518 char *t;
1519 char const *s = 0 ? (char *) 0 : (char const *) 0;
1520
1521 *t++ = 0;
1522 }
1523 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1524 int x[] = {25, 17};
1525 const int *foo = &x[0];
1526 ++foo;
1527 }
1528 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1529 typedef const int *iptr;
1530 iptr p = 0;
1531 ++p;
1532 }
1533 { /* AIX XL C 1.02.0.0 rejects this saying
1534 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1535 struct s { int j; const int *ap[3]; };
1536 struct s *b; b->j = 5;
1537 }
1538 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1539 const int foo = 10;
1540 }
1541
1542 ; return 0; }
1543 EOF
1544 if { (eval echo configure:1545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1545 rm -rf conftest*
1546 ac_cv_c_const=yes
1547 else
1548 echo "configure: failed program was:" >&5
1549 cat conftest.$ac_ext >&5
1550 rm -rf conftest*
1551 ac_cv_c_const=no
1552 fi
1553 rm -f conftest*
1554 fi
1555
1556 echo "$ac_t""$ac_cv_c_const" 1>&6
1557 if test $ac_cv_c_const = no; then
1558 cat >> confdefs.h <<\EOF
1559 #define const
1560 EOF
1561
1562 fi
1563
1564 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1565 echo "configure:1566: checking whether time.h and sys/time.h may both be included" >&5
1566 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1567 echo $ac_n "(cached) $ac_c" 1>&6
1568 else
1569 cat > conftest.$ac_ext <<EOF
1570 #line 1571 "configure"
1571 #include "confdefs.h"
1572 #include <sys/types.h>
1573 #include <sys/time.h>
1574 #include <time.h>
1575 int main() {
1576 struct tm *tp;
1577 ; return 0; }
1578 EOF
1579 if { (eval echo configure:1580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1580 rm -rf conftest*
1581 ac_cv_header_time=yes
1582 else
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1585 rm -rf conftest*
1586 ac_cv_header_time=no
1587 fi
1588 rm -f conftest*
1589 fi
1590
1591 echo "$ac_t""$ac_cv_header_time" 1>&6
1592 if test $ac_cv_header_time = yes; then
1593 cat >> confdefs.h <<\EOF
1594 #define TIME_WITH_SYS_TIME 1
1595 EOF
1596
1597 fi
1598
1599
1600 for ac_func in getcwd gettimeofday strdup
1601 do
1602 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1603 echo "configure:1604: checking for $ac_func" >&5
1604 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1605 echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 /* System header to define __stub macros and hopefully few prototypes,
1611 which can conflict with char $ac_func(); below. */
1612 #include <assert.h>
1613 /* Override any gcc2 internal prototype to avoid an error. */
1614 /* We use char because int might match the return type of a gcc2
1615 builtin and then its argument prototype would still apply. */
1616 char $ac_func();
1617
1618 int main() {
1619
1620 /* The GNU C library defines this for functions which it implements
1621 to always fail with ENOSYS. Some functions are actually named
1622 something starting with __ and the normal name is an alias. */
1623 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1624 choke me
1625 #else
1626 $ac_func();
1627 #endif
1628
1629 ; return 0; }
1630 EOF
1631 if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1632 rm -rf conftest*
1633 eval "ac_cv_func_$ac_func=yes"
1634 else
1635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
1637 rm -rf conftest*
1638 eval "ac_cv_func_$ac_func=no"
1639 fi
1640 rm -f conftest*
1641 fi
1642
1643 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1644 echo "$ac_t""yes" 1>&6
1645 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1646 cat >> confdefs.h <<EOF
1647 #define $ac_tr_func 1
1648 EOF
1649
1650 else
1651 echo "$ac_t""no" 1>&6
1652 fi
1653 done
1654
1655
1656 for ac_func in finite isnan
1657 do
1658 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1659 echo "configure:1660: checking for $ac_func" >&5
1660 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1661 echo $ac_n "(cached) $ac_c" 1>&6
1662 else
1663 cat > conftest.$ac_ext <<EOF
1664 #line 1665 "configure"
1665 #include "confdefs.h"
1666 /* System header to define __stub macros and hopefully few prototypes,
1667 which can conflict with char $ac_func(); below. */
1668 #include <assert.h>
1669 /* Override any gcc2 internal prototype to avoid an error. */
1670 /* We use char because int might match the return type of a gcc2
1671 builtin and then its argument prototype would still apply. */
1672 char $ac_func();
1673
1674 int main() {
1675
1676 /* The GNU C library defines this for functions which it implements
1677 to always fail with ENOSYS. Some functions are actually named
1678 something starting with __ and the normal name is an alias. */
1679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1680 choke me
1681 #else
1682 $ac_func();
1683 #endif
1684
1685 ; return 0; }
1686 EOF
1687 if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1688 rm -rf conftest*
1689 eval "ac_cv_func_$ac_func=yes"
1690 else
1691 echo "configure: failed program was:" >&5
1692 cat conftest.$ac_ext >&5
1693 rm -rf conftest*
1694 eval "ac_cv_func_$ac_func=no"
1695 fi
1696 rm -f conftest*
1697 fi
1698
1699 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1700 echo "$ac_t""yes" 1>&6
1701 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1702 cat >> confdefs.h <<EOF
1703 #define $ac_tr_func 1
1704 EOF
1705
1706 else
1707 echo "$ac_t""no" 1>&6
1708 fi
1709 done
1710
1711 for ac_func in _finite _isnan
1712 do
1713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1714 echo "configure:1715: checking for $ac_func" >&5
1715 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1716 echo $ac_n "(cached) $ac_c" 1>&6
1717 else
1718 cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1721 /* System header to define __stub macros and hopefully few prototypes,
1722 which can conflict with char $ac_func(); below. */
1723 #include <assert.h>
1724 /* Override any gcc2 internal prototype to avoid an error. */
1725 /* We use char because int might match the return type of a gcc2
1726 builtin and then its argument prototype would still apply. */
1727 char $ac_func();
1728
1729 int main() {
1730
1731 /* The GNU C library defines this for functions which it implements
1732 to always fail with ENOSYS. Some functions are actually named
1733 something starting with __ and the normal name is an alias. */
1734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1735 choke me
1736 #else
1737 $ac_func();
1738 #endif
1739
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_func_$ac_func=yes"
1745 else
1746 echo "configure: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 rm -rf conftest*
1749 eval "ac_cv_func_$ac_func=no"
1750 fi
1751 rm -f conftest*
1752 fi
1753
1754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1755 echo "$ac_t""yes" 1>&6
1756 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1757 cat >> confdefs.h <<EOF
1758 #define $ac_tr_func 1
1759 EOF
1760
1761 else
1762 echo "$ac_t""no" 1>&6
1763 fi
1764 done
1765
1766 for ac_hdr in ieeefp.h
1767 do
1768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1770 echo "configure:1771: checking for $ac_hdr" >&5
1771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1772 echo $ac_n "(cached) $ac_c" 1>&6
1773 else
1774 cat > conftest.$ac_ext <<EOF
1775 #line 1776 "configure"
1776 #include "confdefs.h"
1777 #include <$ac_hdr>
1778 EOF
1779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1780 { (eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1782 if test -z "$ac_err"; then
1783 rm -rf conftest*
1784 eval "ac_cv_header_$ac_safe=yes"
1785 else
1786 echo "$ac_err" >&5
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1789 rm -rf conftest*
1790 eval "ac_cv_header_$ac_safe=no"
1791 fi
1792 rm -f conftest*
1793 fi
1794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1795 echo "$ac_t""yes" 1>&6
1796 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1797 cat >> confdefs.h <<EOF
1798 #define $ac_tr_hdr 1
1799 EOF
1800
1801 else
1802 echo "$ac_t""no" 1>&6
1803 fi
1804 done
1805
1806
1807 TR_CPPFLAGS=""
1808 TR_CFLAGS="-O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
1809 TR_CXXFLAGS="-O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
1810 TR_LIBS=""
1811
1812 case "$host" in
1813 alpha*-*-linux-*) TR_CFLAGS="$TR_CFLAGS -mieee";;
1814 esac
1815
1816 # Check whether --enable-debug or --disable-debug was given.
1817 if test "${enable_debug+set}" = set; then
1818 enableval="$enable_debug"
1819 TR_CFLAGS="-g -Wall -fno-inline"; TR_CXXFLAGS="-g -Wall -fno-inline"
1820 else
1821 TR_CPPFLAGS="$TR_CPPFLAGS"
1822 fi
1823
1824
1825 # Check whether --enable-pedantic or --disable-pedantic was given.
1826 if test "${enable_pedantic+set}" = set; then
1827 enableval="$enable_pedantic"
1828 TR_CFLAGS="$TR_CFLAGS -ansi -pedantic"; TR_CXXFLAGS="$TR_CXXFLAGS -pedantic"
1829 fi
1830
1831
1832 # Check whether --enable-profile or --disable-profile was given.
1833 if test "${enable_profile+set}" = set; then
1834 enableval="$enable_profile"
1835 TR_CFLAGS="$TR_CFLAGS -pg"; TR_CXXFLAGS="$TR_CXXFLAGS -pg"
1836 fi
1837
1838
1839
1840 echo $ac_n "checking for Win32 platform""... $ac_c" 1>&6
1841 echo "configure:1842: checking for Win32 platform" >&5
1842 cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845
1846 #if defined(WIN32) || defined(__CYGWIN__)
1847 yes
1848 #endif
1849
1850 EOF
1851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1852 egrep "yes" >/dev/null 2>&1; then
1853 rm -rf conftest*
1854 is_win32=yes
1855 else
1856 rm -rf conftest*
1857 is_win32=no
1858 fi
1859 rm -f conftest*
1860
1861 echo "$ac_t""$is_win32" 1>&6
1862
1863 echo $ac_n "checking for Mac OSX platform""... $ac_c" 1>&6
1864 echo "configure:1865: checking for Mac OSX platform" >&5
1865 cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868
1869 #if defined(__APPLE__) || defined(__MACH_O__)
1870 yes
1871 #endif
1872
1873 EOF
1874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1875 egrep "yes" >/dev/null 2>&1; then
1876 rm -rf conftest*
1877 is_macosx=yes
1878 else
1879 rm -rf conftest*
1880 is_macosx=no
1881 fi
1882 rm -f conftest*
1883
1884 echo "$ac_t""$is_macosx" 1>&6
1885
1886 if test "x$is_win32" = "xyes" ; then
1887 TR_LIBS="$TR_LIBS -luser32 -lgdi32"
1888 fi
1889
1890 if test "x$is_win32" = "xno" ; then
1891 # If we find X, set shell vars x_includes and x_libraries to the
1892 # paths, otherwise set no_x=yes.
1893 # Uses ac_ vars as temps to allow command line to override cache and checks.
1894 # --without-x overrides everything else, but does not touch the cache.
1895 echo $ac_n "checking for X""... $ac_c" 1>&6
1896 echo "configure:1897: checking for X" >&5
1897
1898 # Check whether --with-x or --without-x was given.
1899 if test "${with_x+set}" = set; then
1900 withval="$with_x"
1901 :
1902 fi
1903
1904 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1905 if test "x$with_x" = xno; then
1906 # The user explicitly disabled X.
1907 have_x=disabled
1908 else
1909 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1910 # Both variables are already set.
1911 have_x=yes
1912 else
1913 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916 # One or both of the vars are not set, and there is no cached value.
1917 ac_x_includes=NO ac_x_libraries=NO
1918 rm -fr conftestdir
1919 if mkdir conftestdir; then
1920 cd conftestdir
1921 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1922 cat > Imakefile <<'EOF'
1923 acfindx:
1924 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1925 EOF
1926 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1927 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1928 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1929 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1930 for ac_extension in a so sl; do
1931 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1932 test -f $ac_im_libdir/libX11.$ac_extension; then
1933 ac_im_usrlibdir=$ac_im_libdir; break
1934 fi
1935 done
1936 # Screen out bogus values from the imake configuration. They are
1937 # bogus both because they are the default anyway, and because
1938 # using them would break gcc on systems where it needs fixed includes.
1939 case "$ac_im_incroot" in
1940 /usr/include) ;;
1941 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1942 esac
1943 case "$ac_im_usrlibdir" in
1944 /usr/lib | /lib) ;;
1945 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1946 esac
1947 fi
1948 cd ..
1949 rm -fr conftestdir
1950 fi
1951
1952 if test "$ac_x_includes" = NO; then
1953 # Guess where to find include files, by looking for this one X11 .h file.
1954 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1955
1956 # First, try using that file with no special directory specified.
1957 cat > conftest.$ac_ext <<EOF
1958 #line 1959 "configure"
1959 #include "confdefs.h"
1960 #include <$x_direct_test_include>
1961 EOF
1962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1963 { (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1965 if test -z "$ac_err"; then
1966 rm -rf conftest*
1967 # We can compile using X headers with no special include directory.
1968 ac_x_includes=
1969 else
1970 echo "$ac_err" >&5
1971 echo "configure: failed program was:" >&5
1972 cat conftest.$ac_ext >&5
1973 rm -rf conftest*
1974 # Look for the header file in a standard set of common directories.
1975 # Check X11 before X11Rn because it is often a symlink to the current release.
1976 for ac_dir in \
1977 /usr/X11/include \
1978 /usr/X11R6/include \
1979 /usr/X11R5/include \
1980 /usr/X11R4/include \
1981 \
1982 /usr/include/X11 \
1983 /usr/include/X11R6 \
1984 /usr/include/X11R5 \
1985 /usr/include/X11R4 \
1986 \
1987 /usr/local/X11/include \
1988 /usr/local/X11R6/include \
1989 /usr/local/X11R5/include \
1990 /usr/local/X11R4/include \
1991 \
1992 /usr/local/include/X11 \
1993 /usr/local/include/X11R6 \
1994 /usr/local/include/X11R5 \
1995 /usr/local/include/X11R4 \
1996 \
1997 /usr/X386/include \
1998 /usr/x386/include \
1999 /usr/XFree86/include/X11 \
2000 \
2001 /usr/include \
2002 /usr/local/include \
2003 /usr/unsupported/include \
2004 /usr/athena/include \
2005 /usr/local/x11r5/include \
2006 /usr/lpp/Xamples/include \
2007 \
2008 /usr/openwin/include \
2009 /usr/openwin/share/include \
2010 ; \
2011 do
2012 if test -r "$ac_dir/$x_direct_test_include"; then
2013 ac_x_includes=$ac_dir
2014 break
2015 fi
2016 done
2017 fi
2018 rm -f conftest*
2019 fi # $ac_x_includes = NO
2020
2021 if test "$ac_x_libraries" = NO; then
2022 # Check for the libraries.
2023
2024 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2025 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2026
2027 # See if we find them without any special options.
2028 # Don't add to $LIBS permanently.
2029 ac_save_LIBS="$LIBS"
2030 LIBS="-l$x_direct_test_library $LIBS"
2031 cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034
2035 int main() {
2036 ${x_direct_test_function}()
2037 ; return 0; }
2038 EOF
2039 if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2040 rm -rf conftest*
2041 LIBS="$ac_save_LIBS"
2042 # We can link X programs with no special library path.
2043 ac_x_libraries=
2044 else
2045 echo "configure: failed program was:" >&5
2046 cat conftest.$ac_ext >&5
2047 rm -rf conftest*
2048 LIBS="$ac_save_LIBS"
2049 # First see if replacing the include by lib works.
2050 # Check X11 before X11Rn because it is often a symlink to the current release.
2051 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2052 /usr/X11/lib \
2053 /usr/X11R6/lib \
2054 /usr/X11R5/lib \
2055 /usr/X11R4/lib \
2056 \
2057 /usr/lib/X11 \
2058 /usr/lib/X11R6 \
2059 /usr/lib/X11R5 \
2060 /usr/lib/X11R4 \
2061 \
2062 /usr/local/X11/lib \
2063 /usr/local/X11R6/lib \
2064 /usr/local/X11R5/lib \
2065 /usr/local/X11R4/lib \
2066 \
2067 /usr/local/lib/X11 \
2068 /usr/local/lib/X11R6 \
2069 /usr/local/lib/X11R5 \
2070 /usr/local/lib/X11R4 \
2071 \
2072 /usr/X386/lib \
2073 /usr/x386/lib \
2074 /usr/XFree86/lib/X11 \
2075 \
2076 /usr/lib \
2077 /usr/local/lib \
2078 /usr/unsupported/lib \
2079 /usr/athena/lib \
2080 /usr/local/x11r5/lib \
2081 /usr/lpp/Xamples/lib \
2082 /lib/usr/lib/X11 \
2083 \
2084 /usr/openwin/lib \
2085 /usr/openwin/share/lib \
2086 ; \
2087 do
2088 for ac_extension in a so sl; do
2089 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2090 ac_x_libraries=$ac_dir
2091 break 2
2092 fi
2093 done
2094 done
2095 fi
2096 rm -f conftest*
2097 fi # $ac_x_libraries = NO
2098
2099 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2100 # Didn't find X anywhere. Cache the known absence of X.
2101 ac_cv_have_x="have_x=no"
2102 else
2103 # Record where we found X for the cache.
2104 ac_cv_have_x="have_x=yes \
2105 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2106 fi
2107 fi
2108 fi
2109 eval "$ac_cv_have_x"
2110 fi # $with_x != no
2111
2112 if test "$have_x" != yes; then
2113 echo "$ac_t""$have_x" 1>&6
2114 no_x=yes
2115 else
2116 # If each of the values was on the command line, it overrides each guess.
2117 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2118 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2119 # Update the cache value to reflect the command line values.
2120 ac_cv_have_x="have_x=yes \
2121 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2122 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2123 fi
2124
2125 if test "$no_x" = yes; then
2126 # Not all programs may use this symbol, but it does not hurt to define it.
2127 cat >> confdefs.h <<\EOF
2128 #define X_DISPLAY_MISSING 1
2129 EOF
2130
2131 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2132 else
2133 if test -n "$x_includes"; then
2134 X_CFLAGS="$X_CFLAGS -I$x_includes"
2135 fi
2136
2137 # It would also be nice to do this for all -L options, not just this one.
2138 if test -n "$x_libraries"; then
2139 X_LIBS="$X_LIBS -L$x_libraries"
2140 # For Solaris; some versions of Sun CC require a space after -R and
2141 # others require no space. Words are not sufficient . . . .
2142 case "`(uname -sr) 2>/dev/null`" in
2143 "SunOS 5"*)
2144 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2145 echo "configure:2146: checking whether -R must be followed by a space" >&5
2146 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2147 cat > conftest.$ac_ext <<EOF
2148 #line 2149 "configure"
2149 #include "confdefs.h"
2150
2151 int main() {
2152
2153 ; return 0; }
2154 EOF
2155 if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2156 rm -rf conftest*
2157 ac_R_nospace=yes
2158 else
2159 echo "configure: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 rm -rf conftest*
2162 ac_R_nospace=no
2163 fi
2164 rm -f conftest*
2165 if test $ac_R_nospace = yes; then
2166 echo "$ac_t""no" 1>&6
2167 X_LIBS="$X_LIBS -R$x_libraries"
2168 else
2169 LIBS="$ac_xsave_LIBS -R $x_libraries"
2170 cat > conftest.$ac_ext <<EOF
2171 #line 2172 "configure"
2172 #include "confdefs.h"
2173
2174 int main() {
2175
2176 ; return 0; }
2177 EOF
2178 if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2179 rm -rf conftest*
2180 ac_R_space=yes
2181 else
2182 echo "configure: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 rm -rf conftest*
2185 ac_R_space=no
2186 fi
2187 rm -f conftest*
2188 if test $ac_R_space = yes; then
2189 echo "$ac_t""yes" 1>&6
2190 X_LIBS="$X_LIBS -R $x_libraries"
2191 else
2192 echo "$ac_t""neither works" 1>&6
2193 fi
2194 fi
2195 LIBS="$ac_xsave_LIBS"
2196 esac
2197 fi
2198
2199 # Check for system-dependent libraries X programs must link with.
2200 # Do this before checking for the system-independent R6 libraries
2201 # (-lICE), since we may need -lsocket or whatever for X linking.
2202
2203 if test "$ISC" = yes; then
2204 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2205 else
2206 # [email protected] says this is needed for Ultrix, if the X
2207 # libraries were built with DECnet support. And [email protected] says
2208 # the Alpha needs dnet_stub (dnet does not exist).
2209 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2210 echo "configure:2211: checking for dnet_ntoa in -ldnet" >&5
2211 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2213 echo $ac_n "(cached) $ac_c" 1>&6
2214 else
2215 ac_save_LIBS="$LIBS"
2216 LIBS="-ldnet $LIBS"
2217 cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2220 /* Override any gcc2 internal prototype to avoid an error. */
2221 /* We use char because int might match the return type of a gcc2
2222 builtin and then its argument prototype would still apply. */
2223 char dnet_ntoa();
2224
2225 int main() {
2226 dnet_ntoa()
2227 ; return 0; }
2228 EOF
2229 if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2230 rm -rf conftest*
2231 eval "ac_cv_lib_$ac_lib_var=yes"
2232 else
2233 echo "configure: failed program was:" >&5
2234 cat conftest.$ac_ext >&5
2235 rm -rf conftest*
2236 eval "ac_cv_lib_$ac_lib_var=no"
2237 fi
2238 rm -f conftest*
2239 LIBS="$ac_save_LIBS"
2240
2241 fi
2242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2243 echo "$ac_t""yes" 1>&6
2244 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2245 else
2246 echo "$ac_t""no" 1>&6
2247 fi
2248
2249 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2250 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2251 echo "configure:2252: checking for dnet_ntoa in -ldnet_stub" >&5
2252 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2254 echo $ac_n "(cached) $ac_c" 1>&6
2255 else
2256 ac_save_LIBS="$LIBS"
2257 LIBS="-ldnet_stub $LIBS"
2258 cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 /* Override any gcc2 internal prototype to avoid an error. */
2262 /* We use char because int might match the return type of a gcc2
2263 builtin and then its argument prototype would still apply. */
2264 char dnet_ntoa();
2265
2266 int main() {
2267 dnet_ntoa()
2268 ; return 0; }
2269 EOF
2270 if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2271 rm -rf conftest*
2272 eval "ac_cv_lib_$ac_lib_var=yes"
2273 else
2274 echo "configure: failed program was:" >&5
2275 cat conftest.$ac_ext >&5
2276 rm -rf conftest*
2277 eval "ac_cv_lib_$ac_lib_var=no"
2278 fi
2279 rm -f conftest*
2280 LIBS="$ac_save_LIBS"
2281
2282 fi
2283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2284 echo "$ac_t""yes" 1>&6
2285 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2286 else
2287 echo "$ac_t""no" 1>&6
2288 fi
2289
2290 fi
2291
2292 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
2293 # to get the SysV transport functions.
2294 # [email protected] says the Pyramis MIS-ES running DC/OSx (SVR4)
2295 # needs -lnsl.
2296 # The nsl library prevents programs from opening the X display
2297 # on Irix 5.2, according to [email protected].
2298 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2299 echo "configure:2300: checking for gethostbyname" >&5
2300 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2301 echo $ac_n "(cached) $ac_c" 1>&6
2302 else
2303 cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 /* System header to define __stub macros and hopefully few prototypes,
2307 which can conflict with char gethostbyname(); below. */
2308 #include <assert.h>
2309 /* Override any gcc2 internal prototype to avoid an error. */
2310 /* We use char because int might match the return type of a gcc2
2311 builtin and then its argument prototype would still apply. */
2312 char gethostbyname();
2313
2314 int main() {
2315
2316 /* The GNU C library defines this for functions which it implements
2317 to always fail with ENOSYS. Some functions are actually named
2318 something starting with __ and the normal name is an alias. */
2319 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2320 choke me
2321 #else
2322 gethostbyname();
2323 #endif
2324
2325 ; return 0; }
2326 EOF
2327 if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2328 rm -rf conftest*
2329 eval "ac_cv_func_gethostbyname=yes"
2330 else
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_func_gethostbyname=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338
2339 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2340 echo "$ac_t""yes" 1>&6
2341 :
2342 else
2343 echo "$ac_t""no" 1>&6
2344 fi
2345
2346 if test $ac_cv_func_gethostbyname = no; then
2347 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2348 echo "configure:2349: checking for gethostbyname in -lnsl" >&5
2349 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2351 echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353 ac_save_LIBS="$LIBS"
2354 LIBS="-lnsl $LIBS"
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358 /* Override any gcc2 internal prototype to avoid an error. */
2359 /* We use char because int might match the return type of a gcc2
2360 builtin and then its argument prototype would still apply. */
2361 char gethostbyname();
2362
2363 int main() {
2364 gethostbyname()
2365 ; return 0; }
2366 EOF
2367 if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2368 rm -rf conftest*
2369 eval "ac_cv_lib_$ac_lib_var=yes"
2370 else
2371 echo "configure: failed program was:" >&5
2372 cat conftest.$ac_ext >&5
2373 rm -rf conftest*
2374 eval "ac_cv_lib_$ac_lib_var=no"
2375 fi
2376 rm -f conftest*
2377 LIBS="$ac_save_LIBS"
2378
2379 fi
2380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2381 echo "$ac_t""yes" 1>&6
2382 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2383 else
2384 echo "$ac_t""no" 1>&6
2385 fi
2386
2387 fi
2388
2389 # [email protected] says without -lsocket,
2390 # socket/setsockopt and other routines are undefined under SCO ODT
2391 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2392 # on later versions), says [email protected]: it contains
2393 # gethostby* variants that don't use the nameserver (or something).
2394 # -lsocket must be given before -lnsl if both are needed.
2395 # We assume that if connect needs -lnsl, so does gethostbyname.
2396 echo $ac_n "checking for connect""... $ac_c" 1>&6
2397 echo "configure:2398: checking for connect" >&5
2398 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2399 echo $ac_n "(cached) $ac_c" 1>&6
2400 else
2401 cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 /* System header to define __stub macros and hopefully few prototypes,
2405 which can conflict with char connect(); below. */
2406 #include <assert.h>
2407 /* Override any gcc2 internal prototype to avoid an error. */
2408 /* We use char because int might match the return type of a gcc2
2409 builtin and then its argument prototype would still apply. */
2410 char connect();
2411
2412 int main() {
2413
2414 /* The GNU C library defines this for functions which it implements
2415 to always fail with ENOSYS. Some functions are actually named
2416 something starting with __ and the normal name is an alias. */
2417 #if defined (__stub_connect) || defined (__stub___connect)
2418 choke me
2419 #else
2420 connect();
2421 #endif
2422
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2426 rm -rf conftest*
2427 eval "ac_cv_func_connect=yes"
2428 else
2429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 rm -rf conftest*
2432 eval "ac_cv_func_connect=no"
2433 fi
2434 rm -f conftest*
2435 fi
2436
2437 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2438 echo "$ac_t""yes" 1>&6
2439 :
2440 else
2441 echo "$ac_t""no" 1>&6
2442 fi
2443
2444 if test $ac_cv_func_connect = no; then
2445 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2446 echo "configure:2447: checking for connect in -lsocket" >&5
2447 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2448 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2449 echo $ac_n "(cached) $ac_c" 1>&6
2450 else
2451 ac_save_LIBS="$LIBS"
2452 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2453 cat > conftest.$ac_ext <<EOF
2454 #line 2455 "configure"
2455 #include "confdefs.h"
2456 /* Override any gcc2 internal prototype to avoid an error. */
2457 /* We use char because int might match the return type of a gcc2
2458 builtin and then its argument prototype would still apply. */
2459 char connect();
2460
2461 int main() {
2462 connect()
2463 ; return 0; }
2464 EOF
2465 if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2466 rm -rf conftest*
2467 eval "ac_cv_lib_$ac_lib_var=yes"
2468 else
2469 echo "configure: failed program was:" >&5
2470 cat conftest.$ac_ext >&5
2471 rm -rf conftest*
2472 eval "ac_cv_lib_$ac_lib_var=no"
2473 fi
2474 rm -f conftest*
2475 LIBS="$ac_save_LIBS"
2476
2477 fi
2478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2479 echo "$ac_t""yes" 1>&6
2480 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2481 else
2482 echo "$ac_t""no" 1>&6
2483 fi
2484
2485 fi
2486
2487 # [email protected] says -lposix is necessary on A/UX.
2488 echo $ac_n "checking for remove""... $ac_c" 1>&6
2489 echo "configure:2490: checking for remove" >&5
2490 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 /* System header to define __stub macros and hopefully few prototypes,
2497 which can conflict with char remove(); below. */
2498 #include <assert.h>
2499 /* Override any gcc2 internal prototype to avoid an error. */
2500 /* We use char because int might match the return type of a gcc2
2501 builtin and then its argument prototype would still apply. */
2502 char remove();
2503
2504 int main() {
2505
2506 /* The GNU C library defines this for functions which it implements
2507 to always fail with ENOSYS. Some functions are actually named
2508 something starting with __ and the normal name is an alias. */
2509 #if defined (__stub_remove) || defined (__stub___remove)
2510 choke me
2511 #else
2512 remove();
2513 #endif
2514
2515 ; return 0; }
2516 EOF
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2518 rm -rf conftest*
2519 eval "ac_cv_func_remove=yes"
2520 else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -rf conftest*
2524 eval "ac_cv_func_remove=no"
2525 fi
2526 rm -f conftest*
2527 fi
2528
2529 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2530 echo "$ac_t""yes" 1>&6
2531 :
2532 else
2533 echo "$ac_t""no" 1>&6
2534 fi
2535
2536 if test $ac_cv_func_remove = no; then
2537 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2538 echo "configure:2539: checking for remove in -lposix" >&5
2539 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2541 echo $ac_n "(cached) $ac_c" 1>&6
2542 else
2543 ac_save_LIBS="$LIBS"
2544 LIBS="-lposix $LIBS"
2545 cat > conftest.$ac_ext <<EOF
2546 #line 2547 "configure"
2547 #include "confdefs.h"
2548 /* Override any gcc2 internal prototype to avoid an error. */
2549 /* We use char because int might match the return type of a gcc2
2550 builtin and then its argument prototype would still apply. */
2551 char remove();
2552
2553 int main() {
2554 remove()
2555 ; return 0; }
2556 EOF
2557 if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2558 rm -rf conftest*
2559 eval "ac_cv_lib_$ac_lib_var=yes"
2560 else
2561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 rm -rf conftest*
2564 eval "ac_cv_lib_$ac_lib_var=no"
2565 fi
2566 rm -f conftest*
2567 LIBS="$ac_save_LIBS"
2568
2569 fi
2570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2571 echo "$ac_t""yes" 1>&6
2572 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2573 else
2574 echo "$ac_t""no" 1>&6
2575 fi
2576
2577 fi
2578
2579 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2580 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2581 echo "configure:2582: checking for shmat" >&5
2582 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2583 echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 /* System header to define __stub macros and hopefully few prototypes,
2589 which can conflict with char shmat(); below. */
2590 #include <assert.h>
2591 /* Override any gcc2 internal prototype to avoid an error. */
2592 /* We use char because int might match the return type of a gcc2
2593 builtin and then its argument prototype would still apply. */
2594 char shmat();
2595
2596 int main() {
2597
2598 /* The GNU C library defines this for functions which it implements
2599 to always fail with ENOSYS. Some functions are actually named
2600 something starting with __ and the normal name is an alias. */
2601 #if defined (__stub_shmat) || defined (__stub___shmat)
2602 choke me
2603 #else
2604 shmat();
2605 #endif
2606
2607 ; return 0; }
2608 EOF
2609 if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2610 rm -rf conftest*
2611 eval "ac_cv_func_shmat=yes"
2612 else
2613 echo "configure: failed program was:" >&5
2614 cat conftest.$ac_ext >&5
2615 rm -rf conftest*
2616 eval "ac_cv_func_shmat=no"
2617 fi
2618 rm -f conftest*
2619 fi
2620
2621 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2622 echo "$ac_t""yes" 1>&6
2623 :
2624 else
2625 echo "$ac_t""no" 1>&6
2626 fi
2627
2628 if test $ac_cv_func_shmat = no; then
2629 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2630 echo "configure:2631: checking for shmat in -lipc" >&5
2631 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2633 echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635 ac_save_LIBS="$LIBS"
2636 LIBS="-lipc $LIBS"
2637 cat > conftest.$ac_ext <<EOF
2638 #line 2639 "configure"
2639 #include "confdefs.h"
2640 /* Override any gcc2 internal prototype to avoid an error. */
2641 /* We use char because int might match the return type of a gcc2
2642 builtin and then its argument prototype would still apply. */
2643 char shmat();
2644
2645 int main() {
2646 shmat()
2647 ; return 0; }
2648 EOF
2649 if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2650 rm -rf conftest*
2651 eval "ac_cv_lib_$ac_lib_var=yes"
2652 else
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
2655 rm -rf conftest*
2656 eval "ac_cv_lib_$ac_lib_var=no"
2657 fi
2658 rm -f conftest*
2659 LIBS="$ac_save_LIBS"
2660
2661 fi
2662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2663 echo "$ac_t""yes" 1>&6
2664 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2665 else
2666 echo "$ac_t""no" 1>&6
2667 fi
2668
2669 fi
2670 fi
2671
2672 # Check for libraries that X11R6 Xt/Xaw programs need.
2673 ac_save_LDFLAGS="$LDFLAGS"
2674 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2675 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2676 # check for ICE first), but we must link in the order -lSM -lICE or
2677 # we get undefined symbols. So assume we have SM if we have ICE.
2678 # These have to be linked with before -lX11, unlike the other
2679 # libraries we check for below, so use a different variable.
2680 # [email protected], [email protected].
2681 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2682 echo "configure:2683: checking for IceConnectionNumber in -lICE" >&5
2683 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2684 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2685 echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687 ac_save_LIBS="$LIBS"
2688 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2689 cat > conftest.$ac_ext <<EOF
2690 #line 2691 "configure"
2691 #include "confdefs.h"
2692 /* Override any gcc2 internal prototype to avoid an error. */
2693 /* We use char because int might match the return type of a gcc2
2694 builtin and then its argument prototype would still apply. */
2695 char IceConnectionNumber();
2696
2697 int main() {
2698 IceConnectionNumber()
2699 ; return 0; }
2700 EOF
2701 if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2702 rm -rf conftest*
2703 eval "ac_cv_lib_$ac_lib_var=yes"
2704 else
2705 echo "configure: failed program was:" >&5
2706 cat conftest.$ac_ext >&5
2707 rm -rf conftest*
2708 eval "ac_cv_lib_$ac_lib_var=no"
2709 fi
2710 rm -f conftest*
2711 LIBS="$ac_save_LIBS"
2712
2713 fi
2714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2715 echo "$ac_t""yes" 1>&6
2716 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2717 else
2718 echo "$ac_t""no" 1>&6
2719 fi
2720
2721 LDFLAGS="$ac_save_LDFLAGS"
2722
2723 fi
2724
2725 if test "x$no_x" = "x" ; then
2726 TR_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXi -lXext -lXmu -lXt $X_EXTRA_LIBS $TR_LIBS"
2727 fi
2728 fi
2729
2730 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2731 echo "configure:2732: checking for main in -ldl" >&5
2732 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2733 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2734 echo $ac_n "(cached) $ac_c" 1>&6
2735 else
2736 ac_save_LIBS="$LIBS"
2737 LIBS="-ldl $LIBS"
2738 cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741
2742 int main() {
2743 main()
2744 ; return 0; }
2745 EOF
2746 if { (eval echo configure:2747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2747 rm -rf conftest*
2748 eval "ac_cv_lib_$ac_lib_var=yes"
2749 else
2750 echo "configure: failed program was:" >&5
2751 cat conftest.$ac_ext >&5
2752 rm -rf conftest*
2753 eval "ac_cv_lib_$ac_lib_var=no"
2754 fi
2755 rm -f conftest*
2756 LIBS="$ac_save_LIBS"
2757
2758 fi
2759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2760 echo "$ac_t""yes" 1>&6
2761 TR_LIBS="$TR_LIBS -ldl"
2762 else
2763 echo "$ac_t""no" 1>&6
2764 fi
2765
2766 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
2767 echo "configure:2768: checking for main in -lm" >&5
2768 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
2769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772 ac_save_LIBS="$LIBS"
2773 LIBS="-lm $LIBS"
2774 cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777
2778 int main() {
2779 main()
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2783 rm -rf conftest*
2784 eval "ac_cv_lib_$ac_lib_var=yes"
2785 else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -rf conftest*
2789 eval "ac_cv_lib_$ac_lib_var=no"
2790 fi
2791 rm -f conftest*
2792 LIBS="$ac_save_LIBS"
2793
2794 fi
2795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2796 echo "$ac_t""yes" 1>&6
2797 TR_LIBS="$TR_LIBS -lm"
2798 else
2799 echo "$ac_t""no" 1>&6
2800 fi
2801
2802
2803 # Check whether --enable-sdl or --disable-sdl was given.
2804 if test "${enable_sdl+set}" = set; then
2805 enableval="$enable_sdl"
2806 :
2807 fi
2808
2809
2810 if test "x$enable_sdl" != "xno" ; then
2811
2812 SDL_VERSION=1.0.1
2813 # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
2814 if test "${with_sdl_prefix+set}" = set; then
2815 withval="$with_sdl_prefix"
2816 sdl_prefix="$withval"
2817 else
2818 sdl_prefix=""
2819 fi
2820
2821 # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
2822 if test "${with_sdl_exec_prefix+set}" = set; then
2823 withval="$with_sdl_exec_prefix"
2824 sdl_exec_prefix="$withval"
2825 else
2826 sdl_exec_prefix=""
2827 fi
2828
2829 # Check whether --enable-sdltest or --disable-sdltest was given.
2830 if test "${enable_sdltest+set}" = set; then
2831 enableval="$enable_sdltest"
2832 :
2833 else
2834 enable_sdltest=yes
2835 fi
2836
2837
2838 if test x$sdl_exec_prefix != x ; then
2839 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
2840 if test x${SDL_CONFIG+set} != xset ; then
2841 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
2842 fi
2843 fi
2844 if test x$sdl_prefix != x ; then
2845 sdl_args="$sdl_args --prefix=$sdl_prefix"
2846 if test x${SDL_CONFIG+set} != xset ; then
2847 SDL_CONFIG=$sdl_prefix/bin/sdl-config
2848 fi
2849 fi
2850
2851 # Extract the first word of "sdl-config", so it can be a program name with args.
2852 set dummy sdl-config; ac_word=$2
2853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2854 echo "configure:2855: checking for $ac_word" >&5
2855 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
2856 echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858 case "$SDL_CONFIG" in
2859 /*)
2860 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
2861 ;;
2862 ?:/*)
2863 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
2864 ;;
2865 *)
2866 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2867 ac_dummy="$PATH"
2868 for ac_dir in $ac_dummy; do
2869 test -z "$ac_dir" && ac_dir=.
2870 if test -f $ac_dir/$ac_word; then
2871 ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
2872 break
2873 fi
2874 done
2875 IFS="$ac_save_ifs"
2876 test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
2877 ;;
2878 esac
2879 fi
2880 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
2881 if test -n "$SDL_CONFIG"; then
2882 echo "$ac_t""$SDL_CONFIG" 1>&6
2883 else
2884 echo "$ac_t""no" 1>&6
2885 fi
2886
2887 min_sdl_version=$SDL_VERSION
2888 echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
2889 echo "configure:2890: checking for SDL - version >= $min_sdl_version" >&5
2890 no_sdl=""
2891 if test "$SDL_CONFIG" = "no" ; then
2892 no_sdl=yes
2893 else
2894 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
2895 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
2896
2897 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
2898 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2899 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
2900 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2901 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
2902 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2903 if test "x$enable_sdltest" = "xyes" ; then
2904 ac_save_CFLAGS="$CFLAGS"
2905 ac_save_LIBS="$LIBS"
2906 CFLAGS="$CFLAGS $SDL_CFLAGS"
2907 LIBS="$LIBS $SDL_LIBS"
2908 rm -f conf.sdltest
2909 if test "$cross_compiling" = yes; then
2910 echo $ac_n "cross compiling; assumed OK... $ac_c"
2911 else
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915
2916 #include <stdio.h>
2917 #include <stdlib.h>
2918 #include <string.h>
2919 #include "SDL.h"
2920
2921 char*
2922 my_strdup (char *str)
2923 {
2924 char *new_str;
2925
2926 if (str)
2927 {
2928 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
2929 strcpy (new_str, str);
2930 }
2931 else
2932 new_str = NULL;
2933
2934 return new_str;
2935 }
2936
2937 int main (int argc, char *argv[])
2938 {
2939 int major, minor, micro;
2940 char *tmp_version;
2941
2942 /* This hangs on some systems (?)
2943 system ("touch conf.sdltest");
2944 */
2945 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
2946
2947 /* HP/UX 9 (%@#!) writes to sscanf strings */
2948 tmp_version = my_strdup("$min_sdl_version");
2949 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
2950 printf("%s, bad version string\n", "$min_sdl_version");
2951 exit(1);
2952 }
2953
2954 if (($sdl_major_version > major) ||
2955 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
2956 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
2957 {
2958 return 0;
2959 }
2960 else
2961 {
2962 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
2963 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
2964 printf("*** best to upgrade to the required version.\n");
2965 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
2966 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
2967 printf("*** config.cache before re-running configure\n");
2968 return 1;
2969 }
2970 }
2971
2972
2973 EOF
2974 if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2975 then
2976 :
2977 else
2978 echo "configure: failed program was:" >&5
2979 cat conftest.$ac_ext >&5
2980 rm -fr conftest*
2981 no_sdl=yes
2982 fi
2983 rm -fr conftest*
2984 fi
2985
2986 CFLAGS="$ac_save_CFLAGS"
2987 LIBS="$ac_save_LIBS"
2988 fi
2989 fi
2990 if test "x$no_sdl" = x ; then
2991 echo "$ac_t""yes" 1>&6
2992 have_SDL=yes
2993 else
2994 echo "$ac_t""no" 1>&6
2995 if test "$SDL_CONFIG" = "no" ; then
2996 echo "*** The sdl-config script installed by SDL could not be found"
2997 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
2998 echo "*** your path, or set the SDL_CONFIG environment variable to the"
2999 echo "*** full path to sdl-config."
3000 else
3001 if test -f conf.sdltest ; then
3002 :
3003 else
3004 echo "*** Could not run SDL test program, checking why..."
3005 CFLAGS="$CFLAGS $SDL_CFLAGS"
3006 LIBS="$LIBS $SDL_LIBS"
3007 cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010
3011 #include <stdio.h>
3012 #include "SDL.h"
3013
3014 int main() {
3015 return 0;
3016 ; return 0; }
3017 EOF
3018 if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3019 rm -rf conftest*
3020 echo "*** The test program compiled, but did not run. This usually means"
3021 echo "*** that the run-time linker is not finding SDL or finding the wrong"
3022 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
3023 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
3024 echo "*** to the installed location Also, make sure you have run ldconfig if that"
3025 echo "*** is required on your system"
3026 echo "***"
3027 echo "*** If you have an old version installed, it is best to remove it, although"
3028 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
3029 else
3030 echo "configure: failed program was:" >&5
3031 cat conftest.$ac_ext >&5
3032 rm -rf conftest*
3033 echo "*** The test program failed to compile or link. See the file config.log for the"
3034 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
3035 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
3036 echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
3037 fi
3038 rm -f conftest*
3039 CFLAGS="$ac_save_CFLAGS"
3040 LIBS="$ac_save_LIBS"
3041 fi
3042 fi
3043 SDL_CFLAGS=""
3044 SDL_LIBS=""
3045 have_SDL=no
3046 fi
3047
3048
3049 rm -f conf.sdltest
3050
3051
3052 if test "x$have_SDL" = "xyes" ; then
3053 TR_CPPFLAGS="$TR_CPPFLAGS -DHAVE_SDL=1"
3054 TR_CFLAGS="$TR_CFLAGS $SDL_CFLAGS"
3055 TR_CXXFLAGS="$TR_CXXFLAGS $SDL_CFLAGS"
3056 TR_LIBS="$TR_LIBS $SDL_LIBS"
3057
3058 saved_LIBS="$LIBS"
3059 LIBS="$saved_LIBS $TR_LIBS"
3060
3061 for ac_func in SDL_JoystickOpen
3062 do
3063 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_func" >&5
3065 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3066 echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068 cat > conftest.$ac_ext <<EOF
3069 #line 3070 "configure"
3070 #include "confdefs.h"
3071 /* System header to define __stub macros and hopefully few prototypes,
3072 which can conflict with char $ac_func(); below. */
3073 #include <assert.h>
3074 /* Override any gcc2 internal prototype to avoid an error. */
3075 /* We use char because int might match the return type of a gcc2
3076 builtin and then its argument prototype would still apply. */
3077 char $ac_func();
3078
3079 int main() {
3080
3081 /* The GNU C library defines this for functions which it implements
3082 to always fail with ENOSYS. Some functions are actually named
3083 something starting with __ and the normal name is an alias. */
3084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3085 choke me
3086 #else
3087 $ac_func();
3088 #endif
3089
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3093 rm -rf conftest*
3094 eval "ac_cv_func_$ac_func=yes"
3095 else
3096 echo "configure: failed program was:" >&5
3097 cat conftest.$ac_ext >&5
3098 rm -rf conftest*
3099 eval "ac_cv_func_$ac_func=no"
3100 fi
3101 rm -f conftest*
3102 fi
3103
3104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3105 echo "$ac_t""yes" 1>&6
3106 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3107 cat >> confdefs.h <<EOF
3108 #define $ac_tr_func 1
3109 EOF
3110 have_SDL_joystick=yes
3111 else
3112 echo "$ac_t""no" 1>&6
3113 have_SDL_joystick=no
3114 fi
3115 done
3116
3117
3118 if test "x$have_SDL_joystick" = "xno" ; then
3119 echo "*** This version of SDL doesn't have joystick support."
3120 echo "*** Configuring without joystick support."
3121 fi
3122
3123 echo $ac_n "checking for Mix_OpenAudio in -lSDL_mixer""... $ac_c" 1>&6
3124 echo "configure:3125: checking for Mix_OpenAudio in -lSDL_mixer" >&5
3125 ac_lib_var=`echo SDL_mixer'_'Mix_OpenAudio | sed 'y%./+-%__p_%'`
3126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3127 echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129 ac_save_LIBS="$LIBS"
3130 LIBS="-lSDL_mixer $LIBS"
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 /* Override any gcc2 internal prototype to avoid an error. */
3135 /* We use char because int might match the return type of a gcc2
3136 builtin and then its argument prototype would still apply. */
3137 char Mix_OpenAudio();
3138
3139 int main() {
3140 Mix_OpenAudio()
3141 ; return 0; }
3142 EOF
3143 if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3144 rm -rf conftest*
3145 eval "ac_cv_lib_$ac_lib_var=yes"
3146 else
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3149 rm -rf conftest*
3150 eval "ac_cv_lib_$ac_lib_var=no"
3151 fi
3152 rm -f conftest*
3153 LIBS="$ac_save_LIBS"
3154
3155 fi
3156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3157 echo "$ac_t""yes" 1>&6
3158 have_SDL_mixer=yes
3159 else
3160 echo "$ac_t""no" 1>&6
3161 have_SDL_mixer=no
3162 fi
3163
3164
3165 if test "x$have_SDL_mixer" = "xyes" ; then
3166 TR_CPPFLAGS="$TR_CPPFLAGS -DHAVE_SDL_MIXER=1"
3167 TR_LIBS="$TR_LIBS -lSDL_mixer"
3168 else
3169 echo "*** SDL_mixer not found. Configuring without audio support."
3170 fi
3171
3172 LIBS="$saved_LIBS"
3173 else
3174 echo "*** SDL not found. Configuring without audio or joystick support."
3175 fi
3176
3177 fi
3178
3179
3180 # Check whether --enable-stencil-buffer or --disable-stencil-buffer was given.
3181 if test "${enable_stencil_buffer+set}" = set; then
3182 enableval="$enable_stencil_buffer"
3183 TR_CPPFLAGS="$TR_CPPFLAGS -DUSE_STENCIL_BUFFER"
3184 fi
3185
3186
3187 # Check whether --with-data-dir or --without-data-dir was given.
3188 if test "${with_data_dir+set}" = set; then
3189 withval="$with_data_dir"
3190 TR_CPPFLAGS="$TR_CPPFLAGS -DBASE_DIR=\"$withval\""
3191 fi
3192
3193
3194
3195
3196
3197
3198
3199
3200 CPPFLAGS="$CPPFLAGS $TR_CPPFLAGS"
3201 CFLAGS="$CFLAGS $TR_CFLAGS"
3202 CXXFLAGS="$CXXFLAGS $TR_CXXFLAGS"
3203 LIBS="$LIBS $TR_LIBS"
3204
3205 trap '' 1 2 15
3206 cat > confcache <<\EOF
3207 # This file is a shell script that caches the results of configure
3208 # tests run on this system so they can be shared between configure
3209 # scripts and configure runs. It is not useful on other systems.
3210 # If it contains results you don't want to keep, you may remove or edit it.
3211 #
3212 # By default, configure uses ./config.cache as the cache file,
3213 # creating it if it does not exist already. You can give configure
3214 # the --cache-file=FILE option to use a different cache file; that is
3215 # what configure does when it calls configure scripts in
3216 # subdirectories, so they share the cache.
3217 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3218 # config.status only pays attention to the cache file if you give it the
3219 # --recheck option to rerun configure.
3220 #
3221 EOF
3222 # The following way of writing the cache mishandles newlines in values,
3223 # but we know of no workaround that is simple, portable, and efficient.
3224 # So, don't put newlines in cache variables' values.
3225 # Ultrix sh set writes to stderr and can't be redirected directly,
3226 # and sets the high bit in the cache file unless we assign to the vars.
3227 (set) 2>&1 |
3228 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3229 *ac_space=\ *)
3230 # `set' does not quote correctly, so add quotes (double-quote substitution
3231 # turns \\\\ into \\, and sed turns \\ into \).
3232 sed -n \
3233 -e "s/'/'\\\\''/g" \
3234 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3235 ;;
3236 *)
3237 # `set' quotes correctly as required by POSIX, so do not add quotes.
3238 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3239 ;;
3240 esac >> confcache
3241 if cmp -s $cache_file confcache; then
3242 :
3243 else
3244 if test -w $cache_file; then
3245 echo "updating cache $cache_file"
3246 cat confcache > $cache_file
3247 else
3248 echo "not updating unwritable cache $cache_file"
3249 fi
3250 fi
3251 rm -f confcache
3252
3253 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3254
3255 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3256 # Let make expand exec_prefix.
3257 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3258
3259 # Any assignment to VPATH causes Sun make to only execute
3260 # the first set of double-colon rules, so remove it if not needed.
3261 # If there is a colon in the path, we need to keep it.
3262 if test "x$srcdir" = x.; then
3263 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3264 fi
3265
3266 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3267
3268 DEFS=-DHAVE_CONFIG_H
3269
3270 # Without the "./", some shells look in PATH for config.status.
3271 : ${CONFIG_STATUS=./config.status}
3272
3273 echo creating $CONFIG_STATUS
3274 rm -f $CONFIG_STATUS
3275 cat > $CONFIG_STATUS <<EOF
3276 #! /bin/sh
3277 # Generated automatically by configure.
3278 # Run this file to recreate the current configuration.
3279 # This directory was configured as follows,
3280 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3281 #
3282 # $0 $ac_configure_args
3283 #
3284 # Compiler output produced by configure, useful for debugging
3285 # configure, is in ./config.log if it exists.
3286
3287 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3288 for ac_option
3289 do
3290 case "\$ac_option" in
3291 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3292 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3293 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3294 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3295 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3296 exit 0 ;;
3297 -help | --help | --hel | --he | --h)
3298 echo "\$ac_cs_usage"; exit 0 ;;
3299 *) echo "\$ac_cs_usage"; exit 1 ;;
3300 esac
3301 done
3302
3303 ac_given_srcdir=$srcdir
3304 ac_given_INSTALL="$INSTALL"
3305
3306 trap 'rm -fr `echo "Makefile src/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3307 EOF
3308 cat >> $CONFIG_STATUS <<EOF
3309
3310 # Protect against being on the right side of a sed subst in config.status.
3311 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3312 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3313 $ac_vpsub
3314 $extrasub
3315 s%@SHELL@%$SHELL%g
3316 s%@CFLAGS@%$CFLAGS%g
3317 s%@CPPFLAGS@%$CPPFLAGS%g
3318 s%@CXXFLAGS@%$CXXFLAGS%g
3319 s%@FFLAGS@%$FFLAGS%g
3320 s%@DEFS@%$DEFS%g
3321 s%@LDFLAGS@%$LDFLAGS%g
3322 s%@LIBS@%$LIBS%g
3323 s%@exec_prefix@%$exec_prefix%g
3324 s%@prefix@%$prefix%g
3325 s%@program_transform_name@%$program_transform_name%g
3326 s%@bindir@%$bindir%g
3327 s%@sbindir@%$sbindir%g
3328 s%@libexecdir@%$libexecdir%g
3329 s%@datadir@%$datadir%g
3330 s%@sysconfdir@%$sysconfdir%g
3331 s%@sharedstatedir@%$sharedstatedir%g
3332 s%@localstatedir@%$localstatedir%g
3333 s%@libdir@%$libdir%g
3334 s%@includedir@%$includedir%g
3335 s%@oldincludedir@%$oldincludedir%g
3336 s%@infodir@%$infodir%g
3337 s%@mandir@%$mandir%g
3338 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3339 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3340 s%@INSTALL_DATA@%$INSTALL_DATA%g
3341 s%@PACKAGE@%$PACKAGE%g
3342 s%@VERSION@%$VERSION%g
3343 s%@ACLOCAL@%$ACLOCAL%g
3344 s%@AUTOCONF@%$AUTOCONF%g
3345 s%@AUTOMAKE@%$AUTOMAKE%g
3346 s%@AUTOHEADER@%$AUTOHEADER%g
3347 s%@MAKEINFO@%$MAKEINFO%g
3348 s%@SET_MAKE@%$SET_MAKE%g
3349 s%@host@%$host%g
3350 s%@host_alias@%$host_alias%g
3351 s%@host_cpu@%$host_cpu%g
3352 s%@host_vendor@%$host_vendor%g
3353 s%@host_os@%$host_os%g
3354 s%@CC@%$CC%g
3355 s%@CXX@%$CXX%g
3356 s%@RANLIB@%$RANLIB%g
3357 s%@CPP@%$CPP%g
3358 s%@X_CFLAGS@%$X_CFLAGS%g
3359 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3360 s%@X_LIBS@%$X_LIBS%g
3361 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3362 s%@SDL_CONFIG@%$SDL_CONFIG%g
3363 s%@SDL_CFLAGS@%$SDL_CFLAGS%g
3364 s%@SDL_LIBS@%$SDL_LIBS%g
3365 s%@TR_CPPFLAGS@%$TR_CPPFLAGS%g
3366 s%@TR_CFLAGS@%$TR_CFLAGS%g
3367 s%@TR_CXXFLAGS@%$TR_CXXFLAGS%g
3368 s%@TR_LIBS@%$TR_LIBS%g
3369
3370 CEOF
3371 EOF
3372
3373 cat >> $CONFIG_STATUS <<\EOF
3374
3375 # Split the substitutions into bite-sized pieces for seds with
3376 # small command number limits, like on Digital OSF/1 and HP-UX.
3377 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3378 ac_file=1 # Number of current file.
3379 ac_beg=1 # First line for current file.
3380 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3381 ac_more_lines=:
3382 ac_sed_cmds=""
3383 while $ac_more_lines; do
3384 if test $ac_beg -gt 1; then
3385 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3386 else
3387 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3388 fi
3389 if test ! -s conftest.s$ac_file; then
3390 ac_more_lines=false
3391 rm -f conftest.s$ac_file
3392 else
3393 if test -z "$ac_sed_cmds"; then
3394 ac_sed_cmds="sed -f conftest.s$ac_file"
3395 else
3396 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3397 fi
3398 ac_file=`expr $ac_file + 1`
3399 ac_beg=$ac_end
3400 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3401 fi
3402 done
3403 if test -z "$ac_sed_cmds"; then
3404 ac_sed_cmds=cat
3405 fi
3406 EOF
3407
3408 cat >> $CONFIG_STATUS <<EOF
3409
3410 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile "}
3411 EOF
3412 cat >> $CONFIG_STATUS <<\EOF
3413 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3414 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3415 case "$ac_file" in
3416 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3417 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3418 *) ac_file_in="${ac_file}.in" ;;
3419 esac
3420
3421 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3422
3423 # Remove last slash and all that follows it. Not all systems have dirname.
3424 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3425 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3426 # The file is in a subdirectory.
3427 test ! -d "$ac_dir" && mkdir "$ac_dir"
3428 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3429 # A "../" for each directory in $ac_dir_suffix.
3430 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3431 else
3432 ac_dir_suffix= ac_dots=
3433 fi
3434
3435 case "$ac_given_srcdir" in
3436 .) srcdir=.
3437 if test -z "$ac_dots"; then top_srcdir=.
3438 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3439 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3440 *) # Relative path.
3441 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3442 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3443 esac
3444
3445 case "$ac_given_INSTALL" in
3446 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3447 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3448 esac
3449
3450 echo creating "$ac_file"
3451 rm -f "$ac_file"
3452 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3453 case "$ac_file" in
3454 *Makefile*) ac_comsub="1i\\
3455 # $configure_input" ;;
3456 *) ac_comsub= ;;
3457 esac
3458
3459 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3460 sed -e "$ac_comsub
3461 s%@configure_input@%$configure_input%g
3462 s%@srcdir@%$srcdir%g
3463 s%@top_srcdir@%$top_srcdir%g
3464 s%@INSTALL@%$INSTALL%g
3465 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3466 fi; done
3467 rm -f conftest.s*
3468
3469 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3470 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3471 #
3472 # ac_d sets the value in "#define NAME VALUE" lines.
3473 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3474 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3475 ac_dC='\3'
3476 ac_dD='%g'
3477 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3478 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3479 ac_uB='\([ ]\)%\1#\2define\3'
3480 ac_uC=' '
3481 ac_uD='\4%g'
3482 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3483 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3484 ac_eB='$%\1#\2define\3'
3485 ac_eC=' '
3486 ac_eD='%g'
3487
3488 if test "${CONFIG_HEADERS+set}" != set; then
3489 EOF
3490 cat >> $CONFIG_STATUS <<EOF
3491 CONFIG_HEADERS="config.h"
3492 EOF
3493 cat >> $CONFIG_STATUS <<\EOF
3494 fi
3495 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3496 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3497 case "$ac_file" in
3498 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3499 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3500 *) ac_file_in="${ac_file}.in" ;;
3501 esac
3502
3503 echo creating $ac_file
3504
3505 rm -f conftest.frag conftest.in conftest.out
3506 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3507 cat $ac_file_inputs > conftest.in
3508
3509 EOF
3510
3511 # Transform confdefs.h into a sed script conftest.vals that substitutes
3512 # the proper values into config.h.in to produce config.h. And first:
3513 # Protect against being on the right side of a sed subst in config.status.
3514 # Protect against being in an unquoted here document in config.status.
3515 rm -f conftest.vals
3516 cat > conftest.hdr <<\EOF
3517 s/[\\&%]/\\&/g
3518 s%[\\$`]%\\&%g
3519 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3520 s%ac_d%ac_u%gp
3521 s%ac_u%ac_e%gp
3522 EOF
3523 sed -n -f conftest.hdr confdefs.h > conftest.vals
3524 rm -f conftest.hdr
3525
3526 # This sed command replaces #undef with comments. This is necessary, for
3527 # example, in the case of _POSIX_SOURCE, which is predefined and required
3528 # on some systems where configure will not decide to define it.
3529 cat >> conftest.vals <<\EOF
3530 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3531 EOF
3532
3533 # Break up conftest.vals because some shells have a limit on
3534 # the size of here documents, and old seds have small limits too.
3535
3536 rm -f conftest.tail
3537 while :
3538 do
3539 ac_lines=`grep -c . conftest.vals`
3540 # grep -c gives empty output for an empty file on some AIX systems.
3541 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3542 # Write a limited-size here document to conftest.frag.
3543 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3544 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3545 echo 'CEOF
3546 sed -f conftest.frag conftest.in > conftest.out
3547 rm -f conftest.in
3548 mv conftest.out conftest.in
3549 ' >> $CONFIG_STATUS
3550 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3551 rm -f conftest.vals
3552 mv conftest.tail conftest.vals
3553 done
3554 rm -f conftest.vals
3555
3556 cat >> $CONFIG_STATUS <<\EOF
3557 rm -f conftest.frag conftest.h
3558 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3559 cat conftest.in >> conftest.h
3560 rm -f conftest.in
3561 if cmp -s $ac_file conftest.h 2>/dev/null; then
3562 echo "$ac_file is unchanged"
3563 rm -f conftest.h
3564 else
3565 # Remove last slash and all that follows it. Not all systems have dirname.
3566 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3567 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3568 # The file is in a subdirectory.
3569 test ! -d "$ac_dir" && mkdir "$ac_dir"
3570 fi
3571 rm -f $ac_file
3572 mv conftest.h $ac_file
3573 fi
3574 fi; done
3575
3576 EOF
3577 cat >> $CONFIG_STATUS <<EOF
3578
3579
3580 EOF
3581 cat >> $CONFIG_STATUS <<\EOF
3582 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3583
3584 exit 0
3585 EOF
3586 chmod +x $CONFIG_STATUS
3587 rm -fr confdefs* $ac_clean_files
3588 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3589