#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-shared[=PKGS]  build shared libraries [default=yes]"
ac_help="$ac_help
  --enable-static[=PKGS]  build static libraries [default=yes]"
ac_help="$ac_help
  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
ac_help="$ac_help
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
  --disable-libtool-lock  avoid locking (might break parallel builds)"
ac_help="$ac_help
  --enable-debug          Disable aggressive optimizations [default=yes]"
ac_help="$ac_help
  --enable-strict-ansi    Enable strict ANSI compliance build [default=no]"
ac_help="$ac_help
  --enable-audio          Enable the audio subsystem [default=yes]"
ac_help="$ac_help
  --enable-video          Enable the video subsystem [default=yes]"
ac_help="$ac_help
  --enable-events         Enable the events subsystem [default=yes]"
ac_help="$ac_help
  --enable-joystick       Enable the joystick subsystem [default=yes]"
ac_help="$ac_help
  --enable-cdrom          Enable the cdrom subsystem [default=yes]"
ac_help="$ac_help
  --enable-threads        Enable the threading subsystem [default=yes]"
ac_help="$ac_help
  --enable-timers         Enable the timer subsystem [default=yes]"
ac_help="$ac_help
  --enable-endian         Enable the endian subsystem [default=yes]"
ac_help="$ac_help
  --enable-file           Enable the file subsystem [default=yes]"
ac_help="$ac_help
  --enable-oss            support the OSS audio API [default=yes]"
ac_help="$ac_help
  --enable-alsa           support the ALSA audio API [default=yes]"
ac_help="$ac_help
  --enable-esd            support the Enlightened Sound Daemon [default=yes]"
ac_help="$ac_help
  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)"
ac_help="$ac_help
  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)"
ac_help="$ac_help
  --disable-esdtest       Do not try to compile and run a test ESD program"
ac_help="$ac_help
  --enable-arts           support the Analog Real Time Synthesizer [default=yes]"
ac_help="$ac_help
  --enable-nas		support the NAS audio API [default=yes]"
ac_help="$ac_help
  --enable-nasm           use nasm assembly blitters on x86 [default=yes]"
ac_help="$ac_help
  --enable-video-x11      use X11 video driver [default=yes]"
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --enable-video-x11-vm   use X11 VM extension for fullscreen [default=yes]"
ac_help="$ac_help
  --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]"
ac_help="$ac_help
  --enable-video-x11-dgamouse  use X11 DGA for mouse events [default=yes]"
ac_help="$ac_help
  --enable-video-x11-xv   use X11 XvImage extension for video [default=yes]"
ac_help="$ac_help
  --enable-video-photon   use QNX Photonvideo driver [default=yes]"
ac_help="$ac_help
  --enable-video-dga      use DGA 2.0 video driver [default=yes]"
ac_help="$ac_help
  --enable-video-fbcon    use framebuffer console video driver [default=yes]"
ac_help="$ac_help
  --enable-video-ggi      use GGI video driver [default=no]"
ac_help="$ac_help
  --enable-video-svga     use SVGAlib video driver [default=no]"
ac_help="$ac_help
  --enable-video-aalib    use AAlib video driver [default=no]"
ac_help="$ac_help
  --enable-video-opengl   include OpenGL context creation [default=yes]"
ac_help="$ac_help
  --enable-input-events   use Linux 2.4 unified input interface [default=yes]"
ac_help="$ac_help
  --enable-pthreads       use POSIX threads for multi-threading [default=yes]"
ac_help="$ac_help
    --enable-pthread-sem  use pthread semaphores [default=yes]"
ac_help="$ac_help
  --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]"
ac_help="$ac_help
  --enable-directx        use DirectX for Win32 audio/video [default=yes]"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=README

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi



#
# Making releases:
# Edit include/SDL/SDL_version.h and change the version, then:
#   SDL_MICRO_VERSION += 1;
#   SDL_INTERFACE_AGE += 1;
#   SDL_BINARY_AGE += 1;
# if any functions have been added, set SDL_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
#
SDL_MAJOR_VERSION=1
SDL_MINOR_VERSION=2
SDL_MICRO_VERSION=0
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=0
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION








# libtool versioning
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
LT_REVISION=$SDL_INTERFACE_AGE
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`






ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:678: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:731: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftestfile`
   fi
   if test "$*" != "X $srcdir/configure conftestfile" \
      && test "$*" != "X conftestfile $srcdir/configure"; then

      # If neither matched, then we have a broken ls.  This can happen
      # if, for instance, CONFIG_SHELL is bash and it inherits a
      # broken ls alias from the environment.  This has actually
      # happened.  Such a system could not be considered "sane".
      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
   fi

   test "$2" = conftestfile
   )
then
   # Ok.
   :
else
   { echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:788: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi


PACKAGE=SDL

VERSION=$SDL_VERSION

if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
fi
cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF



missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:834: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
   ACLOCAL=aclocal
   echo "$ac_t""found" 1>&6
else
   ACLOCAL="$missing_dir/missing aclocal"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:847: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
   AUTOCONF=autoconf
   echo "$ac_t""found" 1>&6
else
   AUTOCONF="$missing_dir/missing autoconf"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:860: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (automake --version) < /dev/null > /dev/null 2>&1; then
   AUTOMAKE=automake
   echo "$ac_t""found" 1>&6
else
   AUTOMAKE="$missing_dir/missing automake"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:873: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (autoheader --version) < /dev/null > /dev/null 2>&1; then
   AUTOHEADER=autoheader
   echo "$ac_t""found" 1>&6
else
   AUTOHEADER="$missing_dir/missing autoheader"
   echo "$ac_t""missing" 1>&6
fi

echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:886: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf.  Sigh.
if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
   MAKEINFO=makeinfo
   echo "$ac_t""found" 1>&6
else
   MAKEINFO="$missing_dir/missing makeinfo"
   echo "$ac_t""missing" 1>&6
fi




# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:907: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:928: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6




# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
  enable_shared=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_shared=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_shared=yes
fi

# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
  enable_static=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_static=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_static=yes
fi

# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
  enableval="$enable_fast_install"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
  enable_fast_install=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_fast_install=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_fast_install=yes
fi

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1018: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1038: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1068: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1098: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1149: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1181: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 1192 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1223: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1228: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1256: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
  withval="$with_gnu_ld"
  test "$withval" = no || with_gnu_ld=yes
else
  with_gnu_ld=no
fi

ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:1299: checking for ld used by GCC" >&5
  ac_prog=`($CC -print-prog-name=ld | tr -d '\r') 2>&5`
  case "$ac_prog" in
    # Accept absolute paths.
    [\\/]* | [A-Za-z]:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:1323: checking for GNU ld" >&5
else
  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:1326: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -z "$LD"; then
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      ac_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
	test "$with_gnu_ld" != no && break
      else
	test "$with_gnu_ld" != yes && break
      fi
    fi
  done
  IFS="$ac_save_ifs"
else
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi

LD="$ac_cv_path_LD"
if test -n "$LD"; then
  echo "$ac_t""$LD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:1361: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  ac_cv_prog_gnu_ld=yes
else
  ac_cv_prog_gnu_ld=no
fi
fi

echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6


echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:1377: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$NM"; then
  # Let the user override the test.
  ac_cv_path_NM="$NM"
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -B"
	break
      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$ac_dir/nm -p"
	break
      else
	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
	continue # so that we can try to find one that supports BSD flags
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi
fi

NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1413: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi


case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac

# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"

libtool_flags="$libtool_flags --enable-win32-dll"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
  enableval="$enable_libtool_lock"
  :
fi

test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 1468 "configure"' > conftest.$ac_ext
  if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    case "`/usr/bin/file conftest.o`" in
    *32-bit*)
      LD="${LD-ld} -32"
      ;;
    *N32*)
      LD="${LD-ld} -n32"
      ;;
    *64-bit*)
      LD="${LD-ld} -64"
      ;;
    esac
  fi
  rm -rf conftest*
  ;;

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:1490: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1495 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  lt_cv_cc_needs_belf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  lt_cv_cc_needs_belf=no
fi
rm -f conftest*
fi

echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;

*-*-cygwin* | *-*-mingw*)
  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1525: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$DLLTOOL"; then
  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
DLLTOOL="$ac_cv_prog_DLLTOOL"
if test -n "$DLLTOOL"; then
  echo "$ac_t""$DLLTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_DLLTOOL"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1557: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$DLLTOOL"; then
  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_DLLTOOL="dlltool"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
