Import Debian changes 1.23-6
[debian-dgen.git] / configure
blob4f36bc095921494ee38a7b075698b616b414557d
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-extra-opt Add extra optimizations (egcs/GCC >= 2.95 only)"
16 ac_help="$ac_help
17 --with-sdl-prefix=PFX Prefix where SDL is installed (optional)"
18 ac_help="$ac_help
19 --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)"
20 ac_help="$ac_help
21 --disable-sdltest Do not try to compile and run a test SDL program"
22 ac_help="$ac_help
23 --with-x use the X Window System"
24 ac_help="$ac_help
25 --without-opengl Don't use SDL OpenGL support"
26 ac_help="$ac_help
27 --without-nasm Don't use NASM for assembler routines"
28 ac_help="$ac_help
29 --without-mmx Don't use MMX routines, even if supported"
30 ac_help="$ac_help
31 --without-star Don't use StarScream assembler CPU core if available"
32 ac_help="$ac_help
33 --without-musa Don't use Musashi C CPU core"
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'
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
76 ac_prev=
77 for ac_option
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
87 case "$ac_option" in
88 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89 *) ac_optarg= ;;
90 esac
92 # Accept the important Cygnus configure options, so we can diagnose typos.
94 case "$ac_option" in
96 -bindir | --bindir | --bindi | --bind | --bin | --bi)
97 ac_prev=bindir ;;
98 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
99 bindir="$ac_optarg" ;;
101 -build | --build | --buil | --bui | --bu)
102 ac_prev=build ;;
103 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
104 build="$ac_optarg" ;;
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" ;;
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" ;;
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; }
125 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126 eval "enable_${ac_feature}=no" ;;
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; }
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'" ;;
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" ;;
150 -gas | --gas | --ga | --g)
151 # Obsolete; use --with-gas.
152 with_gas=yes ;;
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
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
204 if test -n "$ac_help"; then
205 echo "--enable and --with options recognized:$ac_help"
207 exit 0 ;;
209 -host | --host | --hos | --ho)
210 ac_prev=host ;;
211 -host=* | --host=* | --hos=* | --ho=*)
212 host="$ac_optarg" ;;
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" ;;
221 -infodir | --infodir | --infodi | --infod | --info | --inf)
222 ac_prev=infodir ;;
223 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
224 infodir="$ac_optarg" ;;
226 -libdir | --libdir | --libdi | --libd)
227 ac_prev=libdir ;;
228 -libdir=* | --libdir=* | --libdi=* | --libd=*)
229 libdir="$ac_optarg" ;;
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" ;;
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" ;;
247 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
248 ac_prev=mandir ;;
249 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
250 mandir="$ac_optarg" ;;
252 -nfp | --nfp | --nf)
253 # Obsolete; use --without-fp.
254 with_fp=no ;;
256 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
257 | --no-cr | --no-c)
258 no_create=yes ;;
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 ;;
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" ;;
273 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
274 ac_prev=prefix ;;
275 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
276 prefix="$ac_optarg" ;;
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" ;;
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" ;;
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" ;;
309 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
310 | -silent | --silent | --silen | --sile | --sil)
311 silent=yes ;;
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" ;;
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" ;;
330 -site | --site | --sit)
331 ac_prev=site ;;
332 -site=* | --site=* | --sit=*)
333 site="$ac_optarg" ;;
335 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
336 ac_prev=srcdir ;;
337 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
338 srcdir="$ac_optarg" ;;
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" ;;
347 -target | --target | --targe | --targ | --tar | --ta | --t)
348 ac_prev=target ;;
349 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
350 target="$ac_optarg" ;;
352 -v | -verbose | --verbose | --verbos | --verbo | --verb)
353 verbose=yes ;;
355 -version | --version | --versio | --versi | --vers)
356 echo "configure generated by autoconf version 2.13"
357 exit 0 ;;
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; }
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'" ;;
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; }
378 ac_package=`echo $ac_package| sed 's/-/_/g'`
379 eval "with_${ac_package}=no" ;;
381 --x)
382 # Obsolete; use --with-x.
383 with_x=yes ;;
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" ;;
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" ;;
399 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
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
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; }
409 nonopt="$ac_option"
412 esac
413 done
415 if test -n "$ac_prev"; then
416 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
419 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
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
434 exec 5>./config.log
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
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
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
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
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
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=decode.c
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=..
487 else
488 ac_srcdir_defaulted=no
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; }
497 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
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"
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"
512 done
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
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
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 ghazi@caip.rutgers.edu.
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=
539 else
540 ac_n= ac_c='\c' ac_t=
545 ac_aux_dir=
546 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547 if test -f $ac_dir/install-sh; then
548 ac_aux_dir=$ac_dir
549 ac_install_sh="$ac_aux_dir/install-sh -c"
550 break
551 elif test -f $ac_dir/install.sh; then
552 ac_aux_dir=$ac_dir
553 ac_install_sh="$ac_aux_dir/install.sh -c"
554 break
556 done
557 if test -z "$ac_aux_dir"; then
558 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
560 ac_config_guess=$ac_aux_dir/config.guess
561 ac_config_sub=$ac_aux_dir/config.sub
562 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
565 # Do some error checking and defaulting for the host and target type.
566 # The inputs are:
567 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
569 # The rules are:
570 # 1. You are not allowed to specify --host, --target, and nonopt at the
571 # same time.
572 # 2. Host defaults to nonopt.
573 # 3. If nonopt is not specified, then host defaults to the current host,
574 # as determined by config.guess.
575 # 4. Target and build default to nonopt.
576 # 5. If nonopt is not specified, then target and build default to host.
578 # The aliases save the names the user supplied, while $host etc.
579 # will get canonicalized.
580 case $host---$target---$nonopt in
581 NONE---*---* | *---NONE---* | *---*---NONE) ;;
582 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
583 esac
586 # Make sure we can run config.sub.
587 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
588 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
591 echo $ac_n "checking host system type""... $ac_c" 1>&6
592 echo "configure:593: checking host system type" >&5
594 host_alias=$host
595 case "$host_alias" in
596 NONE)
597 case $nonopt in
598 NONE)
599 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
600 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
601 fi ;;
602 *) host_alias=$nonopt ;;
603 esac ;;
604 esac
606 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
607 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
608 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
609 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
610 echo "$ac_t""$host" 1>&6
612 echo $ac_n "checking target system type""... $ac_c" 1>&6
613 echo "configure:614: checking target system type" >&5
615 target_alias=$target
616 case "$target_alias" in
617 NONE)
618 case $nonopt in
619 NONE) target_alias=$host_alias ;;
620 *) target_alias=$nonopt ;;
621 esac ;;
622 esac
624 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
625 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628 echo "$ac_t""$target" 1>&6
630 echo $ac_n "checking build system type""... $ac_c" 1>&6
631 echo "configure:632: checking build system type" >&5
633 build_alias=$build
634 case "$build_alias" in
635 NONE)
636 case $nonopt in
637 NONE) build_alias=$host_alias ;;
638 *) build_alias=$nonopt ;;
639 esac ;;
640 esac
642 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
643 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$build" 1>&6
648 test "$host_alias" != "$target_alias" &&
649 test "$program_prefix$program_suffix$program_transform_name" = \
650 NONENONEs,x,x, &&
651 program_prefix=${target_alias}-
653 machtype=$target_cpu
655 # Find a good install program. We prefer a C program (faster),
656 # so one script is as good as another. But avoid the broken or
657 # incompatible versions:
658 # SysV /etc/install, /usr/sbin/install
659 # SunOS /usr/etc/install
660 # IRIX /sbin/install
661 # AIX /bin/install
662 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
663 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
664 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
665 # ./install, which can be erroneously created by make from ./install.sh.
666 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
667 echo "configure:668: checking for a BSD compatible install" >&5
668 if test -z "$INSTALL"; then
669 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
670 echo $ac_n "(cached) $ac_c" 1>&6
671 else
672 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
673 for ac_dir in $PATH; do
674 # Account for people who put trailing slashes in PATH elements.
675 case "$ac_dir/" in
676 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
678 # OSF1 and SCO ODT 3.0 have their own names for install.
679 # Don't use installbsd from OSF since it installs stuff as root
680 # by default.
681 for ac_prog in ginstall scoinst install; do
682 if test -f $ac_dir/$ac_prog; then
683 if test $ac_prog = install &&
684 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
685 # AIX install. It has an incompatible calling convention.
687 else
688 ac_cv_path_install="$ac_dir/$ac_prog -c"
689 break 2
692 done
694 esac
695 done
696 IFS="$ac_save_IFS"
699 if test "${ac_cv_path_install+set}" = set; then
700 INSTALL="$ac_cv_path_install"
701 else
702 # As a last resort, use the slow shell script. We don't cache a
703 # path for INSTALL within a source directory, because that will
704 # break other packages using the cache if that directory is
705 # removed, or if the path is relative.
706 INSTALL="$ac_install_sh"
709 echo "$ac_t""$INSTALL" 1>&6
711 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
712 # It thinks the first close brace ends the variable substitution.
713 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
715 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
717 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
719 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
720 echo "configure:721: checking whether build environment is sane" >&5
721 # Just in case
722 sleep 1
723 echo timestamp > conftestfile
724 # Do `set' in a subshell so we don't clobber the current shell's
725 # arguments. Must try -L first in case configure is actually a
726 # symlink; some systems play weird games with the mod time of symlinks
727 # (eg FreeBSD returns the mod time of the symlink's containing
728 # directory).
729 if (
730 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
731 if test "$*" = "X"; then
732 # -L didn't work.
733 set X `ls -t $srcdir/configure conftestfile`
735 if test "$*" != "X $srcdir/configure conftestfile" \
736 && test "$*" != "X conftestfile $srcdir/configure"; then
738 # If neither matched, then we have a broken ls. This can happen
739 # if, for instance, CONFIG_SHELL is bash and it inherits a
740 # broken ls alias from the environment. This has actually
741 # happened. Such a system could not be considered "sane".
742 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
743 alias in your environment" 1>&2; exit 1; }
746 test "$2" = conftestfile
748 then
749 # Ok.
751 else
752 { echo "configure: error: newly created file is older than distributed files!
753 Check your system clock" 1>&2; exit 1; }
755 rm -f conftest*
756 echo "$ac_t""yes" 1>&6
757 if test "$program_transform_name" = s,x,x,; then
758 program_transform_name=
759 else
760 # Double any \ or $. echo might interpret backslashes.
761 cat <<\EOF_SED > conftestsed
762 s,\\,\\\\,g; s,\$,$$,g
763 EOF_SED
764 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
765 rm -f conftestsed
767 test "$program_prefix" != NONE &&
768 program_transform_name="s,^,${program_prefix},; $program_transform_name"
769 # Use a double $ so make ignores it.
770 test "$program_suffix" != NONE &&
771 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
773 # sed with no file args requires a program.
774 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
776 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
777 echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
778 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
779 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
780 echo $ac_n "(cached) $ac_c" 1>&6
781 else
782 cat > conftestmake <<\EOF
783 all:
784 @echo 'ac_maketemp="${MAKE}"'
786 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
787 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
788 if test -n "$ac_maketemp"; then
789 eval ac_cv_prog_make_${ac_make}_set=yes
790 else
791 eval ac_cv_prog_make_${ac_make}_set=no
793 rm -f conftestmake
795 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
796 echo "$ac_t""yes" 1>&6
797 SET_MAKE=
798 else
799 echo "$ac_t""no" 1>&6
800 SET_MAKE="MAKE=${MAKE-make}"
804 PACKAGE=dgen-sdl
806 VERSION=1.23
808 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
809 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
811 cat >> confdefs.h <<EOF
812 #define PACKAGE "$PACKAGE"
815 cat >> confdefs.h <<EOF
816 #define VERSION "$VERSION"
821 missing_dir=`cd $ac_aux_dir && pwd`
822 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
823 echo "configure:824: checking for working aclocal" >&5
824 # Run test in a subshell; some versions of sh will print an error if
825 # an executable is not found, even if stderr is redirected.
826 # Redirect stdin to placate older versions of autoconf. Sigh.
827 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
828 ACLOCAL=aclocal
829 echo "$ac_t""found" 1>&6
830 else
831 ACLOCAL="$missing_dir/missing aclocal"
832 echo "$ac_t""missing" 1>&6
835 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
836 echo "configure:837: checking for working autoconf" >&5
837 # Run test in a subshell; some versions of sh will print an error if
838 # an executable is not found, even if stderr is redirected.
839 # Redirect stdin to placate older versions of autoconf. Sigh.
840 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
841 AUTOCONF=autoconf
842 echo "$ac_t""found" 1>&6
843 else
844 AUTOCONF="$missing_dir/missing autoconf"
845 echo "$ac_t""missing" 1>&6
848 echo $ac_n "checking for working automake""... $ac_c" 1>&6
849 echo "configure:850: checking for working automake" >&5
850 # Run test in a subshell; some versions of sh will print an error if
851 # an executable is not found, even if stderr is redirected.
852 # Redirect stdin to placate older versions of autoconf. Sigh.
853 if (automake --version) < /dev/null > /dev/null 2>&1; then
854 AUTOMAKE=automake
855 echo "$ac_t""found" 1>&6
856 else
857 AUTOMAKE="$missing_dir/missing automake"
858 echo "$ac_t""missing" 1>&6
861 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
862 echo "configure:863: checking for working autoheader" >&5
863 # Run test in a subshell; some versions of sh will print an error if
864 # an executable is not found, even if stderr is redirected.
865 # Redirect stdin to placate older versions of autoconf. Sigh.
866 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
867 AUTOHEADER=autoheader
868 echo "$ac_t""found" 1>&6
869 else
870 AUTOHEADER="$missing_dir/missing autoheader"
871 echo "$ac_t""missing" 1>&6
874 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
875 echo "configure:876: checking for working makeinfo" >&5
876 # Run test in a subshell; some versions of sh will print an error if
877 # an executable is not found, even if stderr is redirected.
878 # Redirect stdin to placate older versions of autoconf. Sigh.
879 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
880 MAKEINFO=makeinfo
881 echo "$ac_t""found" 1>&6
882 else
883 MAKEINFO="$missing_dir/missing makeinfo"
884 echo "$ac_t""missing" 1>&6
889 # Check whether --with-extra-opt or --without-extra-opt was given.
890 if test "${with_extra_opt+set}" = set; then
891 withval="$with_extra_opt"
892 ADD_OPT=$withval
893 else
894 ADD_OPT=no
898 if test x$ADD_OPT \!= xno; then
899 case $machtype in
900 i?86)
901 CFLAGS="$CFLAGS -O3 -mpentium -march=pentium -fstrength-reduce -fomit-frame-pointer -frerun-cse-after-loop -funroll-loops -ffast-math -malign-functions=5 -malign-jumps=5 -malign-loops=5 -malign-double -fno-exceptions -fno-rtti"
902 CXXFLAGS="$CXXFLAGS -O3 -mpentium -march=pentium -fstrength-reduce -fomit-frame-pointer -frerun-cse-after-loop -funroll-loops -ffast-math -malign-functions=5 -malign-jumps=5 -malign-loops=5 -malign-double -fno-exceptions -fno-rtti"
905 CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -fno-exceptions -fno-rtti -funroll-loops -frerun-cse-after-loop"
906 CXXFLAGS="$CXXFLAGS -O3 -ffast-math -fomit-frame-pointer -fno-exceptions -fno-rtti -funroll-loops -frerun-cse-after-loop"
908 esac
911 for ac_prog in mawk gawk nawk awk
913 # Extract the first word of "$ac_prog", so it can be a program name with args.
914 set dummy $ac_prog; ac_word=$2
915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
916 echo "configure:917: checking for $ac_word" >&5
917 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
918 echo $ac_n "(cached) $ac_c" 1>&6
919 else
920 if test -n "$AWK"; then
921 ac_cv_prog_AWK="$AWK" # Let the user override the test.
922 else
923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
924 ac_dummy="$PATH"
925 for ac_dir in $ac_dummy; do
926 test -z "$ac_dir" && ac_dir=.
927 if test -f $ac_dir/$ac_word; then
928 ac_cv_prog_AWK="$ac_prog"
929 break
931 done
932 IFS="$ac_save_ifs"
935 AWK="$ac_cv_prog_AWK"
936 if test -n "$AWK"; then
937 echo "$ac_t""$AWK" 1>&6
938 else
939 echo "$ac_t""no" 1>&6
942 test -n "$AWK" && break
943 done
945 # Extract the first word of "gcc", so it can be a program name with args.
946 set dummy gcc; ac_word=$2
947 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
948 echo "configure:949: checking for $ac_word" >&5
949 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
950 echo $ac_n "(cached) $ac_c" 1>&6
951 else
952 if test -n "$CC"; then
953 ac_cv_prog_CC="$CC" # Let the user override the test.
954 else
955 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
956 ac_dummy="$PATH"
957 for ac_dir in $ac_dummy; do
958 test -z "$ac_dir" && ac_dir=.
959 if test -f $ac_dir/$ac_word; then
960 ac_cv_prog_CC="gcc"
961 break
963 done
964 IFS="$ac_save_ifs"
967 CC="$ac_cv_prog_CC"
968 if test -n "$CC"; then
969 echo "$ac_t""$CC" 1>&6
970 else
971 echo "$ac_t""no" 1>&6
974 if test -z "$CC"; then
975 # Extract the first word of "cc", so it can be a program name with args.
976 set dummy cc; ac_word=$2
977 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
978 echo "configure:979: checking for $ac_word" >&5
979 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
980 echo $ac_n "(cached) $ac_c" 1>&6
981 else
982 if test -n "$CC"; then
983 ac_cv_prog_CC="$CC" # Let the user override the test.
984 else
985 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
986 ac_prog_rejected=no
987 ac_dummy="$PATH"
988 for ac_dir in $ac_dummy; do
989 test -z "$ac_dir" && ac_dir=.
990 if test -f $ac_dir/$ac_word; then
991 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
992 ac_prog_rejected=yes
993 continue
995 ac_cv_prog_CC="cc"
996 break
998 done
999 IFS="$ac_save_ifs"
1000 if test $ac_prog_rejected = yes; then
1001 # We found a bogon in the path, so make sure we never use it.
1002 set dummy $ac_cv_prog_CC
1003 shift
1004 if test $# -gt 0; then
1005 # We chose a different compiler from the bogus one.
1006 # However, it has the same basename, so the bogon will be chosen
1007 # first if we set CC to just the basename; use the full file name.
1008 shift
1009 set dummy "$ac_dir/$ac_word" "$@"
1010 shift
1011 ac_cv_prog_CC="$@"
1016 CC="$ac_cv_prog_CC"
1017 if test -n "$CC"; then
1018 echo "$ac_t""$CC" 1>&6
1019 else
1020 echo "$ac_t""no" 1>&6
1023 if test -z "$CC"; then
1024 case "`uname -s`" in
1025 *win32* | *WIN32*)
1026 # Extract the first word of "cl", so it can be a program name with args.
1027 set dummy cl; ac_word=$2
1028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1029 echo "configure:1030: checking for $ac_word" >&5
1030 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1031 echo $ac_n "(cached) $ac_c" 1>&6
1032 else
1033 if test -n "$CC"; then
1034 ac_cv_prog_CC="$CC" # Let the user override the test.
1035 else
1036 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1037 ac_dummy="$PATH"
1038 for ac_dir in $ac_dummy; do
1039 test -z "$ac_dir" && ac_dir=.
1040 if test -f $ac_dir/$ac_word; then
1041 ac_cv_prog_CC="cl"
1042 break
1044 done
1045 IFS="$ac_save_ifs"
1048 CC="$ac_cv_prog_CC"
1049 if test -n "$CC"; then
1050 echo "$ac_t""$CC" 1>&6
1051 else
1052 echo "$ac_t""no" 1>&6
1055 esac
1057 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1060 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1061 echo "configure:1062: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1063 ac_ext=c
1064 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1065 ac_cpp='$CPP $CPPFLAGS'
1066 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1067 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1068 cross_compiling=$ac_cv_prog_cc_cross
1070 cat > conftest.$ac_ext << EOF
1072 #line 1073 "configure"
1073 #include "confdefs.h"
1075 main(){return(0);}
1077 if { (eval echo configure:1078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1078 ac_cv_prog_cc_works=yes
1079 # If we can't run a trivial program, we are probably using a cross compiler.
1080 if (./conftest; exit) 2>/dev/null; then
1081 ac_cv_prog_cc_cross=no
1082 else
1083 ac_cv_prog_cc_cross=yes
1085 else
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 ac_cv_prog_cc_works=no
1090 rm -fr conftest*
1091 ac_ext=c
1092 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1093 ac_cpp='$CPP $CPPFLAGS'
1094 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1095 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1096 cross_compiling=$ac_cv_prog_cc_cross
1098 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1099 if test $ac_cv_prog_cc_works = no; then
1100 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1102 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1103 echo "configure:1104: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1104 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1105 cross_compiling=$ac_cv_prog_cc_cross
1107 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1108 echo "configure:1109: checking whether we are using GNU C" >&5
1109 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1110 echo $ac_n "(cached) $ac_c" 1>&6
1111 else
1112 cat > conftest.c <<EOF
1113 #ifdef __GNUC__
1114 yes;
1115 #endif
1117 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1118 ac_cv_prog_gcc=yes
1119 else
1120 ac_cv_prog_gcc=no
1124 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1126 if test $ac_cv_prog_gcc = yes; then
1127 GCC=yes
1128 else
1129 GCC=
1132 ac_test_CFLAGS="${CFLAGS+set}"
1133 ac_save_CFLAGS="$CFLAGS"
1134 CFLAGS=
1135 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1136 echo "configure:1137: checking whether ${CC-cc} accepts -g" >&5
1137 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140 echo 'void f(){}' > conftest.c
1141 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1142 ac_cv_prog_cc_g=yes
1143 else
1144 ac_cv_prog_cc_g=no
1146 rm -f conftest*
1150 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1151 if test "$ac_test_CFLAGS" = set; then
1152 CFLAGS="$ac_save_CFLAGS"
1153 elif test $ac_cv_prog_cc_g = yes; then
1154 if test "$GCC" = yes; then
1155 CFLAGS="-g -O2"
1156 else
1157 CFLAGS="-g"
1159 else
1160 if test "$GCC" = yes; then
1161 CFLAGS="-O2"
1162 else
1163 CFLAGS=
1167 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1168 echo "configure:1169: checking how to run the C preprocessor" >&5
1169 # On Suns, sometimes $CPP names a directory.
1170 if test -n "$CPP" && test -d "$CPP"; then
1171 CPP=
1173 if test -z "$CPP"; then
1174 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177 # This must be in double quotes, not single quotes, because CPP may get
1178 # substituted into the Makefile and "${CC-cc}" will confuse make.
1179 CPP="${CC-cc} -E"
1180 # On the NeXT, cc -E runs the code through the compiler's parser,
1181 # not just through cpp.
1182 cat > conftest.$ac_ext <<EOF
1183 #line 1184 "configure"
1184 #include "confdefs.h"
1185 #include <assert.h>
1186 Syntax Error
1188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189 { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191 if test -z "$ac_err"; then
1193 else
1194 echo "$ac_err" >&5
1195 echo "configure: failed program was:" >&5
1196 cat conftest.$ac_ext >&5
1197 rm -rf conftest*
1198 CPP="${CC-cc} -E -traditional-cpp"
1199 cat > conftest.$ac_ext <<EOF
1200 #line 1201 "configure"
1201 #include "confdefs.h"
1202 #include <assert.h>
1203 Syntax Error
1205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1206 { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1208 if test -z "$ac_err"; then
1210 else
1211 echo "$ac_err" >&5
1212 echo "configure: failed program was:" >&5
1213 cat conftest.$ac_ext >&5
1214 rm -rf conftest*
1215 CPP="${CC-cc} -nologo -E"
1216 cat > conftest.$ac_ext <<EOF
1217 #line 1218 "configure"
1218 #include "confdefs.h"
1219 #include <assert.h>
1220 Syntax Error
1222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1223 { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1225 if test -z "$ac_err"; then
1227 else
1228 echo "$ac_err" >&5
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1231 rm -rf conftest*
1232 CPP=/lib/cpp
1234 rm -f conftest*
1236 rm -f conftest*
1238 rm -f conftest*
1239 ac_cv_prog_CPP="$CPP"
1241 CPP="$ac_cv_prog_CPP"
1242 else
1243 ac_cv_prog_CPP="$CPP"
1245 echo "$ac_t""$CPP" 1>&6
1247 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1249 # Extract the first word of "$ac_prog", so it can be a program name with args.
1250 set dummy $ac_prog; ac_word=$2
1251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1252 echo "configure:1253: checking for $ac_word" >&5
1253 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255 else
1256 if test -n "$CXX"; then
1257 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1258 else
1259 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1260 ac_dummy="$PATH"
1261 for ac_dir in $ac_dummy; do
1262 test -z "$ac_dir" && ac_dir=.
1263 if test -f $ac_dir/$ac_word; then
1264 ac_cv_prog_CXX="$ac_prog"
1265 break
1267 done
1268 IFS="$ac_save_ifs"
1271 CXX="$ac_cv_prog_CXX"
1272 if test -n "$CXX"; then
1273 echo "$ac_t""$CXX" 1>&6
1274 else
1275 echo "$ac_t""no" 1>&6
1278 test -n "$CXX" && break
1279 done
1280 test -n "$CXX" || CXX="gcc"
1283 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1284 echo "configure:1285: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1286 ac_ext=C
1287 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1288 ac_cpp='$CXXCPP $CPPFLAGS'
1289 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1290 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1291 cross_compiling=$ac_cv_prog_cxx_cross
1293 cat > conftest.$ac_ext << EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1298 int main(){return(0);}
1300 if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1301 ac_cv_prog_cxx_works=yes
1302 # If we can't run a trivial program, we are probably using a cross compiler.
1303 if (./conftest; exit) 2>/dev/null; then
1304 ac_cv_prog_cxx_cross=no
1305 else
1306 ac_cv_prog_cxx_cross=yes
1308 else
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 ac_cv_prog_cxx_works=no
1313 rm -fr conftest*
1314 ac_ext=c
1315 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1316 ac_cpp='$CPP $CPPFLAGS'
1317 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1318 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1319 cross_compiling=$ac_cv_prog_cc_cross
1321 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1322 if test $ac_cv_prog_cxx_works = no; then
1323 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1325 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1326 echo "configure:1327: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1327 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1328 cross_compiling=$ac_cv_prog_cxx_cross
1330 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1331 echo "configure:1332: checking whether we are using GNU C++" >&5
1332 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 cat > conftest.C <<EOF
1336 #ifdef __GNUC__
1337 yes;
1338 #endif
1340 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1341 ac_cv_prog_gxx=yes
1342 else
1343 ac_cv_prog_gxx=no
1347 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1349 if test $ac_cv_prog_gxx = yes; then
1350 GXX=yes
1351 else
1352 GXX=
1355 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1356 ac_save_CXXFLAGS="$CXXFLAGS"
1357 CXXFLAGS=
1358 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1359 echo "configure:1360: checking whether ${CXX-g++} accepts -g" >&5
1360 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363 echo 'void f(){}' > conftest.cc
1364 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1365 ac_cv_prog_cxx_g=yes
1366 else
1367 ac_cv_prog_cxx_g=no
1369 rm -f conftest*
1373 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1374 if test "$ac_test_CXXFLAGS" = set; then
1375 CXXFLAGS="$ac_save_CXXFLAGS"
1376 elif test $ac_cv_prog_cxx_g = yes; then
1377 if test "$GXX" = yes; then
1378 CXXFLAGS="-g -O2"
1379 else
1380 CXXFLAGS="-g"
1382 else
1383 if test "$GXX" = yes; then
1384 CXXFLAGS="-O2"
1385 else
1386 CXXFLAGS=
1390 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1391 echo "configure:1392: checking how to run the C++ preprocessor" >&5
1392 if test -z "$CXXCPP"; then
1393 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395 else
1396 ac_ext=C
1397 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1398 ac_cpp='$CXXCPP $CPPFLAGS'
1399 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1400 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1401 cross_compiling=$ac_cv_prog_cxx_cross
1402 CXXCPP="${CXX-g++} -E"
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1406 #include <stdlib.h>
1408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1409 { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1411 if test -z "$ac_err"; then
1413 else
1414 echo "$ac_err" >&5
1415 echo "configure: failed program was:" >&5
1416 cat conftest.$ac_ext >&5
1417 rm -rf conftest*
1418 CXXCPP=/lib/cpp
1420 rm -f conftest*
1421 ac_cv_prog_CXXCPP="$CXXCPP"
1422 ac_ext=c
1423 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1424 ac_cpp='$CPP $CPPFLAGS'
1425 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1426 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1427 cross_compiling=$ac_cv_prog_cc_cross
1430 CXXCPP="$ac_cv_prog_CXXCPP"
1431 echo "$ac_t""$CXXCPP" 1>&6
1433 # Find a good install program. We prefer a C program (faster),
1434 # so one script is as good as another. But avoid the broken or
1435 # incompatible versions:
1436 # SysV /etc/install, /usr/sbin/install
1437 # SunOS /usr/etc/install
1438 # IRIX /sbin/install
1439 # AIX /bin/install
1440 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1441 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1442 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1443 # ./install, which can be erroneously created by make from ./install.sh.
1444 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1445 echo "configure:1446: checking for a BSD compatible install" >&5
1446 if test -z "$INSTALL"; then
1447 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1448 echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1451 for ac_dir in $PATH; do
1452 # Account for people who put trailing slashes in PATH elements.
1453 case "$ac_dir/" in
1454 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1456 # OSF1 and SCO ODT 3.0 have their own names for install.
1457 # Don't use installbsd from OSF since it installs stuff as root
1458 # by default.
1459 for ac_prog in ginstall scoinst install; do
1460 if test -f $ac_dir/$ac_prog; then
1461 if test $ac_prog = install &&
1462 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1463 # AIX install. It has an incompatible calling convention.
1465 else
1466 ac_cv_path_install="$ac_dir/$ac_prog -c"
1467 break 2
1470 done
1472 esac
1473 done
1474 IFS="$ac_save_IFS"
1477 if test "${ac_cv_path_install+set}" = set; then
1478 INSTALL="$ac_cv_path_install"
1479 else
1480 # As a last resort, use the slow shell script. We don't cache a
1481 # path for INSTALL within a source directory, because that will
1482 # break other packages using the cache if that directory is
1483 # removed, or if the path is relative.
1484 INSTALL="$ac_install_sh"
1487 echo "$ac_t""$INSTALL" 1>&6
1489 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1490 # It thinks the first close brace ends the variable substitution.
1491 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1493 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1495 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1497 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1498 echo "configure:1499: checking whether ln -s works" >&5
1499 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1500 echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502 rm -f conftestdata
1503 if ln -s X conftestdata 2>/dev/null
1504 then
1505 rm -f conftestdata
1506 ac_cv_prog_LN_S="ln -s"
1507 else
1508 ac_cv_prog_LN_S=ln
1511 LN_S="$ac_cv_prog_LN_S"
1512 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1513 echo "$ac_t""yes" 1>&6
1514 else
1515 echo "$ac_t""no" 1>&6
1518 # Extract the first word of "ranlib", so it can be a program name with args.
1519 set dummy ranlib; ac_word=$2
1520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1521 echo "configure:1522: checking for $ac_word" >&5
1522 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1523 echo $ac_n "(cached) $ac_c" 1>&6
1524 else
1525 if test -n "$RANLIB"; then
1526 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1527 else
1528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1529 ac_dummy="$PATH"
1530 for ac_dir in $ac_dummy; do
1531 test -z "$ac_dir" && ac_dir=.
1532 if test -f $ac_dir/$ac_word; then
1533 ac_cv_prog_RANLIB="ranlib"
1534 break
1536 done
1537 IFS="$ac_save_ifs"
1538 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1541 RANLIB="$ac_cv_prog_RANLIB"
1542 if test -n "$RANLIB"; then
1543 echo "$ac_t""$RANLIB" 1>&6
1544 else
1545 echo "$ac_t""no" 1>&6
1549 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1550 echo "configure:1551: checking whether ${MAKE-make} sets \${MAKE}" >&5
1551 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1552 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1554 else
1555 cat > conftestmake <<\EOF
1556 all:
1557 @echo 'ac_maketemp="${MAKE}"'
1559 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1560 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1561 if test -n "$ac_maketemp"; then
1562 eval ac_cv_prog_make_${ac_make}_set=yes
1563 else
1564 eval ac_cv_prog_make_${ac_make}_set=no
1566 rm -f conftestmake
1568 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1569 echo "$ac_t""yes" 1>&6
1570 SET_MAKE=
1571 else
1572 echo "$ac_t""no" 1>&6
1573 SET_MAKE="MAKE=${MAKE-make}"
1577 ac_ext=c
1578 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1579 ac_cpp='$CPP $CPPFLAGS'
1580 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1581 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1582 cross_compiling=$ac_cv_prog_cc_cross
1585 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1586 echo "configure:1587: checking whether byte ordering is bigendian" >&5
1587 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590 ac_cv_c_bigendian=unknown
1591 # See if sys/param.h defines the BYTE_ORDER macro.
1592 cat > conftest.$ac_ext <<EOF
1593 #line 1594 "configure"
1594 #include "confdefs.h"
1595 #include <sys/types.h>
1596 #include <sys/param.h>
1597 int main() {
1599 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1600 bogus endian macros
1601 #endif
1602 ; return 0; }
1604 if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1605 rm -rf conftest*
1606 # It does; now see whether it defined to BIG_ENDIAN or not.
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <sys/types.h>
1611 #include <sys/param.h>
1612 int main() {
1614 #if BYTE_ORDER != BIG_ENDIAN
1615 not big endian
1616 #endif
1617 ; return 0; }
1619 if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1620 rm -rf conftest*
1621 ac_cv_c_bigendian=yes
1622 else
1623 echo "configure: failed program was:" >&5
1624 cat conftest.$ac_ext >&5
1625 rm -rf conftest*
1626 ac_cv_c_bigendian=no
1628 rm -f conftest*
1629 else
1630 echo "configure: failed program was:" >&5
1631 cat conftest.$ac_ext >&5
1633 rm -f conftest*
1634 if test $ac_cv_c_bigendian = unknown; then
1635 if test "$cross_compiling" = yes; then
1636 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1637 else
1638 cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641 main () {
1642 /* Are we little or big endian? From Harbison&Steele. */
1643 union
1645 long l;
1646 char c[sizeof (long)];
1647 } u;
1648 u.l = 1;
1649 exit (u.c[sizeof (long) - 1] == 1);
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1653 then
1654 ac_cv_c_bigendian=no
1655 else
1656 echo "configure: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
1658 rm -fr conftest*
1659 ac_cv_c_bigendian=yes
1661 rm -fr conftest*
1667 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1668 if test $ac_cv_c_bigendian = yes; then
1669 cat >> confdefs.h <<\EOF
1670 #define WORDS_BIGENDIAN 1
1676 # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
1677 if test "${with_sdl_prefix+set}" = set; then
1678 withval="$with_sdl_prefix"
1679 sdl_prefix="$withval"
1680 else
1681 sdl_prefix=""
1684 # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
1685 if test "${with_sdl_exec_prefix+set}" = set; then
1686 withval="$with_sdl_exec_prefix"
1687 sdl_exec_prefix="$withval"
1688 else
1689 sdl_exec_prefix=""
1692 # Check whether --enable-sdltest or --disable-sdltest was given.
1693 if test "${enable_sdltest+set}" = set; then
1694 enableval="$enable_sdltest"
1696 else
1697 enable_sdltest=yes
1701 if test x$sdl_exec_prefix != x ; then
1702 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
1703 if test x${SDL_CONFIG+set} != xset ; then
1704 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
1707 if test x$sdl_prefix != x ; then
1708 sdl_args="$sdl_args --prefix=$sdl_prefix"
1709 if test x${SDL_CONFIG+set} != xset ; then
1710 SDL_CONFIG=$sdl_prefix/bin/sdl-config
1714 # Extract the first word of "sdl-config", so it can be a program name with args.
1715 set dummy sdl-config; ac_word=$2
1716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1717 echo "configure:1718: checking for $ac_word" >&5
1718 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
1719 echo $ac_n "(cached) $ac_c" 1>&6
1720 else
1721 case "$SDL_CONFIG" in
1723 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
1725 ?:/*)
1726 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
1729 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1730 ac_dummy="$PATH"
1731 for ac_dir in $ac_dummy; do
1732 test -z "$ac_dir" && ac_dir=.
1733 if test -f $ac_dir/$ac_word; then
1734 ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
1735 break
1737 done
1738 IFS="$ac_save_ifs"
1739 test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
1741 esac
1743 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
1744 if test -n "$SDL_CONFIG"; then
1745 echo "$ac_t""$SDL_CONFIG" 1>&6
1746 else
1747 echo "$ac_t""no" 1>&6
1750 min_sdl_version=1.0.0
1751 echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
1752 echo "configure:1753: checking for SDL - version >= $min_sdl_version" >&5
1753 no_sdl=""
1754 if test "$SDL_CONFIG" = "no" ; then
1755 no_sdl=yes
1756 else
1757 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
1758 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
1760 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
1761 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
1762 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
1763 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
1764 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
1765 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
1766 if test "x$enable_sdltest" = "xyes" ; then
1767 ac_save_CFLAGS="$CFLAGS"
1768 ac_save_LIBS="$LIBS"
1769 CFLAGS="$CFLAGS $SDL_CFLAGS"
1770 LIBS="$LIBS $SDL_LIBS"
1771 rm -f conf.sdltest
1772 if test "$cross_compiling" = yes; then
1773 echo $ac_n "cross compiling; assumed OK... $ac_c"
1774 else
1775 cat > conftest.$ac_ext <<EOF
1776 #line 1777 "configure"
1777 #include "confdefs.h"
1779 #include <stdio.h>
1780 #include <stdlib.h>
1781 #include <string.h>
1782 #include <SDL/SDL.h>
1784 char*
1785 my_strdup (char *str)
1787 char *new_str;
1789 if (str)
1791 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1792 strcpy (new_str, str);
1794 else
1795 new_str = NULL;
1797 return new_str;
1800 int main (int argc, char *argv[])
1802 int major, minor, micro;
1803 char *tmp_version;
1805 /* This hangs on some systems (?)
1806 system ("touch conf.sdltest");
1808 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
1810 /* HP/UX 9 (%@#!) writes to sscanf strings */
1811 tmp_version = my_strdup("$min_sdl_version");
1812 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
1813 printf("%s, bad version string\n", "$min_sdl_version");
1814 exit(1);
1817 if (($sdl_major_version > major) ||
1818 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
1819 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
1821 return 0;
1823 else
1825 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
1826 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
1827 printf("*** best to upgrade to the required version.\n");
1828 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
1829 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
1830 printf("*** config.cache before re-running configure\n");
1831 return 1;
1837 if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1838 then
1840 else
1841 echo "configure: failed program was:" >&5
1842 cat conftest.$ac_ext >&5
1843 rm -fr conftest*
1844 no_sdl=yes
1846 rm -fr conftest*
1849 CFLAGS="$ac_save_CFLAGS"
1850 LIBS="$ac_save_LIBS"
1853 if test "x$no_sdl" = x ; then
1854 echo "$ac_t""yes" 1>&6
1855 true
1856 else
1857 echo "$ac_t""no" 1>&6
1858 if test "$SDL_CONFIG" = "no" ; then
1859 echo "*** The sdl-config script installed by SDL could not be found"
1860 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
1861 echo "*** your path, or set the SDL_CONFIG environment variable to the"
1862 echo "*** full path to sdl-config."
1863 else
1864 if test -f conf.sdltest ; then
1866 else
1867 echo "*** Could not run SDL test program, checking why..."
1868 CFLAGS="$CFLAGS $SDL_CFLAGS"
1869 LIBS="$LIBS $SDL_LIBS"
1870 cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1874 #include <stdio.h>
1875 #include <SDL/SDL.h>
1877 int main() {
1878 return 0;
1879 ; return 0; }
1881 if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1882 rm -rf conftest*
1883 echo "*** The test program compiled, but did not run. This usually means"
1884 echo "*** that the run-time linker is not finding SDL or finding the wrong"
1885 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
1886 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1887 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1888 echo "*** is required on your system"
1889 echo "***"
1890 echo "*** If you have an old version installed, it is best to remove it, although"
1891 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1892 else
1893 echo "configure: failed program was:" >&5
1894 cat conftest.$ac_ext >&5
1895 rm -rf conftest*
1896 echo "*** The test program failed to compile or link. See the file config.log for the"
1897 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
1898 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
1899 echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
1901 rm -f conftest*
1902 CFLAGS="$ac_save_CFLAGS"
1903 LIBS="$ac_save_LIBS"
1906 SDL_CFLAGS=""
1907 SDL_LIBS=""
1908 { echo "configure: error: *** SDL version >= 1.0.0 not found." 1>&2; exit 1; }
1912 rm -f conf.sdltest
1915 CFLAGS="$CFLAGS $SDL_CFLAGS"
1916 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
1917 INTERFACE=sdl
1919 OLD_CPPFLAGS=$CPPFLAGS
1920 CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
1922 EXTRAOBJS=
1924 JOYSTICK_SUPPORT=no
1925 ac_safe=`echo "SDL_joystick.h" | sed 'y%./+-%__p_%'`
1926 echo $ac_n "checking for SDL_joystick.h""... $ac_c" 1>&6
1927 echo "configure:1928: checking for SDL_joystick.h" >&5
1928 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1929 echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931 cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1934 #include <SDL_joystick.h>
1936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1937 { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1939 if test -z "$ac_err"; then
1940 rm -rf conftest*
1941 eval "ac_cv_header_$ac_safe=yes"
1942 else
1943 echo "$ac_err" >&5
1944 echo "configure: failed program was:" >&5
1945 cat conftest.$ac_ext >&5
1946 rm -rf conftest*
1947 eval "ac_cv_header_$ac_safe=no"
1949 rm -f conftest*
1951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1952 echo "$ac_t""yes" 1>&6
1953 JOYSTICK_SUPPORT=SDL
1954 else
1955 echo "$ac_t""no" 1>&6
1956 ac_safe=`echo "linux/joystick.h" | sed 'y%./+-%__p_%'`
1957 echo $ac_n "checking for linux/joystick.h""... $ac_c" 1>&6
1958 echo "configure:1959: checking for linux/joystick.h" >&5
1959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1960 echo $ac_n "(cached) $ac_c" 1>&6
1961 else
1962 cat > conftest.$ac_ext <<EOF
1963 #line 1964 "configure"
1964 #include "confdefs.h"
1965 #include <linux/joystick.h>
1967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1968 { (eval echo configure:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1970 if test -z "$ac_err"; then
1971 rm -rf conftest*
1972 eval "ac_cv_header_$ac_safe=yes"
1973 else
1974 echo "$ac_err" >&5
1975 echo "configure: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 rm -rf conftest*
1978 eval "ac_cv_header_$ac_safe=no"
1980 rm -f conftest*
1982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1983 echo "$ac_t""yes" 1>&6
1984 JOYSTICK_SUPPORT=LINUX
1985 else
1986 echo "$ac_t""no" 1>&6
1992 # If we find X, set shell vars x_includes and x_libraries to the
1993 # paths, otherwise set no_x=yes.
1994 # Uses ac_ vars as temps to allow command line to override cache and checks.
1995 # --without-x overrides everything else, but does not touch the cache.
1996 echo $ac_n "checking for X""... $ac_c" 1>&6
1997 echo "configure:1998: checking for X" >&5
1999 # Check whether --with-x or --without-x was given.
2000 if test "${with_x+set}" = set; then
2001 withval="$with_x"
2005 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2006 if test "x$with_x" = xno; then
2007 # The user explicitly disabled X.
2008 have_x=disabled
2009 else
2010 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2011 # Both variables are already set.
2012 have_x=yes
2013 else
2014 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2015 echo $ac_n "(cached) $ac_c" 1>&6
2016 else
2017 # One or both of the vars are not set, and there is no cached value.
2018 ac_x_includes=NO ac_x_libraries=NO
2019 rm -fr conftestdir
2020 if mkdir conftestdir; then
2021 cd conftestdir
2022 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2023 cat > Imakefile <<'EOF'
2024 acfindx:
2025 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2027 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2028 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2029 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2030 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2031 for ac_extension in a so sl; do
2032 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2033 test -f $ac_im_libdir/libX11.$ac_extension; then
2034 ac_im_usrlibdir=$ac_im_libdir; break
2036 done
2037 # Screen out bogus values from the imake configuration. They are
2038 # bogus both because they are the default anyway, and because
2039 # using them would break gcc on systems where it needs fixed includes.
2040 case "$ac_im_incroot" in
2041 /usr/include) ;;
2042 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2043 esac
2044 case "$ac_im_usrlibdir" in
2045 /usr/lib | /lib) ;;
2046 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2047 esac
2049 cd ..
2050 rm -fr conftestdir
2053 if test "$ac_x_includes" = NO; then
2054 # Guess where to find include files, by looking for this one X11 .h file.
2055 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2057 # First, try using that file with no special directory specified.
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 #include <$x_direct_test_include>
2063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2064 { (eval echo configure:2065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2066 if test -z "$ac_err"; then
2067 rm -rf conftest*
2068 # We can compile using X headers with no special include directory.
2069 ac_x_includes=
2070 else
2071 echo "$ac_err" >&5
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 rm -rf conftest*
2075 # Look for the header file in a standard set of common directories.
2076 # Check X11 before X11Rn because it is often a symlink to the current release.
2077 for ac_dir in \
2078 /usr/X11/include \
2079 /usr/X11R6/include \
2080 /usr/X11R5/include \
2081 /usr/X11R4/include \
2083 /usr/include/X11 \
2084 /usr/include/X11R6 \
2085 /usr/include/X11R5 \
2086 /usr/include/X11R4 \
2088 /usr/local/X11/include \
2089 /usr/local/X11R6/include \
2090 /usr/local/X11R5/include \
2091 /usr/local/X11R4/include \
2093 /usr/local/include/X11 \
2094 /usr/local/include/X11R6 \
2095 /usr/local/include/X11R5 \
2096 /usr/local/include/X11R4 \
2098 /usr/X386/include \
2099 /usr/x386/include \
2100 /usr/XFree86/include/X11 \
2102 /usr/include \
2103 /usr/local/include \
2104 /usr/unsupported/include \
2105 /usr/athena/include \
2106 /usr/local/x11r5/include \
2107 /usr/lpp/Xamples/include \
2109 /usr/openwin/include \
2110 /usr/openwin/share/include \
2113 if test -r "$ac_dir/$x_direct_test_include"; then
2114 ac_x_includes=$ac_dir
2115 break
2117 done
2119 rm -f conftest*
2120 fi # $ac_x_includes = NO
2122 if test "$ac_x_libraries" = NO; then
2123 # Check for the libraries.
2125 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2126 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2128 # See if we find them without any special options.
2129 # Don't add to $LIBS permanently.
2130 ac_save_LIBS="$LIBS"
2131 LIBS="-l$x_direct_test_library $LIBS"
2132 cat > conftest.$ac_ext <<EOF
2133 #line 2134 "configure"
2134 #include "confdefs.h"
2136 int main() {
2137 ${x_direct_test_function}()
2138 ; return 0; }
2140 if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141 rm -rf conftest*
2142 LIBS="$ac_save_LIBS"
2143 # We can link X programs with no special library path.
2144 ac_x_libraries=
2145 else
2146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 LIBS="$ac_save_LIBS"
2150 # First see if replacing the include by lib works.
2151 # Check X11 before X11Rn because it is often a symlink to the current release.
2152 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2153 /usr/X11/lib \
2154 /usr/X11R6/lib \
2155 /usr/X11R5/lib \
2156 /usr/X11R4/lib \
2158 /usr/lib/X11 \
2159 /usr/lib/X11R6 \
2160 /usr/lib/X11R5 \
2161 /usr/lib/X11R4 \
2163 /usr/local/X11/lib \
2164 /usr/local/X11R6/lib \
2165 /usr/local/X11R5/lib \
2166 /usr/local/X11R4/lib \
2168 /usr/local/lib/X11 \
2169 /usr/local/lib/X11R6 \
2170 /usr/local/lib/X11R5 \
2171 /usr/local/lib/X11R4 \
2173 /usr/X386/lib \
2174 /usr/x386/lib \
2175 /usr/XFree86/lib/X11 \
2177 /usr/lib \
2178 /usr/local/lib \
2179 /usr/unsupported/lib \
2180 /usr/athena/lib \
2181 /usr/local/x11r5/lib \
2182 /usr/lpp/Xamples/lib \
2183 /lib/usr/lib/X11 \
2185 /usr/openwin/lib \
2186 /usr/openwin/share/lib \
2189 for ac_extension in a so sl; do
2190 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2191 ac_x_libraries=$ac_dir
2192 break 2
2194 done
2195 done
2197 rm -f conftest*
2198 fi # $ac_x_libraries = NO
2200 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2201 # Didn't find X anywhere. Cache the known absence of X.
2202 ac_cv_have_x="have_x=no"
2203 else
2204 # Record where we found X for the cache.
2205 ac_cv_have_x="have_x=yes \
2206 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2210 eval "$ac_cv_have_x"
2211 fi # $with_x != no
2213 if test "$have_x" != yes; then
2214 echo "$ac_t""$have_x" 1>&6
2215 no_x=yes
2216 else
2217 # If each of the values was on the command line, it overrides each guess.
2218 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2219 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2220 # Update the cache value to reflect the command line values.
2221 ac_cv_have_x="have_x=yes \
2222 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2223 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2226 if test "$no_x" = yes; then
2227 # Not all programs may use this symbol, but it does not hurt to define it.
2228 cat >> confdefs.h <<\EOF
2229 #define X_DISPLAY_MISSING 1
2232 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2233 else
2234 if test -n "$x_includes"; then
2235 X_CFLAGS="$X_CFLAGS -I$x_includes"
2238 # It would also be nice to do this for all -L options, not just this one.
2239 if test -n "$x_libraries"; then
2240 X_LIBS="$X_LIBS -L$x_libraries"
2241 # For Solaris; some versions of Sun CC require a space after -R and
2242 # others require no space. Words are not sufficient . . . .
2243 case "`(uname -sr) 2>/dev/null`" in
2244 "SunOS 5"*)
2245 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2246 echo "configure:2247: checking whether -R must be followed by a space" >&5
2247 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2248 cat > conftest.$ac_ext <<EOF
2249 #line 2250 "configure"
2250 #include "confdefs.h"
2252 int main() {
2254 ; return 0; }
2256 if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2257 rm -rf conftest*
2258 ac_R_nospace=yes
2259 else
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2262 rm -rf conftest*
2263 ac_R_nospace=no
2265 rm -f conftest*
2266 if test $ac_R_nospace = yes; then
2267 echo "$ac_t""no" 1>&6
2268 X_LIBS="$X_LIBS -R$x_libraries"
2269 else
2270 LIBS="$ac_xsave_LIBS -R $x_libraries"
2271 cat > conftest.$ac_ext <<EOF
2272 #line 2273 "configure"
2273 #include "confdefs.h"
2275 int main() {
2277 ; return 0; }
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2280 rm -rf conftest*
2281 ac_R_space=yes
2282 else
2283 echo "configure: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2285 rm -rf conftest*
2286 ac_R_space=no
2288 rm -f conftest*
2289 if test $ac_R_space = yes; then
2290 echo "$ac_t""yes" 1>&6
2291 X_LIBS="$X_LIBS -R $x_libraries"
2292 else
2293 echo "$ac_t""neither works" 1>&6
2296 LIBS="$ac_xsave_LIBS"
2297 esac
2300 # Check for system-dependent libraries X programs must link with.
2301 # Do this before checking for the system-independent R6 libraries
2302 # (-lICE), since we may need -lsocket or whatever for X linking.
2304 if test "$ISC" = yes; then
2305 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2306 else
2307 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2308 # libraries were built with DECnet support. And karl@cs.umb.edu says
2309 # the Alpha needs dnet_stub (dnet does not exist).
2310 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2311 echo "configure:2312: checking for dnet_ntoa in -ldnet" >&5
2312 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2315 else
2316 ac_save_LIBS="$LIBS"
2317 LIBS="-ldnet $LIBS"
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 /* Override any gcc2 internal prototype to avoid an error. */
2322 /* We use char because int might match the return type of a gcc2
2323 builtin and then its argument prototype would still apply. */
2324 char dnet_ntoa();
2326 int main() {
2327 dnet_ntoa()
2328 ; return 0; }
2330 if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2331 rm -rf conftest*
2332 eval "ac_cv_lib_$ac_lib_var=yes"
2333 else
2334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2336 rm -rf conftest*
2337 eval "ac_cv_lib_$ac_lib_var=no"
2339 rm -f conftest*
2340 LIBS="$ac_save_LIBS"
2343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2344 echo "$ac_t""yes" 1>&6
2345 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2346 else
2347 echo "$ac_t""no" 1>&6
2350 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2351 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2352 echo "configure:2353: checking for dnet_ntoa in -ldnet_stub" >&5
2353 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357 ac_save_LIBS="$LIBS"
2358 LIBS="-ldnet_stub $LIBS"
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 /* Override any gcc2 internal prototype to avoid an error. */
2363 /* We use char because int might match the return type of a gcc2
2364 builtin and then its argument prototype would still apply. */
2365 char dnet_ntoa();
2367 int main() {
2368 dnet_ntoa()
2369 ; return 0; }
2371 if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2372 rm -rf conftest*
2373 eval "ac_cv_lib_$ac_lib_var=yes"
2374 else
2375 echo "configure: failed program was:" >&5
2376 cat conftest.$ac_ext >&5
2377 rm -rf conftest*
2378 eval "ac_cv_lib_$ac_lib_var=no"
2380 rm -f conftest*
2381 LIBS="$ac_save_LIBS"
2384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2385 echo "$ac_t""yes" 1>&6
2386 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2387 else
2388 echo "$ac_t""no" 1>&6
2393 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2394 # to get the SysV transport functions.
2395 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2396 # needs -lnsl.
2397 # The nsl library prevents programs from opening the X display
2398 # on Irix 5.2, according to dickey@clark.net.
2399 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2400 echo "configure:2401: checking for gethostbyname" >&5
2401 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2402 echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404 cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407 /* System header to define __stub macros and hopefully few prototypes,
2408 which can conflict with char gethostbyname(); below. */
2409 #include <assert.h>
2410 /* Override any gcc2 internal prototype to avoid an error. */
2411 /* We use char because int might match the return type of a gcc2
2412 builtin and then its argument prototype would still apply. */
2413 char gethostbyname();
2415 int main() {
2417 /* The GNU C library defines this for functions which it implements
2418 to always fail with ENOSYS. Some functions are actually named
2419 something starting with __ and the normal name is an alias. */
2420 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2421 choke me
2422 #else
2423 gethostbyname();
2424 #endif
2426 ; return 0; }
2428 if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2429 rm -rf conftest*
2430 eval "ac_cv_func_gethostbyname=yes"
2431 else
2432 echo "configure: failed program was:" >&5
2433 cat conftest.$ac_ext >&5
2434 rm -rf conftest*
2435 eval "ac_cv_func_gethostbyname=no"
2437 rm -f conftest*
2440 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2441 echo "$ac_t""yes" 1>&6
2443 else
2444 echo "$ac_t""no" 1>&6
2447 if test $ac_cv_func_gethostbyname = no; then
2448 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2449 echo "configure:2450: checking for gethostbyname in -lnsl" >&5
2450 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 ac_save_LIBS="$LIBS"
2455 LIBS="-lnsl $LIBS"
2456 cat > conftest.$ac_ext <<EOF
2457 #line 2458 "configure"
2458 #include "confdefs.h"
2459 /* Override any gcc2 internal prototype to avoid an error. */
2460 /* We use char because int might match the return type of a gcc2
2461 builtin and then its argument prototype would still apply. */
2462 char gethostbyname();
2464 int main() {
2465 gethostbyname()
2466 ; return 0; }
2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469 rm -rf conftest*
2470 eval "ac_cv_lib_$ac_lib_var=yes"
2471 else
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2474 rm -rf conftest*
2475 eval "ac_cv_lib_$ac_lib_var=no"
2477 rm -f conftest*
2478 LIBS="$ac_save_LIBS"
2481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2482 echo "$ac_t""yes" 1>&6
2483 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2484 else
2485 echo "$ac_t""no" 1>&6
2490 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2491 # socket/setsockopt and other routines are undefined under SCO ODT
2492 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
2493 # on later versions), says simon@lia.di.epfl.ch: it contains
2494 # gethostby* variants that don't use the nameserver (or something).
2495 # -lsocket must be given before -lnsl if both are needed.
2496 # We assume that if connect needs -lnsl, so does gethostbyname.
2497 echo $ac_n "checking for connect""... $ac_c" 1>&6
2498 echo "configure:2499: checking for connect" >&5
2499 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2500 echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502 cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 /* System header to define __stub macros and hopefully few prototypes,
2506 which can conflict with char connect(); below. */
2507 #include <assert.h>
2508 /* Override any gcc2 internal prototype to avoid an error. */
2509 /* We use char because int might match the return type of a gcc2
2510 builtin and then its argument prototype would still apply. */
2511 char connect();
2513 int main() {
2515 /* The GNU C library defines this for functions which it implements
2516 to always fail with ENOSYS. Some functions are actually named
2517 something starting with __ and the normal name is an alias. */
2518 #if defined (__stub_connect) || defined (__stub___connect)
2519 choke me
2520 #else
2521 connect();
2522 #endif
2524 ; return 0; }
2526 if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2527 rm -rf conftest*
2528 eval "ac_cv_func_connect=yes"
2529 else
2530 echo "configure: failed program was:" >&5
2531 cat conftest.$ac_ext >&5
2532 rm -rf conftest*
2533 eval "ac_cv_func_connect=no"
2535 rm -f conftest*
2538 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2539 echo "$ac_t""yes" 1>&6
2541 else
2542 echo "$ac_t""no" 1>&6
2545 if test $ac_cv_func_connect = no; then
2546 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2547 echo "configure:2548: checking for connect in -lsocket" >&5
2548 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2549 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2550 echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552 ac_save_LIBS="$LIBS"
2553 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2554 cat > conftest.$ac_ext <<EOF
2555 #line 2556 "configure"
2556 #include "confdefs.h"
2557 /* Override any gcc2 internal prototype to avoid an error. */
2558 /* We use char because int might match the return type of a gcc2
2559 builtin and then its argument prototype would still apply. */
2560 char connect();
2562 int main() {
2563 connect()
2564 ; return 0; }
2566 if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2567 rm -rf conftest*
2568 eval "ac_cv_lib_$ac_lib_var=yes"
2569 else
2570 echo "configure: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 rm -rf conftest*
2573 eval "ac_cv_lib_$ac_lib_var=no"
2575 rm -f conftest*
2576 LIBS="$ac_save_LIBS"
2579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2580 echo "$ac_t""yes" 1>&6
2581 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2582 else
2583 echo "$ac_t""no" 1>&6
2588 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2589 echo $ac_n "checking for remove""... $ac_c" 1>&6
2590 echo "configure:2591: checking for remove" >&5
2591 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
2593 else
2594 cat > conftest.$ac_ext <<EOF
2595 #line 2596 "configure"
2596 #include "confdefs.h"
2597 /* System header to define __stub macros and hopefully few prototypes,
2598 which can conflict with char remove(); below. */
2599 #include <assert.h>
2600 /* Override any gcc2 internal prototype to avoid an error. */
2601 /* We use char because int might match the return type of a gcc2
2602 builtin and then its argument prototype would still apply. */
2603 char remove();
2605 int main() {
2607 /* The GNU C library defines this for functions which it implements
2608 to always fail with ENOSYS. Some functions are actually named
2609 something starting with __ and the normal name is an alias. */
2610 #if defined (__stub_remove) || defined (__stub___remove)
2611 choke me
2612 #else
2613 remove();
2614 #endif
2616 ; return 0; }
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2619 rm -rf conftest*
2620 eval "ac_cv_func_remove=yes"
2621 else
2622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
2624 rm -rf conftest*
2625 eval "ac_cv_func_remove=no"
2627 rm -f conftest*
2630 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2631 echo "$ac_t""yes" 1>&6
2633 else
2634 echo "$ac_t""no" 1>&6
2637 if test $ac_cv_func_remove = no; then
2638 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2639 echo "configure:2640: checking for remove in -lposix" >&5
2640 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2642 echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644 ac_save_LIBS="$LIBS"
2645 LIBS="-lposix $LIBS"
2646 cat > conftest.$ac_ext <<EOF
2647 #line 2648 "configure"
2648 #include "confdefs.h"
2649 /* Override any gcc2 internal prototype to avoid an error. */
2650 /* We use char because int might match the return type of a gcc2
2651 builtin and then its argument prototype would still apply. */
2652 char remove();
2654 int main() {
2655 remove()
2656 ; return 0; }
2658 if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2659 rm -rf conftest*
2660 eval "ac_cv_lib_$ac_lib_var=yes"
2661 else
2662 echo "configure: failed program was:" >&5
2663 cat conftest.$ac_ext >&5
2664 rm -rf conftest*
2665 eval "ac_cv_lib_$ac_lib_var=no"
2667 rm -f conftest*
2668 LIBS="$ac_save_LIBS"
2671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2672 echo "$ac_t""yes" 1>&6
2673 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2674 else
2675 echo "$ac_t""no" 1>&6
2680 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2681 echo $ac_n "checking for shmat""... $ac_c" 1>&6
2682 echo "configure:2683: checking for shmat" >&5
2683 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2684 echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 /* System header to define __stub macros and hopefully few prototypes,
2690 which can conflict with char shmat(); below. */
2691 #include <assert.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 shmat();
2697 int main() {
2699 /* The GNU C library defines this for functions which it implements
2700 to always fail with ENOSYS. Some functions are actually named
2701 something starting with __ and the normal name is an alias. */
2702 #if defined (__stub_shmat) || defined (__stub___shmat)
2703 choke me
2704 #else
2705 shmat();
2706 #endif
2708 ; return 0; }
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711 rm -rf conftest*
2712 eval "ac_cv_func_shmat=yes"
2713 else
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -rf conftest*
2717 eval "ac_cv_func_shmat=no"
2719 rm -f conftest*
2722 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2723 echo "$ac_t""yes" 1>&6
2725 else
2726 echo "$ac_t""no" 1>&6
2729 if test $ac_cv_func_shmat = no; then
2730 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2731 echo "configure:2732: checking for shmat in -lipc" >&5
2732 ac_lib_var=`echo ipc'_'shmat | 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="-lipc $LIBS"
2738 cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741 /* Override any gcc2 internal prototype to avoid an error. */
2742 /* We use char because int might match the return type of a gcc2
2743 builtin and then its argument prototype would still apply. */
2744 char shmat();
2746 int main() {
2747 shmat()
2748 ; return 0; }
2750 if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2751 rm -rf conftest*
2752 eval "ac_cv_lib_$ac_lib_var=yes"
2753 else
2754 echo "configure: failed program was:" >&5
2755 cat conftest.$ac_ext >&5
2756 rm -rf conftest*
2757 eval "ac_cv_lib_$ac_lib_var=no"
2759 rm -f conftest*
2760 LIBS="$ac_save_LIBS"
2763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2764 echo "$ac_t""yes" 1>&6
2765 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2766 else
2767 echo "$ac_t""no" 1>&6
2773 # Check for libraries that X11R6 Xt/Xaw programs need.
2774 ac_save_LDFLAGS="$LDFLAGS"
2775 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2776 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2777 # check for ICE first), but we must link in the order -lSM -lICE or
2778 # we get undefined symbols. So assume we have SM if we have ICE.
2779 # These have to be linked with before -lX11, unlike the other
2780 # libraries we check for below, so use a different variable.
2781 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2782 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2783 echo "configure:2784: checking for IceConnectionNumber in -lICE" >&5
2784 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2786 echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788 ac_save_LIBS="$LIBS"
2789 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2790 cat > conftest.$ac_ext <<EOF
2791 #line 2792 "configure"
2792 #include "confdefs.h"
2793 /* Override any gcc2 internal prototype to avoid an error. */
2794 /* We use char because int might match the return type of a gcc2
2795 builtin and then its argument prototype would still apply. */
2796 char IceConnectionNumber();
2798 int main() {
2799 IceConnectionNumber()
2800 ; return 0; }
2802 if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2803 rm -rf conftest*
2804 eval "ac_cv_lib_$ac_lib_var=yes"
2805 else
2806 echo "configure: failed program was:" >&5
2807 cat conftest.$ac_ext >&5
2808 rm -rf conftest*
2809 eval "ac_cv_lib_$ac_lib_var=no"
2811 rm -f conftest*
2812 LIBS="$ac_save_LIBS"
2815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2816 echo "$ac_t""yes" 1>&6
2817 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2818 else
2819 echo "$ac_t""no" 1>&6
2822 LDFLAGS="$ac_save_LDFLAGS"
2826 CFLAGS="$CFLAGS $X_CFLAGS"
2827 CXXFLAGS="$CXXFLAGS $X_CFLAGS"
2828 LIBS="$LIBS $X_LIBS"
2830 # Check whether --with-opengl or --without-opengl was given.
2831 if test "${with_opengl+set}" = set; then
2832 withval="$with_opengl"
2833 OPENGL_SUPPORT=$withval
2834 else
2835 OPENGL_SUPPORT=yes
2838 if test x$OPENGL_SUPPORT \!= xno; then
2839 echo $ac_n "checking for OpenGL support in SDL""... $ac_c" 1>&6
2840 echo "configure:2841: checking for OpenGL support in SDL" >&5
2841 cat > conftest.$ac_ext <<EOF
2842 #line 2843 "configure"
2843 #include "confdefs.h"
2844 #include <SDL.h>
2845 int main() {
2846 int foo() { int x = SDL_OPENGL; }
2847 ; return 0; }
2849 if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2850 rm -rf conftest*
2851 OPENGL_SUPPORT=yes
2852 else
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2855 rm -rf conftest*
2856 OPENGL_SUPPORT=no
2858 rm -f conftest*
2859 echo "$ac_t""$OPENGL_SUPPORT" 1>&6
2860 # Check for the GL libs
2861 if test x$OPENGL_SUPPORT \!= xno; then
2862 oldCPPFLAGS=$CPPFLAGS
2863 oldLIBS=$LIBS
2864 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2865 LIBS="$LIBS $SDL_LIBS"
2866 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
2867 echo "configure:2868: checking for glBegin in -lGL" >&5
2868 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
2869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2870 echo $ac_n "(cached) $ac_c" 1>&6
2871 else
2872 ac_save_LIBS="$LIBS"
2873 LIBS="-lGL $LIBS"
2874 cat > conftest.$ac_ext <<EOF
2875 #line 2876 "configure"
2876 #include "confdefs.h"
2877 /* Override any gcc2 internal prototype to avoid an error. */
2878 /* We use char because int might match the return type of a gcc2
2879 builtin and then its argument prototype would still apply. */
2880 char glBegin();
2882 int main() {
2883 glBegin()
2884 ; return 0; }
2886 if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2887 rm -rf conftest*
2888 eval "ac_cv_lib_$ac_lib_var=yes"
2889 else
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2892 rm -rf conftest*
2893 eval "ac_cv_lib_$ac_lib_var=no"
2895 rm -f conftest*
2896 LIBS="$ac_save_LIBS"
2899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2900 echo "$ac_t""yes" 1>&6
2901 ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
2902 echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
2903 echo "configure:2904: checking for GL/gl.h" >&5
2904 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2905 echo $ac_n "(cached) $ac_c" 1>&6
2906 else
2907 cat > conftest.$ac_ext <<EOF
2908 #line 2909 "configure"
2909 #include "confdefs.h"
2910 #include <GL/gl.h>
2912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2913 { (eval echo configure:2914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2915 if test -z "$ac_err"; then
2916 rm -rf conftest*
2917 eval "ac_cv_header_$ac_safe=yes"
2918 else
2919 echo "$ac_err" >&5
2920 echo "configure: failed program was:" >&5
2921 cat conftest.$ac_ext >&5
2922 rm -rf conftest*
2923 eval "ac_cv_header_$ac_safe=no"
2925 rm -f conftest*
2927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2928 echo "$ac_t""yes" 1>&6
2930 else
2931 echo "$ac_t""no" 1>&6
2932 OPENGL_SUPPORT=no
2935 else
2936 echo "$ac_t""no" 1>&6
2937 OPENGL_SUPPORT=no
2941 LIBS=$oldLIBS
2942 CPPFLAGS=$oldCPPFLAGS
2947 if test x$OPENGL_SUPPORT \!= xno; then
2948 cat >> confdefs.h <<\EOF
2949 #define SDL_OPENGL_SUPPORT 1
2952 SDL_LIBS="$SDL_LIBS -lGL"
2955 CPPFLAGS=$OLD_CPPFLAGS
2957 if test x$JOYSTICK_SUPPORT \!= xno; then
2958 cat >> confdefs.h <<\EOF
2959 #define JOYSTICK_SUPPORT 1
2962 cat >> confdefs.h <<EOF
2963 #define ${JOYSTICK_SUPPORT}_JOYSTICK_SUPPORT 1
2966 EXTRAOBJS="$EXTRAOBJS md-phil.o"
2969 oldLIBS=$LIBS
2970 LIBS="$LIBS $SDL_LIBS"
2971 for ac_func in SDL_WM_ToggleFullScreen
2973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2974 echo "configure:2975: checking for $ac_func" >&5
2975 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978 cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2981 /* System header to define __stub macros and hopefully few prototypes,
2982 which can conflict with char $ac_func(); below. */
2983 #include <assert.h>
2984 /* Override any gcc2 internal prototype to avoid an error. */
2985 /* We use char because int might match the return type of a gcc2
2986 builtin and then its argument prototype would still apply. */
2987 char $ac_func();
2989 int main() {
2991 /* The GNU C library defines this for functions which it implements
2992 to always fail with ENOSYS. Some functions are actually named
2993 something starting with __ and the normal name is an alias. */
2994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2995 choke me
2996 #else
2997 $ac_func();
2998 #endif
3000 ; return 0; }
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3003 rm -rf conftest*
3004 eval "ac_cv_func_$ac_func=yes"
3005 else
3006 echo "configure: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 rm -rf conftest*
3009 eval "ac_cv_func_$ac_func=no"
3011 rm -f conftest*
3014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3015 echo "$ac_t""yes" 1>&6
3016 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3017 cat >> confdefs.h <<EOF
3018 #define $ac_tr_func 1
3021 else
3022 echo "$ac_t""no" 1>&6
3024 done
3026 LIBS=$oldLIBS
3028 echo $ac_n "checking for x86 processor""... $ac_c" 1>&6
3029 echo "configure:3030: checking for x86 processor" >&5
3030 case $machtype in
3031 i?86|BePC)
3032 echo "$ac_t""yes" 1>&6
3033 # Check whether --with-nasm or --without-nasm was given.
3034 if test "${with_nasm+set}" = set; then
3035 withval="$with_nasm"
3036 USENASM=$withval
3037 else
3038 USENASM=yes
3041 if test x$USENASM \!= xno; then
3042 # Extract the first word of "nasm", so it can be a program name with args.
3043 set dummy nasm; ac_word=$2
3044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3045 echo "configure:3046: checking for $ac_word" >&5
3046 if eval "test \"`echo '$''{'ac_cv_prog_NASM'+set}'`\" = set"; then
3047 echo $ac_n "(cached) $ac_c" 1>&6
3048 else
3049 if test -n "$NASM"; then
3050 ac_cv_prog_NASM="$NASM" # Let the user override the test.
3051 else
3052 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3053 ac_dummy="$PATH"
3054 for ac_dir in $ac_dummy; do
3055 test -z "$ac_dir" && ac_dir=.
3056 if test -f $ac_dir/$ac_word; then
3057 ac_cv_prog_NASM="nasm"
3058 break
3060 done
3061 IFS="$ac_save_ifs"
3062 test -z "$ac_cv_prog_NASM" && ac_cv_prog_NASM="not found"
3065 NASM="$ac_cv_prog_NASM"
3066 if test -n "$NASM"; then
3067 echo "$ac_t""$NASM" 1>&6
3068 else
3069 echo "$ac_t""no" 1>&6
3072 if test x$NASM \!= "xnot found"; then
3073 echo $ac_n "checking for NASM object format""... $ac_c" 1>&6
3074 echo "configure:3075: checking for NASM object format" >&5
3075 cat >___DgSdFmTTeSt.asm <<EOF
3076 bits 32
3077 section .text
3078 global main
3079 global _main
3080 global main_
3081 main:
3082 _main:
3083 main_:
3086 test -z $NASM_FMT &&
3087 for FMT in elf aout aoutb coff; do
3088 $NASM -f $FMT ___DgSdFmTTeSt.asm
3089 if $CC -o ___DgSdFmTTeSt ___DgSdFmTTeSt.o >&5
3090 then
3091 NASM_FMT=$FMT
3092 break
3094 done
3095 rm ___DgSdFmTTeSt*
3096 if test \! -z "$NASM_FMT"; then
3097 echo "$ac_t""$NASM_FMT" 1>&6
3098 ASM=true
3100 if test x$NASM_FMT = xelf; then
3102 CHOP_="sed -e '/^_/s/^_//' -e '/_/s/\([][,.+ *:-]\)_/\1/g'"
3104 else
3105 CHOP_=cat
3109 if test x$NASM_FMT = xelf; then
3110 NO_USCORE_TRUE=
3111 NO_USCORE_FALSE='#'
3112 else
3113 NO_USCORE_TRUE='#'
3114 NO_USCORE_FALSE=
3117 # Check whether --with-mmx or --without-mmx was given.
3118 if test "${with_mmx+set}" = set; then
3119 withval="$with_mmx"
3120 USEMMX=$withval
3121 else
3122 USEMMX=yes
3125 echo $ac_n "checking for MMX""... $ac_c" 1>&6
3126 echo "configure:3127: checking for MMX" >&5
3127 cat >___DgSdMmXTeSt.asm <<EOF
3128 bits 32
3129 section .text
3130 global main
3131 global _main
3132 global main_
3133 main:
3134 _main:
3135 main_:
3136 emms
3137 xor eax, eax ; Return value of 0
3140 $NASM -f $NASM_FMT ___DgSdMmXTeSt.asm
3141 $CC -o ___DgSdMmXTeSt ___DgSdMmXTeSt.o >&5
3142 ./___DgSdMmXTeSt
3143 MMXE=$?
3144 rm ___DgSdMmXTeSt*
3145 if test x$USEMMX \!= xno -a x$MMXE = x0; then
3146 MMX=true
3147 echo "$ac_t""yes" 1>&6
3148 else
3149 MMX=false
3150 echo "$ac_t""no" 1>&6
3152 else
3153 echo "$ac_t""not found" 1>&6
3154 ASM=false
3155 MMX=false
3157 else
3158 ASM=false
3159 MMX=false
3161 else
3162 ASM=false
3163 MMX=false
3165 if test x$ASM = xfalse; then
3166 { echo "configure: error:
3167 *** NASM is necessary on x86 platforms for assembler optimizations.
3168 *** A package most likely came with your Unix distribution, but if one didn't,
3169 *** it can be found at http://www.web-sites.co.uk/nasm/ (or at
3170 *** http://www.bebits.com/ for BeOS)
3171 " 1>&2; exit 1; }
3175 echo "$ac_t""no" 1>&6
3176 ASM=false
3177 MMX=false
3179 esac
3182 if $ASM; then
3183 EXTRAOBJS="$EXTRAOBJS asm_tiles.o ctv.o"
3184 cat >> confdefs.h <<\EOF
3185 #define ASM_TILES 1
3188 cat >> confdefs.h <<\EOF
3189 #define ASM_CTV 1
3192 if $MMX; then
3193 EXTRAOBJS="$EXTRAOBJS mmx_memcpy.o"
3194 cat >> confdefs.h <<\EOF
3195 #define MMX 1
3198 cat >> confdefs.h <<\EOF
3199 #define memcpy mmx_memcpy
3202 else
3203 EXTRAOBJS="$EXTRAOBJS asm_memcpy.o"
3204 cat >> confdefs.h <<\EOF
3205 #define memcpy asm_memcpy
3209 if test -f mz80/makez80.c; then
3210 CPUDIRS=mz80
3211 MZ80="mz80/mz80.o"
3215 echo $ac_n "checking whether MZ80 is available""... $ac_c" 1>&6
3216 echo "configure:3217: checking whether MZ80 is available" >&5
3217 if test -z "$MZ80"; then
3218 echo "$ac_t""no" 1>&6
3219 EXTRAOBJS="$EXTRAOBJS zz80.o"
3220 else
3221 echo "$ac_t""yes" 1>&6
3224 # Check whether --with-star or --without-star was given.
3225 if test "${with_star+set}" = set; then
3226 withval="$with_star"
3227 USESTAR=$withval
3228 else
3229 USESTAR=yes
3232 # Check whether --with-musa or --without-musa was given.
3233 if test "${with_musa+set}" = set; then
3234 withval="$with_musa"
3235 USEMUSA=$withval
3236 else
3237 USEMUSA=yes
3241 echo $ac_n "checking whether StarScream is available""... $ac_c" 1>&6
3242 echo "configure:3243: checking whether StarScream is available" >&5
3243 if test x$ASM = xfalse -o \! -f star/star.c -o x$USESTAR = xno; then
3244 echo "$ac_t""no" 1>&6
3245 if test x$USEMUSA = xno; then
3246 { echo "configure: error: *** You have disabled both CPU cores. You need at least one." 1>&2; exit 1; }
3248 CPUDIRS="$CPUDIRS musa"
3249 MUSA="-Lmusa -lmusa68"
3250 cat >> confdefs.h <<\EOF
3251 #define COMPILE_WITH_MUSA 1
3254 else
3255 echo "$ac_t""yes" 1>&6
3256 if test x$USEMUSA \!= xno; then
3257 CPUDIRS="$CPUDIRS musa"
3258 MUSA="-Lmusa -lmusa68"
3259 cat >> confdefs.h <<\EOF
3260 #define COMPILE_WITH_MUSA 1
3264 CPUDIRS="$CPUDIRS star"
3265 STAR="star/starcpu.o"
3266 cat >> confdefs.h <<\EOF
3267 #define COMPILE_WITH_STAR 1
3282 trap '' 1 2 15
3283 cat > confcache <<\EOF
3284 # This file is a shell script that caches the results of configure
3285 # tests run on this system so they can be shared between configure
3286 # scripts and configure runs. It is not useful on other systems.
3287 # If it contains results you don't want to keep, you may remove or edit it.
3289 # By default, configure uses ./config.cache as the cache file,
3290 # creating it if it does not exist already. You can give configure
3291 # the --cache-file=FILE option to use a different cache file; that is
3292 # what configure does when it calls configure scripts in
3293 # subdirectories, so they share the cache.
3294 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3295 # config.status only pays attention to the cache file if you give it the
3296 # --recheck option to rerun configure.
3299 # The following way of writing the cache mishandles newlines in values,
3300 # but we know of no workaround that is simple, portable, and efficient.
3301 # So, don't put newlines in cache variables' values.
3302 # Ultrix sh set writes to stderr and can't be redirected directly,
3303 # and sets the high bit in the cache file unless we assign to the vars.
3304 (set) 2>&1 |
3305 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3306 *ac_space=\ *)
3307 # `set' does not quote correctly, so add quotes (double-quote substitution
3308 # turns \\\\ into \\, and sed turns \\ into \).
3309 sed -n \
3310 -e "s/'/'\\\\''/g" \
3311 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3314 # `set' quotes correctly as required by POSIX, so do not add quotes.
3315 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3317 esac >> confcache
3318 if cmp -s $cache_file confcache; then
3320 else
3321 if test -w $cache_file; then
3322 echo "updating cache $cache_file"
3323 cat confcache > $cache_file
3324 else
3325 echo "not updating unwritable cache $cache_file"
3328 rm -f confcache
3330 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3332 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3333 # Let make expand exec_prefix.
3334 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3336 # Any assignment to VPATH causes Sun make to only execute
3337 # the first set of double-colon rules, so remove it if not needed.
3338 # If there is a colon in the path, we need to keep it.
3339 if test "x$srcdir" = x.; then
3340 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3343 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3345 # Transform confdefs.h into DEFS.
3346 # Protect against shell expansion while executing Makefile rules.
3347 # Protect against Makefile macro expansion.
3348 cat > conftest.defs <<\EOF
3349 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
3350 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
3351 s%\[%\\&%g
3352 s%\]%\\&%g
3353 s%\$%$$%g
3355 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3356 rm -f conftest.defs
3359 # Without the "./", some shells look in PATH for config.status.
3360 : ${CONFIG_STATUS=./config.status}
3362 echo creating $CONFIG_STATUS
3363 rm -f $CONFIG_STATUS
3364 cat > $CONFIG_STATUS <<EOF
3365 #! /bin/sh
3366 # Generated automatically by configure.
3367 # Run this file to recreate the current configuration.
3368 # This directory was configured as follows,
3369 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3371 # $0 $ac_configure_args
3373 # Compiler output produced by configure, useful for debugging
3374 # configure, is in ./config.log if it exists.
3376 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3377 for ac_option
3379 case "\$ac_option" in
3380 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3381 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3382 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3383 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3384 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3385 exit 0 ;;
3386 -help | --help | --hel | --he | --h)
3387 echo "\$ac_cs_usage"; exit 0 ;;
3388 *) echo "\$ac_cs_usage"; exit 1 ;;
3389 esac
3390 done
3392 ac_given_srcdir=$srcdir
3393 ac_given_INSTALL="$INSTALL"
3395 trap 'rm -fr `echo "
3396 Makefile
3397 star/Makefile
3398 musa/Makefile
3399 mz80/Makefile
3400 sdl/Makefile
3401 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3403 cat >> $CONFIG_STATUS <<EOF
3405 # Protect against being on the right side of a sed subst in config.status.
3406 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3407 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3408 $ac_vpsub
3409 $extrasub
3410 s%@SHELL@%$SHELL%g
3411 s%@CFLAGS@%$CFLAGS%g
3412 s%@CPPFLAGS@%$CPPFLAGS%g
3413 s%@CXXFLAGS@%$CXXFLAGS%g
3414 s%@FFLAGS@%$FFLAGS%g
3415 s%@DEFS@%$DEFS%g
3416 s%@LDFLAGS@%$LDFLAGS%g
3417 s%@LIBS@%$LIBS%g
3418 s%@exec_prefix@%$exec_prefix%g
3419 s%@prefix@%$prefix%g
3420 s%@program_transform_name@%$program_transform_name%g
3421 s%@bindir@%$bindir%g
3422 s%@sbindir@%$sbindir%g
3423 s%@libexecdir@%$libexecdir%g
3424 s%@datadir@%$datadir%g
3425 s%@sysconfdir@%$sysconfdir%g
3426 s%@sharedstatedir@%$sharedstatedir%g
3427 s%@localstatedir@%$localstatedir%g
3428 s%@libdir@%$libdir%g
3429 s%@includedir@%$includedir%g
3430 s%@oldincludedir@%$oldincludedir%g
3431 s%@infodir@%$infodir%g
3432 s%@mandir@%$mandir%g
3433 s%@host@%$host%g
3434 s%@host_alias@%$host_alias%g
3435 s%@host_cpu@%$host_cpu%g
3436 s%@host_vendor@%$host_vendor%g
3437 s%@host_os@%$host_os%g
3438 s%@target@%$target%g
3439 s%@target_alias@%$target_alias%g
3440 s%@target_cpu@%$target_cpu%g
3441 s%@target_vendor@%$target_vendor%g
3442 s%@target_os@%$target_os%g
3443 s%@build@%$build%g
3444 s%@build_alias@%$build_alias%g
3445 s%@build_cpu@%$build_cpu%g
3446 s%@build_vendor@%$build_vendor%g
3447 s%@build_os@%$build_os%g
3448 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3449 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3450 s%@INSTALL_DATA@%$INSTALL_DATA%g
3451 s%@PACKAGE@%$PACKAGE%g
3452 s%@VERSION@%$VERSION%g
3453 s%@ACLOCAL@%$ACLOCAL%g
3454 s%@AUTOCONF@%$AUTOCONF%g
3455 s%@AUTOMAKE@%$AUTOMAKE%g
3456 s%@AUTOHEADER@%$AUTOHEADER%g
3457 s%@MAKEINFO@%$MAKEINFO%g
3458 s%@SET_MAKE@%$SET_MAKE%g
3459 s%@AWK@%$AWK%g
3460 s%@CC@%$CC%g
3461 s%@CPP@%$CPP%g
3462 s%@CXX@%$CXX%g
3463 s%@CXXCPP@%$CXXCPP%g
3464 s%@LN_S@%$LN_S%g
3465 s%@RANLIB@%$RANLIB%g
3466 s%@SDL_CONFIG@%$SDL_CONFIG%g
3467 s%@SDL_CFLAGS@%$SDL_CFLAGS%g
3468 s%@SDL_LIBS@%$SDL_LIBS%g
3469 s%@X_CFLAGS@%$X_CFLAGS%g
3470 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3471 s%@X_LIBS@%$X_LIBS%g
3472 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3473 s%@NASM@%$NASM%g
3474 s%@NO_USCORE_TRUE@%$NO_USCORE_TRUE%g
3475 s%@NO_USCORE_FALSE@%$NO_USCORE_FALSE%g
3476 s%@INTERFACE@%$INTERFACE%g
3477 s%@NASM_FMT@%$NASM_FMT%g
3478 s%@CHOP_@%$CHOP_%g
3479 s%@CPUDIRS@%$CPUDIRS%g
3480 s%@MUSA@%$MUSA%g
3481 s%@STAR@%$STAR%g
3482 s%@MZ80@%$MZ80%g
3483 s%@EXTRAOBJS@%$EXTRAOBJS%g
3485 CEOF
3488 cat >> $CONFIG_STATUS <<\EOF
3490 # Split the substitutions into bite-sized pieces for seds with
3491 # small command number limits, like on Digital OSF/1 and HP-UX.
3492 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3493 ac_file=1 # Number of current file.
3494 ac_beg=1 # First line for current file.
3495 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3496 ac_more_lines=:
3497 ac_sed_cmds=""
3498 while $ac_more_lines; do
3499 if test $ac_beg -gt 1; then
3500 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3501 else
3502 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3504 if test ! -s conftest.s$ac_file; then
3505 ac_more_lines=false
3506 rm -f conftest.s$ac_file
3507 else
3508 if test -z "$ac_sed_cmds"; then
3509 ac_sed_cmds="sed -f conftest.s$ac_file"
3510 else
3511 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3513 ac_file=`expr $ac_file + 1`
3514 ac_beg=$ac_end
3515 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3517 done
3518 if test -z "$ac_sed_cmds"; then
3519 ac_sed_cmds=cat
3523 cat >> $CONFIG_STATUS <<EOF
3525 CONFIG_FILES=\${CONFIG_FILES-"Makefile
3526 star/Makefile
3527 musa/Makefile
3528 mz80/Makefile
3529 sdl/Makefile
3532 cat >> $CONFIG_STATUS <<\EOF
3533 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3534 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3535 case "$ac_file" in
3536 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3537 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3538 *) ac_file_in="${ac_file}.in" ;;
3539 esac
3541 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3543 # Remove last slash and all that follows it. Not all systems have dirname.
3544 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3545 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3546 # The file is in a subdirectory.
3547 test ! -d "$ac_dir" && mkdir "$ac_dir"
3548 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3549 # A "../" for each directory in $ac_dir_suffix.
3550 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3551 else
3552 ac_dir_suffix= ac_dots=
3555 case "$ac_given_srcdir" in
3556 .) srcdir=.
3557 if test -z "$ac_dots"; then top_srcdir=.
3558 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3559 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3560 *) # Relative path.
3561 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3562 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3563 esac
3565 case "$ac_given_INSTALL" in
3566 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3567 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3568 esac
3570 echo creating "$ac_file"
3571 rm -f "$ac_file"
3572 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3573 case "$ac_file" in
3574 *Makefile*) ac_comsub="1i\\
3575 # $configure_input" ;;
3576 *) ac_comsub= ;;
3577 esac
3579 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3580 sed -e "$ac_comsub
3581 s%@configure_input@%$configure_input%g
3582 s%@srcdir@%$srcdir%g
3583 s%@top_srcdir@%$top_srcdir%g
3584 s%@INSTALL@%$INSTALL%g
3585 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3586 fi; done
3587 rm -f conftest.s*
3590 cat >> $CONFIG_STATUS <<EOF
3593 cat >> $CONFIG_STATUS <<\EOF
3595 exit 0
3597 chmod +x $CONFIG_STATUS
3598 rm -fr confdefs* $ac_clean_files
3599 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1