#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
cross_compiling=no
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

ac_unique_file="README"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
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'

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

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

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

  # 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_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

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

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$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_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    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 "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

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

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: should be removed in autoconf 3.0.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null

# 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 "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CXX_set=${CXX+set}
ac_env_CXX_value=$CXX
ac_cv_env_CXX_set=${CXX+set}
ac_cv_env_CXX_value=$CXX
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

EOF

  cat <<EOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]
EOF

  cat <<\EOF

Program names:
  --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

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-shared=PKGS  build shared libraries default=yes
  --enable-static=PKGS  build static libraries default=yes
  --enable-fast-install=PKGS  optimize for fast installation default=yes
  --disable-dependency-tracking Speeds up one-time builds
  --enable-dependency-tracking  Do not reject slow dependency extractors
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-debug          Disable aggressive optimizations default=yes
  --enable-strict-ansi    Enable strict ANSI compliance build default=no
  --enable-audio          Enable the audio subsystem default=yes
  --enable-video          Enable the video subsystem default=yes
  --enable-events         Enable the events subsystem default=yes
  --enable-joystick       Enable the joystick subsystem default=yes
  --enable-cdrom          Enable the cdrom subsystem default=yes
  --enable-threads        Enable the threading subsystem default=yes
  --enable-timers         Enable the timer subsystem default=yes
  --enable-endian         Enable the endian subsystem default=yes
  --enable-file           Enable the file subsystem default=yes
  --enable-oss            support the OSS audio API default=yes
  --enable-alsa           support the ALSA audio API default=yes
  --enable-esd            support the Enlightened Sound Daemon default=yes
  --disable-esdtest       Do not try to compile and run a test ESD program
  --enable-esd-shared     dynamically load ESD audio support default=no
  --enable-arts           support the Analog Real Time Synthesizer default=yes
  --enable-arts-shared     dynamically load aRts audio support default=no
  --enable-nas                  support the NAS audio API default=yes
  --enable-diskaudio            support the disk writer audio driver default=yes
  --enable-mintaudio      support Atari audio driver default=yes
  --enable-nasm           use nasm assembly blitters on x86 default=yes
  --enable-video-nanox use nanox video driver default=no
  --enable-nanox-debug print debug messages default=no
  --enable-nanox-share-memory use share memory default=no
  --enable-nanox-direct-fb use direct framebuffer access default=no
  --enable-video-x11      use X11 video driver default=yes
  --enable-video-x11-vm   use X11 VM extension for fullscreen default=yes
  --enable-dga            allow use of X11 DGA code default=yes
  --enable-video-x11-dgamouse  use X11 DGA for mouse events default=yes
  --enable-video-x11-xv   use X11 XvImage extension for video default=yes
  --enable-video-x11-xinerama   enable X11 Xinerama support default=yes
  --enable-video-x11-xme  enable Xi Graphics XME for fullscreen default=yes
  --enable-video-dga      use DGA 2.0 video driver default=yes
  --enable-video-photon   use QNX Photon video driver default=yes
  --enable-video-fbcon    use framebuffer console video driver default=yes
  --enable-video-directfb    use DirectFB video driver default=yes
  --enable-video-ps2gs    use PlayStation 2 GS video driver default=yes
  --enable-video-ggi      use GGI video driver default=no
  --enable-video-svga     use SVGAlib video driver default=no
  --enable-video-vgl     use VGL video driver default=no
  --enable-video-aalib    use AAlib video driver default=no
  --enable-video-xbios    use Atari Xbios video driver default=yes
  --enable-video-gem      use Atari Gem video driver default=yes
  --enable-video-dummy    use dummy video driver default=yes
  --enable-video-opengl   include OpenGL context creation default=yes
  --enable-input-events   use Linux 2.4 unified input interface default=yes
  --enable-pth            use GNU pth library for multi-threading default=yes
  --enable-pthreads       use POSIX threads for multi-threading default=yes
  --enable-pthread-sem    use pthread semaphores default=yes
  --enable-stdio-redirect Redirect STDIO to files on Win32 default=yes
  --enable-directx        use DirectX for Win32 audio/video default=yes
  --enable-video-qtopia   use Qtopia video driver default=no
  --enable-video-picogui  use PicoGUI video driver default=no
  --enable-dlopen         use dlopen for shared object loading default=no

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)
  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)
  --with-x                use the X Window System

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`

    case $srcdir in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [\\/]* | ?:[\\/]* ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure.gnu; then
      echo
      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.ac ||
           test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
exec 5>config.log
cat >&5 <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.52.  Invocation command line was

  $ $0 $@

EOF
{
cat <<_ASUNAME
## ---------- ##
## Platform.  ##
## ---------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

PATH = $PATH

_ASUNAME
} >&5

cat >&5 <<EOF
## ------------ ##
## Core tests.  ##
## ------------ ##

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  echo >&5
  echo "## ----------------- ##" >&5
  echo "## Cache variables.  ##" >&5
  echo "## ----------------- ##" >&5
  echo >&5
  # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} >&5
  sed "/^$/d" confdefs.h >conftest.log
  if test -s conftest.log; then
    echo >&5
    echo "## ------------ ##" >&5
    echo "## confdefs.h.  ##" >&5
    echo "## ------------ ##" >&5
    echo >&5
    cat conftest.log >&5
  fi
  (echo; echo) >&5
  test "$ac_signal" != 0 &&
    echo "$as_me: caught signal $ac_signal" >&5
  echo "$as_me: exit $exit_status" >&5
  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# 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

# Let the site file select an alternate cache file if it wants to.
# 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 "$as_me:916: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:927: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:935: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:951: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:955: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        { echo "$as_me:961: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
        { echo "$as_me:963:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:965:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
        ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.  It doesn't matter if
  # we pass some twice (in addition to the command line arguments).
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
       ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:984: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:986: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo  "exit 0"   >>conftest.sh
chmod +x conftest.sh
if { (echo "$as_me:1006: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:1009: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  ac_path_separator=';'
else
  ac_path_separator=:
fi
PATH_SEPARATOR="$ac_path_separator"
rm -f conftest.sh

#
# 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=5
SDL_INTERFACE_AGE=5
SDL_BINARY_AGE=5
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
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:1058: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
   { (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:1068: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1072: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  { { echo "$as_me:1081: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
  { { echo "$as_me:1085: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1090: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1097: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
  ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
  { { echo "$as_me:1106: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1111: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1118: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_target_alias=$target_alias
test "x$ac_cv_target_alias" = "x" &&
  ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
  { { echo "$as_me:1127: error: $ac_config_sub $ac_cv_target_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1132: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

am__api_version="1.6"
# 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
# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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 "$as_me:1159: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /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 $as_executable_p "$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.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

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 "$as_me:1208: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&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}'

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

echo "$as_me:1219: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftest.file
# 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 conftest.file 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftest.file`
   fi
   rm -f conftest.file
   if test "$*" != "X $srcdir/configure conftest.file" \
      && test "$*" != "X conftest.file $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 "$as_me:1243: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" >&5
echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" >&2;}
   { (exit 1); exit 1; }; }
   fi

   test "$2" = conftest.file
   )
then
   # Ok.
   :
else
   { { echo "$as_me:1256: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
   { (exit 1); exit 1; }; }
fi
echo "$as_me:1262: result: yes" >&5
echo "${ECHO_T}yes" >&6
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"
# Double any \ or $.  echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed

# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`

test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
  { echo "$as_me:1286: WARNING: \`missing' script is too old or missing" >&5
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi

for ac_prog in mawk gawk nawk awk
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 "$as_me:1294: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:1309: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "$as_me:1317: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
  echo "$as_me:1320: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AWK" && break
done

echo "$as_me:1327: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 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 conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:1347: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:1351: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

 # test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
   test -f $srcdir/config.status; then
  { { echo "$as_me:1359: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
   { (exit 1); exit 1; }; }
fi

# Define the identity of the package.
 PACKAGE=SDL
 VERSION=$SDL_VERSION

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

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

# Some tools Automake needs.

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}

AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}

AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}

AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}

MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}

AMTAR=${AMTAR-"${am_missing_run}tar"}

install_sh=${install_sh-"$am_aux_dir/install-sh"}

# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'.  However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo "$as_me:1400: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:1415: found $ac_dir/$ac_word" >&5
break
done

fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  echo "$as_me:1423: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
  echo "$as_me:1426: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_STRIP"; then
  ac_ct_STRIP=$STRIP
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "$as_me:1435: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_STRIP"; then
  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:1450: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
  echo "$as_me:1459: result: $ac_ct_STRIP" >&5
echo "${ECHO_T}$ac_ct_STRIP" >&6
else
  echo "$as_me:1462: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  STRIP=$ac_ct_STRIP
else
  STRIP="$ac_cv_prog_STRIP"
fi

fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"

# We need awk for the "check" target.  The system "awk" is bad on
# some platforms.

# 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;
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:1546: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:1561: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:1569: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:1572: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:1581: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:1596: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:1605: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:1608: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
  DEPDIR=.deps
else
  # MS-DOS does not allow filenames that begin with a dot.
  DEPDIR=_deps
fi
rmdir .deps 2>/dev/null

ac_config_commands="$ac_config_commands depfiles"

am_make=${MAKE-make}
cat > confinc << 'END'
doit:
	@echo done
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:1635: checking for style of include used by $am_make" >&5
echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
   am__include=include
   am__quote=
   _am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
   echo '.include "confinc"' > confmf
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
      am__include=.include
      am__quote="\""
      _am_result=BSD
   fi
fi

echo "$as_me:1662: result: $_am_result" >&5
echo "${ECHO_T}$_am_result" >&6
rm -f confinc confmf

# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
  enableval="$enable_dependency_tracking"

fi;
if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
fi

if test "x$enable_dependency_tracking" != xno; then
  AMDEP_TRUE=
  AMDEP_FALSE='#'
else
  AMDEP_TRUE='#'
  AMDEP_FALSE=
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:1692: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:1707: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1715: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1718: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:1727: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:1742: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1750: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1753: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:1766: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:1781: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1789: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1792: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1801: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:1816: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1824: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1827: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:1840: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:1860: found $ac_dir/$ac_word" >&5
break
done

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 $# != 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" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1882: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1885: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:1896: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:1911: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1919: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1922: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in 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 "$as_me:1935: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:1950: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1958: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1961: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