fi
fi
DLLTOOL="$ac_cv_prog_DLLTOOL"
if test -n "$DLLTOOL"; then
  echo "$ac_t""$DLLTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  DLLTOOL="false"
fi
fi

  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1592: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AS"; then
  ac_cv_prog_AS="$AS" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AS="${ac_tool_prefix}as"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AS="$ac_cv_prog_AS"
if test -n "$AS"; then
  echo "$ac_t""$AS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_AS"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1624: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AS"; then
  ac_cv_prog_AS="$AS" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AS="as"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
fi
fi
AS="$ac_cv_prog_AS"
if test -n "$AS"; then
  echo "$ac_t""$AS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  AS="false"
fi
fi

  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1659: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$OBJDUMP"; then
  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
OBJDUMP="$ac_cv_prog_OBJDUMP"
if test -n "$OBJDUMP"; then
  echo "$ac_t""$OBJDUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_OBJDUMP"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1691: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$OBJDUMP"; then
  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_OBJDUMP="objdump"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
fi
fi
OBJDUMP="$ac_cv_prog_OBJDUMP"
if test -n "$OBJDUMP"; then
  echo "$ac_t""$OBJDUMP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  OBJDUMP="false"
fi
fi

  ;;

esac


# Save cache, so that ltconfig can load it
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache


# Actually configure libtool.  ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }

# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi


# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"

# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1807: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1836: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1866: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1917: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 1960 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1996: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2024: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:2056: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
#line 2063 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2096: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2101 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

case "$target" in
    *-*-beos*)
        for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2177: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2209: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 2220 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2251: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2256: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2284: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

        ;;
    *-*-aix*)
        for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2322: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2354: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 2365 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2396: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2401: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2429: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

        ;;
    # This is stupid, but necessary on some versions of Linux (joysticks)
    *-*-linux*)
        for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2468: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2500: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 2511 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2542: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2547: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2575: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

        ;;
esac
# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2620: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2673: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 2688 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 2705 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 2722 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:2755: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2760 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
EOF

fi

echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:2788: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2793 "configure"
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_alloca_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:2853: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2858 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_os_cray=yes
else
  rm -rf conftest*
  ac_cv_os_cray=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2883: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2888 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

  break
else
  echo "$ac_t""no" 1>&6
fi

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:2938: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat > conftest.$ac_ext <<EOF
#line 2946 "configure"
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi


case "$target" in
    alpha*-*-linux*)
        if test x$ac_cv_prog_gcc = xyes; then
            CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
        fi
        ;;
esac


# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  :
else
  enable_debug=yes
fi

if test x$enable_debug != xyes; then
    if test x$ac_cv_prog_gcc = xyes; then
        CFLAGS="$CFLAGS -fexpensive-optimizations"
        # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
        # CFLAGS="$CFLAGS -fomit-frame-pointer"
    fi
    case "$target" in
        i486-*-*)
            if test x$ac_cv_prog_gcc = xyes; then
                CFLAGS="$CFLAGS -march=486"
            fi
            ;;
        i?86-*-*)
            if test x$ac_cv_prog_gcc = xyes; then
                CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
            fi
            ;;
        *-*-osf*)
            if test x$ac_cv_prog_gcc != xyes; then
                CFLAGS="-g3 -fast -arch host"
            fi
            ;;
    esac
fi

# Check whether --enable-strict-ansi or --disable-strict-ansi was given.
if test "${enable_strict_ansi+set}" = set; then
  enableval="$enable_strict_ansi"
  :
else
  enable_strict_ansi=no
fi

if test x$ac_cv_prog_gcc = xyes; then
    CFLAGS="$CFLAGS -Wall"
    if test x$enable_strict_ansi = xyes; then
        CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
    fi
fi


SDL_CFLAGS=""
SDL_LIBS="-lSDL"


case "$target" in
    *-*-cygwin* | *-*-mingw32*)
        MATHLIB=""
        ;;
    *-*-beos*)
        MATHLIB=""
        ;;
    *-*-darwin*)
        MATHLIB=""
        ;;
    *)
        MATHLIB="-lm"
        ;;
esac
SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"


# Check whether --enable-audio or --disable-audio was given.
if test "${enable_audio+set}" = set; then
  enableval="$enable_audio"
  :
else
  enable_audio=yes
fi

if test x$enable_audio = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
    SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
else
    CFLAGS="$CFLAGS -DDISABLE_AUDIO"
fi
# Check whether --enable-video or --disable-video was given.
if test "${enable_video+set}" = set; then
  enableval="$enable_video"
  :
else
  enable_video=yes
fi

if test x$enable_video = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS video"
    SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
else
    CFLAGS="$CFLAGS -DDISABLE_VIDEO"
fi
# Check whether --enable-events or --disable-events was given.
if test "${enable_events+set}" = set; then
  enableval="$enable_events"
  :
else
  enable_events=yes
fi

if test x$enable_video = xyes -a x$enable_events = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS events"
    SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
else
    CFLAGS="$CFLAGS -DDISABLE_EVENTS"
fi
# Check whether --enable-joystick or --disable-joystick was given.
if test "${enable_joystick+set}" = set; then
  enableval="$enable_joystick"
  :
else
  enable_joystick=yes
fi

if test x$enable_joystick = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
    SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
else
    CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
fi
# Check whether --enable-cdrom or --disable-cdrom was given.
if test "${enable_cdrom+set}" = set; then
  enableval="$enable_cdrom"
  :
else
  enable_cdrom=yes
fi

if test x$enable_cdrom = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
    SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
else
    CFLAGS="$CFLAGS -DDISABLE_CDROM"
fi
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval="$enable_threads"
  :
else
  enable_threads=yes
fi

SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
if test x$enable_threads != xyes; then
    CFLAGS="$CFLAGS -DDISABLE_THREADS"
    
  echo "Copying src/thread/generic/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/generic/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/generic/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/generic/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

    
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

fi
# Check whether --enable-timers or --disable-timers was given.
if test "${enable_timers+set}" = set; then
  enableval="$enable_timers"
  :
else
  enable_timers=yes
fi

if test x$enable_timers = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
    SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
else
    CFLAGS="$CFLAGS -DDISABLE_TIMERS"
fi
# Check whether --enable-endian or --disable-endian was given.
if test "${enable_endian+set}" = set; then
  enableval="$enable_endian"
  :
else
  enable_endian=yes
fi

if test x$enable_endian = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
    SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
else
    CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
fi
# Check whether --enable-file or --disable-file was given.
if test "${enable_file+set}" = set; then
  enableval="$enable_file"
  :
else
  enable_file=yes
fi

if test x$enable_file = xyes; then
    SDL_EXTRADIRS="$SDL_EXTRADIRS file"
    SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
else
    CFLAGS="$CFLAGS -DDISABLE_FILE"
fi

CheckOSS()
{
    # Check whether --enable-oss or --disable-oss was given.
if test "${enable_oss+set}" = set; then
  enableval="$enable_oss"
  :
else
  enable_oss=yes
fi

    if test x$enable_audio = xyes -a x$enable_oss = xyes; then
        echo $ac_n "checking for OSS audio support""... $ac_c" 1>&6
echo "configure:3292: checking for OSS audio support" >&5
        have_oss=no
        cat > conftest.$ac_ext <<EOF
#line 3295 "configure"
#include "confdefs.h"

          #ifdef linux
          #include <linux/soundcard.h>
          #endif
          #ifdef __FreeBSD__
          #include <machine/soundcard.h>
          #endif
          #ifdef __bsdi__
          #include <sys/soundcard.h>
          #endif
          #ifdef __USLC__
          #include <sys/soundcard.h>
          #endif
        
int main() {

	  int arg = SNDCTL_DSP_SETFRAGMENT;
        
; return 0; }
EOF
if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        have_oss=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$have_oss" 1>&6
        if test x$have_oss = xyes; then
            CFLAGS="$CFLAGS -DOSS_SUPPORT"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
            AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
            AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
        fi
    fi
}

