3 # From configure.in configure.in 1.00
7 # Configure paths for SDL
9 # stolen from Manish Singh
10 # stolen back from Frank Belew
11 # stolen from Manish Singh
12 # Shamelessly stolen from Owen Taylor
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
28 --enable-gl Enable OpenGL mode"
30 --with-sdl-prefix=PFX Prefix where SDL is installed (optional)"
32 --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)"
34 --disable-sdltest Do not try to compile and run a test SDL program"
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
40 cache_file=./config.cache
49 program_transform_name=s,x,x,
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
70 # Initialize some other variables.
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
81 # If the previous option needs an argument, assign it.
82 if test -n "$ac_prev"; then
83 eval "$ac_prev=\$ac_option"
89 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93 # Accept the important Cygnus configure options, so we can diagnose typos.
97 -bindir | --bindir | --bindi | --bind | --bin | --bi)
99 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100 bindir="$ac_optarg" ;;
102 -build | --build | --buil | --bui | --bu)
104 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105 build="$ac_optarg" ;;
107 -cache-file | --cache-file | --cache-fil | --cache-fi \
108 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109 ac_prev=cache_file ;;
110 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112 cache_file="$ac_optarg" ;;
114 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
116 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
118 datadir="$ac_optarg" ;;
120 -disable-* | --disable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 eval "enable_${ac_feature}=no" ;;
129 -enable-* | --enable-*)
130 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131 # Reject names that are not valid shell variable names.
132 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 eval "enable_${ac_feature}='$ac_optarg'" ;;
142 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144 | --exec | --exe | --ex)
145 ac_prev=exec_prefix ;;
146 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148 | --exec=* | --exe=* | --ex=*)
149 exec_prefix="$ac_optarg" ;;
151 -gas | --gas | --ga | --g)
152 # Obsolete; use --with-gas.
155 -help | --help | --hel | --he)
156 # Omit some internal or obsolete options to make the list less imposing.
157 # This message is too long to be a string in the A/UX 3.1 sh.
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
162 --cache-file=FILE cache test results in FILE
163 --help print this message
164 --no-create do not create output files
165 --quiet, --silent do not print \`checking...' messages
166 --version print the version of autoconf that created configure
167 Directory and file names:
168 --prefix=PREFIX install architecture-independent files in PREFIX
170 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
172 --bindir=DIR user executables in DIR [EPREFIX/bin]
173 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
174 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
175 --datadir=DIR read-only architecture-independent data in DIR
177 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
178 --sharedstatedir=DIR modifiable architecture-independent data in DIR
180 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
181 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
182 --includedir=DIR C header files in DIR [PREFIX/include]
183 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
184 --infodir=DIR info documentation in DIR [PREFIX/info]
185 --mandir=DIR man documentation in DIR [PREFIX/man]
186 --srcdir=DIR find the sources in DIR [configure dir or ..]
187 --program-prefix=PREFIX prepend PREFIX to installed program names
188 --program-suffix=SUFFIX append SUFFIX to installed program names
189 --program-transform-name=PROGRAM
190 run sed PROGRAM on installed program names
194 --build=BUILD configure for building on BUILD [BUILD=HOST]
195 --host=HOST configure for HOST [guessed]
196 --target=TARGET configure for TARGET [TARGET=HOST]
197 Features and packages:
198 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
199 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
200 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
201 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
202 --x-includes=DIR X include files are in DIR
203 --x-libraries=DIR X library files are in DIR
205 if test -n "$ac_help"; then
206 echo "--enable and --with options recognized:$ac_help"
210 -host | --host | --hos | --ho)
212 -host=* | --host=* | --hos=* | --ho=*)
215 -includedir | --includedir | --includedi | --included | --include \
216 | --includ | --inclu | --incl | --inc)
217 ac_prev=includedir ;;
218 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219 | --includ=* | --inclu=* | --incl=* | --inc=*)
220 includedir="$ac_optarg" ;;
222 -infodir | --infodir | --infodi | --infod | --info | --inf)
224 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225 infodir="$ac_optarg" ;;
227 -libdir | --libdir | --libdi | --libd)
229 -libdir=* | --libdir=* | --libdi=* | --libd=*)
230 libdir="$ac_optarg" ;;
232 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233 | --libexe | --libex | --libe)
234 ac_prev=libexecdir ;;
235 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236 | --libexe=* | --libex=* | --libe=*)
237 libexecdir="$ac_optarg" ;;
239 -localstatedir | --localstatedir | --localstatedi | --localstated \
240 | --localstate | --localstat | --localsta | --localst \
241 | --locals | --local | --loca | --loc | --lo)
242 ac_prev=localstatedir ;;
243 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246 localstatedir="$ac_optarg" ;;
248 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
250 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251 mandir="$ac_optarg" ;;
254 # Obsolete; use --without-fp.
257 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
261 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
265 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267 | --oldin | --oldi | --old | --ol | --o)
268 ac_prev=oldincludedir ;;
269 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272 oldincludedir="$ac_optarg" ;;
274 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
276 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277 prefix="$ac_optarg" ;;
279 -program-prefix | --program-prefix | --program-prefi | --program-pref \
280 | --program-pre | --program-pr | --program-p)
281 ac_prev=program_prefix ;;
282 -program-prefix=* | --program-prefix=* | --program-prefi=* \
283 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284 program_prefix="$ac_optarg" ;;
286 -program-suffix | --program-suffix | --program-suffi | --program-suff \
287 | --program-suf | --program-su | --program-s)
288 ac_prev=program_suffix ;;
289 -program-suffix=* | --program-suffix=* | --program-suffi=* \
290 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291 program_suffix="$ac_optarg" ;;
293 -program-transform-name | --program-transform-name \
294 | --program-transform-nam | --program-transform-na \
295 | --program-transform-n | --program-transform- \
296 | --program-transform | --program-transfor \
297 | --program-transfo | --program-transf \
298 | --program-trans | --program-tran \
299 | --progr-tra | --program-tr | --program-t)
300 ac_prev=program_transform_name ;;
301 -program-transform-name=* | --program-transform-name=* \
302 | --program-transform-nam=* | --program-transform-na=* \
303 | --program-transform-n=* | --program-transform-=* \
304 | --program-transform=* | --program-transfor=* \
305 | --program-transfo=* | --program-transf=* \
306 | --program-trans=* | --program-tran=* \
307 | --progr-tra=* | --program-tr=* | --program-t=*)
308 program_transform_name="$ac_optarg" ;;
310 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311 | -silent | --silent | --silen | --sile | --sil)
314 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
316 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
318 sbindir="$ac_optarg" ;;
320 -sharedstatedir | --sharedstatedir | --sharedstatedi \
321 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322 | --sharedst | --shareds | --shared | --share | --shar \
324 ac_prev=sharedstatedir ;;
325 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
329 sharedstatedir="$ac_optarg" ;;
331 -site | --site | --sit)
333 -site=* | --site=* | --sit=*)
336 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
338 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339 srcdir="$ac_optarg" ;;
341 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342 | --syscon | --sysco | --sysc | --sys | --sy)
343 ac_prev=sysconfdir ;;
344 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346 sysconfdir="$ac_optarg" ;;
348 -target | --target | --targe | --targ | --tar | --ta | --t)
350 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351 target="$ac_optarg" ;;
353 -v | -verbose | --verbose | --verbos | --verbo | --verb)
356 -version | --version | --versio | --versi | --vers)
357 echo "configure generated by autoconf version 2.13"
361 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}='$ac_optarg'" ;;
373 -without-* | --without-*)
374 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375 # Reject names that are not valid shell variable names.
376 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
379 ac_package=`echo $ac_package| sed 's/-/_/g'`
380 eval "with_${ac_package}=no" ;;
383 # Obsolete; use --with-x.
386 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387 | --x-incl | --x-inc | --x-in | --x-i)
388 ac_prev=x_includes ;;
389 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391 x_includes="$ac_optarg" ;;
393 -x-libraries | --x-libraries | --x-librarie | --x-librari \
394 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395 ac_prev=x_libraries ;;
396 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398 x_libraries="$ac_optarg" ;;
400 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
404 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405 echo "configure: warning: $ac_option: invalid host type" 1>&2
407 if test "x$nonopt" != xNONE; then
408 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416 if test -n "$ac_prev"; then
417 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
422 # File descriptor usage:
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
448 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449 | --no-cr | --no-c) ;;
450 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459 # Only set these to C if already set. These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=base/am_map.c
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479 ac_srcdir_defaulted=yes
480 # Try the directory containing this script, then its parent.
482 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
485 if test ! -r $srcdir/$ac_unique_file; then
489 ac_srcdir_defaulted=no
491 if test ! -r $srcdir/$ac_unique_file; then
492 if test "$ac_srcdir_defaulted" = yes; then
493 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
495 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502 if test "x$prefix" != xNONE; then
503 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
505 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
508 for ac_site_file in $CONFIG_SITE; do
509 if test -r "$ac_site_file"; then
510 echo "loading site script $ac_site_file"
515 if test -r "$cache_file"; then
516 echo "loading cache $cache_file"
519 echo "creating cache $cache_file"
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='\c' ac_t=
551 LIBS="-L/usr/X11R6/lib"
555 # Check whether --enable-gl or --disable-gl was given.
556 if test "${enable_gl+set}" = set; then
557 enableval="$enable_gl"
558 GLHEXEN="true";SDL_VERSION="1.1.2"; cat >> confdefs.h <<\EOF
570 cat >> confdefs.h <<\EOF
574 cat >> confdefs.h <<\EOF
575 #define NORANGECHECKING 1
580 # Extract the first word of "gcc", so it can be a program name with args.
581 set dummy gcc; ac_word=$2
582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
583 echo "configure:584: checking for $ac_word" >&5
584 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
585 echo $ac_n "(cached) $ac_c" 1>&6
587 if test -n "$CC"; then
588 ac_cv_prog_CC="$CC" # Let the user override the test.
590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
592 for ac_dir in $ac_dummy; do
593 test -z "$ac_dir" && ac_dir=.
594 if test -f $ac_dir/$ac_word; then
603 if test -n "$CC"; then
604 echo "$ac_t""$CC" 1>&6
606 echo "$ac_t""no" 1>&6
609 if test -z "$CC"; then
610 # Extract the first word of "cc", so it can be a program name with args.
611 set dummy cc; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 echo "configure:614: checking for $ac_word" >&5
614 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
615 echo $ac_n "(cached) $ac_c" 1>&6
617 if test -n "$CC"; then
618 ac_cv_prog_CC="$CC" # Let the user override the test.
620 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
635 if test $ac_prog_rejected = yes; then
636 # We found a bogon in the path, so make sure we never use it.
637 set dummy $ac_cv_prog_CC
639 if test $# -gt 0; then
640 # We chose a different compiler from the bogus one.
641 # However, it has the same basename, so the bogon will be chosen
642 # first if we set CC to just the basename; use the full file name.
644 set dummy "$ac_dir/$ac_word" "$@"
652 if test -n "$CC"; then
653 echo "$ac_t""$CC" 1>&6
655 echo "$ac_t""no" 1>&6
658 if test -z "$CC"; then
661 # Extract the first word of "cl", so it can be a program name with args.
662 set dummy cl; ac_word=$2
663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
664 echo "configure:665: checking for $ac_word" >&5
665 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
666 echo $ac_n "(cached) $ac_c" 1>&6
668 if test -n "$CC"; then
669 ac_cv_prog_CC="$CC" # Let the user override the test.
671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
673 for ac_dir in $ac_dummy; do
674 test -z "$ac_dir" && ac_dir=.
675 if test -f $ac_dir/$ac_word; then
684 if test -n "$CC"; then
685 echo "$ac_t""$CC" 1>&6
687 echo "$ac_t""no" 1>&6
692 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
695 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
696 echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
699 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
700 ac_cpp='$CPP $CPPFLAGS'
701 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
702 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
703 cross_compiling=$ac_cv_prog_cc_cross
705 cat > conftest.$ac_ext << EOF
707 #line 708 "configure"
708 #include "confdefs.h"
712 if { (eval echo configure:713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
713 ac_cv_prog_cc_works=yes
714 # If we can't run a trivial program, we are probably using a cross compiler.
715 if (./conftest; exit) 2>/dev/null; then
716 ac_cv_prog_cc_cross=no
718 ac_cv_prog_cc_cross=yes
721 echo "configure: failed program was:" >&5
722 cat conftest.$ac_ext >&5
723 ac_cv_prog_cc_works=no
727 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
728 ac_cpp='$CPP $CPPFLAGS'
729 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
730 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
731 cross_compiling=$ac_cv_prog_cc_cross
733 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
734 if test $ac_cv_prog_cc_works = no; then
735 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
737 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
738 echo "configure:739: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
739 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
740 cross_compiling=$ac_cv_prog_cc_cross
742 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
743 echo "configure:744: checking whether we are using GNU C" >&5
744 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
745 echo $ac_n "(cached) $ac_c" 1>&6
747 cat > conftest.c <<EOF
752 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
759 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
761 if test $ac_cv_prog_gcc = yes; then
767 ac_test_CFLAGS="${CFLAGS+set}"
768 ac_save_CFLAGS="$CFLAGS"
770 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
771 echo "configure:772: checking whether ${CC-cc} accepts -g" >&5
772 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
773 echo $ac_n "(cached) $ac_c" 1>&6
775 echo 'void f(){}' > conftest.c
776 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
785 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
786 if test "$ac_test_CFLAGS" = set; then
787 CFLAGS="$ac_save_CFLAGS"
788 elif test $ac_cv_prog_cc_g = yes; then
789 if test "$GCC" = yes; then
795 if test "$GCC" = yes; then
802 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
803 echo "configure:804: checking how to run the C preprocessor" >&5
804 # On Suns, sometimes $CPP names a directory.
805 if test -n "$CPP" && test -d "$CPP"; then
808 if test -z "$CPP"; then
809 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
812 # This must be in double quotes, not single quotes, because CPP may get
813 # substituted into the Makefile and "${CC-cc}" will confuse make.
815 # On the NeXT, cc -E runs the code through the compiler's parser,
816 # not just through cpp.
817 cat > conftest.$ac_ext <<EOF
818 #line 819 "configure"
819 #include "confdefs.h"
823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
824 { (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
826 if test -z "$ac_err"; then
830 echo "configure: failed program was:" >&5
831 cat conftest.$ac_ext >&5
833 CPP="${CC-cc} -E -traditional-cpp"
834 cat > conftest.$ac_ext <<EOF
835 #line 836 "configure"
836 #include "confdefs.h"
840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
841 { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
843 if test -z "$ac_err"; then
847 echo "configure: failed program was:" >&5
848 cat conftest.$ac_ext >&5
850 CPP="${CC-cc} -nologo -E"
851 cat > conftest.$ac_ext <<EOF
852 #line 853 "configure"
853 #include "confdefs.h"
857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
858 { (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
860 if test -z "$ac_err"; then
864 echo "configure: failed program was:" >&5
865 cat conftest.$ac_ext >&5
874 ac_cv_prog_CPP="$CPP"
876 CPP="$ac_cv_prog_CPP"
878 ac_cv_prog_CPP="$CPP"
880 echo "$ac_t""$CPP" 1>&6
884 echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
885 echo "configure:886: checking for pthread_join in -lpthread" >&5
886 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
888 echo $ac_n "(cached) $ac_c" 1>&6
891 LIBS="-lpthread $LIBS"
892 cat > conftest.$ac_ext <<EOF
893 #line 894 "configure"
894 #include "confdefs.h"
895 /* Override any gcc2 internal prototype to avoid an error. */
896 /* We use char because int might match the return type of a gcc2
897 builtin and then its argument prototype would still apply. */
904 if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
906 eval "ac_cv_lib_$ac_lib_var=yes"
908 echo "configure: failed program was:" >&5
909 cat conftest.$ac_ext >&5
911 eval "ac_cv_lib_$ac_lib_var=no"
917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
918 echo "$ac_t""yes" 1>&6
921 echo "$ac_t""no" 1>&6
927 # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
928 if test "${with_sdl_prefix+set}" = set; then
929 withval="$with_sdl_prefix"
930 sdl_prefix="$withval"
935 # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
936 if test "${with_sdl_exec_prefix+set}" = set; then
937 withval="$with_sdl_exec_prefix"
938 sdl_exec_prefix="$withval"
943 # Check whether --enable-sdltest or --disable-sdltest was given.
944 if test "${enable_sdltest+set}" = set; then
945 enableval="$enable_sdltest"
952 if test x$sdl_exec_prefix != x ; then
953 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
954 if test x${SDL_CONFIG+set} != xset ; then
955 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
958 if test x$sdl_prefix != x ; then
959 sdl_args="$sdl_args --prefix=$sdl_prefix"
960 if test x${SDL_CONFIG+set} != xset ; then
961 SDL_CONFIG=$sdl_prefix/bin/sdl-config
965 # Extract the first word of "sdl-config", so it can be a program name with args.
966 set dummy sdl-config; ac_word=$2
967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
968 echo "configure:969: checking for $ac_word" >&5
969 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
970 echo $ac_n "(cached) $ac_c" 1>&6
972 case "$SDL_CONFIG" in
974 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
977 ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
980 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
982 for ac_dir in $ac_dummy; do
983 test -z "$ac_dir" && ac_dir=.
984 if test -f $ac_dir/$ac_word; then
985 ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
990 test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
994 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
995 if test -n "$SDL_CONFIG"; then
996 echo "$ac_t""$SDL_CONFIG" 1>&6
998 echo "$ac_t""no" 1>&6
1001 min_sdl_version=$SDL_VERSION
1002 echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
1003 echo "configure:1004: checking for SDL - version >= $min_sdl_version" >&5
1005 if test "$SDL_CONFIG" = "no" ; then
1008 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
1009 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
1011 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
1012 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
1013 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
1014 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
1015 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
1016 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
1017 if test "x$enable_sdltest" = "xyes" ; then
1018 ac_save_CFLAGS="$CFLAGS"
1019 ac_save_LIBS="$LIBS"
1020 CFLAGS="$CFLAGS $SDL_CFLAGS"
1021 LIBS="$LIBS $SDL_LIBS"
1023 if test "$cross_compiling" = yes; then
1024 echo $ac_n "cross compiling; assumed OK... $ac_c"
1026 cat > conftest.$ac_ext <<EOF
1027 #line 1028 "configure"
1028 #include "confdefs.h"
1036 my_strdup (char *str)
1042 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
1043 strcpy (new_str, str);
1051 int main (int argc, char *argv[])
1053 int major, minor, micro;
1056 /* This hangs on some systems (?)
1057 system ("touch conf.sdltest");
1059 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
1061 /* HP/UX 9 (%@#!) writes to sscanf strings */
1062 tmp_version = my_strdup("$min_sdl_version");
1063 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1064 printf("%s, bad version string\n", "$min_sdl_version");
1068 if (($sdl_major_version > major) ||
1069 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
1070 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
1076 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
1077 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
1078 printf("*** best to upgrade to the required version.\n");
1079 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
1080 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
1081 printf("*** config.cache before re-running configure\n");
1088 if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1092 echo "configure: failed program was:" >&5
1093 cat conftest.$ac_ext >&5
1100 CFLAGS="$ac_save_CFLAGS"
1101 LIBS="$ac_save_LIBS"
1104 if test "x$no_sdl" = x ; then
1105 echo "$ac_t""yes" 1>&6
1106 HAVESDL="yes";GLBASE="sdl/i_sdlgl.o";BUILDNAMES="sdl $BUILDNAMES"
1108 echo "$ac_t""no" 1>&6
1109 if test "$SDL_CONFIG" = "no" ; then
1110 echo "*** The sdl-config script installed by SDL could not be found"
1111 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
1112 echo "*** your path, or set the SDL_CONFIG environment variable to the"
1113 echo "*** full path to sdl-config."
1115 if test -f conf.sdltest ; then
1118 echo "*** Could not run SDL test program, checking why..."
1119 CFLAGS="$CFLAGS $SDL_CFLAGS"
1120 LIBS="$LIBS $SDL_LIBS"
1121 cat > conftest.$ac_ext <<EOF
1122 #line 1123 "configure"
1123 #include "confdefs.h"
1132 if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1134 echo "*** The test program compiled, but did not run. This usually means"
1135 echo "*** that the run-time linker is not finding SDL or finding the wrong"
1136 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
1137 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1138 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1139 echo "*** is required on your system"
1141 echo "*** If you have an old version installed, it is best to remove it, although"
1142 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1144 echo "configure: failed program was:" >&5
1145 cat conftest.$ac_ext >&5
1147 echo "*** The test program failed to compile or link. See the file config.log for the"
1148 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
1149 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
1150 echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
1153 CFLAGS="$ac_save_CFLAGS"
1154 LIBS="$ac_save_LIBS"
1172 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1173 echo "configure:1174: checking for dlopen in -ldl" >&5
1174 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1176 echo $ac_n "(cached) $ac_c" 1>&6
1178 ac_save_LIBS="$LIBS"
1180 cat > conftest.$ac_ext <<EOF
1181 #line 1182 "configure"
1182 #include "confdefs.h"
1183 /* Override any gcc2 internal prototype to avoid an error. */
1184 /* We use char because int might match the return type of a gcc2
1185 builtin and then its argument prototype would still apply. */
1192 if { (eval echo configure:1193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1194 eval "ac_cv_lib_$ac_lib_var=yes"
1196 echo "configure: failed program was:" >&5
1197 cat conftest.$ac_ext >&5
1199 eval "ac_cv_lib_$ac_lib_var=no"
1202 LIBS="$ac_save_LIBS"
1205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1206 echo "$ac_t""yes" 1>&6
1207 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1208 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1209 cat >> confdefs.h <<EOF
1210 #define $ac_tr_lib 1
1216 echo "$ac_t""no" 1>&6
1219 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
1220 echo "configure:1221: checking for sqrt in -lm" >&5
1221 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
1222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1223 echo $ac_n "(cached) $ac_c" 1>&6
1225 ac_save_LIBS="$LIBS"
1227 cat > conftest.$ac_ext <<EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1230 /* Override any gcc2 internal prototype to avoid an error. */
1231 /* We use char because int might match the return type of a gcc2
1232 builtin and then its argument prototype would still apply. */
1239 if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1241 eval "ac_cv_lib_$ac_lib_var=yes"
1243 echo "configure: failed program was:" >&5
1244 cat conftest.$ac_ext >&5
1246 eval "ac_cv_lib_$ac_lib_var=no"
1249 LIBS="$ac_save_LIBS"
1252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1253 echo "$ac_t""yes" 1>&6
1254 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1255 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1256 cat >> confdefs.h <<EOF
1257 #define $ac_tr_lib 1
1263 echo "$ac_t""no" 1>&6
1268 if test "$GLHEXEN" = "true"
1270 echo $ac_n "checking for glBindTexture in -lGL""... $ac_c" 1>&6
1271 echo "configure:1272: checking for glBindTexture in -lGL" >&5
1272 ac_lib_var=`echo GL'_'glBindTexture | sed 'y%./+-%__p_%'`
1273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1274 echo $ac_n "(cached) $ac_c" 1>&6
1276 ac_save_LIBS="$LIBS"
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 /* Override any gcc2 internal prototype to avoid an error. */
1282 /* We use char because int might match the return type of a gcc2
1283 builtin and then its argument prototype would still apply. */
1284 char glBindTexture();
1290 if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1292 eval "ac_cv_lib_$ac_lib_var=yes"
1294 echo "configure: failed program was:" >&5
1295 cat conftest.$ac_ext >&5
1297 eval "ac_cv_lib_$ac_lib_var=no"
1300 LIBS="$ac_save_LIBS"
1303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1304 echo "$ac_t""yes" 1>&6
1306 echo $ac_n "checking for gluOrtho2D in -lGLU""... $ac_c" 1>&6
1307 echo "configure:1308: checking for gluOrtho2D in -lGLU" >&5
1308 ac_lib_var=`echo GLU'_'gluOrtho2D | sed 'y%./+-%__p_%'`
1309 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1310 echo $ac_n "(cached) $ac_c" 1>&6
1312 ac_save_LIBS="$LIBS"
1314 cat > conftest.$ac_ext <<EOF
1315 #line 1316 "configure"
1316 #include "confdefs.h"
1317 /* Override any gcc2 internal prototype to avoid an error. */
1318 /* We use char because int might match the return type of a gcc2
1319 builtin and then its argument prototype would still apply. */
1326 if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1328 eval "ac_cv_lib_$ac_lib_var=yes"
1330 echo "configure: failed program was:" >&5
1331 cat conftest.$ac_ext >&5
1333 eval "ac_cv_lib_$ac_lib_var=no"
1336 LIBS="$ac_save_LIBS"
1339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1340 echo "$ac_t""yes" 1>&6
1343 echo "$ac_t""no" 1>&6
1344 echo $ac_n "checking for glBindTexture in -lMesaGL""... $ac_c" 1>&6
1345 echo "configure:1346: checking for glBindTexture in -lMesaGL" >&5
1346 ac_lib_var=`echo MesaGL'_'glBindTexture | sed 'y%./+-%__p_%'`
1347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1350 ac_save_LIBS="$LIBS"
1351 LIBS="-lMesaGL $LIBS"
1352 cat > conftest.$ac_ext <<EOF
1353 #line 1354 "configure"
1354 #include "confdefs.h"
1355 /* Override any gcc2 internal prototype to avoid an error. */
1356 /* We use char because int might match the return type of a gcc2
1357 builtin and then its argument prototype would still apply. */
1358 char glBindTexture();
1364 if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1366 eval "ac_cv_lib_$ac_lib_var=yes"
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1371 eval "ac_cv_lib_$ac_lib_var=no"
1374 LIBS="$ac_save_LIBS"
1377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1378 echo "$ac_t""yes" 1>&6
1379 LIBS="$LIBS -lMesaGL";
1380 echo $ac_n "checking for gluOrtho2D in -lMesaGLU""... $ac_c" 1>&6
1381 echo "configure:1382: checking for gluOrtho2D in -lMesaGLU" >&5
1382 ac_lib_var=`echo MesaGLU'_'gluOrtho2D | sed 'y%./+-%__p_%'`
1383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1386 ac_save_LIBS="$LIBS"
1387 LIBS="-lMesaGLU $LIBS"
1388 cat > conftest.$ac_ext <<EOF
1389 #line 1390 "configure"
1390 #include "confdefs.h"
1391 /* Override any gcc2 internal prototype to avoid an error. */
1392 /* We use char because int might match the return type of a gcc2
1393 builtin and then its argument prototype would still apply. */
1400 if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1402 eval "ac_cv_lib_$ac_lib_var=yes"
1404 echo "configure: failed program was:" >&5
1405 cat conftest.$ac_ext >&5
1407 eval "ac_cv_lib_$ac_lib_var=no"
1410 LIBS="$ac_save_LIBS"
1413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1414 echo "$ac_t""yes" 1>&6
1417 echo "$ac_t""no" 1>&6
1422 echo "$ac_t""no" 1>&6
1430 echo "$ac_t""no" 1>&6
1431 echo $ac_n "checking for glBindTexture in -lMesaGL""... $ac_c" 1>&6
1432 echo "configure:1433: checking for glBindTexture in -lMesaGL" >&5
1433 ac_lib_var=`echo MesaGL'_'glBindTexture | sed 'y%./+-%__p_%'`
1434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1435 echo $ac_n "(cached) $ac_c" 1>&6
1437 ac_save_LIBS="$LIBS"
1438 LIBS="-lMesaGL $LIBS"
1439 cat > conftest.$ac_ext <<EOF
1440 #line 1441 "configure"
1441 #include "confdefs.h"
1442 /* Override any gcc2 internal prototype to avoid an error. */
1443 /* We use char because int might match the return type of a gcc2
1444 builtin and then its argument prototype would still apply. */
1445 char glBindTexture();
1451 if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1453 eval "ac_cv_lib_$ac_lib_var=yes"
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1458 eval "ac_cv_lib_$ac_lib_var=no"
1461 LIBS="$ac_save_LIBS"
1464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1465 echo "$ac_t""yes" 1>&6
1466 LIBS="$LIBS -lMesaGL";
1467 echo $ac_n "checking for gluOrtho2D in -lMesaGLU""... $ac_c" 1>&6
1468 echo "configure:1469: checking for gluOrtho2D in -lMesaGLU" >&5
1469 ac_lib_var=`echo MesaGLU'_'gluOrtho2D | sed 'y%./+-%__p_%'`
1470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1471 echo $ac_n "(cached) $ac_c" 1>&6
1473 ac_save_LIBS="$LIBS"
1474 LIBS="-lMesaGLU $LIBS"
1475 cat > conftest.$ac_ext <<EOF
1476 #line 1477 "configure"
1477 #include "confdefs.h"
1478 /* Override any gcc2 internal prototype to avoid an error. */
1479 /* We use char because int might match the return type of a gcc2
1480 builtin and then its argument prototype would still apply. */
1487 if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1489 eval "ac_cv_lib_$ac_lib_var=yes"
1491 echo "configure: failed program was:" >&5
1492 cat conftest.$ac_ext >&5
1494 eval "ac_cv_lib_$ac_lib_var=no"
1497 LIBS="$ac_save_LIBS"
1500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1501 echo "$ac_t""yes" 1>&6
1504 echo "$ac_t""no" 1>&6
1509 echo "$ac_t""no" 1>&6
1519 if test "x${GCC}" = "xyes"
1521 CFLAGS="$CFLAGS -Wall"
1522 echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
1523 echo "configure:1524: checking "for gcc strength-reduce bug"" >&5
1524 if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1527 if test "$cross_compiling" = yes; then
1528 ac_cv_c_gcc_strength_bug="yes"
1530 cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1535 static int Array[3];
1538 for(i=0; i<B; i++) Array[i] = i - 3;
1539 exit( Array[1] != -2 );
1542 if { (eval echo configure:1543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1544 ac_cv_c_gcc_strength_bug="no"
1546 echo "configure: failed program was:" >&5
1547 cat conftest.$ac_ext >&5
1549 ac_cv_c_gcc_strength_bug="yes"
1556 echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
1557 if test "$ac_cv_c_gcc_strength_bug" = "yes"
1559 CFLAGS="$CFLAGS -fno-strength-reduce"
1564 echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
1565 echo "configure:1566: checking "whether external symbols need an underscore prefix"" >&5
1566 if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
1567 echo $ac_n "(cached) $ac_c" 1>&6
1570 LIBS="conftest_asm.s $LIBS"
1571 cat > conftest_asm.s <<EOF
1576 cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1581 if (ac_test) return 1
1584 if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1586 ac_cv_c_extern_prefix="yes"
1588 echo "configure: failed program was:" >&5
1589 cat conftest.$ac_ext >&5
1591 ac_cv_c_extern_prefix="no"
1597 echo "$ac_t""$ac_cv_c_extern_prefix" 1>&6
1602 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1603 # for constant arguments. Useless!
1604 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1605 echo "configure:1606: checking for working alloca.h" >&5
1606 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1609 cat > conftest.$ac_ext <<EOF
1610 #line 1611 "configure"
1611 #include "confdefs.h"
1614 void *p = alloca(2 * sizeof(int));
1617 if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1619 ac_cv_header_alloca_h=yes
1621 echo "configure: failed program was:" >&5
1622 cat conftest.$ac_ext >&5
1624 ac_cv_header_alloca_h=no
1629 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1630 if test $ac_cv_header_alloca_h = yes; then
1631 cat >> confdefs.h <<\EOF
1632 #define HAVE_ALLOCA_H 1
1637 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1638 echo "configure:1639: checking for alloca" >&5
1639 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1640 echo $ac_n "(cached) $ac_c" 1>&6
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1647 # define alloca __builtin_alloca
1650 # include <malloc.h>
1651 # define alloca _alloca
1654 # include <alloca.h>
1659 # ifndef alloca /* predefined by HP cc +Olibcalls */
1668 char *p = (char *) alloca(1);
1671 if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1673 ac_cv_func_alloca_works=yes
1675 echo "configure: failed program was:" >&5
1676 cat conftest.$ac_ext >&5
1678 ac_cv_func_alloca_works=no
1683 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1684 if test $ac_cv_func_alloca_works = yes; then
1685 cat >> confdefs.h <<\EOF
1686 #define HAVE_ALLOCA 1
1691 if test $ac_cv_func_alloca_works = no; then
1692 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1693 # that cause trouble. Some versions do not even contain alloca or
1694 # contain a buggy version. If you still want to use their alloca,
1695 # use ar to extract alloca.o from them instead of compiling alloca.c.
1696 ALLOCA=alloca.${ac_objext}
1697 cat >> confdefs.h <<\EOF
1702 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1703 echo "configure:1704: checking whether alloca needs Cray hooks" >&5
1704 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1705 echo $ac_n "(cached) $ac_c" 1>&6
1707 cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 #if defined(CRAY) && ! defined(CRAY2)
1717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1718 egrep "webecray" >/dev/null 2>&1; then
1729 echo "$ac_t""$ac_cv_os_cray" 1>&6
1730 if test $ac_cv_os_cray = yes; then
1731 for ac_func in _getb67 GETB67 getb67; do
1732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1733 echo "configure:1734: checking for $ac_func" >&5
1734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1737 cat > conftest.$ac_ext <<EOF
1738 #line 1739 "configure"
1739 #include "confdefs.h"
1740 /* System header to define __stub macros and hopefully few prototypes,
1741 which can conflict with char $ac_func(); below. */
1743 /* Override any gcc2 internal prototype to avoid an error. */
1744 /* We use char because int might match the return type of a gcc2
1745 builtin and then its argument prototype would still apply. */
1750 /* The GNU C library defines this for functions which it implements
1751 to always fail with ENOSYS. Some functions are actually named
1752 something starting with __ and the normal name is an alias. */
1753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1761 if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1763 eval "ac_cv_func_$ac_func=yes"
1765 echo "configure: failed program was:" >&5
1766 cat conftest.$ac_ext >&5
1768 eval "ac_cv_func_$ac_func=no"
1773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1774 echo "$ac_t""yes" 1>&6
1775 cat >> confdefs.h <<EOF
1776 #define CRAY_STACKSEG_END $ac_func
1781 echo "$ac_t""no" 1>&6
1787 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1788 echo "configure:1789: checking stack direction for C alloca" >&5
1789 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1790 echo $ac_n "(cached) $ac_c" 1>&6
1792 if test "$cross_compiling" = yes; then
1793 ac_cv_c_stack_direction=0
1795 cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 find_stack_direction ()
1800 static char *addr = 0;
1805 return find_stack_direction ();
1808 return (&dummy > addr) ? 1 : -1;
1812 exit (find_stack_direction() < 0);
1815 if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1817 ac_cv_c_stack_direction=1
1819 echo "configure: failed program was:" >&5
1820 cat conftest.$ac_ext >&5
1822 ac_cv_c_stack_direction=-1
1829 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1830 cat >> confdefs.h <<EOF
1831 #define STACK_DIRECTION $ac_cv_c_stack_direction
1842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1844 echo "configure:1845: checking for $ac_hdr" >&5
1845 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1854 { (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1856 if test -z "$ac_err"; then
1858 eval "ac_cv_header_$ac_safe=yes"
1861 echo "configure: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1864 eval "ac_cv_header_$ac_safe=no"
1868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1869 echo "$ac_t""yes" 1>&6
1870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1871 cat >> confdefs.h <<EOF
1872 #define $ac_tr_hdr 1
1876 echo "$ac_t""no" 1>&6
1880 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1881 echo "configure:1882: checking whether stat file-mode macros are broken" >&5
1882 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1883 echo $ac_n "(cached) $ac_c" 1>&6
1885 cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 #include <sys/types.h>
1889 #include <sys/stat.h>
1891 #if defined(S_ISBLK) && defined(S_IFDIR)
1892 # if S_ISBLK (S_IFDIR)
1897 #if defined(S_ISBLK) && defined(S_IFCHR)
1898 # if S_ISBLK (S_IFCHR)
1903 #if defined(S_ISLNK) && defined(S_IFREG)
1904 # if S_ISLNK (S_IFREG)
1909 #if defined(S_ISSOCK) && defined(S_IFREG)
1910 # if S_ISSOCK (S_IFREG)
1916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1917 egrep "You lose" >/dev/null 2>&1; then
1919 ac_cv_header_stat_broken=yes
1922 ac_cv_header_stat_broken=no
1928 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1929 if test $ac_cv_header_stat_broken = yes; then
1930 cat >> confdefs.h <<\EOF
1931 #define STAT_MACROS_BROKEN 1
1938 echo $ac_n "checking for working const""... $ac_c" 1>&6
1939 echo "configure:1940: checking for working const" >&5
1940 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1941 echo $ac_n "(cached) $ac_c" 1>&6
1943 cat > conftest.$ac_ext <<EOF
1944 #line 1945 "configure"
1945 #include "confdefs.h"
1949 /* Ultrix mips cc rejects this. */
1950 typedef int charset[2]; const charset x = {0,0};
1951 /* SunOS 4.1.1 cc rejects this. */
1952 char const *const *ccp;
1954 /* NEC SVR4.0.2 mips cc rejects this. */
1955 struct point {int x, y;};
1956 static struct point const zero = {0,0};
1957 /* AIX XL C 1.02.0.0 rejects this.
1958 It does not let you subtract one const X* pointer from another in an arm
1959 of an if-expression whose if-part is not a constant expression */
1960 const char *g = "string";
1961 ccp = &g + (g ? g-g : 0);
1962 /* HPUX 7.0 cc rejects these. */
1965 ccp = (char const *const *) p;
1966 { /* SCO 3.2v4 cc rejects this. */
1968 char const *s = 0 ? (char *) 0 : (char const *) 0;
1972 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1974 const int *foo = &x[0];
1977 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1978 typedef const int *iptr;
1982 { /* AIX XL C 1.02.0.0 rejects this saying
1983 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1984 struct s { int j; const int *ap[3]; };
1985 struct s *b; b->j = 5;
1987 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
2005 echo "$ac_t""$ac_cv_c_const" 1>&6
2006 if test $ac_cv_c_const = no; then
2007 cat >> confdefs.h <<\EOF
2013 echo $ac_n "checking for inline""... $ac_c" 1>&6
2014 echo "configure:2015: checking for inline" >&5
2015 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2019 for ac_kw in inline __inline__ __inline; do
2020 cat > conftest.$ac_ext <<EOF
2021 #line 2022 "configure"
2022 #include "confdefs.h"
2025 } int $ac_kw foo() {
2028 if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2030 ac_cv_c_inline=$ac_kw; break
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2040 echo "$ac_t""$ac_cv_c_inline" 1>&6
2041 case "$ac_cv_c_inline" in
2043 no) cat >> confdefs.h <<\EOF
2047 *) cat >> confdefs.h <<EOF
2048 #define inline $ac_cv_c_inline
2053 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2054 echo "configure:2055: checking for ANSI C header files" >&5
2055 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2056 echo $ac_n "(cached) $ac_c" 1>&6
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2067 { (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2069 if test -z "$ac_err"; then
2071 ac_cv_header_stdc=yes
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2077 ac_cv_header_stdc=no
2081 if test $ac_cv_header_stdc = yes; then
2082 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2083 cat > conftest.$ac_ext <<EOF
2084 #line 2085 "configure"
2085 #include "confdefs.h"
2088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2089 egrep "memchr" >/dev/null 2>&1; then
2093 ac_cv_header_stdc=no
2099 if test $ac_cv_header_stdc = yes; then
2100 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2101 cat > conftest.$ac_ext <<EOF
2102 #line 2103 "configure"
2103 #include "confdefs.h"
2106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2107 egrep "free" >/dev/null 2>&1; then
2111 ac_cv_header_stdc=no
2117 if test $ac_cv_header_stdc = yes; then
2118 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2119 if test "$cross_compiling" = yes; then
2122 cat > conftest.$ac_ext <<EOF
2123 #line 2124 "configure"
2124 #include "confdefs.h"
2126 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2127 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2128 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2129 int main () { int i; for (i = 0; i < 256; i++)
2130 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2134 if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
2141 ac_cv_header_stdc=no
2149 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2150 if test $ac_cv_header_stdc = yes; then
2151 cat >> confdefs.h <<\EOF
2152 #define STDC_HEADERS 1
2157 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2158 echo "configure:2159: checking for size_t" >&5
2159 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2160 echo $ac_n "(cached) $ac_c" 1>&6
2162 cat > conftest.$ac_ext <<EOF
2163 #line 2164 "configure"
2164 #include "confdefs.h"
2165 #include <sys/types.h>
2171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2172 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2174 ac_cv_type_size_t=yes
2177 ac_cv_type_size_t=no
2182 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2183 if test $ac_cv_type_size_t = no; then
2184 cat >> confdefs.h <<\EOF
2185 #define size_t unsigned
2190 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2191 echo "configure:2192: checking size of long long" >&5
2192 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2195 if test "$cross_compiling" = yes; then
2196 ac_cv_sizeof_long_long=0
2198 cat > conftest.$ac_ext <<EOF
2199 #line 2200 "configure"
2200 #include "confdefs.h"
2204 FILE *f=fopen("conftestval", "w");
2206 fprintf(f, "%d\n", sizeof(long long));
2210 if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2212 ac_cv_sizeof_long_long=`cat conftestval`
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2217 ac_cv_sizeof_long_long=0
2223 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2224 cat >> confdefs.h <<EOF
2225 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2230 if test "$HAVEGL" = "yes"
2232 if test "$HAVESDL" = "yes"
2234 BUILDNAMES="OpenGL (SDL)"
2243 cat > confcache <<\EOF
2244 # This file is a shell script that caches the results of configure
2245 # tests run on this system so they can be shared between configure
2246 # scripts and configure runs. It is not useful on other systems.
2247 # If it contains results you don't want to keep, you may remove or edit it.
2249 # By default, configure uses ./config.cache as the cache file,
2250 # creating it if it does not exist already. You can give configure
2251 # the --cache-file=FILE option to use a different cache file; that is
2252 # what configure does when it calls configure scripts in
2253 # subdirectories, so they share the cache.
2254 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2255 # config.status only pays attention to the cache file if you give it the
2256 # --recheck option to rerun configure.
2259 # The following way of writing the cache mishandles newlines in values,
2260 # but we know of no workaround that is simple, portable, and efficient.
2261 # So, don't put newlines in cache variables' values.
2262 # Ultrix sh set writes to stderr and can't be redirected directly,
2263 # and sets the high bit in the cache file unless we assign to the vars.
2265 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2267 # `set' does not quote correctly, so add quotes (double-quote substitution
2268 # turns \\\\ into \\, and sed turns \\ into \).
2270 -e "s/'/'\\\\''/g" \
2271 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2274 # `set' quotes correctly as required by POSIX, so do not add quotes.
2275 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2278 if cmp -s $cache_file confcache; then
2281 if test -w $cache_file; then
2282 echo "updating cache $cache_file"
2283 cat confcache > $cache_file
2285 echo "not updating unwritable cache $cache_file"
2290 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2292 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2293 # Let make expand exec_prefix.
2294 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2296 # Any assignment to VPATH causes Sun make to only execute
2297 # the first set of double-colon rules, so remove it if not needed.
2298 # If there is a colon in the path, we need to keep it.
2299 if test "x$srcdir" = x.; then
2300 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2303 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2305 DEFS=-DHAVE_CONFIG_H
2307 # Without the "./", some shells look in PATH for config.status.
2308 : ${CONFIG_STATUS=./config.status}
2310 echo creating $CONFIG_STATUS
2311 rm -f $CONFIG_STATUS
2312 cat > $CONFIG_STATUS <<EOF
2314 # Generated automatically by configure.
2315 # Run this file to recreate the current configuration.
2316 # This directory was configured as follows,
2317 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2319 # $0 $ac_configure_args
2321 # Compiler output produced by configure, useful for debugging
2322 # configure, is in ./config.log if it exists.
2324 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2327 case "\$ac_option" in
2328 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2329 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2330 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2331 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2332 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2334 -help | --help | --hel | --he | --h)
2335 echo "\$ac_cs_usage"; exit 0 ;;
2336 *) echo "\$ac_cs_usage"; exit 1 ;;
2340 ac_given_srcdir=$srcdir
2342 trap 'rm -fr `echo "Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2344 cat >> $CONFIG_STATUS <<EOF
2346 # Protect against being on the right side of a sed subst in config.status.
2347 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2348 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2352 s%@CFLAGS@%$CFLAGS%g
2353 s%@CPPFLAGS@%$CPPFLAGS%g
2354 s%@CXXFLAGS@%$CXXFLAGS%g
2355 s%@FFLAGS@%$FFLAGS%g
2357 s%@LDFLAGS@%$LDFLAGS%g
2359 s%@exec_prefix@%$exec_prefix%g
2360 s%@prefix@%$prefix%g
2361 s%@program_transform_name@%$program_transform_name%g
2362 s%@bindir@%$bindir%g
2363 s%@sbindir@%$sbindir%g
2364 s%@libexecdir@%$libexecdir%g
2365 s%@datadir@%$datadir%g
2366 s%@sysconfdir@%$sysconfdir%g
2367 s%@sharedstatedir@%$sharedstatedir%g
2368 s%@localstatedir@%$localstatedir%g
2369 s%@libdir@%$libdir%g
2370 s%@includedir@%$includedir%g
2371 s%@oldincludedir@%$oldincludedir%g
2372 s%@infodir@%$infodir%g
2373 s%@mandir@%$mandir%g
2374 s%@GLHEXEN@%$GLHEXEN%g
2375 s%@SVGALIBS@%$SVGALIBS%g
2378 s%@BASELIBS@%$BASELIBS%g
2379 s%@SDL_CONFIG@%$SDL_CONFIG%g
2380 s%@SDL_CFLAGS@%$SDL_CFLAGS%g
2381 s%@SDL_LIBS@%$SDL_LIBS%g
2382 s%@GLLIBS@%$GLLIBS%g
2383 s%@SDL_OGL@%$SDL_OGL%g
2384 s%@HAVESDL@%$HAVESDL%g
2385 s%@GLBASE@%$GLBASE%g
2386 s%@ALLOCA@%$ALLOCA%g
2387 /@MAKE_RULES@/r $MAKE_RULES
2393 cat >> $CONFIG_STATUS <<\EOF
2395 # Split the substitutions into bite-sized pieces for seds with
2396 # small command number limits, like on Digital OSF/1 and HP-UX.
2397 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2398 ac_file=1 # Number of current file.
2399 ac_beg=1 # First line for current file.
2400 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2403 while $ac_more_lines; do
2404 if test $ac_beg -gt 1; then
2405 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2407 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2409 if test ! -s conftest.s$ac_file; then
2411 rm -f conftest.s$ac_file
2413 if test -z "$ac_sed_cmds"; then
2414 ac_sed_cmds="sed -f conftest.s$ac_file"
2416 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2418 ac_file=`expr $ac_file + 1`
2420 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2423 if test -z "$ac_sed_cmds"; then
2428 cat >> $CONFIG_STATUS <<EOF
2430 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2432 cat >> $CONFIG_STATUS <<\EOF
2433 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2434 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2436 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2437 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2438 *) ac_file_in="${ac_file}.in" ;;
2441 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2443 # Remove last slash and all that follows it. Not all systems have dirname.
2444 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2445 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2446 # The file is in a subdirectory.
2447 test ! -d "$ac_dir" && mkdir "$ac_dir"
2448 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2449 # A "../" for each directory in $ac_dir_suffix.
2450 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2452 ac_dir_suffix= ac_dots=
2455 case "$ac_given_srcdir" in
2457 if test -z "$ac_dots"; then top_srcdir=.
2458 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2459 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2461 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2462 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2466 echo creating "$ac_file"
2468 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2470 *Makefile*) ac_comsub="1i\\
2471 # $configure_input" ;;
2475 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2477 s%@configure_input@%$configure_input%g
2478 s%@srcdir@%$srcdir%g
2479 s%@top_srcdir@%$top_srcdir%g
2480 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2484 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2485 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2487 # ac_d sets the value in "#define NAME VALUE" lines.
2488 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2489 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2492 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2493 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2494 ac_uB='\([ ]\)%\1#\2define\3'
2497 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2498 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2499 ac_eB='$%\1#\2define\3'
2503 if test "${CONFIG_HEADERS+set}" != set; then
2505 cat >> $CONFIG_STATUS <<EOF
2506 CONFIG_HEADERS="include/config.h"
2508 cat >> $CONFIG_STATUS <<\EOF
2510 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2511 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2513 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2514 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2515 *) ac_file_in="${ac_file}.in" ;;
2518 echo creating $ac_file
2520 rm -f conftest.frag conftest.in conftest.out
2521 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2522 cat $ac_file_inputs > conftest.in
2526 # Transform confdefs.h into a sed script conftest.vals that substitutes
2527 # the proper values into config.h.in to produce config.h. And first:
2528 # Protect against being on the right side of a sed subst in config.status.
2529 # Protect against being in an unquoted here document in config.status.
2531 cat > conftest.hdr <<\EOF
2534 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2538 sed -n -f conftest.hdr confdefs.h > conftest.vals
2541 # This sed command replaces #undef with comments. This is necessary, for
2542 # example, in the case of _POSIX_SOURCE, which is predefined and required
2543 # on some systems where configure will not decide to define it.
2544 cat >> conftest.vals <<\EOF
2545 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2548 # Break up conftest.vals because some shells have a limit on
2549 # the size of here documents, and old seds have small limits too.
2554 ac_lines=`grep -c . conftest.vals`
2555 # grep -c gives empty output for an empty file on some AIX systems.
2556 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2557 # Write a limited-size here document to conftest.frag.
2558 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2559 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2561 sed -f conftest.frag conftest.in > conftest.out
2563 mv conftest.out conftest.in
2565 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2567 mv conftest.tail conftest.vals
2571 cat >> $CONFIG_STATUS <<\EOF
2572 rm -f conftest.frag conftest.h
2573 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2574 cat conftest.in >> conftest.h
2576 if cmp -s $ac_file conftest.h 2>/dev/null; then
2577 echo "$ac_file is unchanged"
2580 # Remove last slash and all that follows it. Not all systems have dirname.
2581 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2582 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2583 # The file is in a subdirectory.
2584 test ! -d "$ac_dir" && mkdir "$ac_dir"
2587 mv conftest.h $ac_file
2592 cat >> $CONFIG_STATUS <<EOF
2595 cat >> $CONFIG_STATUS <<\EOF
2599 chmod +x $CONFIG_STATUS
2600 rm -fr confdefs* $ac_clean_files
2601 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2605 echo "HHeretic configuration finished."
2606 echo "Enabled targets: $BUILDNAMES"
2608 if test "$HAVESDL" = "no"
2610 echo "It is recommended that you install SDL (http://www.libsdl.org)."
2611 echo "Other targets will compile, but they are no longer supported."
2612 echo "If SDL is installed, you will need to upgrade to version $SDL_VERSION"
2615 echo "Type 'make' to compile."