test -z "$CC" && { { echo "$as_me:1973: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:1978:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1981: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1984: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1986: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1989: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1991: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1994: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
#line 1998 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:2014: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:2017: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:2020: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
for ac_file in `ls a.exe conftest.exe 2>/dev/null;
                ls a.out conftest 2>/dev/null;
                ls a.* conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    a.out ) # We found the default executable, but exeext='' is most
            # certainly right.
            break;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:2043: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:2049: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:2054: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:2060: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2063: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:2070: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:2078: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:2085: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:2087: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:2090: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:2092: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2095: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:2111: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:2117: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:2123: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2129 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2144: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:2156: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:2163: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:2167: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2173 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2188: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2191: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2194: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2197: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:2209: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:2215: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2221 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2233: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2236: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2239: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2242: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:2252: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2282: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2285: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2288: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 2300 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2313: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2316: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2319: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2322: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 2332 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2344: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2347: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2350: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2353: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

depcc="$CC"   am_compiler_list=

echo "$as_me:2382: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named `D' -- because `-MD' means `put the output
  # in D'.
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  for depmode in $am_compiler_list; do
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    echo '#include "conftest.h"' > conftest.c
    echo 'int i;' > conftest.h
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf

    case $depmode in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle `-M -o', and we need to detect this.
    if depmode=$depmode \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type=$depmode
      break
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
echo "$as_me:2444: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type

# 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_c_compiler_gnu" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo "$as_me:2458: checking for ld used by GCC" >&5
echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
  DELCR='tr -d \015'
  ac_prog=`($CC -print-prog-name=ld | $DELCR) 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 "$as_me:2483: checking for GNU ld" >&5
echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
  echo "$as_me:2486: checking for non-GNU ld" >&5
echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
if test "${ac_cv_path_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:2516: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
  echo "$as_me:2519: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -z "$LD" && { { echo "$as_me:2522: error: no acceptable ld found in \$PATH" >&5
echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }
echo "$as_me:2525: checking if the linker ($LD) is GNU ld" >&5
echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${ac_cv_prog_gnu_ld+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:2537: result: $ac_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6

echo "$as_me:2540: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
if test "${ac_cv_path_NM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:2574: result: $NM" >&5
echo "${ECHO_T}$NM" >&6

echo "$as_me:2577: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  echo "$as_me:2581: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:2584: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
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_c_compiler_gnu" = 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 2615 "configure"' > conftest.$ac_ext
  if { (eval echo "$as_me:2616: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2619: \$? = $ac_status" >&5
  (exit $ac_status); }; 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 "$as_me:2640: checking whether the C compiler needs -belf" >&5
echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2646 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2658: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2661: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2664: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2667: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  lt_cv_cc_needs_belf=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:2677: result: $lt_cv_cc_needs_belf" >&5
echo "${ECHO_T}$lt_cv_cc_needs_belf" >&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*)
  if test -n "$ac_tool_prefix"; then
  # 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 "$as_me:2689: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_DLLTOOL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DLLTOOL"; then
  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
echo "$as_me:2704: found $ac_dir/$ac_word" >&5
break
done

fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
  echo "$as_me:2712: result: $DLLTOOL" >&5
echo "${ECHO_T}$DLLTOOL" >&6
else
  echo "$as_me:2715: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_DLLTOOL"; then
  ac_ct_DLLTOOL=$DLLTOOL
  # Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo "$as_me:2724: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_DLLTOOL"; then
  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
echo "$as_me:2739: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
  echo "$as_me:2748: result: $ac_ct_DLLTOOL" >&5
echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
else
  echo "$as_me:2751: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  DLLTOOL=$ac_ct_DLLTOOL
else
  DLLTOOL="$ac_cv_prog_DLLTOOL"
fi

  if test -n "$ac_tool_prefix"; then
  # 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 "$as_me:2763: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AS"; then
  ac_cv_prog_AS="$AS" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AS="${ac_tool_prefix}as"
echo "$as_me:2778: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AS=$ac_cv_prog_AS
if test -n "$AS"; then
  echo "$as_me:2786: result: $AS" >&5
echo "${ECHO_T}$AS" >&6
else
  echo "$as_me:2789: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_AS"; then
  ac_ct_AS=$AS
  # Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo "$as_me:2798: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_AS"; then
  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AS="as"
echo "$as_me:2813: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
fi
fi
ac_ct_AS=$ac_cv_prog_ac_ct_AS
if test -n "$ac_ct_AS"; then
  echo "$as_me:2822: result: $ac_ct_AS" >&5
echo "${ECHO_T}$ac_ct_AS" >&6
else
  echo "$as_me:2825: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  AS=$ac_ct_AS
else
  AS="$ac_cv_prog_AS"
fi

  if test -n "$ac_tool_prefix"; then
  # 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 "$as_me:2837: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_OBJDUMP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$OBJDUMP"; then
  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
echo "$as_me:2852: found $ac_dir/$ac_word" >&5
break
done

fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
  echo "$as_me:2860: result: $OBJDUMP" >&5
echo "${ECHO_T}$OBJDUMP" >&6
else
  echo "$as_me:2863: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_OBJDUMP"; then
  ac_ct_OBJDUMP=$OBJDUMP
  # Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo "$as_me:2872: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_OBJDUMP"; then
  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_OBJDUMP="objdump"
echo "$as_me:2887: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
  echo "$as_me:2896: result: $ac_ct_OBJDUMP" >&5
echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
else
  echo "$as_me:2899: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  OBJDUMP=$ac_ct_OBJDUMP
else
  OBJDUMP="$ac_cv_prog_OBJDUMP"
fi

  ;;

esac

# Save cache, so that ltconfig can load it
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && 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 "$as_me:2975: error: libtool configure failed" >&5
echo "$as_me: error: libtool configure failed" >&2;}
   { (exit 1); exit 1; }; }

# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:2984: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:2992: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$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 "$as_me:3007: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 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 conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:3027: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:3031: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:3044: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:3059: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:3067: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:3070: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:3079: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:3094: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:3102: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:3105: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:3118: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:3133: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:3141: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:3144: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:3153: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:3168: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:3176: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:3179: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:3192: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:3212: found $ac_dir/$ac_word" >&5
break
done

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 $# != 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" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:3234: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:3237: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:3248: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:3263: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:3271: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:3274: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in 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 "$as_me:3287: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:3302: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:3310: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:3313: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

test -z "$CC" && { { echo "$as_me:3325: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:3330:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:3333: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3336: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:3338: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3341: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:3343: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3346: \$? = $ac_status" >&5
  (exit $ac_status); }

echo "$as_me:3349: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3355 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3370: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3373: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3376: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3379: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:3391: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:3397: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3403 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3415: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3418: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3421: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3424: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:3434: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3461: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3464: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3467: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3470: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 3482 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3495: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3498: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3501: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3504: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 3514 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3526: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3529: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3532: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3535: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

depcc="$CC"   am_compiler_list=

echo "$as_me:3564: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named `D' -- because `-MD' means `put the output
  # in D'.
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  for depmode in $am_compiler_list; do
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    echo '#include "conftest.h"' > conftest.c
    echo 'int i;' > conftest.h
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf

    case $depmode in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle `-M -o', and we need to detect this.
    if depmode=$depmode \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type=$depmode
      break
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
echo "$as_me:3626: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type

echo "$as_me:3630: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line 3638 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:3687: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3690: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3693: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3696: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:3713: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:3716: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

echo "$as_me:3721: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 3729 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3738: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3741: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3744: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3747: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:3758: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&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 "$as_me:3773: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3779 "configure"
#include "confdefs.h"

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* 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;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3837: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3840: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3843: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3846: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:3856: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\EOF
#define const
EOF

fi

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:3876: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
echo "$as_me:3891: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "$as_me:3899: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "$as_me:3902: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
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 "$as_me:3915: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CXX="$ac_prog"
echo "$as_me:3930: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  echo "$as_me:3938: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
  echo "$as_me:3941: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CXX" && break
done
test -n "$ac_ct_CXX" || ac_ct_CXX="g++"

  CXX=$ac_ct_CXX
fi

# Provide some information about the compiler.
echo "$as_me:3953:" \
     "checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:3956: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3959: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:3961: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3964: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:3966: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:3969: \$? = $ac_status" >&5
  (exit $ac_status); }

echo "$as_me:3972: checking whether we are using the GNU C++ compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3978 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:3996: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:3999: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4002: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:4014: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:4020: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4026 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4038: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4041: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4044: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4047: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cxx_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:4057: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&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
for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 4084 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4097: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4100: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4103: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4106: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 4116 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:4131: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:4134: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4137: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

depcc="$CXX"  am_compiler_list=

echo "$as_me:4161: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named `D' -- because `-MD' means `put the output
  # in D'.
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir

  am_cv_CXX_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  for depmode in $am_compiler_list; do
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    echo '#include "conftest.h"' > conftest.c
    echo 'int i;' > conftest.h
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf

    case $depmode in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle `-M -o', and we need to detect this.
    if depmode=$depmode \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      am_cv_CXX_dependencies_compiler_type=$depmode
      break
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi
echo "$as_me:4223: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type

# 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
# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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 "$as_me:4239: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /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 $as_executable_p "$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.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

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 "$as_me:4288: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&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}'

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

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:4304: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 4325 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:4330: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4336: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 4359 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:4363: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4369: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:4406: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 4416 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:4421: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4427: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 4450 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:4454: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:4460: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:4488: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo "$as_me:4501: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4507 "configure"
#include "confdefs.h"
#include <alloca.h>
int
main ()
{
char *p = (char *) alloca (2 * sizeof (int));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4519: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4522: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4525: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4528: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_working_alloca_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4538: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then

cat >>confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
EOF

fi

echo "$as_me:4548: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4554 "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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4586: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4589: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4592: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4595: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_alloca_works=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4605: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6

if test $ac_cv_func_alloca_works = yes; then

cat >>confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

else
  # 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 "$as_me:4626: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4632 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

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

fi
echo "$as_me:4650: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:4655: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4661 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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 ();
char (*f) ();

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
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4692: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4695: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4698: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4701: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4711: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then

cat >>confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

    break
fi

  done
fi

echo "$as_me:4725: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4734 "configure"
#include "confdefs.h"
int
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;
}

int
main ()
{
  exit (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:4757: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4760: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:4762: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4765: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_stack_direction=1
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_stack_direction=-1
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:4777: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6

cat >>confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi

ASFLAGS=""

CCAS="$CC"

CCASFLAGS=""

case "$target" in
    alpha*-*-linux*)
        if test x$ac_cv_c_compiler_gnu = 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_c_compiler_gnu = 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_c_compiler_gnu = xyes; then
                CFLAGS="$CFLAGS -march=486"
            fi
            ;;
        i?86-*-*)
            if test x$ac_cv_c_compiler_gnu = xyes; then
                CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
            fi
            ;;
        *-*-osf*)
            if test x$ac_cv_c_compiler_gnu != 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_c_compiler_gnu = 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 "$as_me:5073: checking for OSS audio support" >&5
echo $ECHO_N "checking for OSS audio support... $ECHO_C" >&6
        have_oss=no
        if test x$have_oss != xyes; then
            cat >conftest.$ac_ext <<_ACEOF
#line 5078 "configure"
#include "confdefs.h"

              #include <sys/soundcard.h>

int
main ()
{

              int arg = SNDCTL_DSP_SETFRAGMENT;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5094: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5097: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5100: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5103: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            have_oss=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        fi
        if test x$have_oss != xyes; then
            cat >conftest.$ac_ext <<_ACEOF
#line 5116 "configure"
#include "confdefs.h"

              #include <soundcard.h>

int
main ()
{

              int arg = SNDCTL_DSP_SETFRAGMENT;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5135: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5138: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5141: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            have_oss=yes
            CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        fi
        echo "$as_me:5153: result: $have_oss" >&5
echo "${ECHO_T}$have_oss" >&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
        echo "$as_me:5175: checking for ALSA audio support" >&5
echo $ECHO_N "checking for ALSA audio support... $ECHO_C" >&6
        have_alsa=no
        cat >conftest.$ac_ext <<_ACEOF
#line 5179 "configure"
#include "confdefs.h"

          #include <alsa/asoundlib.h>

int
main ()
{

          #if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
          #error Your version of ALSA is too old
          #endif
          snd_pcm_t *pcm_handle;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5198: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5201: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5204: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5207: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        echo "$as_me:5210: checking for snd_pcm_open in -lasound" >&5
echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lasound  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5218 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5237: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5240: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5243: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5246: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_asound_snd_pcm_open=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_asound_snd_pcm_open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:5257: result: $ac_cv_lib_asound_snd_pcm_open" >&5
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6
if test $ac_cv_lib_asound_snd_pcm_open = yes; then
  have_alsa=yes
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        if test x$have_alsa = xyes; then
            CFLAGS="$CFLAGS -DALSA_SUPPORT"
            SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
            AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
        else
            echo "$as_me:5274: result: $have_alsa" >&5
echo "${ECHO_T}$have_alsa" >&6
        fi
    fi
}

CheckDMEDIA()
{
    if test x$enable_audio = xyes; then
        echo "$as_me:5283: checking for dmedia audio support" >&5
echo $ECHO_N "checking for dmedia audio support... $ECHO_C" >&6
        have_dmedia=no
        cat >conftest.$ac_ext <<_ACEOF
#line 5287 "configure"
#include "confdefs.h"

          #include <dmedia/audio.h>

int
main ()
{

          ALport audio_port;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5303: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5306: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5309: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5312: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        have_dmedia=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        # Set up files for the audio library
        if test x$have_dmedia = xyes; then
            CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
            AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
            SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
        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
        use_esd=no

# 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 "$as_me:5382: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_ESD_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ESD_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:5399: found $ac_dir/$ac_word" >&5
   break
fi
done

  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 "$as_me:5411: result: $ESD_CONFIG" >&5
echo "${ECHO_T}$ESD_CONFIG" >&6
else
  echo "$as_me:5414: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  min_esd_version=0.2.8
  echo "$as_me:5419: checking for ESD - version >= $min_esd_version" >&5
echo $ECHO_N "checking for ESD - version >= $min_esd_version... $ECHO_C" >&6
  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 <<_ACEOF
#line 5444 "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;
    }
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:5502: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5505: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:5507: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5510: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
no_esd=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_esd" = x ; then
     echo "$as_me:5526: result: yes" >&5
echo "${ECHO_T}yes" >&6
     use_esd=yes
  else
     echo "$as_me:5530: result: no" >&5
echo "${ECHO_T}no" >&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 <<_ACEOF
#line 5545 "configure"
#include "confdefs.h"

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

int
main ()
{
 return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5560: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5563: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5566: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5569: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   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 "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 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.$ac_objext conftest$ac_exeext conftest.$ac_ext
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     ESD_CFLAGS=""
     ESD_LIBS=""
     :
  fi

  rm -f conf.esdtest

        if test x$use_esd = xyes; then
            # Check whether --enable-esd-shared or --disable-esd-shared was given.
if test "${enable_esd_shared+set}" = set; then
  enableval="$enable_esd_shared"

else
  enable_esd_shared=no
fi;
            esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libesd.so.*/'`
            esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
            echo "-- $esd_lib_spec -> $esd_lib"
            if test x$enable_dlopen != xyes && \
               test x$enable_esd_shared = xyes; then
                { { echo "$as_me:5613: error: You must have dlopen() support and use the --enable-dlopen option" >&5
echo "$as_me: error: You must have dlopen() support and use the --enable-dlopen option" >&2;}
   { (exit 1); exit 1; }; }
            fi
            if test x$enable_dlopen = xyes && \
               test x$enable_esd_shared = xyes && test x$esd_lib != x; then
                CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"

            else
                CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
                SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
            fi
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
            AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
        fi
    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 "$as_me:5643: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_ARTSCCONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ARTSCCONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ARTSCCONFIG="$ARTSCCONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_ARTSCCONFIG="$ac_dir/$ac_word"
   echo "$as_me:5660: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
ARTSCCONFIG=$ac_cv_path_ARTSCCONFIG

if test -n "$ARTSCCONFIG"; then
  echo "$as_me:5671: result: $ARTSCCONFIG" >&5
echo "${ECHO_T}$ARTSCCONFIG" >&6
else
  echo "$as_me:5674: result: no" >&5
echo "${ECHO_T}no" >&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 "$as_me:5683: checking for aRts development environment" >&5
echo $ECHO_N "checking for aRts development environment... $ECHO_C" >&6
            audio_arts=no
            save_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS $ARTSC_CFLAGS"
            cat >conftest.$ac_ext <<_ACEOF
#line 5689 "configure"
#include "confdefs.h"

             #include <artsc.h>

int
main ()
{

             arts_stream_t stream;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5705: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5708: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5711: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5714: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            audio_arts=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
            CFLAGS="$save_CFLAGS"
            echo "$as_me:5725: result: $audio_arts" >&5
echo "${ECHO_T}$audio_arts" >&6
            if test x$audio_arts = xyes; then
                # Check whether --enable-arts-shared or --disable-arts-shared was given.
if test "${enable_arts_shared+set}" = set; then
  enableval="$enable_arts_shared"

else
  enable_arts_shared=no
fi;
                arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libartsc.so.*/'`
                arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
                echo "-- $arts_lib_spec -> $arts_lib"
                if test x$enable_dlopen != xyes && \
                   test x$enable_arts_shared = xyes; then
                    { { echo "$as_me:5740: error: You must have dlopen() support and use the --enable-dlopen option" >&5
echo "$as_me: error: You must have dlopen() support and use the --enable-dlopen option" >&2;}
   { (exit 1); exit 1; }; }
                fi
                if test x$enable_dlopen = xyes && \
                   test x$enable_arts_shared = xyes && test x$arts_lib != x; then
                    CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"

                else
                    CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
                    SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
                fi
                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 "$as_me:5769: checking for NAS audio support" >&5
echo $ECHO_N "checking for NAS audio support... $ECHO_C" >&6
        have_nas=no
        if test -r /usr/X11R6/include/audio/audiolib.h; then
            have_nas=yes
        fi
        echo "$as_me:5775: result: $have_nas" >&5
echo "${ECHO_T}$have_nas" >&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
}

CheckDiskAudio()
{
    # Check whether --enable-diskaudio or --disable-diskaudio was given.
if test "${enable_diskaudio+set}" = set; then
  enableval="$enable_diskaudio"

else
  enable_diskaudio=yes
fi;
    if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
        CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
        AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
        AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
    fi
}

CheckAtariAudio()
{
    # Check whether --enable-mintaudio or --disable-mintaudio was given.
if test "${enable_mintaudio+set}" = set; then
  enableval="$enable_mintaudio"

else
  enable_mintaudio=yes
fi;
    if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
        mintaudio=no
        echo "$as_me:5813: checking for mint/falcon.h" >&5
echo $ECHO_N "checking for mint/falcon.h... $ECHO_C" >&6
if test "${ac_cv_header_mint_falcon_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5819 "configure"
#include "confdefs.h"
#include <mint/falcon.h>
_ACEOF
if { (eval echo "$as_me:5823: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5829: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_mint_falcon_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_mint_falcon_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:5848: result: $ac_cv_header_mint_falcon_h" >&5
echo "${ECHO_T}$ac_cv_header_mint_falcon_h" >&6
if test $ac_cv_header_mint_falcon_h = yes; then
  have_mint_falcon_hdr=yes
fi

        if test x$have_mint_falcon_hdr = xyes; then
            mintaudio=yes
            CFLAGS="$CFLAGS -DMINTAUDIO_SUPPORT"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS mint"
            AUDIO_DRIVERS="$AUDIO_DRIVERS mint/libaudio_mintaudio.la"
        fi
    fi
}

# NASM is available from: http://nasm.octium.net/
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 "$as_me:5884: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_NASM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $NASM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_NASM="$ac_dir/$ac_word"
   echo "$as_me:5901: found $ac_dir/$ac_word" >&5
   break
fi
done

  ;;
esac
fi
NASM=$ac_cv_path_NASM

if test -n "$NASM"; then
  echo "$as_me:5912: result: $NASM" >&5
echo "${ECHO_T}$NASM" >&6
else
  echo "$as_me:5915: result: no" >&5
echo "${ECHO_T}no" >&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"
                  ;;
              openbsd)
                  NASMFLAGS="-f aoutb"
                  ;;
              *)
                  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
}