CheckALSA()
{
    # Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
  :
else
  enable_alsa=yes
fi

    if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
        have_alsa=no
        ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3352: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3357 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_alsa_hdr=yes
else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for snd_pcm_open in -lasound""... $ac_c" 1>&6
echo "configure:3384: checking for snd_pcm_open in -lasound" >&5
ac_lib_var=`echo asound'_'snd_pcm_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lasound  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3392 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char snd_pcm_open();

int main() {
snd_pcm_open()
; return 0; }
EOF
if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_alsa_lib=yes
else
  echo "$ac_t""no" 1>&6
fi

        if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
            CFLAGS="$CFLAGS -DALSA_SUPPORT"
            SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
            AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
        fi
    fi
}

CheckESD()
{
    # Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
  :
else
  enable_esd=yes
fi

    if test x$enable_audio = xyes -a x$enable_esd = xyes; then
        # Check whether --with-esd-prefix or --without-esd-prefix was given.
if test "${with_esd_prefix+set}" = set; then
  withval="$with_esd_prefix"
  esd_prefix="$withval"
else
  esd_prefix=""
fi

# Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given.
if test "${with_esd_exec_prefix+set}" = set; then
  withval="$with_esd_exec_prefix"
  esd_exec_prefix="$withval"
else
  esd_exec_prefix=""
fi

# Check whether --enable-esdtest or --disable-esdtest was given.
if test "${enable_esdtest+set}" = set; then
  enableval="$enable_esdtest"
  :
else
  enable_esdtest=yes
fi


  if test x$esd_exec_prefix != x ; then
     esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
     if test x${ESD_CONFIG+set} != xset ; then
        ESD_CONFIG=$esd_exec_prefix/bin/esd-config
     fi
  fi
  if test x$esd_prefix != x ; then
     esd_args="$esd_args --prefix=$esd_prefix"
     if test x${ESD_CONFIG+set} != xset ; then
        ESD_CONFIG=$esd_prefix/bin/esd-config
     fi
  fi

  # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3484: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ESD_CONFIG" in
  /*)
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
if test -n "$ESD_CONFIG"; then
  echo "$ac_t""$ESD_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_esd_version=0.2.8
  echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6
echo "configure:3519: checking for ESD - version >= $min_esd_version" >&5
  no_esd=""
  if test "$ESD_CONFIG" = "no" ; then
    no_esd=yes
  else
    ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
    ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`

    esd_major_version=`$ESD_CONFIG $esd_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    esd_minor_version=`$ESD_CONFIG $esd_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_esdtest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $ESD_CFLAGS"
      LIBS="$LIBS $ESD_LIBS"
      rm -f conf.esdtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 3543 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>

char*
my_strdup (char *str)
{
  char *new_str;
  
  if (str)
    {
      new_str = malloc ((strlen (str) + 1) * sizeof(char));
      strcpy (new_str, str);
    }
  else
    new_str = NULL;
  
  return new_str;
}

int main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.esdtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = my_strdup("$min_esd_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_esd_version");
     exit(1);
   }

   if (($esd_major_version > major) ||
      (($esd_major_version == major) && ($esd_minor_version > minor)) ||
      (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
    {
      return 0;
    }
  else
    {
      printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
      printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
      printf("*** best to upgrade to the required version.\n");
      printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
      printf("*** to point to the correct copy of esd-config, and remove the file\n");
      printf("*** config.cache before re-running configure\n");
      return 1;
    }
}


EOF
if { (eval echo configure:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  no_esd=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_esd" = x ; then
     echo "$ac_t""yes" 1>&6
     
            CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
            SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
            AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
             
  else
     echo "$ac_t""no" 1>&6
     if test "$ESD_CONFIG" = "no" ; then
       echo "*** The esd-config script installed by ESD could not be found"
       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the ESD_CONFIG environment variable to the"
       echo "*** full path to esd-config."
     else
       if test -f conf.esdtest ; then
        :
       else
          echo "*** Could not run ESD test program, checking why..."
          CFLAGS="$CFLAGS $ESD_CFLAGS"
          LIBS="$LIBS $ESD_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 3640 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <esd.h>

int main() {
 return 0; 
; return 0; }
EOF
if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding ESD or finding the wrong"
          echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means ESD was incorrectly installed"
          echo "*** or that you have moved ESD since it was installed. In the latter case, you"
          echo "*** may want to edit the esd-config script: $ESD_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     ESD_CFLAGS=""
     ESD_LIBS=""
     :
  fi
  
  
  rm -f conf.esdtest

    fi
}

CheckARTSC()
{
    # Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
  :
else
  enable_arts=yes
fi

    if test x$enable_audio = xyes -a x$enable_arts = xyes; then
        # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3700: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ARTSCCONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ARTSCCONFIG" in
  /*)
  ac_cv_path_ARTSCCONFIG="$ARTSCCONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ARTSCCONFIG="$ARTSCCONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ARTSCCONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
ARTSCCONFIG="$ac_cv_path_ARTSCCONFIG"
if test -n "$ARTSCCONFIG"; then
  echo "$ac_t""$ARTSCCONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

        if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
            : # arts isn't installed
        else
            ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
            ARTSC_LIBS=`$ARTSCCONFIG --libs`
            echo $ac_n "checking for aRts development environment""... $ac_c" 1>&6
echo "configure:3738: checking for aRts development environment" >&5
            audio_arts=no
            save_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS $ARTSC_CFLAGS"
            cat > conftest.$ac_ext <<EOF
#line 3743 "configure"
#include "confdefs.h"

             #include <artsc.h>
            
int main() {

             arts_stream_t stream;
            
; return 0; }
EOF
if { (eval echo configure:3754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
            audio_arts=yes
            
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
            CFLAGS="$save_CFLAGS"
            echo "$ac_t""$audio_arts" 1>&6
            if test x$audio_arts = xyes; then
                CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
                SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
                AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
                AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
            fi
        fi
    fi
}

CheckNAS()
{
    # Check whether --enable-nas or --disable-nas was given.
if test "${enable_nas+set}" = set; then
  enableval="$enable_nas"
  :
else
  enable_nas=yes
fi

    if test x$enable_audio = xyes -a x$enable_nas = xyes; then
	echo $ac_n "checking for NAS audio support""... $ac_c" 1>&6
echo "configure:3788: checking for NAS audio support" >&5
	have_nas=no
	if test -r /usr/X11R6/include/audio/audiolib.h ; then
		have_nas=yes
	fi
	echo "$ac_t""$have_nas" 1>&6
	if test x$have_nas = xyes; then
	    CFLAGS="$CFLAGS -DNAS_SUPPORT"
	    SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
	    AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
	    AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
	fi
    fi
}

CheckNASM()
{
        case $target in
        i?86*)
            ;;
        *)
        # Nope, bail early.
            return
            ;;
    esac
        # Check whether --enable-nasm or --disable-nasm was given.
if test "${enable_nasm+set}" = set; then
  enableval="$enable_nasm"
  :
else
  enable_nasm=yes
fi

    if test x$enable_video = xyes -a x$enable_nasm = xyes; then
        # Extract the first word of "nasm", so it can be a program name with args.
set dummy nasm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3825: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NASM" in
  /*)
  ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_NASM="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
NASM="$ac_cv_path_NASM"
if test -n "$NASM"; then
  echo "$ac_t""$NASM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

        if test x$NASM = x -o x$NASM = x'"$NASM"'; then
            : # nasm isn't installed
        else
            CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
            case $ARCH in
              win32)
                  NASMFLAGS="-f win32"
                  ;;
              *)
                  NASMFLAGS="-f elf"
                  ;;
            esac
            
            CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
            SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
            SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
        fi
    fi
}

CheckX11()
{
    # Check whether --enable-video-x11 or --disable-video-x11 was given.
if test "${enable_video_x11+set}" = set; then
  enableval="$enable_video_x11"
  :
else
  enable_video_x11=yes
fi

    if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
        # If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:3893: checking for X" >&5

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 3955 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4029 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

        if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.
  cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case "`(uname -sr) 2>/dev/null`" in
    "SunOS 5"*)
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:4142: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 4145 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_nospace=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_nospace=no
fi
rm -f conftest*
      if test $ac_R_nospace = yes; then
	echo "$ac_t""no" 1>&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat > conftest.$ac_ext <<EOF
#line 4168 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&6
	fi
      fi
      LIBS="$ac_xsave_LIBS"
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:4207: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4215 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:4248: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4256 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:4296: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4301 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_gethostbyname = no; then
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:4345: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4353 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says simon@lia.di.epfl.ch: it contains
    # gethostby* variants that don't use the nameserver (or something).
    # -lsocket must be given before -lnsl if both are needed.
    # We assume that if connect needs -lnsl, so does gethostbyname.
    echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:4394: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4399 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
connect();
#endif

; return 0; }
EOF
if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_connect=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_connect = no; then
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:4443: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4451 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
    echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:4486: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4491 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
remove();
#endif

; return 0; }
EOF
if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_remove=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_remove=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_remove = no; then
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:4535: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lposix  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4543 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:4578: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4583 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
shmat();
#endif

; return 0; }
EOF
if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_shmat=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_shmat=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_shmat = no; then
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:4627: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lipc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4635 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS="$LDFLAGS"
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:4679: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4687 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceConnectionNumber();

int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
  echo "$ac_t""no" 1>&6
fi

  LDFLAGS="$ac_save_LDFLAGS"

fi

        if test x$have_x = xyes; then
            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11"
            if test x$ac_cv_func_shmat != xyes; then
                CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
            fi
            SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
            VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"

            # Check whether --enable-video-x11-vm or --disable-video-x11-vm was given.
if test "${enable_video_x11_vm+set}" = set; then
  enableval="$enable_video_x11_vm"
  :
else
  enable_video_x11_vm=yes
fi

            if test x$enable_video_x11_vm = xyes; then
                echo $ac_n "checking for XFree86 VidMode 1.0 support""... $ac_c" 1>&6
echo "configure:4741: checking for XFree86 VidMode 1.0 support" >&5
                video_x11_vm=no
                cat > conftest.$ac_ext <<EOF
#line 4744 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <X11/extensions/xf86vmode.h>
                
int main() {

                
; return 0; }
EOF
if { (eval echo configure:4755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
                video_x11_vm=yes
                
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
                echo "$ac_t""$video_x11_vm" 1>&6
                if test x$video_x11_vm = xyes; then
                    CFLAGS="$CFLAGS -DXFREE86_VM"
                    # Check for nasty XFree86 4.0/Glide hack
                    # Check whether --enable-xfree86_glidehack or --disable-xfree86_glidehack was given.
if test "${enable_xfree86_glidehack+set}" = set; then
  enableval="$enable_xfree86_glidehack"
  :
else
  enable_xfreeglidehack=no
fi

                    if test x$enable_xfree86_glidehack = xyes; then
                        ac_save_libs="$LIBS"
                        LIBS="$LIBS $X_LIBS -lX11 -lXext"
                        if test x$xfree86_glidehack = x; then
                            echo $ac_n "checking for XF40VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6
echo "configure:4782: checking for XF40VidModeQueryExtension in -lXxf86vm" >&5
ac_lib_var=`echo Xxf86vm'_'XF40VidModeQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXxf86vm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4790 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XF40VidModeQueryExtension();

int main() {
XF40VidModeQueryExtension()
; return 0; }
EOF
if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  xfree86_glidehack=Xxf86vm
else
  echo "$ac_t""no" 1>&6
fi

                        fi
                        if test x$xfree86_glidehack = x; then
                            echo $ac_n "checking for XF40VidModeQueryExtension in -lXxf86vm40""... $ac_c" 1>&6
echo "configure:4824: checking for XF40VidModeQueryExtension in -lXxf86vm40" >&5
ac_lib_var=`echo Xxf86vm40'_'XF40VidModeQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXxf86vm40  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4832 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XF40VidModeQueryExtension();

int main() {
XF40VidModeQueryExtension()
; return 0; }
EOF
if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  xfree86_glidehack=Xxf86vm40
else
  echo "$ac_t""no" 1>&6
fi

                        fi
                        LIBS="$ac_save_libs"
                    fi
                    if test x$xfree86_glidehack != x; then
                        CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK"
                        SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack"
                    else
                        SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm"
                    fi
                    echo $ac_n "checking for XFree86 VidMode gamma support""... $ac_c" 1>&6
echo "configure:4873: checking for XFree86 VidMode gamma support" >&5
                    video_x11_vmgamma=no
                    cat > conftest.$ac_ext <<EOF
#line 4876 "configure"
#include "confdefs.h"

                     #include <X11/Xlib.h>
                     #include <X11/extensions/xf86vmode.h>
                    
int main() {

                     XF86VidModeGamma gamma;
                    
; return 0; }
EOF
if { (eval echo configure:4888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
                    video_x11_vmgamma=yes
                    
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
                    echo "$ac_t""$video_x11_vmgamma" 1>&6
                    if test x$video_x11_vmgamma = xyes; then
                        CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
                    fi
                fi
            fi
            # Check whether --enable-video-x11-dgamouse or --disable-video-x11-dgamouse was given.
if test "${enable_video_x11_dgamouse+set}" = set; then
  enableval="$enable_video_x11_dgamouse"
  :
else
  enable_video_x11_dgamouse=yes
fi

            echo $ac_n "checking for XFree86 DGA 1.0 support""... $ac_c" 1>&6
echo "configure:4913: checking for XFree86 DGA 1.0 support" >&5
            video_x11_dga=no
            cat > conftest.$ac_ext <<EOF
#line 4916 "configure"
#include "confdefs.h"

             #include <X11/Xlib.h>
             #include <X11/extensions/xf86dga.h>
            
int main() {

            
; return 0; }
EOF
if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
            video_x11_dga=yes
            
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
            echo "$ac_t""$video_x11_dga" 1>&6
            if test x$video_x11_dga = xyes; then
                CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
                if test x$enable_video_x11_dgamouse = xyes; then
                    CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
                fi
                SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga"
            fi
            # Check whether --enable-video-x11-xv or --disable-video-x11-xv was given.
if test "${enable_video_x11_xv+set}" = set; then
  enableval="$enable_video_x11_xv"
  :
else
  enable_video_x11_xv=yes
fi

            if test x$enable_video_x11_xv = xyes; then
                echo $ac_n "checking for XFree86 XvImage support""... $ac_c" 1>&6
echo "configure:4955: checking for XFree86 XvImage support" >&5
                video_x11_xv=no
                cat > conftest.$ac_ext <<EOF
#line 4958 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <sys/ipc.h>
                 #include <sys/shm.h>
                 #include <X11/extensions/XShm.h>
                 #include <X11/extensions/Xvlib.h>
                
int main() {

                 XvImage *image;
                
; return 0; }
EOF
if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
                video_x11_xv=yes
                
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
                echo "$ac_t""$video_x11_xv" 1>&6
                if test x$video_x11_xv = xyes; then
                    CFLAGS="$CFLAGS -DXFREE86_XV"
                    SYSTEM_LIBS="$SYSTEM_LIBS -lXv"
                fi
            fi
        fi
    fi
}
CheckPHOTON()
{
    # Check whether --enable-video-photon or --disable-video-photon was given.
if test "${enable_video_photon+set}" = set; then
  enableval="$enable_video_photon"
  :
else
  enable_video_photon=yes
fi

    if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
        echo $ac_n "checking for QNX Photon support""... $ac_c" 1>&6
echo "configure:5004: checking for QNX Photon support" >&5
        video_photon=no
        cat > conftest.$ac_ext <<EOF
#line 5007 "configure"
#include "confdefs.h"

          #include <Ph.h>
          #include <Pt.h>
          #include <photon/Pg.h>
          #include <photon/PdDirect.h>
        
int main() {

         PgDisplaySettings_t *visual;
        
; return 0; }
EOF
if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_photon=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_photon" 1>&6
        if test x$video_photon = xyes; then
            SYSTEM_LIBS="$SYSTEM_LIBS -lph"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
            VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
        fi
    fi
}

CheckDGA()
{
    # Check whether --enable-video-dga or --disable-video-dga was given.
if test "${enable_video_dga+set}" = set; then
  enableval="$enable_video_dga"
  :
else
  enable_video_dga=yes
fi

    if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
        echo $ac_n "checking for XFree86 DGA 2.0 support""... $ac_c" 1>&6
echo "configure:5052: checking for XFree86 DGA 2.0 support" >&5
        video_x11_dga2=no
        cat > conftest.$ac_ext <<EOF
#line 5055 "configure"
#include "confdefs.h"

         #include <X11/Xlib.h>
         #include <X11/extensions/xf86dga.h>
        
int main() {

         XDGAEvent xevent;
        
; return 0; }
EOF
if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_x11_dga2=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_x11_dga2" 1>&6
        if test x$video_x11_dga2 = xyes; then
            CFLAGS="$CFLAGS -DENABLE_DGA"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
            VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
        fi
    fi
}

CheckFBCON()
{
    # Check whether --enable-video-fbcon or --disable-video-fbcon was given.
if test "${enable_video_fbcon+set}" = set; then
  enableval="$enable_video_fbcon"
  :
else
  enable_video_fbcon=yes
fi

    if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
        echo $ac_n "checking for framebuffer console support""... $ac_c" 1>&6
echo "configure:5098: checking for framebuffer console support" >&5
        video_fbcon=no
        cat > conftest.$ac_ext <<EOF
#line 5101 "configure"
#include "confdefs.h"

         #include <linux/fb.h>
         #include <linux/kd.h>
         #include <linux/keyboard.h>
        
int main() {

        
; return 0; }
EOF
if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_fbcon=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_fbcon" 1>&6
        if test x$video_fbcon = xyes; then
            CFLAGS="$CFLAGS -DENABLE_FBCON"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
            VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
        fi
    fi
}

CheckGGI()
{
    # Check whether --enable-video-ggi or --disable-video-ggi was given.
if test "${enable_video_ggi+set}" = set; then
  enableval="$enable_video_ggi"
  :
else
  enable_video_ggi=no
fi

    if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
        echo $ac_n "checking for GGI support""... $ac_c" 1>&6
echo "configure:5144: checking for GGI support" >&5
        video_ggi=no
        cat > conftest.$ac_ext <<EOF
#line 5147 "configure"
#include "confdefs.h"

         #include <ggi/ggi.h>
         #include <ggi/gii.h>
        
int main() {

        
; return 0; }
EOF
if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_ggi=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_ggi" 1>&6
        if test x$video_ggi = xyes; then
            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
            SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"

            VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
            VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
        fi
    fi
}

CheckSVGA()
{
    # Check whether --enable-video-svga or --disable-video-svga was given.
if test "${enable_video_svga+set}" = set; then
  enableval="$enable_video_svga"
  :
else
  enable_video_svga=no
fi

    if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
        echo $ac_n "checking for SVGAlib (1.4.0+) support""... $ac_c" 1>&6
echo "configure:5191: checking for SVGAlib (1.4.0+) support" >&5
        video_svga=no
        cat > conftest.$ac_ext <<EOF
#line 5194 "configure"
#include "confdefs.h"

         #include <vga.h>
         #include <vgamouse.h>
         #include <vgakeyboard.h>
        
int main() {

         if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
             exit(0);
         }
        
; return 0; }
EOF
if { (eval echo configure:5209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_svga=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_svga" 1>&6
        if test x$video_svga = xyes; then
            CFLAGS="$CFLAGS -DENABLE_SVGALIB"
            SYSTEM_LIBS="$SYSTEM_LIBS -lvga"

            VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
            VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
        fi
    fi
}

CheckAAlib()
{
    # Check whether --enable-video-aalib or --disable-video-aalib was given.
if test "${enable_video_aalib+set}" = set; then
  enableval="$enable_video_aalib"
  :
else
  enable_video_aalib=no
fi

    if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
        echo $ac_n "checking for AAlib support""... $ac_c" 1>&6
echo "configure:5242: checking for AAlib support" >&5
        video_aalib=no
        cat > conftest.$ac_ext <<EOF
#line 5245 "configure"
#include "confdefs.h"

         #include <aalib.h>
        
int main() {

        
; return 0; }
EOF
if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_aalib=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_aalib" 1>&6
        if test x$video_aalib = xyes; then
            CFLAGS="$CFLAGS -DENABLE_AALIB"
            SYSTEM_LIBS="$SYSTEM_LIBS -laa"

            VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
            VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
        fi
    fi
}

# Check whether --enable-video-opengl or --disable-video-opengl was given.
if test "${enable_video_opengl+set}" = set; then
  enableval="$enable_video_opengl"
  :
else
  enable_video_opengl=yes
fi


CheckOpenGL()
{
    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
        echo $ac_n "checking for OpenGL (GLX) support""... $ac_c" 1>&6
echo "configure:5289: checking for OpenGL (GLX) support" >&5
        video_opengl=no
        cat > conftest.$ac_ext <<EOF
#line 5292 "configure"
#include "confdefs.h"

         #include <GL/gl.h>
         #include <GL/glx.h>
         #include <dlfcn.h> /* For loading extensions */
        
int main() {

        
; return 0; }
EOF
if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        video_opengl=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$video_opengl" 1>&6
        if test x$video_opengl = xyes; then
            CFLAGS="$CFLAGS -DHAVE_OPENGL"
            echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:5318: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5326 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SYSTEM_LIBS="$SYSTEM_LIBS -ldl"
else
  echo "$ac_t""no" 1>&6
fi

        fi
    fi
}

CheckBeGL()
{
    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
        CFLAGS="$CFLAGS -DHAVE_OPENGL"
        SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
    fi
}

CheckMacGL()
{
    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
        CFLAGS="$CFLAGS -DHAVE_OPENGL"
        case "$target" in
            *-*-darwin*)
                SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL"
        esac
    fi
}

CheckInputEvents()
{
        # Check whether --enable-input-events or --disable-input-events was given.
if test "${enable_input_events+set}" = set; then
  enableval="$enable_input_events"
  :
else
  enable_input_events=yes
fi

    if test x$enable_input_events = xyes; then
        echo $ac_n "checking for Linux 2.4 unified input interface""... $ac_c" 1>&6
echo "configure:5392: checking for Linux 2.4 unified input interface" >&5
        use_input_events=no
        cat > conftest.$ac_ext <<EOF
#line 5395 "configure"
#include "confdefs.h"

          #include <linux/input.h>
        
int main() {

          #ifndef EVIOCGNAME
          #error EVIOCGNAME() ioctl not available
          #endif
        
; return 0; }
EOF
if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        use_input_events=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$use_input_events" 1>&6
        if test x$use_input_events = xyes; then
            CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
        fi
    fi
}

CheckPTHREAD()
{
        # Check whether --enable-pthreads or --disable-pthreads was given.
if test "${enable_pthreads+set}" = set; then
  enableval="$enable_pthreads"
  :
else
  enable_pthreads=yes
fi

        # Check whether --enable-pthread-sem or --disable-pthread-sem was given.
if test "${enable_pthread_sem+set}" = set; then
  enableval="$enable_pthread_sem"
  :
else
  enable_pthread_sem=yes
fi

    ac_save_libs="$LIBS"
    case "$target" in
        *-*-bsdi*)
            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
            pthread_lib=""
            ;;
        *-*-darwin*)
            pthread_cflags="-D_THREAD_SAFE"
# causes Carbon.p complaints?
#            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
            ;;
        *-*-freebsd*)
            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
            pthread_lib="-pthread"
            ;;
        *-*-openbsd*)
            pthread_cflags="-D_REENTRANT"
            pthread_lib="-pthread"
            ;;
        *-*-solaris*)
            pthread_cflags="-D_REENTRANT"
            pthread_lib="-lpthread -lposix4"
            ;;
        *-*-sysv5*)
            pthread_cflags="-D_REENTRANT -Kthread"
            pthread_lib=""
            ;;
        *-*-irix*)
            pthread_cflags="-D_SGI_MP_SOURCE"
            pthread_lib="-lpthread"
            ;;
        *-*-aix*)
            pthread_cflags="-D_REENTRANT -mthreads"
            pthread_lib="-lpthread"
            ;;
        *-*-qnx*)
            pthread_cflags=""
            pthread_lib=""
            ;;
        *)
            pthread_cflags="-D_REENTRANT"
            pthread_lib="-lpthread"
            ;;
    esac
    LIBS="$LIBS $pthread_lib"
    if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
        echo $ac_n "checking for pthreads""... $ac_c" 1>&6
echo "configure:5490: checking for pthreads" >&5
        use_pthreads=no
        cat > conftest.$ac_ext <<EOF