CheckNANOX()
{
    # Check whether --enable-video-nanox or --disable-video-nanox was given.
if test "${enable_video_nanox+set}" = set; then
  enableval="$enable_video_nanox"

else
  enable_video_nanox=no
fi;
    # Check whether --enable-nanox-debug or --disable-nanox-debug was given.
if test "${enable_nanox_debug+set}" = set; then
  enableval="$enable_nanox_debug"

else
  enable_nanox_debug=no
fi;
    # Check whether --enable-nanox-share-memory or --disable-nanox-share-memory was given.
if test "${enable_nanox_share_memory+set}" = set; then
  enableval="$enable_nanox_share_memory"

else
  enable_nanox_share_memory=no
fi;
    # Check whether --enable-nanox_direct_fb or --disable-nanox_direct_fb was given.
if test "${enable_nanox_direct_fb+set}" = set; then
  enableval="$enable_nanox_direct_fb"

else
  enable_nanox_direct_fb=no
fi;

    if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
        if test x$enable_nanox_debug = xyes; then
            CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
        fi

        if test x$enable_nanox_share_memory = xyes; then
            CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
        fi

        if test x$enable_nanox_direct_fb = xyes; then
            CFLAGS="$CFLAGS -DENABLE_NANOX_DIRECT_FB"
        fi

        CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
        SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
        VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
        VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
    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
        echo "$as_me:6003: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6

# 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 test "${ac_cv_have_x+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  # 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 conftest.dir
fi

# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/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'

if test "$ac_x_includes" = no; then
  # Guess where to find include files, by looking for Intrinsic.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
#line 6100 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:6104: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:6110: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Intrinsic.h"; then
    ac_x_includes=$ac_dir
    break
  fi
done
fi
rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no

if test "$ac_x_libraries" = no; then
  # Check for the libraries.
  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-lXt $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
#line 6143 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
main ()
{
XtMalloc (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6155: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6158: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6161: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6164: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
  # Don't even attempt the hair of trying to link an X program!
  for ac_extension in a so sl; do
    if test -r $ac_dir/libXt.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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 "$as_me:6202: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&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 "$as_me:6212: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&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 "$as_me:6236: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
      cat >conftest.$ac_ext <<_ACEOF
#line 6240 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6252: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6255: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6258: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6261: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_nospace=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      if test $ac_R_nospace = yes; then
	echo "$as_me:6271: result: no" >&5
echo "${ECHO_T}no" >&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<_ACEOF
#line 6277 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6289: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6292: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6295: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6298: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_space=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	if test $ac_R_space = yes; then
	  echo "$as_me:6308: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:6312: result: neither works" >&5
echo "${ECHO_T}neither works" >&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 says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And Karl Berry says
    # the Alpha needs dnet_stub (dnet does not exist).
    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
    cat >conftest.$ac_ext <<_ACEOF
#line 6332 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6351: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6354: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6357: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6360: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:6366: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6374 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6393: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6396: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6399: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6402: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6413: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo "$as_me:6420: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6428 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6447: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6450: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6453: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6456: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6467: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    LIBS="$ac_xsave_LIBS"

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # Chad R. Larson 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 T.E. Dickey.
    # The functions gethostbyname, getservbyname, and inet_addr are
    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
    echo "$as_me:6486: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6492 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
char (*f) ();

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
f = gethostbyname;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6523: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6526: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6529: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6532: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6542: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then
      echo "$as_me:6546: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6554 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6573: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6576: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6579: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6582: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6593: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
        echo "$as_me:6600: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6608 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6627: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6630: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6633: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6636: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6647: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi

      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 Leinen: 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 "$as_me:6663: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6669 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
char (*f) ();

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
f = connect;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6700: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6703: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6706: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6709: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6719: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then
      echo "$as_me:6723: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6731 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6750: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6753: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6756: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6759: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6770: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    echo "$as_me:6779: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6785 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char remove ();
char (*f) ();

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
f = remove;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6819: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6822: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6825: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6835: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then
      echo "$as_me:6839: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6847 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6866: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6869: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6872: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6875: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_posix_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:6886: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo "$as_me:6895: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6901 "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.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shmat ();
char (*f) ();

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
f = shmat;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6935: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6938: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6941: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6951: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then
      echo "$as_me:6955: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 6963 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6982: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6985: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6988: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6991: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7002: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
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.
  # John Interrante, Karl Berry
  echo "$as_me:7020: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7028 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7047: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7050: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7053: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7056: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7067: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi

        if test x$have_x = xyes; then
            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -I$srcdir/include -I$srcdir/src/video"
            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 "$as_me:7094: checking for XFree86 VidMode 1.0 support" >&5
echo $ECHO_N "checking for XFree86 VidMode 1.0 support... $ECHO_C" >&6
                video_x11_vm=no
                cat >conftest.$ac_ext <<_ACEOF
#line 7098 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <XFree86/extensions/xf86vmode.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7113: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7116: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7119: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7122: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                video_x11_vm=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:7132: result: $video_x11_vm" >&5
echo "${ECHO_T}$video_x11_vm" >&6
                if test x$video_x11_vm = xyes; then
                    CFLAGS="$CFLAGS -DXFREE86_VM"
                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
                    echo "$as_me:7138: checking for XFree86 VidMode gamma support" >&5
echo $ECHO_N "checking for XFree86 VidMode gamma support... $ECHO_C" >&6
                    video_x11_vmgamma=no
                    cat >conftest.$ac_ext <<_ACEOF
#line 7142 "configure"
#include "confdefs.h"

                     #include <X11/Xlib.h>
                     #include <XFree86/extensions/xf86vmode.h>

int
main ()
{

                     SDL_NAME(XF86VidModeGamma) gamma;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7159: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7162: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7165: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7168: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                    video_x11_vmgamma=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                    echo "$as_me:7178: result: $video_x11_vmgamma" >&5
echo "${ECHO_T}$video_x11_vmgamma" >&6
                    if test x$video_x11_vmgamma = xyes; then
                        CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
                    fi
                fi
            fi
            # Check whether --enable-dga or --disable-dga was given.
if test "${enable_dga+set}" = set; then
  enableval="$enable_dga"

else
  enable_dga=yes
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;
            if test x$enable_dga = xyes; then
                echo "$as_me:7200: checking for XFree86 DGA 1.0 support" >&5
echo $ECHO_N "checking for XFree86 DGA 1.0 support... $ECHO_C" >&6
                video_x11_dga=no
                cat >conftest.$ac_ext <<_ACEOF
#line 7204 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <XFree86/extensions/xf86dga.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7219: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7222: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7225: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7228: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                video_x11_dga=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:7238: result: $video_x11_dga" >&5
echo "${ECHO_T}$video_x11_dga" >&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
                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
                fi
            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 "$as_me:7257: checking for XFree86 XvImage support" >&5
echo $ECHO_N "checking for XFree86 XvImage support... $ECHO_C" >&6
                video_x11_xv=no
                cat >conftest.$ac_ext <<_ACEOF
#line 7261 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <sys/ipc.h>
                 #include <sys/shm.h>
                 #include <X11/extensions/XShm.h>
                 #include <XFree86/extensions/Xvlib.h>

int
main ()
{

                 SDL_NAME(XvImage) *image;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7281: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7284: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7287: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7290: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                video_x11_xv=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:7300: result: $video_x11_xv" >&5
echo "${ECHO_T}$video_x11_xv" >&6
                if test x$video_x11_xv = xyes; then
                    CFLAGS="$CFLAGS -DXFREE86_XV"
                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
                fi
            fi
            # Check whether --enable-video-x11-xinerama or --disable-video-x11-xinerama was given.
if test "${enable_video_x11_xinerama+set}" = set; then
  enableval="$enable_video_x11_xinerama"

else
  enable_video_x11_xinerama=yes
fi;
            if test x$enable_video_x11_xinerama = xyes; then
                echo "$as_me:7316: checking for X11 Xinerama support" >&5
echo $ECHO_N "checking for X11 Xinerama support... $ECHO_C" >&6
                video_x11_xinerama=no
                cat >conftest.$ac_ext <<_ACEOF
#line 7320 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <XFree86/extensions/Xinerama.h>

int
main ()
{

                 SDL_NAME(XineramaScreenInfo) *xinerama;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7340: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7343: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7346: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                video_x11_xinerama=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:7356: result: $video_x11_xinerama" >&5
echo "${ECHO_T}$video_x11_xinerama" >&6
                if test x$video_x11_xinerama = xyes; then
                    CFLAGS="$CFLAGS -DHAVE_XINERAMA"
                    VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
                    VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
                fi
            fi
            # Check whether --enable-video-x11-xme or --disable-video-x11-xme was given.
if test "${enable_video_x11_xme+set}" = set; then
  enableval="$enable_video_x11_xme"

else
  enable_video_x11_xme=yes
fi;
            if test x$enable_video_x11_xme = xyes; then
                echo "$as_me:7372: checking for Xi Graphics XiGMiscExtension support" >&5
echo $ECHO_N "checking for Xi Graphics XiGMiscExtension support... $ECHO_C" >&6
                video_x11_xme=no
                cat >conftest.$ac_ext <<_ACEOF
#line 7376 "configure"
#include "confdefs.h"

                 #include <X11/Xlib.h>
                 #include <X11/extensions/xme.h>

int
main ()
{

                 XiGMiscResolutionInfo *resolutions;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7393: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7396: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7399: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7402: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                video_x11_xme=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:7412: result: $video_x11_xme" >&5
echo "${ECHO_T}$video_x11_xme" >&6
                if test x$video_x11_xme = xyes; then
                    CFLAGS="$CFLAGS -DHAVE_XIGXME"
                    SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
                fi
            fi
        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
        save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
        echo "$as_me:7434: checking for XFree86 DGA 2.0 support" >&5
echo $ECHO_N "checking for XFree86 DGA 2.0 support... $ECHO_C" >&6
        video_x11_dga2=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7438 "configure"
#include "confdefs.h"

         #include <X11/Xlib.h>
         #include <XFree86/extensions/xf86dga.h>

int
main ()
{

         SDL_NAME(XDGAEvent) xevent;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7455: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7458: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7461: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7464: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_x11_dga2=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7474: result: $video_x11_dga2" >&5
echo "${ECHO_T}$video_x11_dga2" >&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
}

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 "$as_me:7494: checking for QNX Photon support" >&5
echo $ECHO_N "checking for QNX Photon support... $ECHO_C" >&6
        video_photon=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7498 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7517: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7520: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7523: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7526: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_photon=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7536: result: $video_photon" >&5
echo "${ECHO_T}$video_photon" >&6
        if test x$video_photon = xyes; then
            CFLAGS="$CFLAGS -DENABLE_PHOTON"
            SYSTEM_LIBS="$SYSTEM_LIBS -lph"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
            VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
            CheckOpenGLQNX
        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 "$as_me:7558: checking for framebuffer console support" >&5
echo $ECHO_N "checking for framebuffer console support... $ECHO_C" >&6
        video_fbcon=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7562 "configure"
#include "confdefs.h"

         #include <linux/fb.h>
         #include <linux/kd.h>
         #include <linux/keyboard.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7578: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7581: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7584: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7587: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_fbcon=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7597: result: $video_fbcon" >&5
echo "${ECHO_T}$video_fbcon" >&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
}

CheckDirectFB()
{
    # Check whether --enable-video-directfb or --disable-video-directfb was given.
if test "${enable_video_directfb+set}" = set; then
  enableval="$enable_video_directfb"

else
  enable_video_directfb=yes
fi;
    if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
        video_directfb=no

        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo "$as_me:7621: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:7638: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG

if test -n "$PKG_CONFIG"; then
  echo "$as_me:7650: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6
else
  echo "$as_me:7653: result: no" >&5
echo "${ECHO_T}no" >&6
fi

        if test x$PKG_CONFIG = xno ; then
            { echo "$as_me:7658: WARNING: *** pkg-config is required to build the DirectFB video driver." >&5
echo "$as_me: WARNING: *** pkg-config is required to build the DirectFB video driver." >&2;}
        else
            echo "$as_me:7661: checking for DirectFB support" >&5
echo $ECHO_N "checking for DirectFB support... $ECHO_C" >&6

            if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
                { { echo "$as_me:7665: error: *** pkg-config too old; version 0.7 or better required." >&5
echo "$as_me: error: *** pkg-config too old; version 0.7 or better required." >&2;}
   { (exit 1); exit 1; }; }
            fi

            DIRECTFB_REQUIRED_VERSION=0.9.14

            if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
                DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
                DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
                video_directfb=yes
            fi
        fi

        echo "$as_me:7679: result: $video_directfb" >&5
echo "${ECHO_T}$video_directfb" >&6
        if test x$video_directfb = xyes; then
            CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
            VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"

        fi
    fi
}

CheckPS2GS()
{
    # Check whether --enable-video-ps2gs or --disable-video-ps2gs was given.
if test "${enable_video_ps2gs+set}" = set; then
  enableval="$enable_video_ps2gs"

else
  enable_video_ps2gs=yes
fi;
    if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
        echo "$as_me:7700: checking for PlayStation 2 GS support" >&5
echo $ECHO_N "checking for PlayStation 2 GS support... $ECHO_C" >&6
        video_ps2gs=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7704 "configure"
#include "confdefs.h"

         #include <linux/ps2/dev.h>
         #include <linux/ps2/gs.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7719: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7722: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7725: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7728: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_ps2gs=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7738: result: $video_ps2gs" >&5
echo "${ECHO_T}$video_ps2gs" >&6
        if test x$video_ps2gs = xyes; then
            CFLAGS="$CFLAGS -DENABLE_PS2GS"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
            VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.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 "$as_me:7758: checking for GGI support" >&5
echo $ECHO_N "checking for GGI support... $ECHO_C" >&6
        video_ggi=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7762 "configure"
#include "confdefs.h"

         #include <ggi/ggi.h>
         #include <ggi/gii.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7777: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7780: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7783: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7786: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_ggi=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7796: result: $video_ggi" >&5
echo "${ECHO_T}$video_ggi" >&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 "$as_me:7818: checking for SVGAlib (1.4.0+) support" >&5
echo $ECHO_N "checking for SVGAlib (1.4.0+) support... $ECHO_C" >&6
        video_svga=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7822 "configure"
#include "confdefs.h"

         #include <vga.h>
         #include <vgamouse.h>
         #include <vgakeyboard.h>

int
main ()
{

         if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
             exit(0);
         }

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7845: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7848: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7851: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_svga=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7861: result: $video_svga" >&5
echo "${ECHO_T}$video_svga" >&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
}

CheckVGL()
{
    # Check whether --enable-video-vgl or --disable-video-vgl was given.
if test "${enable_video_vgl+set}" = set; then
  enableval="$enable_video_vgl"

else
  enable_video_vgl=no
fi;
    if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
        echo "$as_me:7883: checking for libVGL support" >&5
echo $ECHO_N "checking for libVGL support... $ECHO_C" >&6
        video_vgl=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7887 "configure"
#include "confdefs.h"

         #include <sys/fbio.h>
         #include <sys/consio.h>
         #include <sys/kbio.h>
         #include <vgl.h>

int
main ()
{

         VGLBitmap bitmap;
         exit(bitmap.Bitmap);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7910: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7913: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7916: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_vgl=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7926: result: $video_vgl" >&5
echo "${ECHO_T}$video_vgl" >&6
        if test x$video_vgl = xyes; then
            CFLAGS="$CFLAGS -DENABLE_VGL"
            SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"

            VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
            VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.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 "$as_me:7948: checking for AAlib support" >&5
echo $ECHO_N "checking for AAlib support... $ECHO_C" >&6
        video_aalib=no
        cat >conftest.$ac_ext <<_ACEOF
#line 7952 "configure"
#include "confdefs.h"

         #include <aalib.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7966: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7969: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7972: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7975: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_aalib=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:7985: result: $video_aalib" >&5
echo "${ECHO_T}$video_aalib" >&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
}

CheckAtariXbiosVideo()
{
    # Check whether --enable-xbios or --disable-xbios was given.
if test "${enable_xbios+set}" = set; then
  enableval="$enable_xbios"

else
  enable_video_xbios=yes
fi;
    video_xbios=no
    if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
        video_xbios=yes
        CFLAGS="$CFLAGS -DENABLE_XBIOS"
        VIDEO_SUBDIRS="$VIDEO_SUBDIRS xbios"
        VIDEO_DRIVERS="$VIDEO_DRIVERS xbios/libvideo_xbios.la"
    fi
}

CheckAtariGemVideo()
{
    # Check whether --enable-gem or --disable-gem was given.
if test "${enable_gem+set}" = set; then
  enableval="$enable_gem"

else
  enable_video_gem=yes
fi;
    if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
        video_gem=no
        echo "$as_me:8026: checking for gem.h" >&5
echo $ECHO_N "checking for gem.h... $ECHO_C" >&6
if test "${ac_cv_header_gem_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8032 "configure"
#include "confdefs.h"
#include <gem.h>
_ACEOF
if { (eval echo "$as_me:8036: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:8042: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_gem_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_gem_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:8061: result: $ac_cv_header_gem_h" >&5
echo "${ECHO_T}$ac_cv_header_gem_h" >&6
if test $ac_cv_header_gem_h = yes; then
  have_gem_hdr=yes
fi

        echo "$as_me:8067: checking for appl_init in -lgem" >&5
echo $ECHO_N "checking for appl_init in -lgem... $ECHO_C" >&6
if test "${ac_cv_lib_gem_appl_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgem  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8075 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char appl_init ();
int
main ()
{
appl_init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8094: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8097: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8100: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8103: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gem_appl_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_gem_appl_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8114: result: $ac_cv_lib_gem_appl_init" >&5
echo "${ECHO_T}$ac_cv_lib_gem_appl_init" >&6
if test $ac_cv_lib_gem_appl_init = yes; then
  have_gem_lib=yes
fi

        if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
            video_gem=yes
            CFLAGS="$CFLAGS -DENABLE_GEM"
            SYSTEM_LIBS="$SYSTEM_LIBS -lgem"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS gem"
            VIDEO_DRIVERS="$VIDEO_DRIVERS gem/libvideo_gem.la"
        fi
    fi
}

CheckAtariBiosEvent()
{
    CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/ataricommon"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS ataricommon"
    VIDEO_DRIVERS="$VIDEO_DRIVERS ataricommon/libvideo_ataricommon.la"
}

CheckDummyVideo()
{
    # Check whether --enable-video-dummy or --disable-video-dummy was given.
if test "${enable_video_dummy+set}" = set; then
  enableval="$enable_video_dummy"

else
  enable_video_dummy=yes
fi;
    if test x$enable_video_dummy = xyes; then
      CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
      VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
      VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
    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 "$as_me:8164: checking for OpenGL (GLX) support" >&5
echo $ECHO_N "checking for OpenGL (GLX) support... $ECHO_C" >&6
        video_opengl=no
        cat >conftest.$ac_ext <<_ACEOF
#line 8168 "configure"
#include "confdefs.h"

         #include <GL/gl.h>
         #include <GL/glx.h>
         #include <dlfcn.h> /* For loading extensions */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8184: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8187: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8190: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8193: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_opengl=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:8203: result: $video_opengl" >&5
echo "${ECHO_T}$video_opengl" >&6
        if test x$video_opengl = xyes; then
            CFLAGS="$CFLAGS -DHAVE_OPENGL"
            if test x$use_dlopen != xyes; then
                echo "$as_me:8208: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8216 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8238: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8241: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8244: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8255: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
  SYSTEM_LIBS="$SYSTEM_LIBS -ldl"
fi

            fi
        fi
    fi
}

CheckOpenGLQNX()
{
    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
        echo "$as_me:8269: checking for OpenGL (Photon) support" >&5
echo $ECHO_N "checking for OpenGL (Photon) support... $ECHO_C" >&6
        video_opengl=no
        cat >conftest.$ac_ext <<_ACEOF
#line 8273 "configure"
#include "confdefs.h"

         #include <GL/gl.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8287: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8290: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8293: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8296: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_opengl=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:8306: result: $video_opengl" >&5
echo "${ECHO_T}$video_opengl" >&6
        if test x$video_opengl = xyes; then
            CFLAGS="$CFLAGS -DHAVE_OPENGL"
            SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
        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*)
                SYSTEM_LIBS="$SYSTEM_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 "$as_me:8344: checking for Linux 2.4 unified input interface" >&5
echo $ECHO_N "checking for Linux 2.4 unified input interface... $ECHO_C" >&6
        use_input_events=no
        cat >conftest.$ac_ext <<_ACEOF
#line 8348 "configure"
#include "confdefs.h"

          #include <linux/input.h>

int
main ()
{

          #ifndef EVIOCGNAME
          #error EVIOCGNAME() ioctl not available
          #endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8366: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8369: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8372: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8375: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        use_input_events=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:8385: result: $use_input_events" >&5
echo "${ECHO_T}$use_input_events" >&6
        if test x$use_input_events = xyes; then
            CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
        fi
    fi
}

CheckPTH()
{
        # Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"

else
  enable_pth=yes
fi;
    if test x$enable_threads = xyes -a x$enable_pth = xyes; then
        # Extract the first word of "pth-config", so it can be a program name with args.
set dummy pth-config; ac_word=$2
echo "$as_me:8405: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PTH_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PTH_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_PTH_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:8422: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_PTH_CONFIG" && ac_cv_path_PTH_CONFIG="no"
  ;;
esac
fi
PTH_CONFIG=$ac_cv_path_PTH_CONFIG

if test -n "$PTH_CONFIG"; then
  echo "$as_me:8434: result: $PTH_CONFIG" >&5
echo "${ECHO_T}$PTH_CONFIG" >&6
else
  echo "$as_me:8437: result: no" >&5
echo "${ECHO_T}no" >&6
fi

        if test "$PTH_CONFIG" = "no"; then
            use_pth=no
        else
            PTH_CFLAGS=`$PTH_CONFIG --cflags`
            PTH_LIBS=`$PTH_CONFIG --libs --all`
            SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
            SDL_LIBS="$SDL_LIBS $PTH_LIBS"
            CFLAGS="$CFLAGS -DENABLE_PTH"
            use_pth=yes
        fi
        echo "$as_me:8451: checking pth" >&5
echo $ECHO_N "checking pth... $ECHO_C" >&6
        if test "x$use_pth" = xyes; then
            echo "$as_me:8454: result: yes" >&5
echo "${ECHO_T}yes" >&6
        else
            echo "$as_me:8457: result: no" >&5
echo "${ECHO_T}no" >&6
        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;
    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"
            ;;
        *-*-netbsd*)
            pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
            pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
            ;;
        *-*-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"
            ;;
        *-*-hpux11*)
            pthread_cflags="-D_REENTRANT"
            pthread_lib="-L/usr/lib -lpthread"
            ;;
        *-*-qnx*)
            pthread_cflags=""
            pthread_lib=""
            ;;
        *)
            pthread_cflags="-D_REENTRANT"
            pthread_lib="-lpthread"
            ;;
    esac
    if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
        # Save the original compiler flags and libraries
        ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
        # Add the pthread compiler flags and libraries
        CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
        # Check to see if we have pthread support on this system
        echo "$as_me:8536: checking for pthreads" >&5
echo $ECHO_N "checking for pthreads... $ECHO_C" >&6
        use_pthreads=no
        cat >conftest.$ac_ext <<_ACEOF
#line 8540 "configure"
#include "confdefs.h"

         #include <pthread.h>

int
main ()
{

         pthread_attr_t type;
         pthread_attr_init(&type);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8557: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8560: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8563: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8566: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        use_pthreads=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        echo "$as_me:8576: result: $use_pthreads" >&5
echo "${ECHO_T}$use_pthreads" >&6
        # Restore the compiler flags and libraries
        CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
        # Do futher testing if we have pthread support...
        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 "$as_me:8587: checking for recursive mutexes" >&5
echo $ECHO_N "checking for recursive mutexes... $ECHO_C" >&6
            has_recursive_mutexes=no
            cat >conftest.$ac_ext <<_ACEOF
#line 8591 "configure"
#include "confdefs.h"

              #include <pthread.h>

int
main ()
{

              pthread_mutexattr_t attr;
              #if defined(linux) && !(defined(__arm__) && defined(QWS))
              pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
              #else
              pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
              #endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8612: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8615: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8618: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8621: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            has_recursive_mutexes=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
            # Some systems have broken recursive mutex implementations
            case "$target" in
                *-*-darwin*)
                    has_recursive_mutexes=no
                    ;;
                *-*-solaris*)
                    has_recursive_mutexes=no
                    ;;
            esac
            echo "$as_me:8640: result: $has_recursive_mutexes" >&5
echo "${ECHO_T}$has_recursive_mutexes" >&6
            if test x$has_recursive_mutexes != xyes; then
                CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
            fi

            # Check to see if pthread semaphore support is missing
            if test x$enable_pthread_sem = xyes; then
                echo "$as_me:8648: checking for pthread semaphores" >&5
echo $ECHO_N "checking for pthread semaphores... $ECHO_C" >&6
                have_pthread_sem=no
                cat >conftest.$ac_ext <<_ACEOF
#line 8652 "configure"
#include "confdefs.h"

                  #include <pthread.h>
                  #include <semaphore.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8667: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8670: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8673: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8676: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                have_pthread_sem=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                echo "$as_me:8686: result: $have_pthread_sem" >&5
echo "${ECHO_T}$have_pthread_sem" >&6
            fi

            # Check to see if this is broken glibc 2.0 pthreads
            case "$target" in
                *-*-linux*)
                    echo "$as_me:8693: checking for broken glibc 2.0 pthreads" >&5
echo $ECHO_N "checking for broken glibc 2.0 pthreads... $ECHO_C" >&6
                    glibc20_pthreads=no
                    cat >conftest.$ac_ext <<_ACEOF
#line 8697 "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;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8716: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8719: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8722: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8725: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

                    glibc20_pthreads=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
                    echo "$as_me:8735: result: $glibc20_pthreads" >&5
echo "${ECHO_T}$glibc20_pthreads" >&6
            esac
        fi
    fi

    echo "$as_me:8741: checking whether semun is defined in /usr/include/sys/sem.h" >&5
echo $ECHO_N "checking whether semun is defined in /usr/include/sys/sem.h... $ECHO_C" >&6
    have_semun=no
    cat >conftest.$ac_ext <<_ACEOF
#line 8745 "configure"
#include "confdefs.h"

      #include <sys/types.h>
      #include <sys/sem.h>

int
main ()
{

      union semun t;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:8762: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:8765: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:8768: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8771: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    have_semun=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
    echo "$as_me:8781: result: $have_semun" >&5
echo "${ECHO_T}$have_semun" >&6
    if test x$have_semun = xyes; then
        CFLAGS="$CFLAGS -DHAVE_SEMUN"
    fi

    # See if we can use GNU Pth or clone() on Linux directly
    if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
        CheckPTH
        if test x$use_pth != xyes; then
            case "$target" in
                *-*-linux*)
                    use_clone=yes
                    ;;
            esac
        fi
    fi
}

# Note that we need to have either semaphores or to have mutexes and
# condition variables to implement all thread synchronization primitives
CopyUnixThreadSource()
{
    if test x$use_pthreads = xyes -o x$use_clone = xyes; then
        # Basic thread creation functions

  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

        if test x$use_clone = 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.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

        # Semaphores
        # We can fake these with mutexes and condition variables if necessary
        if test x$use_pthreads = xyes -a x$have_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

        # Mutexes
        # We can fake these with semaphores if necessary
        case "$target" in
            *-*-bsdi*)

  echo "Copying src/thread/bsdi/SDL_syssem.c -> src/thread/SDL_syssem.c"
  old="$srcdir/src/thread/bsdi/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

                ;;
            *)
                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

                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

                fi
                ;;
        esac

        # Condition variables
        # We can fake these with semaphores and mutexes if necessary
        if test x$glibc20_pthreads = xyes -o x$has_recursive_mutexes != xyes; then

  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

        else

  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

        fi

  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

    elif test x$use_pth = xyes; then

  echo "Copying src/thread/pth/SDL_systhread.c -> src/thread/SDL_systhread.c"
  old="$srcdir/src/thread/pth/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/pth/SDL_systhread_c.h -> src/thread/SDL_systhread_c.h"
  old="$srcdir/src/thread/pth/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/pth/SDL_sysmutex.c -> src/thread/SDL_sysmutex.c"
  old="$srcdir/src/thread/pth/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/pth/SDL_sysmutex_c.h -> src/thread/SDL_sysmutex_c.h"
  old="$srcdir/src/thread/pth/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/pth/SDL_syscond.c -> src/thread/SDL_syscond.c"
  old="$srcdir/src/thread/pth/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/pth/SDL_syscond_c.h -> src/thread/SDL_syscond_c.h"
  old="$srcdir/src/thread/pth/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

  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

    else
       { { echo "$as_me:9075: error:
*** No thread support detected
       " >&5
echo "$as_me: error:
*** No thread support detected
       " >&2;}
   { (exit 1); exit 1; }; }
    fi
}

CheckWIN32()
{
    echo "$as_me:9087: checking Win32 compiler" >&5
echo $ECHO_N "checking Win32 compiler... $ECHO_C" >&6
    have_win32_gcc=no
    cat >conftest.$ac_ext <<_ACEOF
#line 9091 "configure"
#include "confdefs.h"

     #include <windows.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9105: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9108: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9111: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9114: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

    have_win32_gcc=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
    echo "$as_me:9124: result: $have_win32_gcc" >&5
echo "${ECHO_T}$have_win32_gcc" >&6
    if test x$have_win32_gcc != xyes; then
       { { echo "$as_me:9127: error:
*** Your compiler ($CC) does not produce Win32 executables!
       " >&5
echo "$as_me: error:
*** Your compiler ($CC) does not produce Win32 executables!
       " >&2;}
   { (exit 1); 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 "$as_me:9158: checking for DirectX headers and libraries" >&5
echo $ECHO_N "checking for DirectX headers and libraries... $ECHO_C" >&6
        use_directx=no
        cat >conftest.$ac_ext <<_ACEOF
#line 9162 "configure"
#include "confdefs.h"

         #include "src/video/windx5/directx.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9176: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9179: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9182: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9185: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        use_directx=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:9195: result: $use_directx" >&5
echo "${ECHO_T}$use_directx" >&6
    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"
}

CheckQtopia()
{
    # Check whether --enable-video-qtopia or --disable-video-qtopia was given.
if test "${enable_video_qtopia+set}" = set; then
  enableval="$enable_video_qtopia"

else
  enable_video_qtopia=no
fi;
    if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
        echo "$as_me:9233: checking for Qtopia support" >&5
echo $ECHO_N "checking for Qtopia support... $ECHO_C" >&6
        video_qtopia=no
        ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

        OLD_CXX="$CXXFLAGS"
        CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"

cat >conftest.$ac_ext <<_ACEOF
#line 9246 "configure"
#include "confdefs.h"

         #include <qpe/qpeapplication.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9260: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9263: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9266: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9269: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_qtopia=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        CXXFLAGS="$OLD_CXX"
        echo "$as_me:9280: result: $video_qtopia" >&5
echo "${ECHO_T}$video_qtopia" >&6
        if test x$video_qtopia = xyes; then
            CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
            SDL_LIBS="$SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
            VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
        fi
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
}

CheckPicoGUI()
{
    # Check whether --enable-video-picogui or --disable-video-picogui was given.
if test "${enable_video_picogui+set}" = set; then
  enableval="$enable_video_picogui"

else
  enable_video_picogui=no
fi;
    if test x$enable_video = xyes -a x$enable_video_picogui = xyes; then
        echo "$as_me:9307: checking for PicoGUI support" >&5
echo $ECHO_N "checking for PicoGUI support... $ECHO_C" >&6
        video_picogui=no
        cat >conftest.$ac_ext <<_ACEOF
#line 9311 "configure"
#include "confdefs.h"

         #include <picogui.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9325: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9328: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9331: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9334: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        video_picogui=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:9344: result: $video_picogui" >&5
echo "${ECHO_T}$video_picogui" >&6
        if test x$video_picogui = xyes; then
	    SDL_LIBS="$SDL_LIBS -lpgui"
            CFLAGS="$CFLAGS -DENABLE_PICOGUI"
            VIDEO_SUBDIRS="$VIDEO_SUBDIRS picogui"
            VIDEO_DRIVERS="$VIDEO_DRIVERS picogui/libvideo_picogui.la"
        fi
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
}

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"
}

CheckQUARTZ()
{
    # "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 \
      -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
      -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
    VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
    VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
}

CheckDLOPEN()
{
    # Check whether --enable-dlopen or --disable-dlopen was given.
if test "${enable_dlopen+set}" = set; then
  enableval="$enable_dlopen"

else
  enable_dlopen=no
fi;
    if test x$enable_dlopen = xyes; then
        echo "$as_me:9410: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
        use_dlopen=no
        cat >conftest.$ac_ext <<_ACEOF
#line 9414 "configure"
#include "confdefs.h"

         #include <dlfcn.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9428: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9431: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9434: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9437: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        use_dlopen=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:9447: result: $use_dlopen" >&5
echo "${ECHO_T}$use_dlopen" >&6

        if test x$use_dlopen = xyes; then
            CFLAGS="$CFLAGS -DUSE_DLOPEN"
            echo "$as_me:9452: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9460 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9479: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9482: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9485: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9488: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9499: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
  SYSTEM_LIBS="$SYSTEM_LIBS -ldl"
fi

        fi
    fi
}

CheckUSBHID()
{
    if test x$enable_joystick = xyes; then
        have_libusbhid=no
        have_libusb=no
        echo "$as_me:9514: checking for hid_init in -lusbhid" >&5
echo $ECHO_N "checking for hid_init in -lusbhid... $ECHO_C" >&6
if test "${ac_cv_lib_usbhid_hid_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lusbhid  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9522 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char hid_init ();
int
main ()
{
hid_init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9541: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9544: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9547: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9550: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_usbhid_hid_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_usbhid_hid_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9561: result: $ac_cv_lib_usbhid_hid_init" >&5
echo "${ECHO_T}$ac_cv_lib_usbhid_hid_init" >&6
if test $ac_cv_lib_usbhid_hid_init = yes; then
  have_libusbhid=yes
fi

        echo "$as_me:9567: checking for hid_init in -lusb" >&5
echo $ECHO_N "checking for hid_init in -lusb... $ECHO_C" >&6
if test "${ac_cv_lib_usb_hid_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lusb  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9575 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char hid_init ();
int
main ()
{
hid_init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9594: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9597: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9600: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9603: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_usb_hid_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_usb_hid_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9614: result: $ac_cv_lib_usb_hid_init" >&5
echo "${ECHO_T}$ac_cv_lib_usb_hid_init" >&6
if test $ac_cv_lib_usb_hid_init = yes; then
  have_libusb=yes
fi

        if test x$have_libusbhid = xyes; then
            SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
        fi
        if test x$have_libusb = xyes; then
            SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
        fi

        echo "$as_me:9627: checking for usb.h" >&5
echo $ECHO_N "checking for usb.h... $ECHO_C" >&6
if test "${ac_cv_header_usb_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9633 "configure"
#include "confdefs.h"
#include <usb.h>
_ACEOF
if { (eval echo "$as_me:9637: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9643: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_usb_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_usb_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9662: result: $ac_cv_header_usb_h" >&5
echo "${ECHO_T}$ac_cv_header_usb_h" >&6
if test $ac_cv_header_usb_h = yes; then
  have_usb_h=yes
fi

        echo "$as_me:9668: checking for usbhid.h" >&5
echo $ECHO_N "checking for usbhid.h... $ECHO_C" >&6
if test "${ac_cv_header_usbhid_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9674 "configure"
#include "confdefs.h"
#include <usbhid.h>
_ACEOF
if { (eval echo "$as_me:9678: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9684: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_usbhid_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_usbhid_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9703: result: $ac_cv_header_usbhid_h" >&5
echo "${ECHO_T}$ac_cv_header_usbhid_h" >&6
if test $ac_cv_header_usbhid_h = yes; then
  have_usbhid_h=yes
fi

        echo "$as_me:9709: checking for libusb.h" >&5
echo $ECHO_N "checking for libusb.h... $ECHO_C" >&6
if test "${ac_cv_header_libusb_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9715 "configure"
#include "confdefs.h"
#include <libusb.h>
_ACEOF
if { (eval echo "$as_me:9719: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9725: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_libusb_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_libusb_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9744: result: $ac_cv_header_libusb_h" >&5
echo "${ECHO_T}$ac_cv_header_libusb_h" >&6
if test $ac_cv_header_libusb_h = yes; then
  have_libusb_h=yes
fi

        echo "$as_me:9750: checking for libusbhid.h" >&5
echo $ECHO_N "checking for libusbhid.h... $ECHO_C" >&6
if test "${ac_cv_header_libusbhid_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9756 "configure"
#include "confdefs.h"
#include <libusbhid.h>
_ACEOF
if { (eval echo "$as_me:9760: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9766: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_libusbhid_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_libusbhid_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9785: result: $ac_cv_header_libusbhid_h" >&5
echo "${ECHO_T}$ac_cv_header_libusbhid_h" >&6
if test $ac_cv_header_libusbhid_h = yes; then
  have_libusbhid_h=yes
fi

        if test x$have_usb_h = xyes; then
            CFLAGS="$CFLAGS -DHAVE_USB_H"
        fi
        if test x$have_usbhid_h = xyes; then
            CFLAGS="$CFLAGS -DHAVE_USBHID_H"
        fi
        if test x$have_libusb_h = xyes; then
            CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
        fi
        if test x$have_libusbhid_h = xyes; then
            CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
        fi

        echo "$as_me:9804: checking for usbhid" >&5
echo $ECHO_N "checking for usbhid... $ECHO_C" >&6
        have_usbhid=no
        cat >conftest.$ac_ext <<_ACEOF
#line 9808 "configure"
#include "confdefs.h"

          #include <sys/types.h>
          #if defined(HAVE_USB_H)
          #include <usb.h>
          #endif
          #include <dev/usb/usb.h>
          #include <dev/usb/usbhid.h>
          #if defined(HAVE_USBHID_H)
          #include <usbhid.h>
          #elif defined(HAVE_LIBUSB_H)
          #include <libusb.h>
          #elif defined(HAVE_LIBUSBHID_H)
          #include <libusbhid.h>
          #endif

int
main ()
{

          struct report_desc *repdesc;
          struct usb_ctl_report *repbuf;
          hid_kind_t hidkind;

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9838: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9841: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9844: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9847: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

        have_usbhid=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
        echo "$as_me:9857: result: $have_usbhid" >&5
echo "${ECHO_T}$have_usbhid" >&6

        if test x$have_usbhid = xyes; then
            echo "$as_me:9861: checking for ucr_data member of usb_ctl_report" >&5
echo $ECHO_N "checking for ucr_data member of usb_ctl_report... $ECHO_C" >&6
            have_usbhid_ucr_data=no
            cat >conftest.$ac_ext <<_ACEOF
#line 9865 "configure"
#include "confdefs.h"

              #include <sys/types.h>
              #if defined(HAVE_USB_H)
              #include <usb.h>
              #endif
              #include <dev/usb/usb.h>
              #include <dev/usb/usbhid.h>
              #if defined(HAVE_USBHID_H)
              #include <usbhid.h>
              #elif defined(HAVE_LIBUSB_H)
              #include <libusb.h>
              #elif defined(HAVE_LIBUSBHID_H)
              #include <libusbhid.h>
              #endif

int
main ()
{

              struct usb_ctl_report buf;
              if (buf.ucr_data) { }

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9894: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9897: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9900: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9903: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            have_usbhid_ucr_data=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
            if test x$have_usbhid_ucr_data = xyes; then
                CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
            fi
            echo "$as_me:9916: result: $have_usbhid_ucr_data" >&5
echo "${ECHO_T}$have_usbhid_ucr_data" >&6

	    echo "$as_me:9919: checking for new usbhid API" >&5
echo $ECHO_N "checking for new usbhid API... $ECHO_C" >&6
            have_usbhid_new=no
            cat >conftest.$ac_ext <<_ACEOF
#line 9923 "configure"
#include "confdefs.h"

              #include <sys/types.h>
              #if defined(HAVE_USB_H)
              #include <usb.h>
              #endif
              #include <dev/usb/usb.h>
              #include <dev/usb/usbhid.h>
              #if defined(HAVE_USBHID_H)
              #include <usbhid.h>
              #elif defined(HAVE_LIBUSB_H)
              #include <libusb.h>
              #elif defined(HAVE_LIBUSBHID_H)
              #include <libusbhid.h>
              #endif

int
main ()
{

              report_desc_t d;
	      hid_start_parse(d, 1, 1);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:9952: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:9955: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:9958: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9961: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

            have_usbhid_new=yes

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
            if test x$have_usbhid_new = xyes; then
                CFLAGS="$CFLAGS -DUSBHID_NEW"
            fi
            echo "$as_me:9974: result: $have_usbhid_new" >&5
echo "${ECHO_T}$have_usbhid_new" >&6

            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
        fi
    fi
}

case "$target" in
    *-*-linux*)
        ARCH=linux
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckNASM
        CheckOSS
        CheckALSA
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckNANOX
        CheckDGA
        CheckFBCON
        CheckDirectFB
        CheckPS2GS
        CheckGGI
        CheckSVGA
        CheckAAlib
        CheckQtopia
        CheckPicoGUI
        CheckOpenGL
        CheckInputEvents
        CheckPTHREAD
        # Set up files for the main() stub
        if test "x$video_qtopia" = "xyes"; then

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

          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
          SDL_LIBS="-lSDLmain $SDL_LIBS"
        else

  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

        fi
        # 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
        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
        #    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
            CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
            CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        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
        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
        #    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
            CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
            CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckVGL
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckDGA
        CheckSVGA
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        CheckUSBHID
        # 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
        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        #fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
            CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        CheckUSBHID
        # 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 -DSUNAUDIO_SUPPORT"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
            CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            if test x$use_pthreads = xyes; then
                CFLAGS="$CFLAGS -D_POSIX_THREAD_SYSCALL_SOFT=1"
            fi
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckNASM
        CheckOSS
        CheckARTSC
        CheckESD
        CheckNAS
        CheckX11
        CheckAAlib
        CheckOpenGL
        CheckPTHREAD
        CheckUSBHID
        # 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 -DOPENBSD_AUDIO_SUPPORT"
            AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
            AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
        fi
        # OpenBSD needs linking with ossaudio emulation library
        if test x$have_oss = xyes; then
            SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
            CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        # OpenBSD does not define "unix"
        CFLAGS="$CFLAGS -Dunix"
        ;;
    *-*-sysv5*)
        ARCH=sysv5
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        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
            CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
            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
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        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
            CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
            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
            CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
            CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckDMEDIA
        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

        # We use the dmedia audio API, not the Sun audio API
        #if test x$enable_audio = xyes; then
        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
        #    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
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            if test x$use_pthreads = xyes -o x$use_pth = xyes; then
                CopyUnixThreadSource
            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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckOSS
        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
            CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
            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
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        CheckOSS
        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
            CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
            CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        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
            CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
            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
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
        CheckDummyVideo
        CheckDiskAudio
        CheckDLOPEN
        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"
        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
            CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
            CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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
            if  "$BUILD_PREFIX" != "" ; then
                ac_default_prefix=$BUILD_PREFIX
            fi
        fi
        CheckDummyVideo
        CheckDiskAudio
        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
            CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
            CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
        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"
        case "$target" in
            *-*-cygwin*)
                CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
                SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
                LIBS="$LIBS -mno-cygwin"
                SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
                ;;
            *-*-mingw32*)
                SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
                ;;
        esac
        ;;
    *-*-beos*)
        ARCH=beos
        ac_default_prefix=/boot/develop/tools/gnupro
        CheckDummyVideo
        CheckDiskAudio
        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
            CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
            CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
        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
        CheckDummyVideo
        CheckDiskAudio
        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
            CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
            CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
        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 and Cocoa.
        # But config.guess comes back with "darwin", so go with the flow.
        ARCH=macosx
        CheckDummyVideo
        CheckDiskAudio
        CheckQUARTZ
        CheckMacGL
        CheckPTHREAD
        # Set up files for the main() stub

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

  echo "Copying src/main/macosx/SDLMain.h -> src/main/SDLMain.h"
  old="$srcdir/src/main/macosx/SDLMain.h"
  new="$srcdir/src/main/SDLMain.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 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 darwin"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la"
            SYSTEM_LIBS="$SYSTEM_LIBS -framework IOKit"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        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_LIBS="-lSDLmain $SDL_LIBS"
        # The Cocoa backend still needs Carbon, and the YUV code QuickTime
        SYSTEM_LIBS="$SYSTEM_LIBS -framework Cocoa -framework Carbon -framework QuickTime -framework ForceFeedback"
        ;;
    *-*-mint*)
        ARCH=mint
        CheckDummyVideo
        CheckDiskAudio
        CheckAtariBiosEvent
        CheckAtariXbiosVideo
        CheckAtariGemVideo
        CheckAtariAudio
        CheckPTH
        # 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_threads = xyes -a x$enable_pth = xyes; then
            if test x$enable_audio = xyes; then
                CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
                AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
                AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
            fi
        fi
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS mint"
            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS mint/libjoystick_mint.la"
        fi
        # Set up files for the cdrom library
        if test x$enable_cdrom = xyes; then
            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
        fi
        # Set up files for the thread library
        if test x$enable_threads = xyes; then
            CopyUnixThreadSource
        fi
        # Set up files for the timer library
        if test x$enable_timers = xyes; then

  echo "Copying src/timer/mint/SDL_systimer.c -> src/timer/SDL_systimer.c"
  old="$srcdir/src/timer/mint/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

  echo "Copying src/timer/mint/SDL_vbltimer.S -> src/timer/SDL_vbltimer.S"
  old="$srcdir/src/timer/mint/SDL_vbltimer.S"
  new="$srcdir/src/timer/SDL_vbltimer.S"
  cat >$new <<__EOF__
/* WARNING:  This file was automatically generated!
 * Original: $old
 */
__EOF__
  cat >>$new <$old

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

        fi
        # MiNT does not define "unix"
        CFLAGS="$CFLAGS -Dunix"
        ;;
    *)
        { { echo "$as_me:11438: error: Unsupported target:  Please add to configure.in" >&5
echo "$as_me: error: Unsupported target:  Please add to configure.in" >&2;}
   { (exit 1); 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 "x$video_qtopia" = "xyes"; then
  TARGET_QTOPIA_TRUE=
  TARGET_QTOPIA_FALSE='#'
else
  TARGET_QTOPIA_TRUE='#'
  TARGET_QTOPIA_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 = netbsd; then
  TARGET_NETBSD_TRUE=
  TARGET_NETBSD_FALSE='#'
else
  TARGET_NETBSD_TRUE='#'
  TARGET_NETBSD_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

if test $ARCH = macosx; then
  TARGET_MACOSX_TRUE=
  TARGET_MACOSX_FALSE='#'
else
  TARGET_MACOSX_TRUE='#'
  TARGET_MACOSX_FALSE=
fi

if test $ARCH = qnx; then
  TARGET_QNX_TRUE=
  TARGET_QNX_FALSE='#'
else
  TARGET_QNX_TRUE='#'
  TARGET_QNX_FALSE=
fi

if test $ARCH = mint; then
  TARGET_MINT_TRUE=
  TARGET_MINT_FALSE='#'
else
  TARGET_MINT_TRUE='#'
  TARGET_MINT_FALSE=
fi

# More automake conditionals

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

if test x$use_clone = xyes; then
  USE_CLONE_TRUE=
  USE_CLONE_FALSE='#'
else
  USE_CLONE_TRUE='#'
  USE_CLONE_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

case "$ARCH" in
  openbsd | netbsd | bsdi)
    SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
    ;;
  macosx)
    SHARED_SYSTEM_LIBS="-framework Cocoa"
    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
    fi
    ;;
  *)
    SHARED_SYSTEM_LIBS=""
    ;;
esac

STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"

if test x$enable_video = xtrue; then
    if test "$VIDEO_SUBDIRS" = ""; then
        { { echo "$as_me:11631: error: *** No video drivers are enabled!" >&5
echo "$as_me: error: *** No video drivers are enabled!" >&2;}
   { (exit 1); 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/video/XFree86/extensions"
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"

# Check for darwin at the very end and set up the Objective C compiler
# We do this here so that we get the full CFLAGS into OBJCFLAGS
case "$target" in
    *-*-darwin*)
        OBJC="cc"
        OBJCFLAGS="$CFLAGS"
        OBJCDEPMODE="$CCDEPMODE"

        ;;
esac

# Finally create all the generated files
ac_config_files="$ac_config_files Makefile docs/Makefile docs/html/Makefile docs/man3/Makefile include/Makefile src/Makefile src/main/Makefile src/main/macosx/Makefile src/main/macosx/Info.plist src/audio/Makefile src/audio/alsa/Makefile src/audio/arts/Makefile src/audio/baudio/Makefile src/audio/dc/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/openbsd/Makefile src/audio/paudio/Makefile src/audio/sun/Makefile src/audio/ums/Makefile src/audio/windib/Makefile src/audio/windx5/Makefile src/audio/disk/Makefile src/audio/mint/Makefile src/video/Makefile src/video/XFree86/Makefile src/video/XFree86/extensions/Makefile src/video/XFree86/Xinerama/Makefile src/video/XFree86/Xv/Makefile src/video/XFree86/Xxf86dga/Makefile src/video/XFree86/Xxf86vm/Makefile src/video/cybergfx/Makefile src/video/x11/Makefile src/video/dga/Makefile src/video/nanox/Makefile src/video/fbcon/Makefile src/video/directfb/Makefile src/video/ps2gs/Makefile src/video/ggi/Makefile src/video/maccommon/Makefile src/video/macdsp/Makefile src/video/macrom/Makefile src/video/quartz/Makefile src/video/svga/Makefile src/video/vgl/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/video/epoc/Makefile src/video/dummy/Makefile src/video/ataricommon/Makefile src/video/xbios/Makefile src/video/gem/Makefile src/video/dc/Makefile src/video/qtopia/Makefile src/video/picogui/Makefile src/events/Makefile src/joystick/Makefile src/joystick/amigaos/Makefile src/joystick/beos/Makefile src/joystick/bsd/Makefile src/joystick/darwin/Makefile src/joystick/dc/Makefile src/joystick/dummy/Makefile src/joystick/linux/Makefile src/joystick/macos/Makefile src/joystick/mint/Makefile src/joystick/win32/Makefile src/cdrom/Makefile src/cdrom/aix/Makefile src/cdrom/beos/Makefile src/cdrom/dc/Makefile src/cdrom/dummy/Makefile src/cdrom/bsdi/Makefile src/cdrom/freebsd/Makefile src/cdrom/linux/Makefile src/cdrom/macos/Makefile src/cdrom/openbsd/Makefile src/cdrom/qnx/Makefile src/cdrom/win32/Makefile src/thread/Makefile src/timer/Makefile src/endian/Makefile src/file/Makefile src/hermes/Makefile sdl-config SDL.spec"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then we branch to the quote section.  Otherwise,
# look for a macro that doesn't take arguments.
cat >confdef2opt.sed <<\EOF
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
t quote
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
t quote
d
: quote
s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
s,\[,\\&,g
s,\],\\&,g
s,\$,$$,g
p
EOF
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# line-breaks from the sub-command output.  A line-break within
# single-quotes doesn't work because, if this script is created in a
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT=`echo; echo .`
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f confdef2opt.sed

if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
  { { echo "$as_me:11774: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_LINUX_TRUE}" && test -z "${TARGET_LINUX_FALSE}"; then
  { { echo "$as_me:11781: error: conditional \"TARGET_LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_QTOPIA_TRUE}" && test -z "${TARGET_QTOPIA_FALSE}"; then
  { { echo "$as_me:11788: error: conditional \"TARGET_QTOPIA\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_QTOPIA\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_SOLARIS_TRUE}" && test -z "${TARGET_SOLARIS_FALSE}"; then
  { { echo "$as_me:11795: error: conditional \"TARGET_SOLARIS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_SOLARIS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_IRIX_TRUE}" && test -z "${TARGET_IRIX_FALSE}"; then
  { { echo "$as_me:11802: error: conditional \"TARGET_IRIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_IRIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_BSDI_TRUE}" && test -z "${TARGET_BSDI_FALSE}"; then
  { { echo "$as_me:11809: error: conditional \"TARGET_BSDI\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_BSDI\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_FREEBSD_TRUE}" && test -z "${TARGET_FREEBSD_FALSE}"; then
  { { echo "$as_me:11816: error: conditional \"TARGET_FREEBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_FREEBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_NETBSD_TRUE}" && test -z "${TARGET_NETBSD_FALSE}"; then
  { { echo "$as_me:11823: error: conditional \"TARGET_NETBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_NETBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_OPENBSD_TRUE}" && test -z "${TARGET_OPENBSD_FALSE}"; then
  { { echo "$as_me:11830: error: conditional \"TARGET_OPENBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_OPENBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_AIX_TRUE}" && test -z "${TARGET_AIX_FALSE}"; then
  { { echo "$as_me:11837: error: conditional \"TARGET_AIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_AIX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_WIN32_TRUE}" && test -z "${TARGET_WIN32_FALSE}"; then
  { { echo "$as_me:11844: error: conditional \"TARGET_WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_WIN32\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_BEOS_TRUE}" && test -z "${TARGET_BEOS_FALSE}"; then
  { { echo "$as_me:11851: error: conditional \"TARGET_BEOS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_BEOS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_MACOS_TRUE}" && test -z "${TARGET_MACOS_FALSE}"; then
  { { echo "$as_me:11858: error: conditional \"TARGET_MACOS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_MACOS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_MACOSX_TRUE}" && test -z "${TARGET_MACOSX_FALSE}"; then
  { { echo "$as_me:11865: error: conditional \"TARGET_MACOSX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_MACOSX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_QNX_TRUE}" && test -z "${TARGET_QNX_FALSE}"; then
  { { echo "$as_me:11872: error: conditional \"TARGET_QNX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_QNX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${TARGET_MINT_TRUE}" && test -z "${TARGET_MINT_FALSE}"; then
  { { echo "$as_me:11879: error: conditional \"TARGET_MINT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"TARGET_MINT\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${USE_DIRECTX_TRUE}" && test -z "${USE_DIRECTX_FALSE}"; then
  { { echo "$as_me:11886: error: conditional \"USE_DIRECTX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"USE_DIRECTX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${USE_CLONE_TRUE}" && test -z "${USE_CLONE_FALSE}"; then
  { { echo "$as_me:11893: error: conditional \"USE_CLONE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"USE_CLONE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${ENABLE_SHARED_TRUE}" && test -z "${ENABLE_SHARED_FALSE}"; then
  { { echo "$as_me:11900: error: conditional \"ENABLE_SHARED\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"ENABLE_SHARED\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
  { { echo "$as_me:11907: error: conditional \"ENABLE_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"ENABLE_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
   { (exit 1); exit 1; }; }
fi

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:11917: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE

Configuration files:
$config_files

Configuration commands:
$config_commands

Report bugs to <bug-autoconf@gnu.org>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:12088: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:12107: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
#

AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"

EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
  "docs/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/html/Makefile" ;;
  "docs/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/man3/Makefile" ;;
  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
  "src/main/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/main/Makefile" ;;
  "src/main/macosx/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/main/macosx/Makefile" ;;
  "src/main/macosx/Info.plist" ) CONFIG_FILES="$CONFIG_FILES src/main/macosx/Info.plist" ;;
  "src/audio/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/Makefile" ;;
  "src/audio/alsa/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/alsa/Makefile" ;;
  "src/audio/arts/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/arts/Makefile" ;;
  "src/audio/baudio/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/baudio/Makefile" ;;
  "src/audio/dc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/dc/Makefile" ;;
  "src/audio/dma/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/dma/Makefile" ;;
  "src/audio/dmedia/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/dmedia/Makefile" ;;
  "src/audio/dsp/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/dsp/Makefile" ;;
  "src/audio/esd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/esd/Makefile" ;;
  "src/audio/macrom/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/macrom/Makefile" ;;
  "src/audio/nas/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/nas/Makefile" ;;
  "src/audio/nto/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/nto/Makefile" ;;
  "src/audio/openbsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/openbsd/Makefile" ;;
  "src/audio/paudio/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/paudio/Makefile" ;;
  "src/audio/sun/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/sun/Makefile" ;;
  "src/audio/ums/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/ums/Makefile" ;;
  "src/audio/windib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/windib/Makefile" ;;
  "src/audio/windx5/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/windx5/Makefile" ;;
  "src/audio/disk/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/disk/Makefile" ;;
  "src/audio/mint/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/audio/mint/Makefile" ;;
  "src/video/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/Makefile" ;;
  "src/video/XFree86/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/Makefile" ;;
  "src/video/XFree86/extensions/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/extensions/Makefile" ;;
  "src/video/XFree86/Xinerama/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/Xinerama/Makefile" ;;
  "src/video/XFree86/Xv/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/Xv/Makefile" ;;
  "src/video/XFree86/Xxf86dga/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/Xxf86dga/Makefile" ;;
  "src/video/XFree86/Xxf86vm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/XFree86/Xxf86vm/Makefile" ;;
  "src/video/cybergfx/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/cybergfx/Makefile" ;;
  "src/video/x11/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/x11/Makefile" ;;
  "src/video/dga/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/dga/Makefile" ;;
  "src/video/nanox/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/nanox/Makefile" ;;
  "src/video/fbcon/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/fbcon/Makefile" ;;
  "src/video/directfb/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/directfb/Makefile" ;;
  "src/video/ps2gs/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/ps2gs/Makefile" ;;
  "src/video/ggi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/ggi/Makefile" ;;
  "src/video/maccommon/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/maccommon/Makefile" ;;
  "src/video/macdsp/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/macdsp/Makefile" ;;
  "src/video/macrom/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/macrom/Makefile" ;;
  "src/video/quartz/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/quartz/Makefile" ;;
  "src/video/svga/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/svga/Makefile" ;;
  "src/video/vgl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/vgl/Makefile" ;;
  "src/video/aalib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/aalib/Makefile" ;;
  "src/video/wincommon/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/wincommon/Makefile" ;;
  "src/video/windib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/windib/Makefile" ;;
  "src/video/windx5/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/windx5/Makefile" ;;
  "src/video/bwindow/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/bwindow/Makefile" ;;
  "src/video/photon/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/photon/Makefile" ;;
  "src/video/epoc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/epoc/Makefile" ;;
  "src/video/dummy/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/dummy/Makefile" ;;
  "src/video/ataricommon/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/ataricommon/Makefile" ;;
  "src/video/xbios/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/xbios/Makefile" ;;
  "src/video/gem/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/gem/Makefile" ;;
  "src/video/dc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/dc/Makefile" ;;
  "src/video/qtopia/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/qtopia/Makefile" ;;
  "src/video/picogui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/video/picogui/Makefile" ;;
  "src/events/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/events/Makefile" ;;
  "src/joystick/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/Makefile" ;;
  "src/joystick/amigaos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/amigaos/Makefile" ;;
  "src/joystick/beos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/beos/Makefile" ;;
  "src/joystick/bsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/bsd/Makefile" ;;
  "src/joystick/darwin/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/darwin/Makefile" ;;
  "src/joystick/dc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/dc/Makefile" ;;
  "src/joystick/dummy/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/dummy/Makefile" ;;
  "src/joystick/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/linux/Makefile" ;;
  "src/joystick/macos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/macos/Makefile" ;;
  "src/joystick/mint/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/mint/Makefile" ;;
  "src/joystick/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/joystick/win32/Makefile" ;;
  "src/cdrom/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/Makefile" ;;
  "src/cdrom/aix/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/aix/Makefile" ;;
  "src/cdrom/beos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/beos/Makefile" ;;
  "src/cdrom/dc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/dc/Makefile" ;;
  "src/cdrom/dummy/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/dummy/Makefile" ;;
  "src/cdrom/bsdi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/bsdi/Makefile" ;;
  "src/cdrom/freebsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/freebsd/Makefile" ;;
  "src/cdrom/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/linux/Makefile" ;;
  "src/cdrom/macos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/macos/Makefile" ;;
  "src/cdrom/openbsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/openbsd/Makefile" ;;
  "src/cdrom/qnx/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/qnx/Makefile" ;;
  "src/cdrom/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cdrom/win32/Makefile" ;;
  "src/thread/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/thread/Makefile" ;;
  "src/timer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/timer/Makefile" ;;
  "src/endian/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/endian/Makefile" ;;
  "src/file/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/file/Makefile" ;;
  "src/hermes/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/hermes/Makefile" ;;
  "sdl-config" ) CONFIG_FILES="$CONFIG_FILES sdl-config" ;;
  "SDL.spec" ) CONFIG_FILES="$CONFIG_FILES SDL.spec" ;;
  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
  *) { { echo "$as_me:12248: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@SDL_MAJOR_VERSION@,$SDL_MAJOR_VERSION,;t t
s,@SDL_MINOR_VERSION@,$SDL_MINOR_VERSION,;t t
s,@SDL_MICRO_VERSION@,$SDL_MICRO_VERSION,;t t
s,@SDL_INTERFACE_AGE@,$SDL_INTERFACE_AGE,;t t
s,@SDL_BINARY_AGE@,$SDL_BINARY_AGE,;t t
s,@SDL_VERSION@,$SDL_VERSION,;t t
s,@LT_RELEASE@,$LT_RELEASE,;t t
s,@LT_CURRENT@,$LT_CURRENT,;t t
s,@LT_REVISION@,$LT_REVISION,;t t
s,@LT_AGE@,$LT_AGE,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@am__include@,$am__include,;t t
s,@am__quote@,$am__quote,;t t
s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@LN_S@,$LN_S,;t t
s,@DLLTOOL@,$DLLTOOL,;t t
s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
s,@AS@,$AS,;t t
s,@ac_ct_AS@,$ac_ct_AS,;t t
s,@OBJDUMP@,$OBJDUMP,;t t
s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@CXXDEPMODE@,$CXXDEPMODE,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@CPP@,$CPP,;t t
s,@ASFLAGS@,$ASFLAGS,;t t
s,@CCAS@,$CCAS,;t t
s,@CCASFLAGS@,$CCASFLAGS,;t t
s,@ESD_CONFIG@,$ESD_CONFIG,;t t
s,@ESD_CFLAGS@,$ESD_CFLAGS,;t t
s,@ESD_LIBS@,$ESD_LIBS,;t t
s,@esd_lib@,$esd_lib,;t t
s,@ARTSCCONFIG@,$ARTSCCONFIG,;t t
s,@arts_lib@,$arts_lib,;t t
s,@NASM@,$NASM,;t t
s,@NASMFLAGS@,$NASMFLAGS,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@DIRECTFB_CFLAGS@,$DIRECTFB_CFLAGS,;t t
s,@DIRECTFB_LIBS@,$DIRECTFB_LIBS,;t t
s,@PTH_CONFIG@,$PTH_CONFIG,;t t
s,@ARCH@,$ARCH,;t t
s,@TARGET_LINUX_TRUE@,$TARGET_LINUX_TRUE,;t t
s,@TARGET_LINUX_FALSE@,$TARGET_LINUX_FALSE,;t t
s,@TARGET_QTOPIA_TRUE@,$TARGET_QTOPIA_TRUE,;t t
s,@TARGET_QTOPIA_FALSE@,$TARGET_QTOPIA_FALSE,;t t
s,@TARGET_SOLARIS_TRUE@,$TARGET_SOLARIS_TRUE,;t t
s,@TARGET_SOLARIS_FALSE@,$TARGET_SOLARIS_FALSE,;t t
s,@TARGET_IRIX_TRUE@,$TARGET_IRIX_TRUE,;t t
s,@TARGET_IRIX_FALSE@,$TARGET_IRIX_FALSE,;t t
s,@TARGET_BSDI_TRUE@,$TARGET_BSDI_TRUE,;t t
s,@TARGET_BSDI_FALSE@,$TARGET_BSDI_FALSE,;t t
s,@TARGET_FREEBSD_TRUE@,$TARGET_FREEBSD_TRUE,;t t
s,@TARGET_FREEBSD_FALSE@,$TARGET_FREEBSD_FALSE,;t t
s,@TARGET_NETBSD_TRUE@,$TARGET_NETBSD_TRUE,;t t
s,@TARGET_NETBSD_FALSE@,$TARGET_NETBSD_FALSE,;t t
s,@TARGET_OPENBSD_TRUE@,$TARGET_OPENBSD_TRUE,;t t
s,@TARGET_OPENBSD_FALSE@,$TARGET_OPENBSD_FALSE,;t t
s,@TARGET_AIX_TRUE@,$TARGET_AIX_TRUE,;t t
s,@TARGET_AIX_FALSE@,$TARGET_AIX_FALSE,;t t
s,@TARGET_WIN32_TRUE@,$TARGET_WIN32_TRUE,;t t
s,@TARGET_WIN32_FALSE@,$TARGET_WIN32_FALSE,;t t
s,@TARGET_BEOS_TRUE@,$TARGET_BEOS_TRUE,;t t
s,@TARGET_BEOS_FALSE@,$TARGET_BEOS_FALSE,;t t
s,@TARGET_MACOS_TRUE@,$TARGET_MACOS_TRUE,;t t
s,@TARGET_MACOS_FALSE@,$TARGET_MACOS_FALSE,;t t
s,@TARGET_MACOSX_TRUE@,$TARGET_MACOSX_TRUE,;t t
s,@TARGET_MACOSX_FALSE@,$TARGET_MACOSX_FALSE,;t t
s,@TARGET_QNX_TRUE@,$TARGET_QNX_TRUE,;t t
s,@TARGET_QNX_FALSE@,$TARGET_QNX_FALSE,;t t
s,@TARGET_MINT_TRUE@,$TARGET_MINT_TRUE,;t t
s,@TARGET_MINT_FALSE@,$TARGET_MINT_FALSE,;t t
s,@USE_DIRECTX_TRUE@,$USE_DIRECTX_TRUE,;t t
s,@USE_DIRECTX_FALSE@,$USE_DIRECTX_FALSE,;t t
s,@USE_CLONE_TRUE@,$USE_CLONE_TRUE,;t t
s,@USE_CLONE_FALSE@,$USE_CLONE_FALSE,;t t
s,@ENABLE_SHARED_TRUE@,$ENABLE_SHARED_TRUE,;t t
s,@ENABLE_SHARED_FALSE@,$ENABLE_SHARED_FALSE,;t t
s,@ENABLE_STATIC_TRUE@,$ENABLE_STATIC_TRUE,;t t
s,@ENABLE_STATIC_FALSE@,$ENABLE_STATIC_FALSE,;t t
s,@AUDIO_SUBDIRS@,$AUDIO_SUBDIRS,;t t
s,@AUDIO_DRIVERS@,$AUDIO_DRIVERS,;t t
s,@VIDEO_SUBDIRS@,$VIDEO_SUBDIRS,;t t
s,@VIDEO_DRIVERS@,$VIDEO_DRIVERS,;t t
s,@JOYSTICK_SUBDIRS@,$JOYSTICK_SUBDIRS,;t t
s,@JOYSTICK_DRIVERS@,$JOYSTICK_DRIVERS,;t t
s,@CDROM_SUBDIRS@,$CDROM_SUBDIRS,;t t
s,@CDROM_DRIVERS@,$CDROM_DRIVERS,;t t
s,@SDL_EXTRADIRS@,$SDL_EXTRADIRS,;t t
s,@SDL_EXTRALIBS@,$SDL_EXTRALIBS,;t t
s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
s,@SDL_LIBS@,$SDL_LIBS,;t t
s,@SDL_RLD_FLAGS@,$SDL_RLD_FLAGS,;t t
s,@STATIC_SYSTEM_LIBS@,$STATIC_SYSTEM_LIBS,;t t
s,@SHARED_SYSTEM_LIBS@,$SHARED_SYSTEM_LIBS,;t t
s,@SYSTEM_LIBS@,$SYSTEM_LIBS,;t t
s,@OBJC@,$OBJC,;t t
s,@OBJCFLAGS@,$OBJCFLAGS,;t t
s,@OBJCDEPMODE@,$OBJCDEPMODE,;t t
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_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    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 $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:12589: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:12607: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:12620: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`

  case $ac_dest in
    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
  # Strip MF so we end up with the name of the file.
  mf=`echo "$mf" | sed -e 's/:.*$//'`
  if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
    dirpart=`$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
         X"$mf" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$mf" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  else
    continue
  fi
  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
  # Extract the definition of DEP_FILES from the Makefile without
  # running `make'.
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  test -z "$DEPDIR" && continue
  # When using ansi2knr, U may be empty or an underscore; expand it
  U=`sed -n -e '/^U = / s///p' < "$mf"`
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  # We invoke sed twice because it is the simplest approach to
  # changing $(DEPDIR) to its actual value in the expansion.
  for file in `sed -n -e '
    /^DEP_FILES = .*\\\\$/ {
      s/^DEP_FILES = //
      :loop
	s/\\\\$//
	p
	n
	/\\\\$/ b loop
      p
    }
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    # Make sure the directory exists.
    test -f "$dirpart/$file" && continue
    fdir=`$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
         X"$file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    { case $dirpart/$fdir in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy=$dirpart/$fdir
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    # echo "creating $dirpart/$file"
    echo '# dummy' > "$dirpart/$file"
  done
done
 ;;
    default ) chmod +x sdl-config ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