#line 5493 "configure"
#include "confdefs.h"

         #include <pthread.h>
        
int main() {

         pthread_attr_t type;
         pthread_attr_init(&type);
        
; return 0; }
EOF
if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  
        use_pthreads=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$use_pthreads" 1>&6
        if test x$use_pthreads = xyes; then
            CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
            SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
            SDL_LIBS="$SDL_LIBS $pthread_lib"

            # Check to see if recursive mutexes are available
            echo $ac_n "checking for recursive mutexes""... $ac_c" 1>&6
echo "configure:5523: checking for recursive mutexes" >&5
            has_recursive_mutexes=no
            cat > conftest.$ac_ext <<EOF
#line 5526 "configure"
#include "confdefs.h"

              #include <pthread.h>
            
int main() {

              pthread_mutexattr_t attr;
              #ifdef linux
              pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
              #else
              pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
              #endif
            
; return 0; }
EOF
if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  
            has_recursive_mutexes=yes
            
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
            # Some systems have broken recursive mutex implementations
            case "$target" in
                *-*-solaris*)
                    has_recursive_mutexes=no
                    ;;
            esac
            echo "$ac_t""$has_recursive_mutexes" 1>&6
            if test x$has_recursive_mutexes != xyes; then
                CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
            fi

            # Check to see if this is broken glibc 2.0 pthreads
            case "$target" in
                *-*-linux*)
                    echo $ac_n "checking for broken glibc 2.0 pthreads""... $ac_c" 1>&6
echo "configure:5567: checking for broken glibc 2.0 pthreads" >&5
                    glibc20_pthreads=no
                    cat > conftest.$ac_ext <<EOF
#line 5570 "configure"
#include "confdefs.h"

                      #include <features.h>
                      #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
                      #warning Working around a bug in glibc 2.0 pthreads
                      #else
                      #error pthread implementation okay
                      #endif /* glibc 2.0 */
                    
int main() {

                    
; return 0; }
EOF
if { (eval echo configure:5585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
                    glibc20_pthreads=yes
                    
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
                    echo "$ac_t""$glibc20_pthreads" 1>&6
            esac
        fi
    fi
    LIBS="$ac_save_libs"

    echo $ac_n "checking whether semun is defined in /usr/include/sys/sem.h""... $ac_c" 1>&6
echo "configure:5602: checking whether semun is defined in /usr/include/sys/sem.h" >&5
    have_semun=no
    cat > conftest.$ac_ext <<EOF
#line 5605 "configure"
#include "confdefs.h"

      #include <sys/types.h>
      #include <sys/sem.h>
    
int main() {

      union semun t;
    
; return 0; }
EOF
if { (eval echo configure:5617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    have_semun=yes
    
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    echo "$ac_t""$have_semun" 1>&6
    if test x$have_semun = xyes; then
        CFLAGS="$CFLAGS -DHAVE_SEMUN"
    fi

    # See if we can use clone() on Linux directly
    use_clone=no
    if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
        case "$target" in
            *-*-linux*)
                use_clone=yes
                ;;
            *)
                CFLAGS="$CFLAGS -DFORK_HACK"
                ;;
        esac
    fi
    

if test x$use_clone = xyes; then
  USE_CLONE_TRUE=
  USE_CLONE_FALSE='#'
else
  USE_CLONE_TRUE='#'
  USE_CLONE_FALSE=
fi
}

CheckWIN32()
{
    echo $ac_n "checking Win32 compiler""... $ac_c" 1>&6
echo "configure:5658: checking Win32 compiler" >&5
    have_win32_gcc=no
    cat > conftest.$ac_ext <<EOF
#line 5661 "configure"
#include "confdefs.h"

     #include <windows.h>
    
int main() {

    
; return 0; }
EOF
if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    have_win32_gcc=yes
    
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    echo "$ac_t""$have_win32_gcc" 1>&6
    if test x$have_win32_gcc != xyes; then
       { echo "configure: error: 
*** Your compiler ($CC) does not produce Win32 executables!
       " 1>&2; exit 1; }
    fi

        # Check whether --enable-stdio-redirect or --disable-stdio-redirect was given.
if test "${enable_stdio_redirect+set}" = set; then
  enableval="$enable_stdio_redirect"
  :
else
  enable_stdio_redirect=yes
fi

    if test x$enable_stdio_redirect != xyes; then
        CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
    fi
}

CheckDIRECTX()
{
    # Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
  :
else
  enable_directx=yes
fi

    if test x$enable_directx = xyes; then
        echo $ac_n "checking for DirectX headers and libraries""... $ac_c" 1>&6
echo "configure:5713: checking for DirectX headers and libraries" >&5
        use_directx=no
        cat > conftest.$ac_ext <<EOF
#line 5716 "configure"
#include "confdefs.h"

         #include "src/video/windx5/directx.h"
        
int main() {

        
; return 0; }
EOF
if { (eval echo configure:5726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
        use_directx=yes
        
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        echo "$ac_t""$use_directx" 1>&6
    fi
    

if test x$use_directx = xyes; then
  USE_DIRECTX_TRUE=
  USE_DIRECTX_FALSE='#'
else
  USE_DIRECTX_TRUE='#'
  USE_DIRECTX_FALSE=
fi

    CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
    SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
    VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
    # Enable the DIB driver
    CFLAGS="$CFLAGS -DENABLE_WINDIB"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
    VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
    # See if we should enable the DirectX driver
    if test x$use_directx = xyes; then
        CFLAGS="$CFLAGS -DENABLE_DIRECTX"
        SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
        VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
        VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
    fi
}

CheckBWINDOW()
{
    CFLAGS="$CFLAGS -DENABLE_BWINDOW"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
    VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
}

CheckTOOLBOX()
{
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
    VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
    VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
}

CheckCARBON()
{
    # "MACOSX" is not an official definition, but it's commonly
    # accepted as a way to differentiate between what runs on X
    # and what runs on older Macs - while in theory "Carbon" defns
    # are consistent between the two, in practice Carbon is still
    # changing. -sts Aug 2000
    mac_autoconf_target_workaround="MAC"
    CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
      -fpascal-strings -DENABLE_TOOLBOX -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/maccommon -I\$(top_srcdir)/src/video/macrom -I\$(top_srcdir)/src/video/macdsp"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
    VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
    VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
}

CheckKSTAT()
{
    CFLAGS="$CFLAGS -DHAVE_KSTAT"
    SYSTEM_LIBS="$SYSTEM_LIBS -lkstat"
}

case "$target" in
    *-*-linux*)
        ARCH=linux
        CheckNASM
        CheckOSS
        CheckALSA
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckDGA
        CheckFBCON
        CheckGGI
        CheckSVGA
        CheckAAlib
        CheckOpenGL
        CheckInputEvents
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        # We use the OSS and ALSA API's, not the Sun audio API
        #if test x$enable_audio = xyes; then
        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        #fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/linux/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/linux/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            if test x$use_pthreads != xyes; then
                
  echo "Copying src/thread/linux/clone.S -> src/thread/clone.S"
  old="$srcdir/src/thread/linux/clone.S"
  new="$srcdir/src/thread/clone.S"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
                
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            if test x$glibc20_pthreads = xyes; then
                
  echo "Copying src/thread/generic/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/generic/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-bsdi*)
        ARCH=bsdi
        CheckNASM
        CheckOSS
        CheckNAS
        CheckX11
        CheckDGA
        CheckSVGA
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        # (No cdrom support yet)
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-freebsd*)
        ARCH=freebsd
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckDGA
        CheckSVGA
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        # We use the OSS and ALSA API's, not the Sun audio API
        #if test x$enable_audio = xyes; then
        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        #fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/freebsd/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/freebsd/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
                
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-netbsd*)
        ARCH=netbsd
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/openbsd/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/openbsd/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # NetBSD does not define "unix"
        CFLAGS="$CFLAGS -Dunix"
        ;;
    *-*-openbsd*)
        ARCH=openbsd
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/openbsd/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/openbsd/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
                
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-sysv5*)
        ARCH=sysv5
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        CheckKSTAT
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/generic/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/generic/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/generic/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/generic/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-solaris*)
        ARCH=solaris
        CheckNASM
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        CheckKSTAT
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/linux/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/linux/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-irix*)
        ARCH=irix
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
            AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
            LIBS="$LIBS -laudio"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        # (No CD-ROM support yet)
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            if test x$use_pthreads = xyes; then
                
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                if test x$enable_pthread_sem != xyes; then
                    
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                else
                    
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                fi
                
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/irix/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/irix/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/irix/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/irix/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

                
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-hpux*)
        ARCH=hpux
        CheckNAS
        CheckX11
        CheckGGI
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        # (No CD-ROM support yet)
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-aix*)
        ARCH=aix
        CheckNAS
        CheckX11
        CheckGGI
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
            AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/aix/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/aix/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-osf*)
        ARCH=osf
        CheckNAS
        CheckX11
        CheckGGI
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        # (No joystick support yet)
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        # (No cdrom support yet)
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-qnx*)
        ARCH=qnx
        CheckNAS
        CheckPHOTON
        CheckX11
        CheckOpenGL
        CheckPTHREAD
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            CFLAGS="$CFLAGS -DALSA_SUPPORT"
            SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
            AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
        # (No joystick support yet)
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/qnx/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/qnx/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/linux/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        ;;
    *-*-cygwin* | *-*-mingw32*)
        ARCH=win32
        if test "$build" != "$target"; then # cross-compiling
            # Default cross-compile location
            ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
        else
            # Look for the location of the tools and install there
            ac_default_prefix=$BUILD_PREFIX
        fi
        CheckWIN32
        CheckDIRECTX
        CheckNASM
        # Set up files for the main() stub
        
  echo "Copying src/main/win32/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/win32/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
            AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
            if test x$use_directx = xyes; then
    	        AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
    	        AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
            fi
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/win32/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/win32/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/win32/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/win32/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/win32/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/win32/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/win32/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/win32/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/win32/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/win32/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/win32/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/win32/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # The Win32 platform requires special setup
        SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
        SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
        ;;
    *-*-beos*)
        ARCH=beos
        ac_default_prefix=/boot/develop/tools/gnupro
        CheckNASM
        CheckBWINDOW
        CheckBeGL
        # Set up files for the main() stub
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        
  echo "Copying src/main/beos/SDL_BeApp.cc -> src/main/SDL_BeApp.cc"
  old="$srcdir/src/main/beos/SDL_BeApp.cc"
  new="$srcdir/src/main/SDL_BeApp.cc"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        
  echo "Copying src/main/beos/SDL_BeApp.h -> src/main/SDL_BeApp.h"
  old="$srcdir/src/main/beos/SDL_BeApp.h"
  new="$srcdir/src/main/SDL_BeApp.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
            AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/beos/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/beos/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/beos/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/beos/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/beos/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/beos/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/generic/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/beos/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/beos/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/beos/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/beos/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # The BeOS platform requires special libraries
        SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
        ;;
    *-*-macos*)
        # This would be used if cross-compiling to MacOS 9.  No way to
        # use it at present, but Apple is working on a X-to-9 compiler
        # for which this case would be handy.
        ARCH=macos
        CheckTOOLBOX
        CheckMacGL
        # Set up files for the main() stub
        
  echo "Copying src/main/macos/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/macos/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
            AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/macos/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/macos/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/macos/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/macos/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/macos/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/macos/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/generic/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/generic/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/macos/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/macos/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/macos/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/macos/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # The MacOS platform requires special setup
        SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
        SDL_LIBS="-lSDLmain $SDL_LIBS"
        ;;
    *-*-darwin* )
        # Strictly speaking, we want "Mac OS X", not "Darwin", which is
        # just the OS X kernel sans upper layers like Carbon.  But
        # config.guess comes back with "darwin", so go with the flow.
        ARCH=macos
        CheckCARBON
        CheckMacGL
        CheckPTHREAD
        # Set up files for the main() stub
        # COPY_ARCH_SRC(src/main, macos, SDL_main.c)
        
  echo "Copying src/main/linux/SDL_main.c -> src/main/SDL_main.c"
  old="$srcdir/src/main/linux/SDL_main.c"
  new="$srcdir/src/main/SDL_main.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
            AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            
  echo "Copying src/cdrom/dummy/SDL_syscdrom.c -> src/cdrom/SDL_syscdrom.c"
  old="$srcdir/src/cdrom/dummy/SDL_syscdrom.c"
  new="$srcdir/src/cdrom/SDL_syscdrom.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            
  echo "Copying src/thread/linux/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/linux/SDL_systhread.c"
  new="$srcdir/src/thread/SDL_systhread.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/linux/SDL_systhread_c.h"
  new="$srcdir/src/thread/SDL_systhread_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/linux/SDL_sysmutex.c"
  new="$srcdir/src/thread/SDL_sysmutex.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/linux/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/linux/SDL_sysmutex_c.h"
  new="$srcdir/src/thread/SDL_sysmutex_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
                
  echo "Copying src/thread/generic/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/generic/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            else
                
  echo "Copying src/thread/linux/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/linux/SDL_syssem.c"
  new="$srcdir/src/thread/SDL_syssem.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            fi
            
  echo "Copying src/thread/generic/SDL_syssem_c.h -> src/thread/SDL_syssem_c.h"
  old="$srcdir/src/thread/generic/SDL_syssem_c.h"
  new="$srcdir/src/thread/SDL_syssem_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/generic/SDL_syscond.c"
  new="$srcdir/src/thread/SDL_syscond.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

            
  echo "Copying src/thread/generic/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/generic/SDL_syscond_c.h"
  new="$srcdir/src/thread/SDL_syscond_c.h"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            
  echo "Copying src/timer/linux/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/linux/SDL_systimer.c"
  new="$srcdir/src/timer/SDL_systimer.c"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

        fi
        # The MacOS X platform requires special setup
        SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework"
        SDL_LIBS="$SDL_LIBS -framework Carbon"
        ;;
    *)
        { echo "configure: error: Unsupported target:  Please add to configure.in" 1>&2; exit 1; }
        ;;
esac


# Set the conditional variables for this target


if test $ARCH = linux; then
  TARGET_LINUX_TRUE=
  TARGET_LINUX_FALSE='#'
else
  TARGET_LINUX_TRUE='#'
  TARGET_LINUX_FALSE=
fi


if test $ARCH = solaris; then
  TARGET_SOLARIS_TRUE=
  TARGET_SOLARIS_FALSE='#'
else
  TARGET_SOLARIS_TRUE='#'
  TARGET_SOLARIS_FALSE=
fi


if test $ARCH = irix; then
  TARGET_IRIX_TRUE=
  TARGET_IRIX_FALSE='#'
else
  TARGET_IRIX_TRUE='#'
  TARGET_IRIX_FALSE=
fi


if test $ARCH = bsdi; then
  TARGET_BSDI_TRUE=
  TARGET_BSDI_FALSE='#'
else
  TARGET_BSDI_TRUE='#'
  TARGET_BSDI_FALSE=
fi


if test $ARCH = freebsd; then
  TARGET_FREEBSD_TRUE=
  TARGET_FREEBSD_FALSE='#'
else
  TARGET_FREEBSD_TRUE='#'
  TARGET_FREEBSD_FALSE=
fi


if test $ARCH = openbsd; then
  TARGET_OPENBSD_TRUE=
  TARGET_OPENBSD_FALSE='#'
else
  TARGET_OPENBSD_TRUE='#'
  TARGET_OPENBSD_FALSE=
fi


if test $ARCH = aix; then
  TARGET_AIX_TRUE=
  TARGET_AIX_FALSE='#'
else
  TARGET_AIX_TRUE='#'
  TARGET_AIX_FALSE=
fi


if test $ARCH = win32; then
  TARGET_WIN32_TRUE=
  TARGET_WIN32_FALSE='#'
else
  TARGET_WIN32_TRUE='#'
  TARGET_WIN32_FALSE=
fi


if test $ARCH = beos; then
  TARGET_BEOS_TRUE=
  TARGET_BEOS_FALSE='#'
else
  TARGET_BEOS_TRUE='#'
  TARGET_BEOS_FALSE=
fi


if test $ARCH = macos; then
  TARGET_MACOS_TRUE=
  TARGET_MACOS_FALSE='#'
else
  TARGET_MACOS_TRUE='#'
  TARGET_MACOS_FALSE=
fi

# Set conditional variables for shared and static library selection.
# These are not used in any Makefile.am but in sdl-config.in.


if test "$enable_shared" = yes; then
  ENABLE_SHARED_TRUE=
  ENABLE_SHARED_FALSE='#'
else
  ENABLE_SHARED_TRUE='#'
  ENABLE_SHARED_FALSE=
fi


if test "$enable_static" = yes; then
  ENABLE_STATIC_TRUE=
  ENABLE_STATIC_FALSE='#'
else
  ENABLE_STATIC_TRUE='#'
  ENABLE_STATIC_FALSE=
fi

# Set runtime shared library paths as needed

if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
  SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
fi

if test $ARCH = solaris; then
  SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
fi

if test x$enable_video = xtrue; then
    if test "$VIDEO_SUBDIRS" = ""; then
        { echo "configure: error: *** No video drivers are enabled!" 1>&2; exit 1; }
    fi
fi















CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
CXXFLAGS="$CFLAGS"

# Finally create all the generated files
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs


# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "
Makefile
docs/Makefile
docs/html/Makefile
docs/man3/Makefile
include/Makefile
src/Makefile
src/main/Makefile
src/audio/Makefile
src/audio/alsa/Makefile
src/audio/arts/Makefile
src/audio/baudio/Makefile
src/audio/dma/Makefile
src/audio/dmedia/Makefile
src/audio/dsp/Makefile
src/audio/esd/Makefile
src/audio/macrom/Makefile
src/audio/nas/Makefile
src/audio/nto/Makefile
src/audio/paudio/Makefile
src/audio/sun/Makefile
src/audio/ums/Makefile
src/audio/windib/Makefile
src/audio/windx5/Makefile
src/video/Makefile
src/video/cybergfx/Makefile
src/video/x11/Makefile
src/video/dga/Makefile
src/video/fbcon/Makefile
src/video/ggi/Makefile
src/video/maccommon/Makefile
src/video/macdsp/Makefile
src/video/macrom/Makefile
src/video/svga/Makefile
src/video/aalib/Makefile
src/video/wincommon/Makefile
src/video/windib/Makefile
src/video/windx5/Makefile
src/video/bwindow/Makefile
src/video/photon/Makefile
src/events/Makefile
src/joystick/Makefile
src/joystick/beos/Makefile
src/joystick/dummy/Makefile
src/joystick/linux/Makefile
src/joystick/macos/Makefile
src/joystick/win32/Makefile
src/cdrom/Makefile
src/thread/Makefile
src/timer/Makefile
src/endian/Makefile
src/file/Makefile
src/hermes/Makefile
sdl-config
SDL.spec
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@SDL_MAJOR_VERSION@%$SDL_MAJOR_VERSION%g
s%@SDL_MINOR_VERSION@%$SDL_MINOR_VERSION%g
s%@SDL_MICRO_VERSION@%$SDL_MICRO_VERSION%g
s%@SDL_INTERFACE_AGE@%$SDL_INTERFACE_AGE%g
s%@SDL_BINARY_AGE@%$SDL_BINARY_AGE%g
s%@SDL_VERSION@%$SDL_VERSION%g
s%@LT_RELEASE@%$LT_RELEASE%g
s%@LT_CURRENT@%$LT_CURRENT%g
s%@LT_REVISION@%$LT_REVISION%g
s%@LT_AGE@%$LT_AGE%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@RANLIB@%$RANLIB%g
s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@DLLTOOL@%$DLLTOOL%g
s%@AS@%$AS%g
s%@OBJDUMP@%$OBJDUMP%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CXX@%$CXX%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@ESD_CFLAGS@%$ESD_CFLAGS%g
s%@ESD_LIBS@%$ESD_LIBS%g
s%@ARTSCCONFIG@%$ARTSCCONFIG%g
s%@NASM@%$NASM%g
s%@NASMFLAGS@%$NASMFLAGS%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@USE_CLONE_TRUE@%$USE_CLONE_TRUE%g
s%@USE_CLONE_FALSE@%$USE_CLONE_FALSE%g
s%@USE_DIRECTX_TRUE@%$USE_DIRECTX_TRUE%g
s%@USE_DIRECTX_FALSE@%$USE_DIRECTX_FALSE%g
s%@ARCH@%$ARCH%g
s%@TARGET_LINUX_TRUE@%$TARGET_LINUX_TRUE%g
s%@TARGET_LINUX_FALSE@%$TARGET_LINUX_FALSE%g
s%@TARGET_SOLARIS_TRUE@%$TARGET_SOLARIS_TRUE%g
s%@TARGET_SOLARIS_FALSE@%$TARGET_SOLARIS_FALSE%g
s%@TARGET_IRIX_TRUE@%$TARGET_IRIX_TRUE%g
s%@TARGET_IRIX_FALSE@%$TARGET_IRIX_FALSE%g
s%@TARGET_BSDI_TRUE@%$TARGET_BSDI_TRUE%g
s%@TARGET_BSDI_FALSE@%$TARGET_BSDI_FALSE%g
s%@TARGET_FREEBSD_TRUE@%$TARGET_FREEBSD_TRUE%g
s%@TARGET_FREEBSD_FALSE@%$TARGET_FREEBSD_FALSE%g
s%@TARGET_OPENBSD_TRUE@%$TARGET_OPENBSD_TRUE%g
s%@TARGET_OPENBSD_FALSE@%$TARGET_OPENBSD_FALSE%g
s%@TARGET_AIX_TRUE@%$TARGET_AIX_TRUE%g
s%@TARGET_AIX_FALSE@%$TARGET_AIX_FALSE%g
s%@TARGET_WIN32_TRUE@%$TARGET_WIN32_TRUE%g
s%@TARGET_WIN32_FALSE@%$TARGET_WIN32_FALSE%g
s%@TARGET_BEOS_TRUE@%$TARGET_BEOS_TRUE%g
s%@TARGET_BEOS_FALSE@%$TARGET_BEOS_FALSE%g
s%@TARGET_MACOS_TRUE@%$TARGET_MACOS_TRUE%g
s%@TARGET_MACOS_FALSE@%$TARGET_MACOS_FALSE%g
s%@ENABLE_SHARED_TRUE@%$ENABLE_SHARED_TRUE%g
s%@ENABLE_SHARED_FALSE@%$ENABLE_SHARED_FALSE%g
s%@ENABLE_STATIC_TRUE@%$ENABLE_STATIC_TRUE%g
s%@ENABLE_STATIC_FALSE@%$ENABLE_STATIC_FALSE%g
s%@AUDIO_SUBDIRS@%$AUDIO_SUBDIRS%g
s%@AUDIO_DRIVERS@%$AUDIO_DRIVERS%g
s%@VIDEO_SUBDIRS@%$VIDEO_SUBDIRS%g
s%@VIDEO_DRIVERS@%$VIDEO_DRIVERS%g
s%@JOYSTICK_SUBDIRS@%$JOYSTICK_SUBDIRS%g
s%@JOYSTICK_DRIVERS@%$JOYSTICK_DRIVERS%g
s%@SDL_EXTRADIRS@%$SDL_EXTRADIRS%g
s%@SDL_EXTRALIBS@%$SDL_EXTRALIBS%g
s%@SYSTEM_LIBS@%$SYSTEM_LIBS%g
s%@SDL_CFLAGS@%$SDL_CFLAGS%g
s%@SDL_LIBS@%$SDL_LIBS%g
s%@SDL_RLD_FLAGS@%$SDL_RLD_FLAGS%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile
docs/Makefile
docs/html/Makefile
docs/man3/Makefile
include/Makefile
src/Makefile
src/main/Makefile
src/audio/Makefile
src/audio/alsa/Makefile
src/audio/arts/Makefile
src/audio/baudio/Makefile
src/audio/dma/Makefile
src/audio/dmedia/Makefile
src/audio/dsp/Makefile
src/audio/esd/Makefile
src/audio/macrom/Makefile
src/audio/nas/Makefile
src/audio/nto/Makefile
src/audio/paudio/Makefile
src/audio/sun/Makefile
src/audio/ums/Makefile
src/audio/windib/Makefile
src/audio/windx5/Makefile
src/video/Makefile
src/video/cybergfx/Makefile
src/video/x11/Makefile
src/video/dga/Makefile
src/video/fbcon/Makefile
src/video/ggi/Makefile
src/video/maccommon/Makefile
src/video/macdsp/Makefile
src/video/macrom/Makefile
src/video/svga/Makefile
src/video/aalib/Makefile
src/video/wincommon/Makefile
src/video/windib/Makefile
src/video/windx5/Makefile
src/video/bwindow/Makefile
src/video/photon/Makefile
src/events/Makefile
src/joystick/Makefile
src/joystick/beos/Makefile
src/joystick/dummy/Makefile
src/joystick/linux/Makefile
src/joystick/macos/Makefile
src/joystick/win32/Makefile
src/cdrom/Makefile
src/thread/Makefile
src/timer/Makefile
src/endian/Makefile
src/file/Makefile
src/hermes/Makefile
sdl-config
SDL.spec
"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF
chmod +x sdl-config
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

