#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for crystalspace 1.0.
#
# Report bugs to <crystal-main@lists.sourceforge.net>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi




# PATH needs CR
# 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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# CDPATH.
$as_unset CDPATH


if test "x$CONFIG_SHELL" = x; then
  if (eval ":") 2>/dev/null; then
  as_have_required=yes
else
  as_have_required=no
fi

  if test $as_have_required = yes && 	 (eval ":
(as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=\$LINENO
  as_lineno_2=\$LINENO
  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
") 2> /dev/null; then
  :
else
  as_candidate_shells=
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
	 /*)
	   for as_base in sh bash ksh sh5; do
	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
	   done;;
       esac
done
IFS=$as_save_IFS


      for as_shell in $as_candidate_shells $SHELL; do
	 # Try only shells that exist, to save several forks.
	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		{ ("$as_shell") 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi


:
_ASEOF
}; then
  CONFIG_SHELL=$as_shell
	       as_have_required=yes
	       if { "$as_shell" 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi


:
(as_func_return () {
  (exit $1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = "$1" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test $exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }

_ASEOF
}; then
  break
fi

fi

      done

      if test "x$CONFIG_SHELL" != x; then
  for as_var in BASH_ENV ENV
        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
        done
        export CONFIG_SHELL
        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi


    if test $as_have_required = no; then
  echo This script requires a shell more modern than all the
      echo shells that I found on your system.  Please install a
      echo modern shell, or manually run the script under such a
      echo shell if you do have one.
      { (exit 1); exit 1; }
fi


fi

fi



(eval "as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0") || {
  echo No shell found that supports shell functions.
  echo Please tell autoconf@gnu.org about your system,
  echo including any error possibly output before this
  echo message
}



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, and appends
  # trailing '-' during substitution so that $LINENO is not a special
  # case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
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$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p'
elif mkdirs . 2>/dev/null; then
  as_mkdir_p='mkdirs'
else
  as_mkdir_p=''
fi
test -d ./-p && rmdir ./-p

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
        test -d "$1/.";
      else
	case $1 in
        -*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

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

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



exec 7<&0 </dev/null 6>&1

# 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`

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

# Identity of this package.
PACKAGE_NAME='crystalspace'
PACKAGE_TARNAME='crystalspace'
PACKAGE_VERSION='1.0'
PACKAGE_STRING='crystalspace 1.0'
PACKAGE_BUGREPORT='crystal-main@lists.sourceforge.net'

ac_unique_file="libs/Jamfile"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_subst_vars='SHELL
PATH_SEPARATOR
PACKAGE_NAME
PACKAGE_TARNAME
PACKAGE_VERSION
PACKAGE_STRING
PACKAGE_BUGREPORT
exec_prefix
prefix
program_transform_name
bindir
sbindir
libexecdir
datarootdir
datadir
sysconfdir
sharedstatedir
localstatedir
includedir
oldincludedir
docdir
infodir
htmldir
dvidir
pdfdir
psdir
libdir
localedir
mandir
DEFS
ECHO_C
ECHO_N
ECHO_T
LIBS
build_alias
host_alias
target_alias
build
build_cpu
build_vendor
build_os
host
host_cpu
host_vendor
host_os
CC
CFLAGS
LDFLAGS
CPPFLAGS
ac_ct_CC
EXEEXT
OBJEXT
CXX
CXXFLAGS
ac_ct_CXX
LD
ac_ct_LD
CPP
CXXCPP
RANLIB
DLLTOOL
ac_ct_DLLTOOL
DLLWRAP
ac_ct_DLLWRAP
WINDRES
ac_ct_WINDRES
STRINGS
ac_ct_STRINGS
OBJCOPY
ac_ct_OBJCOPY
LIBTOOL_TEST
ac_ct_LIBTOOL_TEST
LIBTOOL_PATH
LIBTOOL
ac_ct_LIBTOOL
CS_LT_APPLE
APPLE_LIBTOOL
MKDIR
MKDIRS
INSTALL
TEXI2DVI
TEXI2PDF
DVIPS
DVIPDF
MAKEINFO
DOXYGEN
DOT
ac_ct_DOT
FLEX
BISON
HHC
ac_ct_HHC
SWIG
JAM
MAKE
CSLIBS_CONFIG
ac_ct_CSLIBS_CONFIG
GREP
EGREP
PERL
PYTHON
JAVA
JAVAC
ANT
PKG_CONFIG
ac_ct_PKG_CONFIG
CONFIG_X11
ac_ct_CONFIG_X11
CONFIG_XEXT
ac_ct_CONFIG_XEXT
XMKMF
X_CFLAGS
X_PRE_LIBS
X_LIBS
X_EXTRA_LIBS
CONFIG_XXF86VM
ac_ct_CONFIG_XXF86VM
CONFIG_XAW7
ac_ct_CONFIG_XAW7
CONFIG_XAW
ac_ct_CONFIG_XAW
CONFIG_Z
ac_ct_CONFIG_Z
CONFIG_ZLIB
ac_ct_CONFIG_ZLIB
CONFIG_PNG
ac_ct_CONFIG_PNG
CONFIG_LIBPNG
ac_ct_CONFIG_LIBPNG
CONFIG_JPEG
ac_ct_CONFIG_JPEG
CONFIG_LIBJPEG
ac_ct_CONFIG_LIBJPEG
CONFIG_LCMS
ac_ct_CONFIG_LCMS
CONFIG_MNG
ac_ct_CONFIG_MNG
CONFIG_LIBMNG
ac_ct_CONFIG_LIBMNG
CONFIG_MIKMOD
ac_ct_CONFIG_MIKMOD
CONFIG_OGG
ac_ct_CONFIG_OGG
CONFIG_VORBIS
ac_ct_CONFIG_VORBIS
CONFIG_VORBISFILE
ac_ct_CONFIG_VORBISFILE
CONFIG_3DS
ac_ct_CONFIG_3DS
CONFIG_LIB3DS
ac_ct_CONFIG_LIB3DS
CONFIG_LIB3DS_120
ac_ct_CONFIG_LIB3DS_120
CONFIG_ODE
ac_ct_CONFIG_ODE
CONFIG_BULLET
ac_ct_CONFIG_BULLET
CONFIG_FREETYPE2
ac_ct_CONFIG_FREETYPE2
CONFIG_FREETYPE
ac_ct_CONFIG_FREETYPE
CONFIG_CAL3D
ac_ct_CONFIG_CAL3D
CONFIG_SDL
ac_ct_CONFIG_SDL
CONFIG_WX
ac_ct_CONFIG_WX
CONFIG_CEGUI
ac_ct_CONFIG_CEGUI
CONFIG_CEGUIBASE
ac_ct_CONFIG_CEGUIBASE
CONFIG_CG
ac_ct_CONFIG_CG
CONFIG_CGGL
ac_ct_CONFIG_CGGL
CONFIG_JACKASYN
ac_ct_CONFIG_JACKASYN
CONFIG_ASOUND
ac_ct_CONFIG_ASOUND
CONFIG_CACA
ac_ct_CONFIG_CACA
CONFIG_LIBCACA
ac_ct_CONFIG_LIBCACA
CONFIG_JS
ac_ct_CONFIG_JS
TTREE
CONFIG_CPPUNIT
ac_ct_CONFIG_CPPUNIT
CONFIG_BFD
ac_ct_CONFIG_BFD
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CXX
CXXFLAGS
CCC
CPP
CXXCPP
XMKMF'


# 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.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

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

  case $ac_option in
  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *)	ac_optarg=yes ;;
  esac

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

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -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)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$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 ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -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'`
    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 ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 | -n)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$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'`
    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; }; }
    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 directory names.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; }
done

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

# FIXME: To remove some day.
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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  { echo "$as_me: error: Working directory cannot be determined" >&2
   { (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  { echo "$as_me: error: pwd does not report name of working directory" >&2
   { (exit 1); exit 1; }; }


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$0" ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$0" : 'X\(//\)[^/]' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$0" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
   { (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
   { (exit 1); exit 1; }; }
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# 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 <<_ACEOF
\`configure' configures crystalspace 1.0 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 \`..']

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]
  --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]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/crystalspace]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

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       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of crystalspace 1.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-mno-cygwin     Compile with the -mno-cygwin option. (default YES)
  --enable-as-needed      Utilize --as-needed linker flag, if supported by
                          linker and if the used binutils version is recent
                          enough to support it properly (default NO)
  --enable-static-baselibs
                          Link statically againts libgcc and libstdc++. Use
                          with caution; enabling this option may cause issues
                          when dynamically linking against other C++ modules.
                          (default NO)
  --enable-cpu-specific-optimizations=level
                          enable CPU-specific optimizations; recognized levels
                          are `no', `minimum' or `min', `maximum' or `max'
                          (default MINIMUM); the `minimum' option selects
                          optimizations which are likely to be supported by
                          reasonably modern hardware, thus making the
                          resulting executables fairly portable; use the
                          `maximum' option with caution since code for one
                          processor will not work with earlier processors (for
                          example, Intel 686-specific code will not work with
                          a 586)
  --enable-separate-debug-info
                          split debug information into separate files.
                          (default YES if binutils >= 2.17, otherwise default
                          NO)
  --enable-optimize-mode-debug-info
                          whether to enable debug information even in optimize
                          builds. (default YES if separate debug information
                          is enabled, otherwise default NO)
  --enable-meta-info-embedding
                          store plugin meta-information directly inside plugin
                          modules if supported by platform; if disabled,
                          meta-information is stored in stand-alone .csplugin
                          files; this option is enabled by default for
                          non-Unix platforms and on Unix platforms with
                          ELF-format object files; it is disabled by default
                          on Unix platforms if ELF is not available and the
                          project uses a non-GPL-compatible license (such as
                          LGPL) since the non-ELF Unix embedding technology
                          requires the GPL-licensed libbfd library; if ELF is
                          not available, enable this option on Unix only if
                          you are certain you want a GPL-licensed library
                          infecting your project
  --enable-optimize       build with optimizations enabled (default YES); same
                          as --enable-mode=optimize
  --enable-debug          build with debugging information (default NO); same
                          as --enable-mode=debug
  --enable-profile        build with profiling information (default NO); same
                          as --enable-mode=profile
  --enable-mode=mode      set build mode; recognized modes are `optimize',
                          `debug', `profile' (default OPTIMIZE)
  --enable-ptmalloc       enable the built-in ptmalloc which provides fast
                          memory allocations, but may cause problems in rare
                          cases. (default YES)
  --enable-extensive-memory-debugger
                          enable the extensive memory debugger which catches
                          common memory management mistakes (default NO)
  --enable-memory-tracker enable the memory tracker which checks memory usage
                          per source file (default NO)
  --enable-ref-tracker    enable the reference tracker which dumps information
                          about leaked references (default NO)
  --enable-leak-guard     enable the leak guard protection which warns about
                          objects not freed at program exit (default NO)
  --enable-shared         enable creation of shared libraries
                          (_EXPERIMENTAL_!) (default NO)
  --enable-make-emulation enable emulation layer allowing project to be built
                          with `make', in addition to `jam' (default YES)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-perl             use Perl5 scripting interface (default NO)
  --without-python        do not use Python scripting interface
  --with-java             use Java scripting interface (default YES)
  --with-x11=dir          specify location of libx11 if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-xext=dir         specify location of libxext if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-x                use the X Window System
  --with-xxf86vm=dir      specify location of libxxf86vm if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-xaw7=dir         specify location of libxaw7 if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-mesa             use Mesa OpenGL library if available (default YES)
  --with-z=dir            specify location of libz if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-png=dir          specify location of libpng if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-jpeg=dir         specify location of libjpeg if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-lcms=dir         specify location of liblcms if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-mng=dir          specify location of libmng if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-mikmod=dir       specify location of libmikmod if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-ogg=dir          specify location of libogg if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-vorbis=dir       specify location of libvorbis if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-vorbisfile=dir   specify location of libvorbisfile if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-3ds=dir          specify location of lib3ds if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-ode=dir          specify location of libode if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-bullet=dir       specify location of libbullet if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-freetype2=dir    specify location of libfreetype2 if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-cal3d=dir        specify location of libcal3d if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-sdl=dir          specify location of libsdl if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-wx=dir           specify location of libwx if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-CEGUI=dir        specify location of libCEGUI if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-Cg=dir           specify location of libCg if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-CgGL=dir         specify location of libCgGL if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-jackasyn=dir     specify location of libjackasyn if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-asound=dir       specify location of libasound if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-caca=dir         specify location of libcaca if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-js=dir           specify location of libjs if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-cppunit=dir      specify location of libcppunit if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir
  --with-bfd=dir          specify location of libbfd if not detected
                          automatically; searches dir/include, dir/lib, and
                          dir

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>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective 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
  CXXCPP      C++ preprocessor
  XMKMF       Path to xmkmf, Makefile generator for X Window System

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

Report bugs to <crystal-main@lists.sourceforge.net>.
_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" || continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested configure.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
crystalspace configure 1.0
generated by GNU Autoconf 2.61

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by crystalspace $as_me 1.0, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
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`
/usr/bin/hostinfo      = `(/usr/bin/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`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
    2)
      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    esac
  done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }

# 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.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------------- ##
## File substitutions. ##
## ------------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      echo "$as_me: caught signal $ac_signal"
    echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* 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 -f -r conftest* confdefs.h

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF


# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  set x "$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  set x "$prefix/share/config.site" "$prefix/etc/config.site"
else
  set x "$ac_default_prefix/share/config.site" \
	"$ac_default_prefix/etc/config.site"
fi
shift
for ac_site_file
do
  if test -r "$ac_site_file"; then
    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$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:$LINENO: 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:$LINENO: 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 $ac_precious_vars; 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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
	{ echo "$as_me:$LINENO:   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.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:$LINENO: 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:$LINENO: 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


PACKAGE_LONGNAME="Crystal Space"
    PACKAGE_COPYRIGHT="Copyright (C)1998-2006 Jorrit Tyberghein and others"
    PACKAGE_HOMEPAGE="http://www.crystalspace3d.org/"


ac_aux_dir=
for ac_dir in mk/autoconf "$srcdir"/mk/autoconf; 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:$LINENO: error: cannot find install-sh or install.sh in mk/autoconf \"$srcdir\"/mk/autoconf" >&5
echo "$as_me: error: cannot find install-sh or install.sh in mk/autoconf \"$srcdir\"/mk/autoconf" >&2;}
   { (exit 1); exit 1; }; }
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.


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

{ echo "$as_me:$LINENO: 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_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  { { echo "$as_me:$LINENO: 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
echo "$as_me: error: invalid value of canonical build" >&2;}
   { (exit 1); exit 1; }; };;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ echo "$as_me:$LINENO: 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
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi

fi
{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
echo "$as_me: error: invalid value of canonical host" >&2;}
   { (exit 1); exit 1; }; };;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac



    { echo "$as_me:$LINENO: checking whether to enable -mno-cygwin" >&5
echo $ECHO_N "checking whether to enable -mno-cygwin... $ECHO_C" >&6; }
    # Check whether --enable-mno-cygwin was given.
if test "${enable_mno_cygwin+set}" = set; then
  enableval=$enable_mno_cygwin; enable_m_no_cygwin=$enableval
else
  enable_m_no_cygwin=yes
fi

    if test "$enable_m_no_cygwin" != "no"; then
  case $host_os in
	    cygwin*)
		if test -n "$CC"; then
  CC="$CC -mno-cygwin"
else
  CC="gcc -mno-cygwin"
fi

		if test -n "$CXX"; then
  CXX="$CXX -mno-cygwin"
else
  CXX="g++ -mno-cygwin"
fi

		CPP="$CC -E"
		CXXCPP="$CXX -E"
		cs_mno_cygwin=yes
		;;
	    *)
		cs_mno_cygwin=no
		;;
	esac

else
  cs_mno_cygwin=no
fi

    { echo "$as_me:$LINENO: result: $cs_mno_cygwin" >&5
echo "${ECHO_T}$cs_mno_cygwin" >&6; }




#------------------------------------------------------------------------------
# Check for compilers and linker.
#------------------------------------------------------------------------------


    CFLAGS="$CFLAGS" # Filter undesired flags
    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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
  { echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 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
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
  { echo "$as_me:$LINENO: 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.exe
  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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6; }
else
  { echo "$as_me:$LINENO: 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.exe
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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:$LINENO: checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# 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:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
#
# List of possible output files, starting from the most likely.
# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
# only as a last resort.  b.out is created by i960 compilers.
ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
#
# The IRIX 6 linker writes into existing files which may not be
# executable, retaining their permissions.  Remove them first so a
# subsequent execution test works.
ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { (ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''
fi

{ echo "$as_me:$LINENO: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6; }
if test -z "$ac_file"; then
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext

# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ echo "$as_me:$LINENO: 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'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }

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

{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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 conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
{ echo "$as_me:$LINENO: 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:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_compiler_gnu=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ echo "$as_me:$LINENO: 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
{ echo "$as_me:$LINENO: 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
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	CFLAGS=""
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ echo "$as_me:$LINENO: 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
{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];

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
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_prog_cc_c89=$ac_arg
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6; } ;;
  xno)
    { echo "$as_me:$LINENO: result: unsupported" >&5
echo "${ECHO_T}unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac


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 "$CC"; then

	cs_build_prop_val="$CC"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.CC ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$CPPFLAGS $CFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi


	# Check if compiler recognizes -pipe directive.
	{ echo "$as_me:$LINENO: checking if $CC accepts -pipe" >&5
echo $ECHO_N "checking if $CC accepts -pipe... $ECHO_C" >&6; }
if test "${cs_cv_prog_cc_pipe_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-pipe@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cc_pipe=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cc_pipe_ok="$cs_cv_prog_cc_pipe"
else
  cs_cv_prog_cc_pipe=''
	    cs_cv_prog_cc_pipe_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cc_pipe_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cc_pipe_ok" >&6; }
    if test "$cs_cv_prog_cc_pipe_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cc_pipe"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi


fi




    CXXFLAGS="$CXXFLAGS" # Filter undesired flags
    ac_ext=cpp
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 -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6; }
else
  { echo "$as_me:$LINENO: 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 g++ c++ gpp aCC CC cxx cc++ cl.exe 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
echo "$as_me:$LINENO: checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

{ echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_compiler_gnu=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ echo "$as_me:$LINENO: 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
{ echo "$as_me:$LINENO: 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
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	CXXFLAGS=""
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ echo "$as_me:$LINENO: 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
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 "$CXX"; then

	cs_build_prop_val="$CXX"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.C++ ?= \"$cs_build_prop_val\" ;
"
fi


	cs_build_prop_val="$CPPFLAGS $CXXFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS += \"$cs_build_prop_val\" ;
"
fi


        # Check if compiler can be instructed to produce position-independent-code
        # (PIC).  This feature is required by some platforms when building plugin
        # modules and shared libraries.
	{ echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
echo $ECHO_N "checking how to treat C++ warnings as errors... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_pic_werror_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Werror@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_pic_werror=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_pic_werror_ok="$cs_cv_prog_cxx_pic_werror"
else
  cs_cv_prog_cxx_pic_werror=''
	    cs_cv_prog_cxx_pic_werror_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_pic_werror_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_pic_werror_ok" >&6; }

    { echo "$as_me:$LINENO: checking how to enable C++ PIC generation" >&5
echo $ECHO_N "checking how to enable C++ PIC generation... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_pic_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fPIC@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_pic_werror $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  if { ac_try='grep "fPIC" conftest.err >/dev/null 2>&1'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_build_ok=no
else
  cs_build_ok=yes
fi

else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done

     rm -f conftest.err
    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_pic=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_pic_ok="$cs_cv_prog_cxx_pic"
else
  cs_cv_prog_cxx_pic=''
	    cs_cv_prog_cxx_pic_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_pic_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_pic_ok" >&6; }
    if test "$cs_cv_prog_cxx_pic_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_pic"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.PIC ?= \"$cs_build_prop_val\" ;
"
fi

fi


fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in ld
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LD="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
  { echo "$as_me:$LINENO: result: $LD" >&5
echo "${ECHO_T}$LD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$LD" && break
  done
fi
if test -z "$LD"; then
  ac_ct_LD=$LD
  for ac_prog in ld
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_LD"; then
  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_LD="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_LD=$ac_cv_prog_ac_ct_LD
if test -n "$ac_ct_LD"; then
  { echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
echo "${ECHO_T}$ac_ct_LD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_LD" && break
done

  if test "x$ac_ct_LD" = x; then
    LD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    LD=$ac_ct_LD
  fi
fi

    if test -n "$LD"; then
  # binutils versions come in the flavors X.Y as well as X.Y.Z
        { echo "$as_me:$LINENO: checking if binutils version >= 2.17" >&5
echo $ECHO_N "checking if binutils version >= 2.17... $ECHO_C" >&6; }
if test "${cs_cv_prog_binutils_version_2_17_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_binutils_is_version=
cs_prog_binutils_min_version=
cs_prog_binutils_is_suffix=
cs_prog_binutils_min_suffix=
cs_prog_binutils_is_suffix_done=
cs_prog_binutils_min_suffix_done=






test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix= ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0.0 ; }








test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix= ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0.0 ; }


cs_prog_binutils_is_ver_1=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_is_ver_2=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_is_ver_3=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_is_ver_4=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_is_ver_5=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_prog_binutils_min_ver_1=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_min_ver_2=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_min_ver_3=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_min_ver_4=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_min_ver_5=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_cv_prog_binutils_version_2_17_ok=''
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_1" ">=" "$cs_prog_binutils_min_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_1" ">=" "$cs_prog_binutils_is_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_2" ">=" "$cs_prog_binutils_min_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_2" ">=" "$cs_prog_binutils_is_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_3" ">=" "$cs_prog_binutils_min_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_3" ">=" "$cs_prog_binutils_is_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_4" ">=" "$cs_prog_binutils_min_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_4" ">=" "$cs_prog_binutils_is_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_5" ">=" "$cs_prog_binutils_min_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_5" ">=" "$cs_prog_binutils_is_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }

if test -z "$cs_cv_prog_binutils_version_2_17_ok"; then
  cs_cv_prog_binutils_version_2_17_ok=yes
fi

if test "$cs_cv_prog_binutils_version_2_17_ok" = yes; then
  cs_prog_binutils_version_ok=yes
else
  cs_prog_binutils_version_ok=no
fi

cs_cv_prog_binutils_version_2_17_ok_annotated="$cs_cv_prog_binutils_version_2_17_ok"
if test -n "$cs_prog_binutils_is_version"; then
  cs_cv_prog_binutils_version_2_17_ok_annotated="$cs_cv_prog_binutils_version_2_17_ok_annotated (version $cs_prog_binutils_is_version)"
    cs_prog_binutils_version="$cs_prog_binutils_is_version"
else
  cs_prog_binutils_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_17_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_binutils_version_2_17_ok_annotated" >&6; }
if test "$cs_cv_prog_binutils_version_2_17_ok" = yes; then
  cs_cv_binutils_true_2_17=yes
else
  cs_cv_binutils_true_2_17=no
fi

        if test "$cs_cv_binutils_true_2_17" = yes; then
  cs_cv_binutils_2_17=yes
fi

	if test -z "$cs_cv_binutils_2_17"; then
  { echo "$as_me:$LINENO: checking if binutils version >= 2.16.91" >&5
echo $ECHO_N "checking if binutils version >= 2.16.91... $ECHO_C" >&6; }
if test "${cs_cv_prog_binutils_version_2_16_91_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_binutils_is_version=
cs_prog_binutils_min_version=
cs_prog_binutils_is_suffix=
cs_prog_binutils_min_suffix=
cs_prog_binutils_is_suffix_done=
cs_prog_binutils_min_suffix_done=





test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix= ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0 ; }







test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix= ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0 ; }


cs_prog_binutils_is_ver_1=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_is_ver_2=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_is_ver_3=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_is_ver_4=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_is_ver_5=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_prog_binutils_min_ver_1=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_min_ver_2=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_min_ver_3=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_min_ver_4=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_min_ver_5=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_cv_prog_binutils_version_2_16_91_ok=''
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_1" ">=" "$cs_prog_binutils_min_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_1" ">=" "$cs_prog_binutils_is_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_2" ">=" "$cs_prog_binutils_min_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_2" ">=" "$cs_prog_binutils_is_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_3" ">=" "$cs_prog_binutils_min_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_3" ">=" "$cs_prog_binutils_is_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_4" ">=" "$cs_prog_binutils_min_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_4" ">=" "$cs_prog_binutils_is_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_5" ">=" "$cs_prog_binutils_min_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_5" ">=" "$cs_prog_binutils_is_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }

if test -z "$cs_cv_prog_binutils_version_2_16_91_ok"; then
  cs_cv_prog_binutils_version_2_16_91_ok=yes
fi

if test "$cs_cv_prog_binutils_version_2_16_91_ok" = yes; then
  cs_prog_binutils_version_ok=yes
else
  cs_prog_binutils_version_ok=no
fi

cs_cv_prog_binutils_version_2_16_91_ok_annotated="$cs_cv_prog_binutils_version_2_16_91_ok"
if test -n "$cs_prog_binutils_is_version"; then
  cs_cv_prog_binutils_version_2_16_91_ok_annotated="$cs_cv_prog_binutils_version_2_16_91_ok_annotated (version $cs_prog_binutils_is_version)"
    cs_prog_binutils_version="$cs_prog_binutils_is_version"
else
  cs_prog_binutils_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&6; }
if test "$cs_cv_prog_binutils_version_2_16_91_ok" = yes; then
  cs_cv_binutils_2_17=yes
fi

fi

	if test -z "$cs_cv_binutils_2_17"; then
  cs_cv_binutils_2_17=no
fi

fi



    if test -n "$CXX"; then
  cs_build_prop_val="\$(CMD.C++)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.LINK ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_build_prop_val="\$(CMD.CC)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.LINK ?= \"$cs_build_prop_val\" ;
"
fi

fi


    cs_build_prop_val="$LDFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


    # Check if compiler/linker recognizes -shared directive which is needed for
    # linking plugin modules.  Unfortunately, the Apple compiler (and possibly
    # others) requires extra effort.  Even though the compiler does not recognize
    # the -shared option, it nevertheless returns a "success" result after emitting
    # the warning "unrecognized option `-shared'".  Worse, even -Werror fails to
    # promote the warning to an error, so we must instead scan the compiler's
    # output for an appropriate diagnostic.
    { echo "$as_me:$LINENO: checking if -shared is accepted" >&5
echo $ECHO_N "checking if -shared is accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_shared_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-shared $cs_cv_prog_cxx_pic@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  if { ac_try='grep "shared" conftest.err >/dev/null 2>&1'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_build_ok=no
else
  cs_build_ok=yes
fi

else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done

     rm -f conftest.err
    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_shared=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_shared_ok="$cs_cv_prog_link_shared"
else
  cs_cv_prog_link_shared=''
	    cs_cv_prog_link_shared_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_shared_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_shared_ok" >&6; }
    if test "$cs_cv_prog_link_shared_ok" != no; then
  cs_build_prop_val="-shared"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PLUGIN.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi


    # Check if linker recognizes -soname which is used to assign a name internally
    # to plugin modules.
    if test "" != yes; then
  { echo "$as_me:$LINENO: checking if -soname is accepted" >&5
echo $ECHO_N "checking if -soname is accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_soname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,-soname,foobar@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_soname=yes
		cs_cv_prog_link_soname_cflags=$cs_build_cflags
		cs_cv_prog_link_soname_lflags=$cs_build_lflags
		cs_cv_prog_link_soname_libs=$cs_build_libs
else
  cs_cv_prog_link_soname=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_soname" >&5
echo "${ECHO_T}$cs_cv_prog_link_soname" >&6; }
else
  { echo "$as_me:$LINENO: checking if -soname is accepted" >&5
echo $ECHO_N "checking if -soname is accepted... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,-soname,foobar@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_soname=yes
		cs_cv_prog_link_soname_cflags=$cs_build_cflags
		cs_cv_prog_link_soname_lflags=$cs_build_lflags
		cs_cv_prog_link_soname_libs=$cs_build_libs
else
  cs_cv_prog_link_soname=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_prog_link_soname" >&5
echo "${ECHO_T}$cs_cv_prog_link_soname" >&6; }
fi

    if test $cs_cv_prog_link_soname = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PLUGIN.LFLAGS.USE_SONAME ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_prog_link_soname_cflags=''
	cs_cv_prog_link_soname_lflags=''
	cs_cv_prog_link_soname_libs=''

fi


    # Check if binutils support response files
    rm -f conftest.resp
    echo "" > conftest.resp
    if test "" != yes; then
  { echo "$as_me:$LINENO: checking if response files are accepted" >&5
echo $ECHO_N "checking if response files are accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_respfile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in -Wl,@conftest.resp
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_respfile=yes
		cs_cv_prog_link_respfile_cflags=$cs_build_cflags
		cs_cv_prog_link_respfile_lflags=$cs_build_lflags
		cs_cv_prog_link_respfile_libs=$cs_build_libs
else
  cs_cv_prog_link_respfile=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_respfile" >&5
echo "${ECHO_T}$cs_cv_prog_link_respfile" >&6; }
else
  { echo "$as_me:$LINENO: checking if response files are accepted" >&5
echo $ECHO_N "checking if response files are accepted... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in -Wl,@conftest.resp
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_respfile=yes
		cs_cv_prog_link_respfile_cflags=$cs_build_cflags
		cs_cv_prog_link_respfile_lflags=$cs_build_lflags
		cs_cv_prog_link_respfile_libs=$cs_build_libs
else
  cs_cv_prog_link_respfile=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_prog_link_respfile" >&5
echo "${ECHO_T}$cs_cv_prog_link_respfile" >&6; }
fi

    if test $cs_cv_prog_link_respfile = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LINKER.RESPONSEFILES ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_prog_link_respfile_cflags=''
	cs_cv_prog_link_respfile_lflags=''
	cs_cv_prog_link_respfile_libs=''

fi

    rm -f conftest.resp

    # Check if linker supports --as-needed.
    # Check whether --enable-as-needed was given.
if test "${enable_as_needed+set}" = set; then
  enableval=$enable_as_needed;
fi

    if test -z "$enable_as_needed"; then
  enable_as_needed=no
fi

    if test "$enable_as_needed" != "no"; then

	if test "$cs_cv_binutils_2_17" = "yes"; then
  { echo "$as_me:$LINENO: checking if --as-needed is supported" >&5
echo $ECHO_N "checking if --as-needed is supported... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_as_needed_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,--as-needed@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_as_needed=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_as_needed_ok="$cs_cv_prog_link_as_needed"
else
  cs_cv_prog_link_as_needed=''
	    cs_cv_prog_link_as_needed_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_as_needed_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_as_needed_ok" >&6; }
    if test "$cs_cv_prog_link_as_needed_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_as_needed"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.LINK += \"$cs_build_prop_val\" ;
"
fi


fi

	    { echo "$as_me:$LINENO: checking if --no-as-needed is supported" >&5
echo $ECHO_N "checking if --no-as-needed is supported... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_no_as_needed_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,--no-as-needed@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_no_as_needed=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_no_as_needed_ok="$cs_cv_prog_link_no_as_needed"
else
  cs_cv_prog_link_no_as_needed=''
	    cs_cv_prog_link_no_as_needed_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_no_as_needed_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_no_as_needed_ok" >&6; }

fi

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
{ echo "$as_me:$LINENO: 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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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 nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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:$LINENO: 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.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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 nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&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

ac_ext=cpp
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
{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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 nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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 nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' 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:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&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

cs_build_prop_val="$CXXCPP"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.C++CPP ?= \"$cs_build_prop_val\" ;
"
fi


if test $ac_compiler_gnu = yes; then
  cs_compiler_name=GCC cs_header_text="${cs_header_text}#define CS_COMPILER_GCC
"
else
  cs_compiler_name="`echo "$CXX" | $as_tr_cpp`"
fi

cs_build_prop_val="$cs_compiler_name"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.TYPE ?= \"$cs_build_prop_val\" ;
"
fi

cs_header_text="${cs_header_text}#define CS_COMPILER_NAME \"$cs_compiler_name\"
"



#------------------------------------------------------------------------------
# Check for common tools.
#------------------------------------------------------------------------------

    # The default RANLIB in Jambase is wrong on some platforms, and is also
    # unsuitable during cross-compilation, so we set the value unconditionally
    # (sixth argument of CS_EMIT_BUILD_PROPERTY).
    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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  { echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6; }
else
  { echo "$as_me:$LINENO: 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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    RANLIB=$ac_ct_RANLIB
  fi
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

    cs_build_prop_val="$RANLIB"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}RANLIB = \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in dlltool
  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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DLLTOOL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$DLLTOOL" && break
  done
fi
if test -z "$DLLTOOL"; then
  ac_ct_DLLTOOL=$DLLTOOL
  for ac_prog in dlltool
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:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_DLLTOOL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  test -n "$ac_ct_DLLTOOL" && break
done

  if test "x$ac_ct_DLLTOOL" = x; then
    DLLTOOL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    DLLTOOL=$ac_ct_DLLTOOL
  fi
fi

    cs_build_prop_val="$DLLTOOL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DLLTOOL ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in dllwrap
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_DLLWRAP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DLLWRAP"; then
  ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DLLWRAP="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
DLLWRAP=$ac_cv_prog_DLLWRAP
if test -n "$DLLWRAP"; then
  { echo "$as_me:$LINENO: result: $DLLWRAP" >&5
echo "${ECHO_T}$DLLWRAP" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$DLLWRAP" && break
  done
fi
if test -z "$DLLWRAP"; then
  ac_ct_DLLWRAP=$DLLWRAP
  for ac_prog in dllwrap
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_DLLWRAP"; then
  ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_DLLWRAP="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
if test -n "$ac_ct_DLLWRAP"; then
  { echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
echo "${ECHO_T}$ac_ct_DLLWRAP" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_DLLWRAP" && break
done

  if test "x$ac_ct_DLLWRAP" = x; then
    DLLWRAP=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    DLLWRAP=$ac_ct_DLLWRAP
  fi
fi

    if test "$cs_mno_cygwin" = "yes"; then
  DLLWRAP="$DLLWRAP --target i386-mingw32"
fi

    cs_build_prop_val="$DLLWRAP"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DLLWRAP ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in windres
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_WINDRES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_WINDRES="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
  { echo "$as_me:$LINENO: result: $WINDRES" >&5
echo "${ECHO_T}$WINDRES" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$WINDRES" && break
  done
fi
if test -z "$WINDRES"; then
  ac_ct_WINDRES=$WINDRES
  for ac_prog in windres
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_WINDRES"; then
  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_WINDRES="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
if test -n "$ac_ct_WINDRES"; then
  { echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
echo "${ECHO_T}$ac_ct_WINDRES" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_WINDRES" && break
done

  if test "x$ac_ct_WINDRES" = x; then
    WINDRES=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    WINDRES=$ac_ct_WINDRES
  fi
fi

    cs_build_prop_val="$WINDRES"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.WINDRES ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in strings
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_STRINGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$STRINGS"; then
  ac_cv_prog_STRINGS="$STRINGS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_STRINGS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
STRINGS=$ac_cv_prog_STRINGS
if test -n "$STRINGS"; then
  { echo "$as_me:$LINENO: result: $STRINGS" >&5
echo "${ECHO_T}$STRINGS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$STRINGS" && break
  done
fi
if test -z "$STRINGS"; then
  ac_ct_STRINGS=$STRINGS
  for ac_prog in strings
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_STRINGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_STRINGS"; then
  ac_cv_prog_ac_ct_STRINGS="$ac_ct_STRINGS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_STRINGS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_STRINGS=$ac_cv_prog_ac_ct_STRINGS
if test -n "$ac_ct_STRINGS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_STRINGS" >&5
echo "${ECHO_T}$ac_ct_STRINGS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_STRINGS" && break
done

  if test "x$ac_ct_STRINGS" = x; then
    STRINGS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    STRINGS=$ac_ct_STRINGS
  fi
fi

    cs_build_prop_val="$STRINGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.STRINGS ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in objcopy
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_OBJCOPY+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$OBJCOPY"; then
  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
  { echo "$as_me:$LINENO: result: $OBJCOPY" >&5
echo "${ECHO_T}$OBJCOPY" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$OBJCOPY" && break
  done
fi
if test -z "$OBJCOPY"; then
  ac_ct_OBJCOPY=$OBJCOPY
  for ac_prog in objcopy
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_OBJCOPY"; then
  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
if test -n "$ac_ct_OBJCOPY"; then
  { echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
echo "${ECHO_T}$ac_ct_OBJCOPY" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_OBJCOPY" && break
done

  if test "x$ac_ct_OBJCOPY" = x; then
    OBJCOPY=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    OBJCOPY=$ac_ct_OBJCOPY
  fi
fi

    cs_build_prop_val="$OBJCOPY"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.OBJCOPY ?= \"$cs_build_prop_val\" ;
"
fi


    # GNU: Search for libtool before glibtool since Fink version is likely newer.

if test -z "$LIBTOOL"; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in libtool glibtool gnulibtool
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_LIBTOOL_TEST+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LIBTOOL_TEST"; then
  ac_cv_prog_LIBTOOL_TEST="$LIBTOOL_TEST" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     /sw/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LIBTOOL_TEST="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
LIBTOOL_TEST=$ac_cv_prog_LIBTOOL_TEST
if test -n "$LIBTOOL_TEST"; then
  { echo "$as_me:$LINENO: result: $LIBTOOL_TEST" >&5
echo "${ECHO_T}$LIBTOOL_TEST" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$LIBTOOL_TEST" && break
  done
fi
if test -z "$LIBTOOL_TEST"; then
  ac_ct_LIBTOOL_TEST=$LIBTOOL_TEST
  for ac_prog in libtool glibtool gnulibtool
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_LIBTOOL_TEST+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_LIBTOOL_TEST"; then
  ac_cv_prog_ac_ct_LIBTOOL_TEST="$ac_ct_LIBTOOL_TEST" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     /sw/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_LIBTOOL_TEST="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_LIBTOOL_TEST=$ac_cv_prog_ac_ct_LIBTOOL_TEST
if test -n "$ac_ct_LIBTOOL_TEST"; then
  { echo "$as_me:$LINENO: result: $ac_ct_LIBTOOL_TEST" >&5
echo "${ECHO_T}$ac_ct_LIBTOOL_TEST" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_LIBTOOL_TEST" && break
done

  if test "x$ac_ct_LIBTOOL_TEST" = x; then
    LIBTOOL_TEST=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    LIBTOOL_TEST=$ac_ct_LIBTOOL_TEST
  fi
fi

    if test -n "$LIBTOOL_TEST"; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    # Extract the first word of "$LIBTOOL_TEST", so it can be a program name with args.
set dummy $LIBTOOL_TEST; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_LIBTOOL_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $LIBTOOL_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIBTOOL_PATH="$LIBTOOL_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     /sw/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_LIBTOOL_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
LIBTOOL_PATH=$ac_cv_path_LIBTOOL_PATH
if test -n "$LIBTOOL_PATH"; then
  { echo "$as_me:$LINENO: result: $LIBTOOL_PATH" >&5
echo "${ECHO_T}$LIBTOOL_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


	if test -n "$LIBTOOL_PATH"; then
  { echo "$as_me:$LINENO: checking classification of $LIBTOOL_PATH" >&5
echo $ECHO_N "checking classification of $LIBTOOL_PATH... $ECHO_C" >&6; }
	if { (echo "$as_me:$LINENO: \$LIBTOOL_PATH --version 1>&2") >&5
  ($LIBTOOL_PATH --version 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  { echo "$as_me:$LINENO: result: gnu" >&5
echo "${ECHO_T}gnu" >&6; }
	    LIBTOOL="$LIBTOOL_PATH"
else
  { echo "$as_me:$LINENO: result: apple" >&5
echo "${ECHO_T}apple" >&6; }
	    if test -z "$APPLE_LIBTOOL"; then
  APPLE_LIBTOOL="$LIBTOOL_PATH"
fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in glibtool gnulibtool
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_LIBTOOL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LIBTOOL"; then
  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
LIBTOOL=$ac_cv_prog_LIBTOOL
if test -n "$LIBTOOL"; then
  { echo "$as_me:$LINENO: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$LIBTOOL" && break
  done
fi
if test -z "$LIBTOOL"; then
  ac_ct_LIBTOOL=$LIBTOOL
  for ac_prog in glibtool gnulibtool
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_LIBTOOL"; then
  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
if test -n "$ac_ct_LIBTOOL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_LIBTOOL" >&5
echo "${ECHO_T}$ac_ct_LIBTOOL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_LIBTOOL" && break
done

  if test "x$ac_ct_LIBTOOL" = x; then
    LIBTOOL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    LIBTOOL=$ac_ct_LIBTOOL
  fi
fi

fi

fi

fi

fi



# Apple: Ensure that Apple libtool will be found before GNU libtool from Fink.

if test -z "$APPLE_LIBTOOL"; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    # Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_CS_LT_APPLE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CS_LT_APPLE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CS_LT_APPLE="$CS_LT_APPLE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CS_LT_APPLE="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CS_LT_APPLE=$ac_cv_path_CS_LT_APPLE
if test -n "$CS_LT_APPLE"; then
  { echo "$as_me:$LINENO: result: $CS_LT_APPLE" >&5
echo "${ECHO_T}$CS_LT_APPLE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    if test -n "$CS_LT_APPLE"; then
  { echo "$as_me:$LINENO: checking classification of $CS_LT_APPLE" >&5
echo $ECHO_N "checking classification of $CS_LT_APPLE... $ECHO_C" >&6; }
	if { (echo "$as_me:$LINENO: \$CS_LT_APPLE --version 1>&2") >&5
  ($CS_LT_APPLE --version 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  { echo "$as_me:$LINENO: result: gnu" >&5
echo "${ECHO_T}gnu" >&6; }

else
  { echo "$as_me:$LINENO: result: apple" >&5
echo "${ECHO_T}apple" >&6; }
	    APPLE_LIBTOOL="$CS_LT_APPLE"
fi

fi

fi


    cs_build_prop_val="$LIBTOOL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBTOOL ?= \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="$APPLE_LIBTOOL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}APPLE_LIBTOOL ?= \"$cs_build_prop_val\" ;
"
fi


{ echo "$as_me:$LINENO: checking how to create a directory" >&5
echo $ECHO_N "checking how to create a directory... $ECHO_C" >&6; }
if test "${cs_cv_shell_mkdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_shell_mkdir='mkdir'
fi
{ echo "$as_me:$LINENO: result: $cs_cv_shell_mkdir" >&5
echo "${ECHO_T}$cs_cv_shell_mkdir" >&6; }
    MKDIR=$cs_cv_shell_mkdir


    { echo "$as_me:$LINENO: checking how to create a directory tree" >&5
echo $ECHO_N "checking how to create a directory tree... $ECHO_C" >&6; }
if test "${cs_cv_shell_mkdir_p+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $cs_cv_shell_mkdir -p . 2>/dev/null; then
	    cs_cv_shell_mkdir_p='mkdir -p'
	elif mkdirs . 2>/dev/null; then
	    cs_cv_shell_mkdir_p='mkdirs'
	fi
	test -d ./-p && rmdir ./-p
fi
{ echo "$as_me:$LINENO: result: $cs_cv_shell_mkdir_p" >&5
echo "${ECHO_T}$cs_cv_shell_mkdir_p" >&6; }
    if test "${cs_cv_shell_mkdir_p+set}" = set; then
  MKDIRS=$cs_cv_shell_mkdir_p

else
  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 overridden 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { echo "$as_me:$LINENO: error: do not know how to create a directory tree" >&5
echo "$as_me: error: do not know how to create a directory tree" >&2;}
   { (exit 1); exit 1; }; }
fi

    cs_build_prop_val="$MKDIR"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.MKDIR ?= \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="$MKDIRS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.MKDIRS ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in install
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_INSTALL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$INSTALL"; then
  ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_INSTALL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
INSTALL=$ac_cv_prog_INSTALL
if test -n "$INSTALL"; then
  { echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$INSTALL" && break
done

    cs_build_prop_val="$INSTALL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}INSTALL ?= \"$cs_build_prop_val\" ;
"
fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in texi2dvi
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_TEXI2DVI+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$TEXI2DVI"; then
  ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_TEXI2DVI="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
TEXI2DVI=$ac_cv_prog_TEXI2DVI
if test -n "$TEXI2DVI"; then
  { echo "$as_me:$LINENO: result: $TEXI2DVI" >&5
echo "${ECHO_T}$TEXI2DVI" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$TEXI2DVI" && break
done

    cs_build_prop_val="$TEXI2DVI"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.TEXI2DVI ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in texi2pdf
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_TEXI2PDF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$TEXI2PDF"; then
  ac_cv_prog_TEXI2PDF="$TEXI2PDF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_TEXI2PDF="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
TEXI2PDF=$ac_cv_prog_TEXI2PDF
if test -n "$TEXI2PDF"; then
  { echo "$as_me:$LINENO: result: $TEXI2PDF" >&5
echo "${ECHO_T}$TEXI2PDF" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$TEXI2PDF" && break
done

    cs_build_prop_val="$TEXI2PDF"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.TEXI2PDF ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in dvips
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_DVIPS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DVIPS"; then
  ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DVIPS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
DVIPS=$ac_cv_prog_DVIPS
if test -n "$DVIPS"; then
  { echo "$as_me:$LINENO: result: $DVIPS" >&5
echo "${ECHO_T}$DVIPS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$DVIPS" && break
done

    cs_build_prop_val="$DVIPS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DVIPS ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in dvipdf
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_DVIPDF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DVIPDF"; then
  ac_cv_prog_DVIPDF="$DVIPDF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DVIPDF="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
DVIPDF=$ac_cv_prog_DVIPDF
if test -n "$DVIPDF"; then
  { echo "$as_me:$LINENO: result: $DVIPDF" >&5
echo "${ECHO_T}$DVIPDF" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$DVIPDF" && break
done

    cs_build_prop_val="$DVIPDF"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DVIPDF ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in makeinfo
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_MAKEINFO+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKEINFO"; then
  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_MAKEINFO="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
MAKEINFO=$ac_cv_prog_MAKEINFO
if test -n "$MAKEINFO"; then
  { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
echo "${ECHO_T}$MAKEINFO" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$MAKEINFO" && break
done

    cs_build_prop_val="$MAKEINFO"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.MAKEINFO ?= \"$cs_build_prop_val\" ;
"
fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in doxygen
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_DOXYGEN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DOXYGEN"; then
  ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DOXYGEN="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
DOXYGEN=$ac_cv_prog_DOXYGEN
if test -n "$DOXYGEN"; then
  { echo "$as_me:$LINENO: result: $DOXYGEN" >&5
echo "${ECHO_T}$DOXYGEN" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$DOXYGEN" && break
done

    cs_build_prop_val="$DOXYGEN"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DOXYGEN ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in dot
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_DOT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$DOT"; then
  ac_cv_prog_DOT="$DOT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_DOT="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
DOT=$ac_cv_prog_DOT
if test -n "$DOT"; then
  { echo "$as_me:$LINENO: result: $DOT" >&5
echo "${ECHO_T}$DOT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$DOT" && break
  done
fi
if test -z "$DOT"; then
  ac_ct_DOT=$DOT
  for ac_prog in dot
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_DOT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_DOT"; then
  ac_cv_prog_ac_ct_DOT="$ac_ct_DOT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_DOT="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_DOT=$ac_cv_prog_ac_ct_DOT
if test -n "$ac_ct_DOT"; then
  { echo "$as_me:$LINENO: result: $ac_ct_DOT" >&5
echo "${ECHO_T}$ac_ct_DOT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_DOT" && break
done

  if test "x$ac_ct_DOT" = x; then
    DOT=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    DOT=$ac_ct_DOT
  fi
fi

    cs_build_prop_val="$DOT"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.DOT ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in flex
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_FLEX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$FLEX"; then
  ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_FLEX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
FLEX=$ac_cv_prog_FLEX
if test -n "$FLEX"; then
  { echo "$as_me:$LINENO: result: $FLEX" >&5
echo "${ECHO_T}$FLEX" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$FLEX" && break
done

cs_build_prop_val="$FLEX"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.FLEX ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in bison
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BISON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$BISON"; then
  ac_cv_prog_BISON="$BISON" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BISON="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
BISON=$ac_cv_prog_BISON
if test -n "$BISON"; then
  { echo "$as_me:$LINENO: result: $BISON" >&5
echo "${ECHO_T}$BISON" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$BISON" && break
done

if test -n "$BISON"; then
  { echo "$as_me:$LINENO: checking if bison version >= 1.35" >&5
echo $ECHO_N "checking if bison version >= 1.35... $ECHO_C" >&6; }
if test "${cs_cv_prog_bison_version_1_35_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_bison_is_version=
cs_prog_bison_min_version=
cs_prog_bison_is_suffix=
cs_prog_bison_min_suffix=
cs_prog_bison_is_suffix_done=
cs_prog_bison_min_suffix_done=



test -z $cs_prog_bison_is_version && cs_prog_bison_is_version=`$BISON --version | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_bison_is_version" && test -z $cs_prog_bison_is_suffix_done  && { cs_prog_bison_is_suffix_done=yes ; cs_prog_bison_is_suffix= ; }





test -z $cs_prog_bison_min_version && cs_prog_bison_min_version=`echo 1.35 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_bison_min_version" && test -z $cs_prog_bison_min_suffix_done  && { cs_prog_bison_min_suffix_done=yes ; cs_prog_bison_min_suffix= ; }


cs_prog_bison_is_ver_1=`echo ${cs_prog_bison_is_version}${cs_prog_bison_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_bison_is_ver_2=`echo ${cs_prog_bison_is_version}${cs_prog_bison_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`

cs_prog_bison_min_ver_1=`echo $cs_prog_bison_min_version${cs_prog_bison_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_bison_min_ver_2=`echo $cs_prog_bison_min_version${cs_prog_bison_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`

cs_cv_prog_bison_version_1_35_ok=''
test -z "$cs_cv_prog_bison_version_1_35_ok" \
  && { expr "$cs_prog_bison_is_ver_1" ">=" "$cs_prog_bison_min_ver_1" >/dev/null \
    || cs_cv_prog_bison_version_1_35_ok=no ; }
test -z "$cs_cv_prog_bison_version_1_35_ok" \
  && { expr "$cs_prog_bison_min_ver_1" ">=" "$cs_prog_bison_is_ver_1" >/dev/null \
    || cs_cv_prog_bison_version_1_35_ok=yes ; }
test -z "$cs_cv_prog_bison_version_1_35_ok" \
  && { expr "$cs_prog_bison_is_ver_2" ">=" "$cs_prog_bison_min_ver_2" >/dev/null \
    || cs_cv_prog_bison_version_1_35_ok=no ; }
test -z "$cs_cv_prog_bison_version_1_35_ok" \
  && { expr "$cs_prog_bison_min_ver_2" ">=" "$cs_prog_bison_is_ver_2" >/dev/null \
    || cs_cv_prog_bison_version_1_35_ok=yes ; }

if test -z "$cs_cv_prog_bison_version_1_35_ok"; then
  cs_cv_prog_bison_version_1_35_ok=yes
fi

if test "$cs_cv_prog_bison_version_1_35_ok" = yes; then
  cs_prog_bison_version_ok=yes
else
  cs_prog_bison_version_ok=no
fi

cs_cv_prog_bison_version_1_35_ok_annotated="$cs_cv_prog_bison_version_1_35_ok"
if test -n "$cs_prog_bison_is_version"; then
  cs_cv_prog_bison_version_1_35_ok_annotated="$cs_cv_prog_bison_version_1_35_ok_annotated (version $cs_prog_bison_is_version)"
    cs_prog_bison_version="$cs_prog_bison_is_version"
else
  cs_prog_bison_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_bison_version_1_35_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_bison_version_1_35_ok_annotated" >&6; }
if test "$cs_cv_prog_bison_version_1_35_ok" = yes; then
  cs_build_prop_val="$BISON"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.BISON ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in hhc
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_HHC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$HHC"; then
  ac_cv_prog_HHC="$HHC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_HHC="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
HHC=$ac_cv_prog_HHC
if test -n "$HHC"; then
  { echo "$as_me:$LINENO: result: $HHC" >&5
echo "${ECHO_T}$HHC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$HHC" && break
  done
fi
if test -z "$HHC"; then
  ac_ct_HHC=$HHC
  for ac_prog in hhc
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_HHC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_HHC"; then
  ac_cv_prog_ac_ct_HHC="$ac_ct_HHC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_HHC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_HHC=$ac_cv_prog_ac_ct_HHC
if test -n "$ac_ct_HHC"; then
  { echo "$as_me:$LINENO: result: $ac_ct_HHC" >&5
echo "${ECHO_T}$ac_ct_HHC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_HHC" && break
done

  if test "x$ac_ct_HHC" = x; then
    HHC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    HHC=$ac_ct_HHC
  fi
fi

cs_build_prop_val="$HHC"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.HHC ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in swig
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_SWIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$SWIG"; then
  ac_cv_prog_SWIG="$SWIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_SWIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
SWIG=$ac_cv_prog_SWIG
if test -n "$SWIG"; then
  { echo "$as_me:$LINENO: result: $SWIG" >&5
echo "${ECHO_T}$SWIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$SWIG" && break
done

if test -n "$SWIG"; then
  { echo "$as_me:$LINENO: checking if swig version >= 1.3.21" >&5
echo $ECHO_N "checking if swig version >= 1.3.21... $ECHO_C" >&6; }
if test "${cs_cv_prog_swig_version_1_3_21_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_swig_is_version=
cs_prog_swig_min_version=
cs_prog_swig_is_suffix=
cs_prog_swig_min_suffix=
cs_prog_swig_is_suffix_done=
cs_prog_swig_min_suffix_done=




test -z $cs_prog_swig_is_version && cs_prog_swig_is_version=`$SWIG -version 2>&1 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_swig_is_version" && test -z $cs_prog_swig_is_suffix_done  && { cs_prog_swig_is_suffix_done=yes ; cs_prog_swig_is_suffix= ; }

test -z $cs_prog_swig_is_version && cs_prog_swig_is_version=`$SWIG -version 2>&1 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_swig_is_version" && test -z $cs_prog_swig_is_suffix_done  && { cs_prog_swig_is_suffix_done=yes ; cs_prog_swig_is_suffix=.0 ; }






test -z $cs_prog_swig_min_version && cs_prog_swig_min_version=`echo 1.3.21 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_swig_min_version" && test -z $cs_prog_swig_min_suffix_done  && { cs_prog_swig_min_suffix_done=yes ; cs_prog_swig_min_suffix= ; }

test -z $cs_prog_swig_min_version && cs_prog_swig_min_version=`echo 1.3.21 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_swig_min_version" && test -z $cs_prog_swig_min_suffix_done  && { cs_prog_swig_min_suffix_done=yes ; cs_prog_swig_min_suffix=.0 ; }


cs_prog_swig_is_ver_1=`echo ${cs_prog_swig_is_version}${cs_prog_swig_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_swig_is_ver_2=`echo ${cs_prog_swig_is_version}${cs_prog_swig_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_swig_is_ver_3=`echo ${cs_prog_swig_is_version}${cs_prog_swig_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`

cs_prog_swig_min_ver_1=`echo $cs_prog_swig_min_version${cs_prog_swig_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_swig_min_ver_2=`echo $cs_prog_swig_min_version${cs_prog_swig_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_swig_min_ver_3=`echo $cs_prog_swig_min_version${cs_prog_swig_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`

cs_cv_prog_swig_version_1_3_21_ok=''
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_is_ver_1" ">=" "$cs_prog_swig_min_ver_1" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=no ; }
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_min_ver_1" ">=" "$cs_prog_swig_is_ver_1" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=yes ; }
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_is_ver_2" ">=" "$cs_prog_swig_min_ver_2" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=no ; }
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_min_ver_2" ">=" "$cs_prog_swig_is_ver_2" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=yes ; }
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_is_ver_3" ">=" "$cs_prog_swig_min_ver_3" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=no ; }
test -z "$cs_cv_prog_swig_version_1_3_21_ok" \
  && { expr "$cs_prog_swig_min_ver_3" ">=" "$cs_prog_swig_is_ver_3" >/dev/null \
    || cs_cv_prog_swig_version_1_3_21_ok=yes ; }

if test -z "$cs_cv_prog_swig_version_1_3_21_ok"; then
  cs_cv_prog_swig_version_1_3_21_ok=yes
fi

if test "$cs_cv_prog_swig_version_1_3_21_ok" = yes; then
  cs_prog_swig_version_ok=yes
else
  cs_prog_swig_version_ok=no
fi

cs_cv_prog_swig_version_1_3_21_ok_annotated="$cs_cv_prog_swig_version_1_3_21_ok"
if test -n "$cs_prog_swig_is_version"; then
  cs_cv_prog_swig_version_1_3_21_ok_annotated="$cs_cv_prog_swig_version_1_3_21_ok_annotated (version $cs_prog_swig_is_version)"
    cs_prog_swig_version="$cs_prog_swig_is_version"
else
  cs_prog_swig_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_swig_version_1_3_21_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_swig_version_1_3_21_ok_annotated" >&6; }
if test "$cs_cv_prog_swig_version_1_3_21_ok" = yes; then
  cs_build_prop_val="$SWIG"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.SWIG ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# In order to avoid alienating users by forcing them to install and use Jam,
# config.status is instructed (see far below) to build Jam on the user's behalf
# from local sources, and to place the executable in the root of the build
# directory.  When checking for Jam, in addition to PATH, we also look in root
# of the build directory since we might already have built Jam on a previous
# configure run.
#
# IMPLEMENTATION NOTES
#
# The Crystal Space build system supports Jam versions starting with 2.4.
# Earlier versions are rejected. Examples of rejected versions include Apple's
# highly modified Jam (based upon 2.2.1), and ftjam (based upon
# 2.3.2). BoostJam reports its version number as 3.1.9 (or greater), though it
# is actually based upon Jam 2.4. Since we accept 2.4, and since 3.1.9 passes
# the "jam -v >= 2.4" assertion, this version anomaly is not a problem.
#
# We also check for 'make', since it is used to build Jam locally, when needed.
#------------------------------------------------------------------------------



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in jam
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAM="$JAM" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     $PATH$PATH_SEPARATOR.$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAM="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAM=$ac_cv_path_JAM
if test -n "$JAM"; then
  { echo "$as_me:$LINENO: result: $JAM" >&5
echo "${ECHO_T}$JAM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$JAM" && break
done

if test -n "$JAM"; then
  { echo "$as_me:$LINENO: checking if jam version >= 2.4" >&5
echo $ECHO_N "checking if jam version >= 2.4... $ECHO_C" >&6; }
if test "${cs_cv_prog_jam_version_2_4_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_jam_is_version=
cs_prog_jam_min_version=
cs_prog_jam_is_suffix=
cs_prog_jam_min_suffix=
cs_prog_jam_is_suffix_done=
cs_prog_jam_min_suffix_done=




test -z $cs_prog_jam_is_version && cs_prog_jam_is_version=`"$JAM" -v 2>&1 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_jam_is_version" && test -z $cs_prog_jam_is_suffix_done  && { cs_prog_jam_is_suffix_done=yes ; cs_prog_jam_is_suffix= ; }

test -z $cs_prog_jam_is_version && cs_prog_jam_is_version=`"$JAM" -v 2>&1 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_jam_is_version" && test -z $cs_prog_jam_is_suffix_done  && { cs_prog_jam_is_suffix_done=yes ; cs_prog_jam_is_suffix=.0 ; }






test -z $cs_prog_jam_min_version && cs_prog_jam_min_version=`echo 2.4 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_jam_min_version" && test -z $cs_prog_jam_min_suffix_done  && { cs_prog_jam_min_suffix_done=yes ; cs_prog_jam_min_suffix= ; }

test -z $cs_prog_jam_min_version && cs_prog_jam_min_version=`echo 2.4 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_jam_min_version" && test -z $cs_prog_jam_min_suffix_done  && { cs_prog_jam_min_suffix_done=yes ; cs_prog_jam_min_suffix=.0 ; }


cs_prog_jam_is_ver_1=`echo ${cs_prog_jam_is_version}${cs_prog_jam_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_jam_is_ver_2=`echo ${cs_prog_jam_is_version}${cs_prog_jam_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_jam_is_ver_3=`echo ${cs_prog_jam_is_version}${cs_prog_jam_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`

cs_prog_jam_min_ver_1=`echo $cs_prog_jam_min_version${cs_prog_jam_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_jam_min_ver_2=`echo $cs_prog_jam_min_version${cs_prog_jam_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_jam_min_ver_3=`echo $cs_prog_jam_min_version${cs_prog_jam_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`

cs_cv_prog_jam_version_2_4_ok=''
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_is_ver_1" ">=" "$cs_prog_jam_min_ver_1" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=no ; }
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_min_ver_1" ">=" "$cs_prog_jam_is_ver_1" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=yes ; }
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_is_ver_2" ">=" "$cs_prog_jam_min_ver_2" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=no ; }
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_min_ver_2" ">=" "$cs_prog_jam_is_ver_2" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=yes ; }
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_is_ver_3" ">=" "$cs_prog_jam_min_ver_3" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=no ; }
test -z "$cs_cv_prog_jam_version_2_4_ok" \
  && { expr "$cs_prog_jam_min_ver_3" ">=" "$cs_prog_jam_is_ver_3" >/dev/null \
    || cs_cv_prog_jam_version_2_4_ok=yes ; }

if test -z "$cs_cv_prog_jam_version_2_4_ok"; then
  cs_cv_prog_jam_version_2_4_ok=yes
fi

if test "$cs_cv_prog_jam_version_2_4_ok" = yes; then
  cs_prog_jam_version_ok=yes
else
  cs_prog_jam_version_ok=no
fi

cs_cv_prog_jam_version_2_4_ok_annotated="$cs_cv_prog_jam_version_2_4_ok"
if test -n "$cs_prog_jam_is_version"; then
  cs_cv_prog_jam_version_2_4_ok_annotated="$cs_cv_prog_jam_version_2_4_ok_annotated (version $cs_prog_jam_is_version)"
    cs_prog_jam_version="$cs_prog_jam_is_version"
else
  cs_prog_jam_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_jam_version_2_4_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_jam_version_2_4_ok_annotated" >&6; }
if test "$cs_cv_prog_jam_version_2_4_ok" = yes; then
  cs_prog_jam_okay=yes
else
  cs_prog_jam_okay=no
fi

else
  cs_prog_jam_okay=no
fi


if test $cs_prog_jam_okay != yes; then
  JAM=./jam$EXEEXT CS_NEED_LOCAL_JAM=yes
fi

cs_build_prop_val="$JAM"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAM ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in gnumake gmake make
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_MAKE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKE"; then
  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_MAKE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
MAKE=$ac_cv_prog_MAKE
if test -n "$MAKE"; then
  { echo "$as_me:$LINENO: result: $MAKE" >&5
echo "${ECHO_T}$MAKE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$MAKE" && break
done




#------------------------------------------------------------------------------
# The cs-win32libs package is a convenience archive made available to Windows
# users of Crystal Space.  It contains common libraries, headers, and tools
# (such as zlib, libjpeg, cal3d, etc.) usable by MSVC, Mingw/MSYS, and Cygwin
# users.  It saves users the bother of having to install these packages
# manually one at a time.
#------------------------------------------------------------------------------
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH

    # ensure PKGCONFIG is set since we may meddle with it


    case $host_os in
    mingw*|cygwin*)

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cslibs-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CSLIBS_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CSLIBS_CONFIG"; then
  ac_cv_prog_CSLIBS_CONFIG="$CSLIBS_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CSLIBS_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CSLIBS_CONFIG=$ac_cv_prog_CSLIBS_CONFIG
if test -n "$CSLIBS_CONFIG"; then
  { echo "$as_me:$LINENO: result: $CSLIBS_CONFIG" >&5
echo "${ECHO_T}$CSLIBS_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CSLIBS_CONFIG" && break
  done
fi
if test -z "$CSLIBS_CONFIG"; then
  ac_ct_CSLIBS_CONFIG=$CSLIBS_CONFIG
  for ac_prog in cslibs-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CSLIBS_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CSLIBS_CONFIG"; then
  ac_cv_prog_ac_ct_CSLIBS_CONFIG="$ac_ct_CSLIBS_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CSLIBS_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CSLIBS_CONFIG=$ac_cv_prog_ac_ct_CSLIBS_CONFIG
if test -n "$ac_ct_CSLIBS_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CSLIBS_CONFIG" >&5
echo "${ECHO_T}$ac_ct_CSLIBS_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CSLIBS_CONFIG" && break
done

  if test "x$ac_ct_CSLIBS_CONFIG" = x; then
    CSLIBS_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CSLIBS_CONFIG=$ac_ct_CSLIBS_CONFIG
  fi
fi

        if test $ac_compiler_gnu = yes; then
  cs_cv_cslibs_compiler="--compiler gcc-`$CXX -dumpversion |
	      sed 's/\([0-9]\?\)\.\([0-9]\?\)\.[0-9]\?/\1.\2/'`"
fi

        { echo "$as_me:$LINENO: checking for cslibs package" >&5
echo $ECHO_N "checking for cslibs package... $ECHO_C" >&6; }
if test "${cs_cv_cslibs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CSLIBS_CONFIG"; then
  cs_cv_cslibs=yes
               if test "x$cs_mno_cygwin" = "xyes"; then
  if $CSLIBS_CONFIG -mno-cygwin --cflags >/dev/null 2>&1; then
  cs_cv_cslibs_compiler="-mno-cygwin $cs_cv_cslibs_compiler"
fi

fi

	       cs_cv_cslibs_cflags=`{ (echo "$as_me:$LINENO: \$CSLIBS_CONFIG --cflags \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --cflags $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	       cs_cv_cslibs_lflags=`{ (echo "$as_me:$LINENO: \$CSLIBS_CONFIG --lflags \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --lflags $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	       cs_cv_cslibs_binpath=`{ (echo "$as_me:$LINENO: \$CSLIBS_CONFIG --binpath \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --binpath $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
               if $CSLIBS_CONFIG --incpath >/dev/null 2>&1; then
  cs_cv_cslibs_incpath=`{ (echo "$as_me:$LINENO: \$CSLIBS_CONFIG --incpath \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --incpath $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
else
  cs_cv_cslibs_incpath=''
fi

               if $CSLIBS_CONFIG --pcpath >/dev/null 2>&1; then
  cs_cv_cslibs_pcpath=`{ (echo "$as_me:$LINENO: \$CSLIBS_CONFIG --pcpath \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --pcpath $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
else
  cs_cv_cslibs_pcpath=''
fi

else
  cs_cv_cslibs=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_cslibs" >&5
echo "${ECHO_T}$cs_cv_cslibs" >&6; }
        if test $cs_cv_cslibs = yes; then
  CFLAGS="$CFLAGS $cs_cv_cslibs_cflags"
	    CPPFLAGS="$CPPFLAGS $cs_cv_cslibs_cflags"
	    LDFLAGS="$LDFLAGS $cs_cv_cslibs_lflags"
	    PATH="$cs_cv_cslibs_binpath$PATH_SEPARATOR$PATH"
	    if test -n "$cs_cv_cslibs_pcpath"; then
  PKG_CONFIG_PATH="$cs_cv_cslibs_pcpath$PATH_SEPARATOR$PKG_CONFIG_PATH"
		export PKG_CONFIG_PATH
fi

fi

        ;;
    esac


#------------------------------------------------------------------------------
# Use the CPPFLAGS, CXXFLAGS, CFLAGS, and LDFLAGS passed to configure, as well
# as any additional flags provided by cs-win32libs.
#------------------------------------------------------------------------------
cs_build_prop_val="$CPPFLAGS $CFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

cs_build_prop_val="$CPPFLAGS $CXXFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS += \"$cs_build_prop_val\" ;
"
fi

cs_build_prop_val="$LDFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi




#------------------------------------------------------------------------------
# Check for typical required libraries (libm, libmx, libdl, libnsl).
#------------------------------------------------------------------------------
ac_ext=cpp
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


{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # Extract the first word of "grep ggrep" to use in msg output
if test -z "$GREP"; then
set dummy grep ggrep; ac_prog_name=$2
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in grep ggrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
    # Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_GREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

GREP="$ac_cv_path_GREP"
if test -z "$GREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_GREP=$GREP
fi


fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     # Extract the first word of "egrep" to use in msg output
if test -z "$EGREP"; then
set dummy egrep; ac_prog_name=$2
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in egrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
    # Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_EGREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

EGREP="$ac_cv_path_EGREP"
if test -z "$EGREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_EGREP=$EGREP
fi


   fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_stdc=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "memchr" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "free" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
		   (('a' <= (c) && (c) <= 'i') \
		     || ('j' <= (c) && (c) <= 'r') \
		     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
	|| toupper (i) != TOUPPER (i))
      return 2;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $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
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF

fi

# On IRIX 5.3, sys/types and inttypes.h are conflicting.









for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
		  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_Header=no"
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



for ac_header in cmath
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_CMATH_H
"
fi

done


for ac_header in math.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_MATH_H
"
fi

done


for ac_header in ieeefp.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_IEEEFP_H
"
fi

done

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


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:$LINENO: checking for pow in -lm" >&5
echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6; }
if test "${ac_cv_lib_m_pow+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char pow ();
int
main ()
{
return pow ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_m_pow=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_m_pow=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
echo "${ECHO_T}$ac_cv_lib_m_pow" >&6; }
if test $ac_cv_lib_m_pow = yes; then
  cs_cv_libm_libs=-lm
else
  cs_cv_libm_libs=
fi

    { echo "$as_me:$LINENO: checking for cosf in -lm" >&5
echo $ECHO_N "checking for cosf in -lm... $ECHO_C" >&6; }
if test "${ac_cv_lib_m_cosf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char cosf ();
int
main ()
{
return cosf ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_m_cosf=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_m_cosf=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_cosf" >&5
echo "${ECHO_T}$ac_cv_lib_m_cosf" >&6; }
if test $ac_cv_lib_m_cosf = yes; then
  cs_cv_libm_libs=-lm
fi


{ echo "$as_me:$LINENO: checking for cosf in -lmx" >&5
echo $ECHO_N "checking for cosf in -lmx... $ECHO_C" >&6; }
if test "${ac_cv_lib_mx_cosf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmx  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char cosf ();
int
main ()
{
return cosf ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_mx_cosf=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_mx_cosf=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_mx_cosf" >&5
echo "${ECHO_T}$ac_cv_lib_mx_cosf" >&6; }
if test $ac_cv_lib_mx_cosf = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMX 1
_ACEOF

  LIBS="-lmx $LIBS"

fi

    { echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dl_dlopen=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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
  cs_cv_libdl_libs=-ldl
else
  cs_cv_libdl_libs=
fi


{ echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nsl_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF

  LIBS="-lnsl $LIBS"

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 $ac_cv_lib_m_pow = yes || test $ac_cv_lib_m_cosf = yes; then
  cs_build_prop_val="-lm"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi

if test $ac_cv_lib_mx_cosf = yes; then
  cs_build_prop_val="-lmx"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi

if test $ac_cv_lib_dl_dlopen = yes; then
  cs_build_prop_val="-ldl"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi

if test $ac_cv_lib_nsl_gethostbyname = yes; then
  cs_build_prop_val="-lnsl"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi


if test $ac_cv_lib_m_cosf != no || test $ac_cv_lib_mx_cosf != no; then
  cs_header_text="${cs_header_text}#define CS_HAVE_MATH_H_FLOAT_FUNCS
"
fi




#------------------------------------------------------------------------------
# Check for pthread.  Also check if pthread implementation supports the
# recursive mutex extension and `atfork' functionality.
#------------------------------------------------------------------------------

    case $host_os in
	cygwin*)
	    cs_cv_sys_pthread=no
	    ;;

	*)
	    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for pthread" >&5
echo $ECHO_N "checking for pthread... $ECHO_C" >&6; }
if test "${cs_cv_sys_pthread+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
    `echo @@@-lpthread | sed 'y% %#%'` \
    `echo @@@-lpthread -lrt | sed 'y% %#%'` \
    `echo @-pthread@-pthread@ | sed 'y% %#%'` \
    `echo @-pthread@-pthread@-lpthread | sed 'y% %#%'` \
    `echo @-pthread@-pthread@-lc_r | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
		    #include <semaphore.h>
		    void* worker(void* p) { (void)p; return p; }
int
main ()
{
pthread_t tid;
		    sem_t sem;
		    pthread_create(&tid, 0, worker, 0);
		    sem_init(&sem, 0, 0);
		    sem_destroy(&sem);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_pthread=yes
		cs_cv_sys_pthread_cflags=$cs_build_cflags
		cs_cv_sys_pthread_lflags=$cs_build_lflags
		cs_cv_sys_pthread_libs=$cs_build_libs
else
  cs_cv_sys_pthread=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_pthread" >&5
echo "${ECHO_T}$cs_cv_sys_pthread" >&6; }
else
  { echo "$as_me:$LINENO: checking for pthread" >&5
echo $ECHO_N "checking for pthread... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
    `echo @@@-lpthread | sed 'y% %#%'` \
    `echo @@@-lpthread -lrt | sed 'y% %#%'` \
    `echo @-pthread@-pthread@ | sed 'y% %#%'` \
    `echo @-pthread@-pthread@-lpthread | sed 'y% %#%'` \
    `echo @-pthread@-pthread@-lc_r | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
		    #include <semaphore.h>
		    void* worker(void* p) { (void)p; return p; }
int
main ()
{
pthread_t tid;
		    sem_t sem;
		    pthread_create(&tid, 0, worker, 0);
		    sem_init(&sem, 0, 0);
		    sem_destroy(&sem);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_pthread=yes
		cs_cv_sys_pthread_cflags=$cs_build_cflags
		cs_cv_sys_pthread_lflags=$cs_build_lflags
		cs_cv_sys_pthread_libs=$cs_build_libs
else
  cs_cv_sys_pthread=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_sys_pthread" >&5
echo "${ECHO_T}$cs_cv_sys_pthread" >&6; }
fi

    if test $cs_cv_sys_pthread = yes; then
  :
else
  cs_cv_sys_pthread_cflags=''
	cs_cv_sys_pthread_lflags=''
	cs_cv_sys_pthread_libs=''

fi

	    ;;
    esac
    if test $cs_cv_sys_pthread = yes; then
  { echo "$as_me:$LINENO: checking for pthread recursive mutexes" >&5
echo $ECHO_N "checking for pthread recursive mutexes... $ECHO_C" >&6; }
if test "${cs_cv_sys_pthread_mutex_recursive+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-DCS_MUTEX_FEATURE=PTHREAD_MUTEX_RECURSIVE@@ | sed 'y% %#%'` \
		`echo @-DCS_MUTEX_FEATURE=PTHREAD_MUTEX_RECURSIVE_NP@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags -D_GNU_SOURCE $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
pthread_mutexattr_t attr;
		    pthread_mutexattr_settype(&attr, CS_MUTEX_FEATURE);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags -D_GNU_SOURCE | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_pthread_mutex_recursive=`echo $cs_build_cflags | sed 's/.*\(PTHREAD_MUTEX_RECURSIVE_*N*P*\).*/\1/'`
else
  cs_cv_sys_pthread_mutex_recursive=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_pthread_mutex_recursive" >&5
echo "${ECHO_T}$cs_cv_sys_pthread_mutex_recursive" >&6; }
else
  cs_cv_sys_pthread_mutex_recursive=no
fi

if test "$cs_cv_sys_pthread" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PTHREAD.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_sys_pthread_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PTHREAD.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_sys_pthread_lflags $cs_cv_sys_pthread_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PTHREAD.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

if test $cs_cv_sys_pthread_mutex_recursive != no; then
  cs_header_text="${cs_header_text}#define CS_PTHREAD_MUTEX_RECURSIVE $cs_cv_sys_pthread_mutex_recursive
"
fi

if test $cs_cv_sys_pthread = yes; then
  { echo "$as_me:$LINENO: checking for pthread_atfork support" >&5
echo $ECHO_N "checking for pthread_atfork support... $ECHO_C" >&6; }
if test "${cs_cv_sys_pthread_atfork+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags -D_GNU_SOURCE $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
pthread_atfork (0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags -D_GNU_SOURCE | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_pthread_atfork=yes
else
  cs_cv_sys_pthread_atfork=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_pthread_atfork" >&5
echo "${ECHO_T}$cs_cv_sys_pthread_atfork" >&6; }
else
  cs_cv_sys_pthread_atfork=no
fi

cs_build_prop_val="$cs_cv_sys_pthread_atfork"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PTHREAD.ATFORK.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi




#------------------------------------------------------------------------------
# Determine whether to link base g++ libraries statically
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to link base g++ libraries statically" >&5
echo $ECHO_N "checking whether to link base g++ libraries statically... $ECHO_C" >&6; }
# Check whether --enable-static-baselibs was given.
if test "${enable_static_baselibs+set}" = set; then
  enableval=$enable_static_baselibs;
else
  enable_static_baselibs=no
fi

{ echo "$as_me:$LINENO: result: $enable_static_baselibs" >&5
echo "${ECHO_T}$enable_static_baselibs" >&6; }
if test $enable_static_baselibs = yes; then
  { echo "$as_me:$LINENO: checking for -static-libgcc" >&5
echo $ECHO_N "checking for -static-libgcc... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_static_libgcc_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-static-libgcc@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_static_libgcc=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_static_libgcc_ok="$cs_cv_prog_link_static_libgcc"
else
  cs_cv_prog_link_static_libgcc=''
	    cs_cv_prog_link_static_libgcc_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_static_libgcc_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_static_libgcc_ok" >&6; }
    if test "$cs_cv_prog_link_static_libgcc_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_static_libgcc"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi

    libstdcxx=`$CXX -print-file-name=libstdc++.a`
    { echo "$as_me:$LINENO: checking for static libstdc++" >&5
echo $ECHO_N "checking for static libstdc++... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_static_libstdcxx_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$libstdcxx@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_static_libstdcxx=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_static_libstdcxx_ok="$cs_cv_prog_link_static_libstdcxx"
else
  cs_cv_prog_link_static_libstdcxx=''
	    cs_cv_prog_link_static_libstdcxx_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_static_libstdcxx_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_static_libstdcxx_ok" >&6; }
    if test "$cs_cv_prog_link_static_libstdcxx_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_static_libstdcxx"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi

fi




#------------------------------------------------------------------------------
# Check if RTLD_NOW dlopen() flag is available; some installations (OpenBSD,
# for example) provide only RTLD_LAZY.
#------------------------------------------------------------------------------



    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for RTLD_NOW" >&5
echo $ECHO_N "checking for RTLD_NOW... $ECHO_C" >&6; }
if test "${cs_cv_sys_rtld_now+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libdl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <dlfcn.h>
int
main ()
{
dlopen(0, RTLD_NOW)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libdl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_rtld_now=yes
		cs_cv_sys_rtld_now_cflags=$cs_build_cflags
		cs_cv_sys_rtld_now_lflags=$cs_build_lflags
		cs_cv_sys_rtld_now_libs=$cs_build_libs
else
  cs_cv_sys_rtld_now=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_rtld_now" >&5
echo "${ECHO_T}$cs_cv_sys_rtld_now" >&6; }
else
  { echo "$as_me:$LINENO: checking for RTLD_NOW" >&5
echo $ECHO_N "checking for RTLD_NOW... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libdl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <dlfcn.h>
int
main ()
{
dlopen(0, RTLD_NOW)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libdl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_rtld_now=yes
		cs_cv_sys_rtld_now_cflags=$cs_build_cflags
		cs_cv_sys_rtld_now_lflags=$cs_build_lflags
		cs_cv_sys_rtld_now_libs=$cs_build_libs
else
  cs_cv_sys_rtld_now=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_sys_rtld_now" >&5
echo "${ECHO_T}$cs_cv_sys_rtld_now" >&6; }
fi

    if test $cs_cv_sys_rtld_now = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_RTLD_NOW
"
else
  cs_cv_sys_rtld_now_cflags=''
	cs_cv_sys_rtld_now_lflags=''
	cs_cv_sys_rtld_now_libs=''

fi




#------------------------------------------------------------------------------
# Determine host platform.  Recognized families: Unix, Windows, MacOS/X.
#
# CS_CHECK_HOST
#	Sets the shell variables cs_host_target and cs_host_family.  Client
#	code can use these variables to emit appropriate Jam variables and
#	CS_PLATFORM_FOO header define.
#------------------------------------------------------------------------------


    case $host_cpu in
        [Ii][3-9]86*|[Xx]86*) cs_host_cpu=x86 ;;
        *) cs_host_cpu=$host_cpu ;;
    esac
    cs_host_cpu_normalized="`echo "$cs_host_cpu" | $as_tr_cpp`"
    cs_jamconfig_text="${cs_jamconfig_text}TARGET.PROCESSOR ?= \"$cs_host_cpu_normalized\" ;
"

    cs_host_os_normalized=''
    case $host_os in
        mingw*|cygwin*)
            cs_host_target=win32gcc
            cs_host_family=windows
            ;;
        darwin*)



    # Both MacOS/X and Darwin are identified via $host_os as "darwin".  We need
    # a way to distinguish between the two.  If Carbon.h is present, then
    # assume MacOX/S; if not, assume Darwin.  If --with-x=yes was invoked, and
    # Carbon.h is present, then assume that user wants to cross-build for
    # Darwin even though build host is MacOS/X.
    # IMPLEMENTATION NOTE *1*
    # The QuickTime 7.0 installer removes <CarbonSound/CarbonSound.h>, which
    # causes #include <Carbon/Carbon.h> to fail unconditionally. Re-installing
    # the QuickTime SDK should restore the header, however not all developers
    # know to do this, so we work around the problem of the missing
    # CarbonSound.h by #defining __CARBONSOUND__ in the test in order to
    # prevent Carbon.h from attempting to #include the missing header.
    # IMPLEMENTATION NOTE *2*
    # At least one MacOS/X user switches between gcc 2.95 and gcc 3.3 with a
    # script which toggles the values of CC, CXX, and CPP.  Unfortunately, CPP
    # was being set to run the preprocessor directly ("cpp", for instance)
    # rather than running it via the compiler ("gcc -E", for instance).  The
    # problem with running the preprocessor directly is that __APPLE__ and
    # __GNUC__ are not defined, which causes the Carbon.h check to fail.  We
    # avoid this problem by supplying a non-empty fourth argument to
    # AC_CHECK_HEADER(), which causes it to test compile the header only (which
    # is a more robust test), rather than also testing it via the preprocessor.


cat >>confdefs.h <<\_ACEOF
#define __CARBONSOUND__
_ACEOF

    { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* force compile */

#include <Carbon/Carbon.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_header_Carbon_Carbon_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_Carbon_Carbon_h=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
if test $ac_cv_header_Carbon_Carbon_h = yes; then
  cs_host_macosx=yes
else
  cs_host_macosx=no
fi



    if test $cs_host_macosx = yes; then
  { echo "$as_me:$LINENO: checking for --with-x" >&5
echo $ECHO_N "checking for --with-x... $ECHO_C" >&6; }
	if test "${with_x+set}" = set && test "$with_x" = "yes"; then
  { echo "$as_me:$LINENO: result: yes (assume Darwin)" >&5
echo "${ECHO_T}yes (assume Darwin)" >&6; }
	    cs_host_macosx=no
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

fi


    if test $cs_host_macosx = yes; then
  cs_host_target=macosx
	cs_host_family=unix
	cs_host_os_normalized='MacOS/X'

cat >>confdefs.h <<\_ACEOF
#define CS_PLATFORM_MACOSX
_ACEOF


	{ echo "$as_me:$LINENO: checking for Objective-C compiler" >&5
echo $ECHO_N "checking for Objective-C compiler... $ECHO_C" >&6; }
if test "${cs_cv_prog_objc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_objc="$CC"
fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_objc" >&5
echo "${ECHO_T}$cs_cv_prog_objc" >&6; }
	cs_jamconfig_text="${cs_jamconfig_text}CMD.OBJC ?= \"$cs_cv_prog_objc\" ;
"
	{ echo "$as_me:$LINENO: checking for Objective-C++ compiler" >&5
echo $ECHO_N "checking for Objective-C++ compiler... $ECHO_C" >&6; }
if test "${cs_cv_prog_objcxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_objcxx="$CXX"
fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_objcxx" >&5
echo "${ECHO_T}$cs_cv_prog_objcxx" >&6; }
	cs_jamconfig_text="${cs_jamconfig_text}CMD.OBJC++ ?= \"$cs_cv_prog_objcxx\" ;
"
else
  cs_host_target=unix
	cs_host_family=unix
fi

            ;;
        *)
            # Everything else is assumed to be Unix or Unix-like.
            cs_host_target=unix
            cs_host_family=unix
	    ;;
    esac

    case $cs_host_family in
	windows)

cat >>confdefs.h <<\_ACEOF
#define CS_PLATFORM_WIN32
_ACEOF

	    if test -z "$cs_host_os_normalized"; then
  cs_host_os_normalized='Win32'
fi

	    ;;
	unix)

cat >>confdefs.h <<\_ACEOF
#define CS_PLATFORM_UNIX
_ACEOF

	    if test -z "$cs_host_os_normalized"; then
  cs_host_os_normalized='Unix'
fi

	    ;;
    esac

    cs_host_os_normalized_uc="`echo "$cs_host_os_normalized" | $as_tr_cpp`"
    cs_jamconfig_text="${cs_jamconfig_text}TARGET.OS ?= \"$cs_host_os_normalized_uc\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}TARGET.OS.NORMALIZED ?= \"$cs_host_os_normalized\" ;
"

if test "x$cs_host_macosx" = "xyes"; then
  # We assume that we always have CoreAudio available on MacOS/X.
    cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COREAUDIO.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="-framework CoreAudio -framework AudioToolbox"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COREAUDIO.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

    cs_header_text="${cs_header_text}#define CS_PLATFORM_MACOSX
"
else
  case $cs_host_family in
	windows)
	    cs_header_text="${cs_header_text}#define CS_PLATFORM_WIN32
"
	    ;;
	unix)
	    cs_header_text="${cs_header_text}#define CS_PLATFORM_UNIX
"
    esac
fi

cs_header_text="${cs_header_text}#define CS_PLATFORM_NAME \"$cs_host_os_normalized\"
"



#------------------------------------------------------------------------------
# Check if Perl SDK is installed and which compiler and linker flags are
# required to embed Perl.  Also determine if the glue file can be created with
# ExtUtils::Embed or if it must be created manually.
#------------------------------------------------------------------------------

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in perl5 perl
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PERL"; then
  ac_cv_prog_PERL="$PERL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PERL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
PERL=$ac_cv_prog_PERL
if test -n "$PERL"; then
  { echo "$as_me:$LINENO: result: $PERL" >&5
echo "${ECHO_T}$PERL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$PERL" && break
done

cs_build_prop_val="$PERL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5 ?= \"$cs_build_prop_val\" ;
"
fi

cs_build_prop_val="$PERL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL ?= \"$cs_build_prop_val\" ;
"
fi

cs_build_prop_val="$PERL"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.PERL5 ?= \"$cs_build_prop_val\" ;
"
fi


# csperl5 fails to build on many platforms, so default is NO for now.

# Check whether --with-perl was given.
if test "${with_perl+set}" = set; then
  withval=$with_perl;
fi

if test -z "$with_perl"; then
  with_perl=no
fi


if test -n "$PERL" && test "$with_perl" != no; then
  { echo "$as_me:$LINENO: checking for perl ExtUtils::Embed module" >&5
echo $ECHO_N "checking for perl ExtUtils::Embed module... $ECHO_C" >&6; }
if test "${cs_cv_perl_mod_embed+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if { (echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e 0 1>&2") >&5
  ($PERL -MExtUtils::Embed -e 0 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_cv_perl_mod_embed=yes
else
  cs_cv_perl_mod_embed=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_perl_mod_embed" >&5
echo "${ECHO_T}$cs_cv_perl_mod_embed" >&6; }

    if test $cs_cv_perl_mod_embed = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.EXTUTILS.EMBED.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	{ echo "$as_me:$LINENO: checking for perl DynaLoader module" >&5
echo $ECHO_N "checking for perl DynaLoader module... $ECHO_C" >&6; }
if test "${cs_cv_perl_mod_dynaloader+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if { (echo "$as_me:$LINENO: \$PERL -MDynaLoader -e 0 1>&2") >&5
  ($PERL -MDynaLoader -e 0 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_cv_perl_mod_dynaloader=yes
else
  cs_cv_perl_mod_dynaloader=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_perl_mod_dynaloader" >&5
echo "${ECHO_T}$cs_cv_perl_mod_dynaloader" >&6; }
	if test $cs_cv_perl_mod_dynaloader = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.DYNALOADER.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  # ExtUtils::Embed absent.
	{ echo "$as_me:$LINENO: Recommend you install a recent release of Perl 5." >&5
echo "$as_me: Recommend you install a recent release of Perl 5." >&6;}
	{ echo "$as_me:$LINENO: http://www.perl.org/" >&5
echo "$as_me: http://www.perl.org/" >&6;}
	{ echo "$as_me:$LINENO: checking for perl Config module" >&5
echo $ECHO_N "checking for perl Config module... $ECHO_C" >&6; }
if test "${cs_cv_perl_mod_config+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if { (echo "$as_me:$LINENO: \$PERL -MConfig -e 0 1>&2") >&5
  ($PERL -MConfig -e 0 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_cv_perl_mod_config=yes
else
  cs_cv_perl_mod_config=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_perl_mod_config" >&5
echo "${ECHO_T}$cs_cv_perl_mod_config" >&6; }
fi


    if test "${cs_cv_perl_cflags+set}" = set; then
  :
else
  if test $cs_cv_perl_mod_embed = yes; then
  cs_cv_perl_cflags=`{ (echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e ccopts") >&5
  ($PERL -MExtUtils::Embed -e ccopts) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_perl_lflags=`{ (echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e ldopts") >&5
  ($PERL -MExtUtils::Embed -e ldopts) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_perl_ext=`{ (echo "$as_me:$LINENO: \$PERL -MConfig -e \\
		'\$e = \$Config{\"dlext\"} || \$Config{\"so\"} || \"\"; print \"\$e\"'") >&5
  ($PERL -MConfig -e \
		'$e = $Config{"dlext"} || $Config{"so"} || ""; print "$e"') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
else
  if test $cs_cv_perl_mod_config = yes; then
  cs_perl_core=`{ (echo "$as_me:$LINENO: \$PERL -MConfig -e 'print \$Config{archlib}'") >&5
  ($PERL -MConfig -e 'print $Config{archlib}') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_core="${cs_perl_core}/CORE"
		cs_cv_perl_cflags=`{ (echo "$as_me:$LINENO: \$PERL -MConfig -e 'print \$Config{ccflags}'") >&5
  ($PERL -MConfig -e 'print $Config{ccflags}') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_cv_perl_cflags="${cs_cv_perl_cflags} -I${cs_perl_core}"
		cs_cv_perl_lflags=`{ (echo "$as_me:$LINENO: \$PERL -MConfig -e \\
		    'print \$Config{ldflags}, \" \", \$Config{libs}'") >&5
  ($PERL -MConfig -e \
		    'print $Config{ldflags}, " ", $Config{libs}') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_cv_perl_lflags="${cs_cv_perl_lflags} -L${cs_perl_core}"
		cs_cv_perl_ext=`{ (echo "$as_me:$LINENO: \$PERL -MConfig -e \\
		    '\$e = \$Config{\"dlext\"}||\$Config{\"so\"}||\"\"; print \"\$e\"'") >&5
  ($PERL -MConfig -e \
		    '$e = $Config{"dlext"}||$Config{"so"}||""; print "$e"') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
else
  cs_perl_core=`{ (echo "$as_me:$LINENO: \$PERL -V:archlib | \\
		    \$PERL -e '<STDIN> =~ m/\\x27(.*)\\x27/; print \$1'") >&5
  ($PERL -V:archlib | \
		    $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_core="${cs_perl_core}/CORE"
		cs_cv_perl_cflags=`{ (echo "$as_me:$LINENO: \$PERL -V:ccflags | \\
		    \$PERL -e '<STDIN> =~ m/\\x27(.*)\\x27/; print \$1'") >&5
  ($PERL -V:ccflags | \
		    $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_cv_perl_cflags="${cs_cv_perl_cflags} -I${cs_perl_core}"
		cs_cv_perl_lflags=`{ (echo "$as_me:$LINENO: \$PERL -V:ldflags | \\
		    \$PERL -e '<STDIN> =~ m/\\x27(.*)\\x27/; print \$1'") >&5
  ($PERL -V:ldflags | \
		    $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_lflags_tmp=`{ (echo "$as_me:$LINENO: \$PERL -V:libs | \\
		    \$PERL -e '<STDIN> =~ m/\\x27(.*)\\x27/; print \$1'") >&5
  ($PERL -V:libs | \
		    $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_cv_perl_lflags="${cs_cv_perl_lflags} ${cs_perl_lflags_tmp}
		    -L${cs_perl_core}"
		cs_cv_perl_ext=`{ (echo "$as_me:$LINENO: \$PERL -V:dlext | \\
		    \$PERL -e '<STDIN> =~ m/\\x27(.*)\\x27/; print \$1'") >&5
  ($PERL -V:dlext | \
		    $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
fi

fi

	cs_cv_perl_cflags=`echo "x$cs_cv_perl_cflags" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_perl_lflags=`echo "x$cs_cv_perl_lflags" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
fi


    if test -n "$cs_cv_perl_cflags$cs_cv_perl_lflags"; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if Perl SDK is usable" >&5
echo $ECHO_N "checking if Perl SDK is usable... $ECHO_C" >&6; }
if test "${cs_cv_perl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_perl_cflags@@$cs_cv_perl_lflags | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <EXTERN.h>
		#include <perl.h>
int
main ()
{
perl_run(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_perl=yes
		cs_cv_perl_cflags=$cs_build_cflags
		cs_cv_perl_lflags=$cs_build_lflags
		cs_cv_perl_libs=$cs_build_libs
else
  cs_cv_perl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_perl" >&5
echo "${ECHO_T}$cs_cv_perl" >&6; }
else
  { echo "$as_me:$LINENO: checking if Perl SDK is usable" >&5
echo $ECHO_N "checking if Perl SDK is usable... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_perl_cflags@@$cs_cv_perl_lflags | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <EXTERN.h>
		#include <perl.h>
int
main ()
{
perl_run(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_perl=yes
		cs_cv_perl_cflags=$cs_build_cflags
		cs_cv_perl_lflags=$cs_build_lflags
		cs_cv_perl_libs=$cs_build_libs
else
  cs_cv_perl=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_perl" >&5
echo "${ECHO_T}$cs_cv_perl" >&6; }
fi

    if test $cs_cv_perl = yes; then
  :
else
  cs_cv_perl_cflags=''
	cs_cv_perl_lflags=''
	cs_cv_perl_libs=''

fi

	if test $cs_cv_perl = yes; then
  if test "$cs_cv_perl" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_perl_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_perl_lflags $cs_cv_perl_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

	    cs_build_prop_val=".$cs_cv_perl_ext"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PERL5.MODULE_EXT ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check if Python SDK is installed and which compiler and linker flags are
# required to embed Python.
#------------------------------------------------------------------------------

    { echo "$as_me:$LINENO: checking how to suppress C++ \`long double' warnings" >&5
echo $ECHO_N "checking how to suppress C++ \`long double' warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_ignore_long_double_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wno-long-double@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_ignore_long_double=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_ignore_long_double_ok="$cs_cv_prog_cxx_ignore_long_double"
else
  cs_cv_prog_cxx_ignore_long_double=''
	    cs_cv_prog_cxx_ignore_long_double_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_long_double_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_ignore_long_double_ok" >&6; }



# Check whether --with-python was given.
if test "${with_python+set}" = set; then
  withval=$with_python;
fi

    if test -z "$with_python"; then
  with_python=yes
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in python
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PYTHON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PYTHON"; then
  ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PYTHON="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
PYTHON=$ac_cv_prog_PYTHON
if test -n "$PYTHON"; then
  { echo "$as_me:$LINENO: result: $PYTHON" >&5
echo "${ECHO_T}$PYTHON" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$PYTHON" && break
done


    cs_build_prop_val="$PYTHON"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PYTHON ?= \"$cs_build_prop_val\" ;
"
fi


    if test -n "$PYTHON" && test "$with_python" != no; then
  { echo "$as_me:$LINENO: checking for python SDK" >&5
echo $ECHO_N "checking for python SDK... $ECHO_C" >&6; }
if test "${cs_cv_python_sdk+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_pyver=`{ (echo "$as_me:$LINENO: \$PYTHON -c 'import sys, string; \\
		print string.join(map(str,sys.version_info[:2]),\".\")'") >&5
  ($PYTHON -c 'import sys, string; \
		print string.join(map(str,sys.version_info[:2]),".")') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_pybase="python${cs_pyver}"

	    cs_cv_pybase_cflags=`{ (echo "$as_me:$LINENO: \$PYTHON -c \\
		'import distutils.sysconfig; \\
		print \"-I\" + distutils.sysconfig.get_python_inc()'") >&5
  ($PYTHON -c \
		'import distutils.sysconfig; \
		print "-I" + distutils.sysconfig.get_python_inc()') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_pybase_cflags="$cs_cv_pybase_cflags \
		$cs_cv_prog_cxx_ignore_long_double"

	    # Depending upon platform and installation, link library might
	    # reside in "get_python_lib()", "get_python_lib()/config",
	    # "${prefix}/lib" (Unix), or "${prefix}/libs" (Windows).
	    cs_cv_pybase_syslib=`{ (echo "$as_me:$LINENO: \$PYTHON -c \\
		'import distutils.sysconfig; \\
		print distutils.sysconfig.get_python_lib(0,1)'") >&5
  ($PYTHON -c \
		'import distutils.sysconfig; \
		print distutils.sysconfig.get_python_lib(0,1)') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_pybase_sysprefix=`{ (echo "$as_me:$LINENO: \$PYTHON -c \\
		'import sys; print sys.prefix'") >&5
  ($PYTHON -c \
		'import sys; print sys.prefix') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_pybase_lflags_base=''
	    if test -d "$cs_cv_pybase_syslib"; then
  cs_cv_pybase_lflags_base="$cs_cv_pybase_lflags_base -L$cs_cv_pybase_syslib"
fi

	    cs_cv_pybase_lflags_ext='$cs_cv_pybase_lflags_base'
	    if test -d "$cs_cv_pybase_syslib/config"; then
  cs_cv_pybase_lflags_ext="$cs_cv_pybase_lflags_ext -L$cs_cv_pybase_syslib/config"
fi

	    if test -d "$cs_cv_pybase_sysprefix/lib"; then
  cs_cv_pybase_sysprefix_lflags="$cs_cv_pybase_sysprefix_lflags -L$cs_cv_pybase_sysprefix/lib"
fi

	    if test -d "$cs_cv_pybase_sysprefix/libs"; then
  cs_cv_pybase_sysprefix_lflags="$cs_cv_pybase_sysprefix_lflags -L$cs_cv_pybase_sysprefix/libs"
fi


	    cs_cv_pybase_libs=`{ (echo "$as_me:$LINENO: \$PYTHON -c \\
		'import distutils.sysconfig; \\
		print (distutils.sysconfig.get_config_var(\"LIBS\") or \"\")+\" \"+ \\
		      (distutils.sysconfig.get_config_var(\"SYSLIBS\") or \"\")'") >&5
  ($PYTHON -c \
		'import distutils.sysconfig; \
		print (distutils.sysconfig.get_config_var("LIBS") or "")+" "+ \
		      (distutils.sysconfig.get_config_var("SYSLIBS") or "")') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`

	    cs_cv_python_ext=`{ (echo "$as_me:$LINENO: \$PYTHON -c \\
		'import distutils.sysconfig; \\
		print (distutils.sysconfig.get_config_var(\"SO\") or \"\")'") >&5
  ($PYTHON -c \
		'import distutils.sysconfig; \
		print (distutils.sysconfig.get_config_var("SO") or "")') 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`

	    if test -n "$cs_pyver" &&
		   test -n "$cs_cv_pybase_cflags" &&
		   test -n "$cs_cv_pybase_lflags$cs_cv_pybase_sysprefix_lflags"; then
  cs_cv_python_sdk=yes
else
  cs_cv_python_sdk=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_python_sdk" >&5
echo "${ECHO_T}$cs_cv_python_sdk" >&6; }

	# Check if Python SDK is usable.  The most common library name is the
	# basename with a few decorations (for example, libpython2.2.a),
	# however some Windows libraries lack the decimal point (for example,
	# libpython22.a or python22.lib), so we must check for both variations.
	# Furthermore, MacOS/X 10.3 supplies a Python.framework, however,
	# earlier releases did not.  Instead, Python on MacOS/X pre-10.3 uses a
	# one-level linker namespace, which means that loadable Python modules
	# do not link against the Python library; instead, unresolved symbols
	# in the modules are satisfied automatically by the Python executable
	# when the module is loaded into the executable.  For this reason,
	# Python on MacOS/X does not even provide a Python link library.  We
	# account for this by trying -bundle, rather than linking against the
	# library.
	if test $cs_cv_python_sdk = yes; then
  cs_build_prop_val="$cs_cv_python_ext"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PYTHON.MODULE_EXT ?= \"$cs_build_prop_val\" ;
"
fi

	    cs_pywinlib=`echo "$cs_cv_pybase" | sed 's/\.//g'`
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_base -framework Python | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_sysprefix_lflags -framework Python | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_ext -framework Python | sed 'y% %#%'`"

	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_base -l$cs_cv_pybase | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_sysprefix_lflags -l$cs_cv_pybase | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_ext -l$cs_cv_pybase | sed 'y% %#%'`"

	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_base -l$cs_pywinlib | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_sysprefix_lflags -l$cs_pywinlib | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@@$cs_cv_pybase_lflags_ext -l$cs_pywinlib | sed 'y% %#%'`"

	    cs_pyflags="$cs_pyflags `echo @@-bundle -flat_namespace -undefined suppress@$cs_cv_pybase_lflags_base | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@-bundle -flat_namespace -undefined suppress@$cs_cv_pybase_sysprefix_lflags | sed 'y% %#%'`"
	    cs_pyflags="$cs_pyflags `echo @@-bundle -flat_namespace -undefined suppress@$cs_cv_pybase_lflags_ext | sed 'y% %#%'`"

	    if test "" != yes; then
  { echo "$as_me:$LINENO: checking if python SDK is usable" >&5
echo $ECHO_N "checking if python SDK is usable... $ECHO_C" >&6; }
if test "${cs_cv_python+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_pyflags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_pybase_cflags $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test                      $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_pybase_libs   $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_pybase_cflags $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test                      $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_pybase_libs   $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_python=yes
		cs_cv_python_cflags=$cs_build_cflags
		cs_cv_python_lflags=$cs_build_lflags
		cs_cv_python_libs=$cs_build_libs
else
  cs_cv_python=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_python" >&5
echo "${ECHO_T}$cs_cv_python" >&6; }
else
  { echo "$as_me:$LINENO: checking if python SDK is usable" >&5
echo $ECHO_N "checking if python SDK is usable... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_pyflags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_pybase_cflags $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test                      $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_pybase_libs   $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Python.h>
int
main ()
{
Py_Initialize(); Py_Finalize();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_pybase_cflags $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test                      $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_pybase_libs   $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_python=yes
		cs_cv_python_cflags=$cs_build_cflags
		cs_cv_python_lflags=$cs_build_lflags
		cs_cv_python_libs=$cs_build_libs
else
  cs_cv_python=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_python" >&5
echo "${ECHO_T}$cs_cv_python" >&6; }
fi

    if test $cs_cv_python = yes; then
  if test "$cs_cv_python" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PYTHON.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_python_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PYTHON.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_python_lflags $cs_cv_python_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PYTHON.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_python_cflags=''
	cs_cv_python_lflags=''
	cs_cv_python_libs=''

fi

else
  cs_cv_python=no
fi

else
  cs_cv_python=no
fi




#------------------------------------------------------------------------------
# Check if Java2 SDK is installed and which compiler and linker flags are
# needed.  Also check if Ant build tool, which is commonly used to build Java
# projects, is available.
#------------------------------------------------------------------------------


JAVA_HOME=`echo "x$JAVA_HOME" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`

if test -z "$JAVA" && test -n "$JAVACMD"; then
  JAVA=`echo "x$JAVACMD" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in java
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     $JAVA_HOME/bin$PATH_SEPARATOR$JAVA_HOME/jre/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVA=$ac_cv_path_JAVA
if test -n "$JAVA"; then
  { echo "$as_me:$LINENO: result: $JAVA" >&5
echo "${ECHO_T}$JAVA" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$JAVA" && break
done

cs_build_prop_val="$JAVA"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAVA ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in javac
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVAC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     $JAVA_HOME/bin$PATH_SEPARATOR$JAVA_HOME/jre/bin$PATH_SEPARATOR$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAC=$ac_cv_path_JAVAC
if test -n "$JAVAC"; then
  { echo "$as_me:$LINENO: result: $JAVAC" >&5
echo "${ECHO_T}$JAVAC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$JAVAC" && break
done

cs_build_prop_val="$JAVAC"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAVAC ?= \"$cs_build_prop_val\" ;
"
fi



# Check whether --with-java was given.
if test "${with_java+set}" = set; then
  withval=$with_java;
fi

if test -z "$with_java"; then
  with_java=yes
fi


if test "$with_java" != no && test -n "$JAVAC" && test -n "$JAVA"; then


    if test x$cs_host_macosx = xyes && # Not cross-building for Darwin.
	test -r /System/Library/Frameworks/JavaVM.framework/Headers; then
  cs_java_cflags="-I/System/Library/Frameworks/JavaVM.framework/Headers"
	cs_java_libs="-framework JavaVM"
else
  if test -n "$JAVA_HOME"; then
  cs_java_dir="$JAVA_HOME"
else
  if test -n "$JAVAC"; then
  cs_java_dir=`$as_dirname -- $JAVAC ||
$as_expr X$JAVAC : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$JAVAC : 'X\(//\)[^/]' \| \
	 X$JAVAC : 'X\(//\)$' \| \
	 X$JAVAC : 'X\(/\)' \| . 2>/dev/null ||
echo X$JAVAC |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
		cs_java_dir=`$as_dirname -- $cs_java_dir ||
$as_expr X$cs_java_dir : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X$cs_java_dir : 'X\(//\)[^/]' \| \
	 X$cs_java_dir : 'X\(//\)$' \| \
	 X$cs_java_dir : 'X\(/\)' \| . 2>/dev/null ||
echo X$cs_java_dir |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
else
  cs_java_dir=''
fi

fi

	if test -n "$cs_java_dir"; then
  cs_java_cflags="-I$cs_java_dir/include"
	    case $host_os in
		mingw*|cygwin*) cs_java_platform=win32 ;;
		*) cs_java_platform=`echo $host_os |
		    sed 's/^\([^-]*\).*$/\1/'` ;;
	    esac
	    if test -n "$cs_java_platform"; then
  cs_java_cflags="$cs_java_cflags
		    $cs_java_cflags/$cs_java_platform"
fi

	    cs_java_cflags=`echo "x$cs_java_cflags" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
fi

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking if Java2 SDK is usable" >&5
echo $ECHO_N "checking if Java2 SDK is usable... $ECHO_C" >&6; }
if test "${cs_cv_java+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
        `echo @$cs_java_cflags@$cs_java_lflags@$cs_java_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if defined(__GNUC__)
	    typedef long long __int64; /* For GCC on Windows */
	    #endif
	    /* Fix for 'jlong' on x86_64. */
	    #if defined(__x86_64)
	    #ifdef _LP64 /* 64-bit Solaris */
	    #undef _LP64
	    #endif
	    #endif
	    #include <jni.h>
	    JNIEXPORT void JNICALL f(JNIEnv* env, jobject obj);
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_java=yes
		cs_cv_java_cflags=$cs_build_cflags
		cs_cv_java_lflags=$cs_build_lflags
		cs_cv_java_libs=$cs_build_libs
else
  cs_cv_java=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_java" >&5
echo "${ECHO_T}$cs_cv_java" >&6; }
else
  { echo "$as_me:$LINENO: checking if Java2 SDK is usable" >&5
echo $ECHO_N "checking if Java2 SDK is usable... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
        `echo @$cs_java_cflags@$cs_java_lflags@$cs_java_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if defined(__GNUC__)
	    typedef long long __int64; /* For GCC on Windows */
	    #endif
	    /* Fix for 'jlong' on x86_64. */
	    #if defined(__x86_64)
	    #ifdef _LP64 /* 64-bit Solaris */
	    #undef _LP64
	    #endif
	    #endif
	    #include <jni.h>
	    JNIEXPORT void JNICALL f(JNIEnv* env, jobject obj);
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_java=yes
		cs_cv_java_cflags=$cs_build_cflags
		cs_cv_java_lflags=$cs_build_lflags
		cs_cv_java_libs=$cs_build_libs
else
  cs_cv_java=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_java" >&5
echo "${ECHO_T}$cs_cv_java" >&6; }
fi

    if test $cs_cv_java = yes; then
  if test "$cs_cv_java" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAVA.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_java_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAVA.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_java_lflags $cs_cv_java_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JAVA.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_java_cflags=''
	cs_cv_java_lflags=''
	cs_cv_java_libs=''

fi

fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in ant
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ANT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ANT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     $PATH$PATH_SEPARATOR$ANT_HOME/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ANT=$ac_cv_path_ANT
if test -n "$ANT"; then
  { echo "$as_me:$LINENO: result: $ANT" >&5
echo "${ECHO_T}$ANT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ANT" && break
done

cs_build_prop_val="$ANT"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ANT ?= \"$cs_build_prop_val\" ;
"
fi




#------------------------------------------------------------------------------
# Check if STL is available. Although STL is not used heavily in Crystal Space,
# a few plugin modules take advantage of it, so they need to know if it is
# available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking for STL" >&5
echo $ECHO_N "checking for STL... $ECHO_C" >&6; }
if test "${cs_cv_libstl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <map>
	#include <string>
int
main ()
{
std::map<std::string,int> m; m.begin();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libstl=yes
		cs_cv_libstl_cflags=$cs_build_cflags
		cs_cv_libstl_lflags=$cs_build_lflags
		cs_cv_libstl_libs=$cs_build_libs
else
  cs_cv_libstl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libstl" >&5
echo "${ECHO_T}$cs_cv_libstl" >&6; }
else
  { echo "$as_me:$LINENO: checking for STL" >&5
echo $ECHO_N "checking for STL... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <map>
	#include <string>
int
main ()
{
std::map<std::string,int> m; m.begin();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libstl=yes
		cs_cv_libstl_cflags=$cs_build_cflags
		cs_cv_libstl_lflags=$cs_build_lflags
		cs_cv_libstl_libs=$cs_build_libs
else
  cs_cv_libstl=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libstl" >&5
echo "${ECHO_T}$cs_cv_libstl" >&6; }
fi

    if test $cs_cv_libstl = yes; then
  if test "$cs_cv_libstl" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}STL.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libstl_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}STL.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libstl_lflags $cs_cv_libstl_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}STL.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libstl_cflags=''
	cs_cv_libstl_lflags=''
	cs_cv_libstl_libs=''

fi




#------------------------------------------------------------------------------
# Check how to enable and disable compilation warnings, and how to promote
# diagnostics from warning to error status.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to enable C++ compilation warnings" >&5
echo $ECHO_N "checking how to enable C++ compilation warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_enable_warnings_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wmost@@ | sed 'y% %#%'` `echo @-Wall@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_enable_warnings=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_enable_warnings_ok="$cs_cv_prog_cxx_enable_warnings"
else
  cs_cv_prog_cxx_enable_warnings=''
	    cs_cv_prog_cxx_enable_warnings_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_warnings_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_enable_warnings_ok" >&6; }
    if test "$cs_cv_prog_cxx_enable_warnings_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_enable_warnings"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
echo $ECHO_N "checking how to treat C++ warnings as errors... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_enable_errors_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Werror@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_enable_errors=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_enable_errors_ok="$cs_cv_prog_cxx_enable_errors"
else
  cs_cv_prog_cxx_enable_errors=''
	    cs_cv_prog_cxx_enable_errors_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_errors_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_enable_errors_ok" >&6; }


{ echo "$as_me:$LINENO: checking how to suppress C++ unused variable warnings" >&5
echo $ECHO_N "checking how to suppress C++ unused variable warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_ignore_unused_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wno-unused@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_ignore_unused=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_ignore_unused_ok="$cs_cv_prog_cxx_ignore_unused"
else
  cs_cv_prog_cxx_ignore_unused=''
	    cs_cv_prog_cxx_ignore_unused_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_unused_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_ignore_unused_ok" >&6; }
    if test "$cs_cv_prog_cxx_ignore_unused_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_ignore_unused"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.WARNING.NO_UNUSED ?= \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking how to suppress C++ uninitialized warnings" >&5
echo $ECHO_N "checking how to suppress C++ uninitialized warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_ignore_uninitialized_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wno-uninitialized@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_ignore_uninitialized=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_ignore_uninitialized_ok="$cs_cv_prog_cxx_ignore_uninitialized"
else
  cs_cv_prog_cxx_ignore_uninitialized=''
	    cs_cv_prog_cxx_ignore_uninitialized_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_uninitialized_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_ignore_uninitialized_ok" >&6; }
    if test "$cs_cv_prog_cxx_ignore_uninitialized_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_ignore_uninitialized"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.WARNING.NO_UNINITIALIZED ?= \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking how to suppress C++ unknown #pragma warnings" >&5
echo $ECHO_N "checking how to suppress C++ unknown #pragma warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_ignore_unknown_pragmas_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wno-unknown-pragmas@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_ignore_unknown_pragmas=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_ignore_unknown_pragmas_ok="$cs_cv_prog_cxx_ignore_unknown_pragmas"
else
  cs_cv_prog_cxx_ignore_unknown_pragmas=''
	    cs_cv_prog_cxx_ignore_unknown_pragmas_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_unknown_pragmas_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_ignore_unknown_pragmas_ok" >&6; }
    if test "$cs_cv_prog_cxx_ignore_unknown_pragmas_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_ignore_unknown_pragmas"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi


# On MacOS/X, use of `long double' in csutil/formatter.h causes complaints.
{ echo "$as_me:$LINENO: checking how to suppress C++ \`long double' warnings" >&5
echo $ECHO_N "checking how to suppress C++ \`long double' warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_ignore_long_double_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wno-long-double@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_ignore_long_double=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_ignore_long_double_ok="$cs_cv_prog_cxx_ignore_long_double"
else
  cs_cv_prog_cxx_ignore_long_double=''
	    cs_cv_prog_cxx_ignore_long_double_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_long_double_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_ignore_long_double_ok" >&6; }
    if test "$cs_cv_prog_cxx_ignore_long_double_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_ignore_long_double"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.MANDATORY += \"$cs_build_prop_val\" ;
"
fi

fi




#------------------------------------------------------------------------------
# Check for option to disable strict-aliasing (enabled by gcc on higher
# optimization levels). This is needed for some code we don't have
# control over (e.g. SWIG-generated code) that breaks strict-aliasing rules.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for flag to disable string-aliasing" >&5
echo $ECHO_N "checking for flag to disable string-aliasing... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_no_strict_aliasing_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fno-strict-aliasing@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_no_strict_aliasing=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_no_strict_aliasing_ok="$cs_cv_prog_cxx_no_strict_aliasing"
else
  cs_cv_prog_cxx_no_strict_aliasing=''
	    cs_cv_prog_cxx_no_strict_aliasing_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_no_strict_aliasing_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_no_strict_aliasing_ok" >&6; }


if test $cs_cv_prog_cxx_no_strict_aliasing != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_no_strict_aliasing"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.STRICTALIASING.DISABLE += \"$cs_build_prop_val\" ;
"
fi

fi




#------------------------------------------------------------------------------
# Check if C++ exceptions can be enabled and disabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to enable C++ exceptions" >&5
echo $ECHO_N "checking how to enable C++ exceptions... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_enable_exceptions_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fexceptions -fno-omit-frame-pointer@@ | sed 'y% %#%'` \
    `echo @-fexceptions@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_enable_exceptions=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_enable_exceptions_ok="$cs_cv_prog_cxx_enable_exceptions"
else
  cs_cv_prog_cxx_enable_exceptions=''
	    cs_cv_prog_cxx_enable_exceptions_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_exceptions_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_enable_exceptions_ok" >&6; }
    if test "$cs_cv_prog_cxx_enable_exceptions_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_enable_exceptions"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.EXCEPTIONS.ENABLE ?= \"$cs_build_prop_val\" ;
"
fi


fi


{ echo "$as_me:$LINENO: checking how to disable C++ exceptions" >&5
echo $ECHO_N "checking how to disable C++ exceptions... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_disable_exceptions_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fno-exceptions@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_disable_exceptions=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_disable_exceptions_ok="$cs_cv_prog_cxx_disable_exceptions"
else
  cs_cv_prog_cxx_disable_exceptions=''
	    cs_cv_prog_cxx_disable_exceptions_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_disable_exceptions_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_disable_exceptions_ok" >&6; }
    if test "$cs_cv_prog_cxx_disable_exceptions_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_disable_exceptions"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.EXCEPTIONS.DISABLE ?= \"$cs_build_prop_val\" ;
"
fi

	    cs_build_prop_val="$cs_cv_prog_cxx_disable_exceptions"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS += \"$cs_build_prop_val\" ;
"
fi

fi




#------------------------------------------------------------------------------
# Check how to make compiler comply strongly with the official C++ language
# specification. Crystal Space itself can not abide 100% by the standard (for
# instance, we employ `long long', which is not part of the present
# specification), however, some external projects do so (by using gcc's -ansi
# and -pedantic options, for instance). Because such projects may utilize
# Crystal Space, we must ensure that our public headers likewise comply with
# the official specification.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to enforce C++ standards conformance" >&5
echo $ECHO_N "checking how to enforce C++ standards conformance... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_enable_pedantic_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-ansi -pedantic@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_enable_pedantic=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_enable_pedantic_ok="$cs_cv_prog_cxx_enable_pedantic"
else
  cs_cv_prog_cxx_enable_pedantic=''
	    cs_cv_prog_cxx_enable_pedantic_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_pedantic_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_enable_pedantic_ok" >&6; }
    if test "$cs_cv_prog_cxx_enable_pedantic_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_enable_pedantic"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.PEDANTIC.ENABLE ?= \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check if the linker recognizes "-multiply_defined suppress".  This is
# required for MacOS/X 10.1 to avoid warning messages when linking a program
# with "-framework Foundation" if that program does not actually employ any
# Objective-C. Note that we first attempt the uglier equivalent
# "-Wl,-multiply_defined,suppress" in order to make life simpler for external
# projects using cs-config (which reports this linker option in response to
# --libs) in conjunction with GNU libtool. The problem with "-multiply_defined
# suppress" for GNU libtool users is that libtool re-orders linker arguments,
# not realizing that "suppress" must follow immediately after
# "-multiply_defined". The uglier equivalent does not suffer from this problem
# in the hands of libtool since it contains no whitespace.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking if -multiply_defined suppress is needed" >&5
echo $ECHO_N "checking if -multiply_defined suppress is needed... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_suppress_multiple_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-Wl,-multiply_defined,suppress@ | sed 'y% %#%'` \
    `echo @@-multiply_defined suppress@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_suppress_multiple=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_suppress_multiple_ok="$cs_cv_prog_link_suppress_multiple"
else
  cs_cv_prog_link_suppress_multiple=''
	    cs_cv_prog_link_suppress_multiple_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_suppress_multiple_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_suppress_multiple_ok" >&6; }
    if test "$cs_cv_prog_link_suppress_multiple_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_suppress_multiple"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check if the linker recognizes "-force_cpusubtype_ALL".  This is required on
# MacOS/X since the Crystal Space's PowerPC implementation of csQsqrt() uses
# the `frsqrte' instruction which is only valid when the -force_cpusubtype_ALL
# flag is present.  This flag is marked "mandatory" because it is required even
# for external projects if they use csQsqrt().
#------------------------------------------------------------------------------


{ echo "$as_me:$LINENO: checking if -force_cpusubtype_ALL is needed" >&5
echo $ECHO_N "checking if -force_cpusubtype_ALL is needed... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_force_cpusubtype_all_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-force_cpusubtype_ALL@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_force_cpusubtype_all=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_force_cpusubtype_all_ok="$cs_cv_prog_cxx_force_cpusubtype_all"
else
  cs_cv_prog_cxx_force_cpusubtype_all=''
	    cs_cv_prog_cxx_force_cpusubtype_all_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_force_cpusubtype_all_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_force_cpusubtype_all_ok" >&6; }

cs_build_prop_val="$cs_cv_prog_cxx_force_cpusubtype_all"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.MANDATORY += \"$cs_build_prop_val\" ;
"
fi




#------------------------------------------------------------------------------
# Check if the MacOS/X compiler recognizes "-fno-common".  This flag is needed
# when building plugin modules (and the libraries which are linked into
# plugins) prior to Apple's introduction of the two-level namespace symbol
# scheme in order to ensure that each plugin module gets its own copy of
# uninitialized global variables.
#------------------------------------------------------------------------------



    case $host_os in
	darwin*)
	    { echo "$as_me:$LINENO: checking if -fno-common is needed" >&5
echo $ECHO_N "checking if -fno-common is needed... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_no_common_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-fno-common@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_no_common=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_no_common_ok="$cs_cv_prog_cxx_no_common"
else
  cs_cv_prog_cxx_no_common=''
	    cs_cv_prog_cxx_no_common_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_no_common_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_no_common_ok" >&6; }
    if test "$cs_cv_prog_cxx_no_common_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_no_common"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.MANDATORY += \"$cs_build_prop_val\" ;
"
fi


fi

	    ;;
    esac



#------------------------------------------------------------------------------
# Check if Mingw and Cygwin compilers recognize -fvtable-thunks.  As of gcc
# 3.x, this option is no longer supported.  Unfortunately, rather than
# returning an error code (as it does with other unrecognized options), the
# compiler merely prints a warning message when -fvtable-thunks is used, thus
# we use -Werror to turn the warning into an error.
#------------------------------------------------------------------------------



    case $host_os in
	mingw*|cygwin*)
	    { echo "$as_me:$LINENO: checking if -fvtable-thunks is needed" >&5
echo $ECHO_N "checking if -fvtable-thunks is needed... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_vtable_thunks_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fvtable-thunks@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_errors $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_vtable_thunks=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_vtable_thunks_ok="$cs_cv_prog_cxx_vtable_thunks"
else
  cs_cv_prog_cxx_vtable_thunks=''
	    cs_cv_prog_cxx_vtable_thunks_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_vtable_thunks_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_vtable_thunks_ok" >&6; }
    if test "$cs_cv_prog_cxx_vtable_thunks_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_vtable_thunks"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.MANDATORY += \"$cs_build_prop_val\" ;
"
fi

fi

	    ;;
    esac



#------------------------------------------------------------------------------
# Check how to ask the linker to export all dynamic symbols in debug mode to
# allow the backtrace() callstack creation code to obtain symbols in all cases.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to export all dynamic symbols" >&5
echo $ECHO_N "checking how to export all dynamic symbols... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_export_dynamic_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,-E@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_export_dynamic=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_export_dynamic_ok="$cs_cv_prog_link_export_dynamic"
else
  cs_cv_prog_link_export_dynamic=''
	    cs_cv_prog_link_export_dynamic_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_export_dynamic_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_export_dynamic_ok" >&6; }
    if test "$cs_cv_prog_link_export_dynamic_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_export_dynamic"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS.debug += \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check whether the linker needs -Bsymbolic. This binds "references to global
# symbols to the definition within the shared library" (from man ld). If this
# flag is not set, it can happen that symbols in plugins get bound against
# symbols from other modules (including the application executable itself),
# causing side-effects such as violating the "memory allocation and freeing in
# the same module" rule.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for -Bsymbolic linker flag" >&5
echo $ECHO_N "checking for -Bsymbolic linker flag... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_Bsymbolic_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-Wl,-Bsymbolic@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_Bsymbolic=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_Bsymbolic_ok="$cs_cv_prog_link_Bsymbolic"
else
  cs_cv_prog_link_Bsymbolic=''
	    cs_cv_prog_link_Bsymbolic_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_Bsymbolic_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_Bsymbolic_ok" >&6; }
    if test "$cs_cv_prog_link_Bsymbolic_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_Bsymbolic"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check if linker recognizes --kill-at which is needed to make csjava.dll
# usable by JNI on Windows.  Without this, JNI is unable to find the exported
# JNI glue functions in csjava.dll.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking if --kill-at is accepted" >&5
echo $ECHO_N "checking if --kill-at is accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_kill_at+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-Wl,--kill-at@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_kill_at=yes
		cs_cv_prog_link_kill_at_cflags=$cs_build_cflags
		cs_cv_prog_link_kill_at_lflags=$cs_build_lflags
		cs_cv_prog_link_kill_at_libs=$cs_build_libs
else
  cs_cv_prog_link_kill_at=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_kill_at" >&5
echo "${ECHO_T}$cs_cv_prog_link_kill_at" >&6; }
else
  { echo "$as_me:$LINENO: checking if --kill-at is accepted" >&5
echo $ECHO_N "checking if --kill-at is accepted... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-Wl,--kill-at@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_kill_at=yes
		cs_cv_prog_link_kill_at_cflags=$cs_build_cflags
		cs_cv_prog_link_kill_at_lflags=$cs_build_lflags
		cs_cv_prog_link_kill_at_libs=$cs_build_libs
else
  cs_cv_prog_link_kill_at=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_prog_link_kill_at" >&5
echo "${ECHO_T}$cs_cv_prog_link_kill_at" >&6; }
fi

    if test $cs_cv_prog_link_kill_at = yes; then
  cs_build_prop_val="-Wl,--kill-at"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CSJAVA.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_prog_link_kill_at_cflags=''
	cs_cv_prog_link_kill_at_lflags=''
	cs_cv_prog_link_kill_at_libs=''

fi




#------------------------------------------------------------------------------
# Check if linker recognizes "-z defs" which is useful on some platforms that
# allow undefined symbols at link time. This can detect possible build issues
# (e.g. not linking against some library, a missing function) that could cause
# problems on stricter platforms.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking if reporting missing symbols is supported" >&5
echo $ECHO_N "checking if reporting missing symbols is supported... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_z_defs_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-Wl,-z,defs@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_z_defs=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_z_defs_ok="$cs_cv_prog_link_z_defs"
else
  cs_cv_prog_link_z_defs=''
	    cs_cv_prog_link_z_defs_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_z_defs_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_z_defs_ok" >&6; }
    if test "$cs_cv_prog_link_z_defs_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_z_defs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi

{ echo "$as_me:$LINENO: checking if missing symbols can be reported as warnings" >&5
echo $ECHO_N "checking if missing symbols can be reported as warnings... $ECHO_C" >&6; }
if test "${cs_cv_prog_link_warn_unresolved_symbols_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@-Wl,--warn-unresolved-symbols@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_link_warn_unresolved_symbols=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_link_warn_unresolved_symbols_ok="$cs_cv_prog_link_warn_unresolved_symbols"
else
  cs_cv_prog_link_warn_unresolved_symbols=''
	    cs_cv_prog_link_warn_unresolved_symbols_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_link_warn_unresolved_symbols_ok" >&5
echo "${ECHO_T}$cs_cv_prog_link_warn_unresolved_symbols_ok" >&6; }
    if test "$cs_cv_prog_link_warn_unresolved_symbols_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_warn_unresolved_symbols"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check if C++ function inlining can be enabled and disabled. Apparently, with
# some versions of GNU build tools on Windows, the Crystal Space Python plugin
# fails to link and emits the error message "Error: 0-bit reloc in dll". In
# particular, this occurs with optimizations (such as -O3) enabled. We can
# avoid the error by disabling function inlining.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to disable function inlining" >&5
echo $ECHO_N "checking how to disable function inlining... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_disable_inlining_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fno-inline-functions@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_disable_inlining=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_disable_inlining_ok="$cs_cv_prog_cxx_disable_inlining"
else
  cs_cv_prog_cxx_disable_inlining=''
	    cs_cv_prog_cxx_disable_inlining_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_disable_inlining_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_disable_inlining_ok" >&6; }
    if test "$cs_cv_prog_cxx_disable_inlining_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_disable_inlining"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS.INLINING.DISABLE ?= \"$cs_build_prop_val\" ;
"
fi


fi




#------------------------------------------------------------------------------
# Check if "hidden" visibilty for inline functions is supported.
#
# IMPLEMENTATION NOTES
#
# There is an obscure bug in gcc 3.4.x and 4.0.x where
# -fvisibility-inlines-hidden on AMD64 in combination with -fPIC and -shared
# flags causes the linker to fail with a bogus error stating that the target
# library needs to be built with -fPIC even when it has been built using that
# option. On such installations, if Crystal Space is built with
# -fvisibility-inlines-hidden, then clients liking against Crystal Space
# experience this bogus error.  Normally, we would test for this anomaly by
# manipulating a std::basic_string<> in a test program, and avoid
# -fvisibility-inlines-hidden if the test program fails to link, however,
# practical experience has shown that this test is not 100% reliable for all
# such installations. Instead, for simplicity, we disable this flag presently
# for all versions of gcc on AMD64.  References:
#
#     http://dev.gentoo.org/~kugelfang/pappy-visibility.txt
#     http://www.gnu.org/software/gcc/gcc-4.0/changes.html#visibility
#     http://www.nedprod.com/programs/gccvisibility.html
#     http://bugs.gentoo.org/show_bug.cgi?id=78720
#
# Furthermore, there seems to be a bug on MacOS/X with gcc 4.0.x where use of
# -fvisibility-inlines-hidden causes link problems with external clients which
# do not specify this flag.  For this reason, we also disable this flag on
# MacOS/X.  In particular, clients receive errors of this sort:
#
#    /usr/bin/ld: libcrystalspace.a(scf.o) malformed object, illegal
#        reference for -dynamic code (reference to a coalesced section
#        (__TEXT,__textcoal_nt) from section (__TEXT,__text) relocation
#        entry (1))
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for inline visibility flag" >&5
echo $ECHO_N "checking for inline visibility flag... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_visibility_inlines_hidden_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fvisibility-inlines-hidden@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_visibility_inlines_hidden=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_visibility_inlines_hidden_ok="$cs_cv_prog_cxx_visibility_inlines_hidden"
else
  cs_cv_prog_cxx_visibility_inlines_hidden=''
	    cs_cv_prog_cxx_visibility_inlines_hidden_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_visibility_inlines_hidden_ok" >&6; }


if test -n "$cs_cv_prog_cxx_visibility_inlines_hidden"; then
  { echo "$as_me:$LINENO: checking if $cs_cv_prog_cxx_visibility_inlines_hidden is buggy" >&5
echo $ECHO_N "checking if $cs_cv_prog_cxx_visibility_inlines_hidden is buggy... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_visibility_inlines_hidden_buggy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test $ac_compiler_gnu = yes; then
  if test $host_cpu = x86_64 || test x$cs_host_macosx = xyes; then
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=yes
else
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=no
fi

else
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_buggy" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_visibility_inlines_hidden_buggy" >&6; }
else
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=no
fi


if test $cs_cv_prog_cxx_visibility_inlines_hidden_buggy != yes; then
  cs_build_prop_val="$cs_cv_prog_cxx_visibility_inlines_hidden"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS += \"$cs_build_prop_val\" ;
"
fi

fi




#------------------------------------------------------------------------------
# Check how to set default symbol visibility, and how to override the setting
# in code.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking for \"hidden\" symbol visibility flag" >&5
echo $ECHO_N "checking for \"hidden\" symbol visibility flag... $ECHO_C" >&6; }
if test "${cs_cv_prog_cc_visibility_hidden_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fvisibility=hidden@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cc_visibility_hidden=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cc_visibility_hidden_ok="$cs_cv_prog_cc_visibility_hidden"
else
  cs_cv_prog_cc_visibility_hidden=''
	    cs_cv_prog_cc_visibility_hidden_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cc_visibility_hidden_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cc_visibility_hidden_ok" >&6; }

if test -n "$cs_cv_prog_cc_visibility_hidden"; then
  cs_build_prop_val="$cs_cv_prog_cc_visibility_hidden"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking for \"default\" symbol visibility flag" >&5
echo $ECHO_N "checking for \"default\" symbol visibility flag... $ECHO_C" >&6; }
if test "${cs_cv_prog_cc_visibility_default_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fvisibility=default@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cc_visibility_default=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cc_visibility_default_ok="$cs_cv_prog_cc_visibility_default"
else
  cs_cv_prog_cc_visibility_default=''
	    cs_cv_prog_cc_visibility_default_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cc_visibility_default_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cc_visibility_default_ok" >&6; }

if test -n "$cs_cv_prog_cc_visibility_default"; then
  cs_build_prop_val="$cs_cv_prog_cc_visibility_default"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.VISIBILITY_DEFAULT ?= \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking how to declare default visibility" >&5
echo $ECHO_N "checking how to declare default visibility... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_declare_visible_def+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_declare_visible_def='no'
	if test "$cs_cv_prog_cxx_declare_visible_def" = no; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((visibility("default"))) void f();
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_declare_visible_def='__attribute__((visibility("default")))'
else
  cs_cv_prog_cxx_declare_visible_def='no'
fi

fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_visible_def" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_declare_visible_def" >&6; }

if test $cs_cv_prog_cxx_declare_visible_def != no; then
  cs_header_text="${cs_header_text}#define CS_VISIBILITY_DEFAULT $cs_cv_prog_cxx_declare_visible_def
"
fi


{ echo "$as_me:$LINENO: checking how to declare hidden visibility" >&5
echo $ECHO_N "checking how to declare hidden visibility... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_declare_visible_hidden+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_declare_visible_hidden='no'
	if test "$cs_cv_prog_cxx_declare_visible_hidden" = no; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((visibility("hidden"))) void f();
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_declare_visible_hidden='__attribute__((visibility("hidden")))'
else
  cs_cv_prog_cxx_declare_visible_hidden='no'
fi

fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_visible_hidden" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_declare_visible_hidden" >&6; }

if test $cs_cv_prog_cxx_declare_visible_hidden != no; then
  cs_header_text="${cs_header_text}#define CS_VISIBILITY_HIDDEN $cs_cv_prog_cxx_declare_visible_hidden
"
fi




#------------------------------------------------------------------------------
# Check for compiler- and CPU-specific code generation flags.  These flags are
# mutually exclusive.  Exclusivity is enforced by the CS_CHECK_CODE_GEN_FLAG()
# macro.  Note that use of these flags typically means that the resulting
# binary will not be backward compatible.  For instance, if Pentium-specific
# instructions are used, the program will not work with earlier processors,
# such as the Intel 486.  Because these options are potentially dangerous,
# their use it controlled by the user via --enable-cpu-specific-optimizations
# which accepts "no" (same as "disable"), "minimum" (the default), and
# "maximum".  The "minimum" option selects optimizations which are likely to be
# supported by reasonably modern hardware, thus making the resulting
# executables fairly portable.
#
# CS_CHECK_CODE_GEN_FLAG(CPU-PATTERN, FLAGS, [LANGUAGE])
#	If compiler- and CPU-specific optimization flags have not already been
#	determined, and if the canonical host CPU matches CPU-PATTERN, try
#	using the provided compiler FLAGS with the compiler represented by
#	LANGUAGE (typically either "C" or "C++").  If language is omitted, C++
#	is used.  If the compiler accepts the flags, assign them to the shell
#	variable cs_cv_prog_cxx_code_gen.
#------------------------------------------------------------------------------


{ echo "$as_me:$LINENO: checking whether to use CPU-specific optimizations" >&5
echo $ECHO_N "checking whether to use CPU-specific optimizations... $ECHO_C" >&6; }
# Check whether --enable-cpu-specific-optimizations was given.
if test "${enable_cpu_specific_optimizations+set}" = set; then
  enableval=$enable_cpu_specific_optimizations; case $enable_cpu_specific_optimizations in
	yes|min) enable_cpu_specific_optimizations=minimum ;;
	max) enable_cpu_specific_optimizations=maximum ;;
    esac
else
  enable_cpu_specific_optimizations=minimum
fi

{ echo "$as_me:$LINENO: result: $enable_cpu_specific_optimizations" >&5
echo "${ECHO_T}$enable_cpu_specific_optimizations" >&6; }

case $enable_cpu_specific_optimizations in
    no|minimum|maximum) ;;
    *) 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 overridden 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { echo "$as_me:$LINENO: error: unrecognized option; use \`no', \`minimum', or \`maximum'" >&5
echo "$as_me: error: unrecognized option; use \`no', \`minimum', or \`maximum'" >&2;}
   { (exit 1); exit 1; }; }
       ;;
esac

if test $enable_cpu_specific_optimizations != no; then
  { echo "$as_me:$LINENO: checking for code generation flags" >&5
echo $ECHO_N "checking for code generation flags... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_code_gen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_code_gen=no
	if test $enable_cpu_specific_optimizations = maximum; then

    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    athlon) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=athlon@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    athlon) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=athlon -march=athlon@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    athlon) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=athlon@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *686) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=i686@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *686) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=pentiumpro -march=i686@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *686) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=pentiumpro@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *686) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mpentiumpro -march=i686@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *686) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mpentiumpro@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi

fi

	if test $host_vendor = apple; then
  # Work around issue on intel macs, where "-fpmath=sse" is on by
	     # default, but this breaks compilation when combined with
	     # the "-march=i586" selected below. Furthermore, -march=i686 was
	     # reported to not work, but -march=prescott so, so try to use
	     # that as the "minimum" optimization on x86 Apples, followed by
	     # -march=i686.

    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=prescott@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=i686@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi

fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    x86_64) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=k8@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    x86_64) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mtune=k8@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[5-6]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=i586@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[5-6]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=pentium -march=i586@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[5-6]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=pentium@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[5-6]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mpentium -march=i586@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[5-6]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mpentium@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-march=i486@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=i486 -march=i486@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mcpu=i486@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *[3-9]86) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-m486@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi


    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    alpha) ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-mieee@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_code_gen=$cs_build_cflags
fi

		;;
	esac
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_code_gen" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_code_gen" >&6; }

    if test "$cs_cv_prog_cxx_code_gen" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_code_gen"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for compiler optimization flags.
#------------------------------------------------------------------------------





    cs_optimize_flags=''

    { echo "$as_me:$LINENO: checking how to enable optimizations" >&5
echo $ECHO_N "checking how to enable optimizations... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_optimize_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-O3@@ | sed 'y% %#%'` `echo @-O2@@ | sed 'y% %#%'` `echo @-O@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_optimize=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_optimize_ok="$cs_cv_prog_cxx_optimize"
else
  cs_cv_prog_cxx_optimize=''
	    cs_cv_prog_cxx_optimize_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_optimize_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_optimize_ok" >&6; }
    if test "$cs_cv_prog_cxx_optimize_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_optimize"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.optimize += \"$cs_build_prop_val\" ;
"
fi

	    cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_optimize"
fi


    { echo "$as_me:$LINENO: checking if -fomit-frame-pointer is accepted" >&5
echo $ECHO_N "checking if -fomit-frame-pointer is accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_omit_frame_pointer_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-fomit-frame-pointer@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_omit_frame_pointer=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_omit_frame_pointer_ok="$cs_cv_prog_cxx_omit_frame_pointer"
else
  cs_cv_prog_cxx_omit_frame_pointer=''
	    cs_cv_prog_cxx_omit_frame_pointer_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_omit_frame_pointer_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_omit_frame_pointer_ok" >&6; }
    if test "$cs_cv_prog_cxx_omit_frame_pointer_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_omit_frame_pointer"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.optimize += \"$cs_build_prop_val\" ;
"
fi

	    cs_optimize_flags="$cs_optimize_flags \
	    $cs_cv_prog_cxx_omit_frame_pointer"
fi


    { echo "$as_me:$LINENO: checking if -ffast-math is accepted" >&5
echo $ECHO_N "checking if -ffast-math is accepted... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_fast_math_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-ffast-math@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_fast_math=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_fast_math_ok="$cs_cv_prog_cxx_fast_math"
else
  cs_cv_prog_cxx_fast_math=''
	    cs_cv_prog_cxx_fast_math_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_fast_math_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_fast_math_ok" >&6; }
    if test "$cs_cv_prog_cxx_fast_math_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_fast_math"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.optimize += \"$cs_build_prop_val\" ;
"
fi

	    cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_fast_math"
fi




#------------------------------------------------------------------------------
# Check for compiler debug flags.
#------------------------------------------------------------------------------

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in ld
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LD="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
  { echo "$as_me:$LINENO: result: $LD" >&5
echo "${ECHO_T}$LD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$LD" && break
  done
fi
if test -z "$LD"; then
  ac_ct_LD=$LD
  for ac_prog in ld
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_LD"; then
  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_LD="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_LD=$ac_cv_prog_ac_ct_LD
if test -n "$ac_ct_LD"; then
  { echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
echo "${ECHO_T}$ac_ct_LD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_LD" && break
done

  if test "x$ac_ct_LD" = x; then
    LD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    LD=$ac_ct_LD
  fi
fi

    if test -n "$LD"; then
  # binutils versions come in the flavors X.Y as well as X.Y.Z
        { echo "$as_me:$LINENO: checking if binutils version >= 2.17" >&5
echo $ECHO_N "checking if binutils version >= 2.17... $ECHO_C" >&6; }
if test "${cs_cv_prog_binutils_version_2_17_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_binutils_is_version=
cs_prog_binutils_min_version=
cs_prog_binutils_is_suffix=
cs_prog_binutils_min_suffix=
cs_prog_binutils_is_suffix_done=
cs_prog_binutils_min_suffix_done=






test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix= ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0.0 ; }








test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix= ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.17 | sed '/[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0.0 ; }


cs_prog_binutils_is_ver_1=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_is_ver_2=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_is_ver_3=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_is_ver_4=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_is_ver_5=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_prog_binutils_min_ver_1=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_min_ver_2=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_min_ver_3=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_min_ver_4=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_min_ver_5=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_cv_prog_binutils_version_2_17_ok=''
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_1" ">=" "$cs_prog_binutils_min_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_1" ">=" "$cs_prog_binutils_is_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_2" ">=" "$cs_prog_binutils_min_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_2" ">=" "$cs_prog_binutils_is_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_3" ">=" "$cs_prog_binutils_min_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_3" ">=" "$cs_prog_binutils_is_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_4" ">=" "$cs_prog_binutils_min_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_4" ">=" "$cs_prog_binutils_is_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_5" ">=" "$cs_prog_binutils_min_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_min_ver_5" ">=" "$cs_prog_binutils_is_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_17_ok=yes ; }

if test -z "$cs_cv_prog_binutils_version_2_17_ok"; then
  cs_cv_prog_binutils_version_2_17_ok=yes
fi

if test "$cs_cv_prog_binutils_version_2_17_ok" = yes; then
  cs_prog_binutils_version_ok=yes
else
  cs_prog_binutils_version_ok=no
fi

cs_cv_prog_binutils_version_2_17_ok_annotated="$cs_cv_prog_binutils_version_2_17_ok"
if test -n "$cs_prog_binutils_is_version"; then
  cs_cv_prog_binutils_version_2_17_ok_annotated="$cs_cv_prog_binutils_version_2_17_ok_annotated (version $cs_prog_binutils_is_version)"
    cs_prog_binutils_version="$cs_prog_binutils_is_version"
else
  cs_prog_binutils_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_17_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_binutils_version_2_17_ok_annotated" >&6; }
if test "$cs_cv_prog_binutils_version_2_17_ok" = yes; then
  cs_cv_binutils_true_2_17=yes
else
  cs_cv_binutils_true_2_17=no
fi

        if test "$cs_cv_binutils_true_2_17" = yes; then
  cs_cv_binutils_2_17=yes
fi

	if test -z "$cs_cv_binutils_2_17"; then
  { echo "$as_me:$LINENO: checking if binutils version >= 2.16.91" >&5
echo $ECHO_N "checking if binutils version >= 2.16.91... $ECHO_C" >&6; }
if test "${cs_cv_prog_binutils_version_2_16_91_ok_annotated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_prog_binutils_is_version=
cs_prog_binutils_min_version=
cs_prog_binutils_is_suffix=
cs_prog_binutils_min_suffix=
cs_prog_binutils_is_suffix_done=
cs_prog_binutils_min_suffix_done=





test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix= ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0 ; }

test -z $cs_prog_binutils_is_version && cs_prog_binutils_is_version=`$LD -v | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_is_version" && test -z $cs_prog_binutils_is_suffix_done  && { cs_prog_binutils_is_suffix_done=yes ; cs_prog_binutils_is_suffix=.0.0 ; }







test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix= ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0 ; }

test -z $cs_prog_binutils_min_version && cs_prog_binutils_min_version=`echo 2.16.91 | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/;q'`
test -n "$cs_prog_binutils_min_version" && test -z $cs_prog_binutils_min_suffix_done  && { cs_prog_binutils_min_suffix_done=yes ; cs_prog_binutils_min_suffix=.0.0 ; }


cs_prog_binutils_is_ver_1=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_is_ver_2=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_is_ver_3=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_is_ver_4=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_is_ver_5=`echo ${cs_prog_binutils_is_version}${cs_prog_binutils_is_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_prog_binutils_min_ver_1=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/'`
cs_prog_binutils_min_ver_2=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/'`
cs_prog_binutils_min_ver_3=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/'`
cs_prog_binutils_min_ver_4=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\4/'`
cs_prog_binutils_min_ver_5=`echo $cs_prog_binutils_min_version${cs_prog_binutils_min_suffix} | sed '/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/!d;s/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\5/'`

cs_cv_prog_binutils_version_2_16_91_ok=''
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_1" ">=" "$cs_prog_binutils_min_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_1" ">=" "$cs_prog_binutils_is_ver_1" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_2" ">=" "$cs_prog_binutils_min_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_2" ">=" "$cs_prog_binutils_is_ver_2" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_3" ">=" "$cs_prog_binutils_min_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_3" ">=" "$cs_prog_binutils_is_ver_3" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_4" ">=" "$cs_prog_binutils_min_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_4" ">=" "$cs_prog_binutils_is_ver_4" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_5" ">=" "$cs_prog_binutils_min_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=no ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_min_ver_5" ">=" "$cs_prog_binutils_is_ver_5" >/dev/null \
    || cs_cv_prog_binutils_version_2_16_91_ok=yes ; }

if test -z "$cs_cv_prog_binutils_version_2_16_91_ok"; then
  cs_cv_prog_binutils_version_2_16_91_ok=yes
fi

if test "$cs_cv_prog_binutils_version_2_16_91_ok" = yes; then
  cs_prog_binutils_version_ok=yes
else
  cs_prog_binutils_version_ok=no
fi

cs_cv_prog_binutils_version_2_16_91_ok_annotated="$cs_cv_prog_binutils_version_2_16_91_ok"
if test -n "$cs_prog_binutils_is_version"; then
  cs_cv_prog_binutils_version_2_16_91_ok_annotated="$cs_cv_prog_binutils_version_2_16_91_ok_annotated (version $cs_prog_binutils_is_version)"
    cs_prog_binutils_version="$cs_prog_binutils_is_version"
else
  cs_prog_binutils_version=''
fi


fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&5
echo "${ECHO_T}$cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&6; }
if test "$cs_cv_prog_binutils_version_2_16_91_ok" = yes; then
  cs_cv_binutils_2_17=yes
fi

fi

	if test -z "$cs_cv_binutils_2_17"; then
  cs_cv_binutils_2_17=no
fi

fi


{ echo "$as_me:$LINENO: checking whether to split debug information" >&5
echo $ECHO_N "checking whether to split debug information... $ECHO_C" >&6; }
# Check whether --enable-separate-debug-info was given.
if test "${enable_separate_debug_info+set}" = set; then
  enableval=$enable_separate_debug_info;
fi

if test -z "$enable_separate_debug_info"; then
  if test -z `uname | grep -i CYGWIN`; then
  enable_separate_debug_info=$cs_cv_binutils_2_17
else
  enable_separate_debug_info=$cs_cv_binutils_true_2_17
fi

fi

{ echo "$as_me:$LINENO: result: $enable_separate_debug_info" >&5
echo "${ECHO_T}$enable_separate_debug_info" >&6; }

cs_build_prop_val="$enable_separate_debug_info"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LINK.DEBUG.INFO.SEPARATE ?= \"$cs_build_prop_val\" ;
"
fi


{ echo "$as_me:$LINENO: checking how to enable debug mode debugging symbols" >&5
echo $ECHO_N "checking how to enable debug mode debugging symbols... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_debug_symbols_extra_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-g3@@ | sed 'y% %#%'` `echo @-g2@@ | sed 'y% %#%'` `echo @-g@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_debug_symbols_extra=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_debug_symbols_extra_ok="$cs_cv_prog_cxx_debug_symbols_extra"
else
  cs_cv_prog_cxx_debug_symbols_extra=''
	    cs_cv_prog_cxx_debug_symbols_extra_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_debug_symbols_extra_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_debug_symbols_extra_ok" >&6; }
    if test "$cs_cv_prog_cxx_debug_symbols_extra_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_debug_symbols_extra"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.debug += \"$cs_build_prop_val\" ;
"
fi

	    cs_build_prop_val="$cs_cv_prog_cxx_debug_symbols_extra"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS.debug += \"$cs_build_prop_val\" ;
"
fi

fi


{ echo "$as_me:$LINENO: checking whether to enable debug information in optimize mode" >&5
echo $ECHO_N "checking whether to enable debug information in optimize mode... $ECHO_C" >&6; }
# Check whether --enable-optimize-mode-debug-info was given.
if test "${enable_optimize_mode_debug_info+set}" = set; then
  enableval=$enable_optimize_mode_debug_info; enable_optimize_mode_debug_info=$enableval
fi

if test -z "$enable_optimize_mode_debug_info"; then
  enable_optimize_mode_debug_info=$enable_separate_debug_info
fi

{ echo "$as_me:$LINENO: result: $enable_optimize_mode_debug_info" >&5
echo "${ECHO_T}$enable_optimize_mode_debug_info" >&6; }
if test "$enable_optimize_mode_debug_info" != "no"; then
  { echo "$as_me:$LINENO: checking how to enable optimize mode debugging symbols" >&5
echo $ECHO_N "checking how to enable optimize mode debugging symbols... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_debug_symbols_normal_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-g2@@ | sed 'y% %#%'` `echo @-g@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_debug_symbols_normal=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cxx_debug_symbols_normal_ok="$cs_cv_prog_cxx_debug_symbols_normal"
else
  cs_cv_prog_cxx_debug_symbols_normal=''
	    cs_cv_prog_cxx_debug_symbols_normal_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_debug_symbols_normal_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_debug_symbols_normal_ok" >&6; }
    if test "$cs_cv_prog_cxx_debug_symbols_normal_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_debug_symbols_normal"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS.optimize += \"$cs_build_prop_val\" ;
"
fi

	    cs_build_prop_val="$cs_cv_prog_cxx_debug_symbols_normal"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS.optimize += \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check if compiler complains about adding /usr/local/include to the header
# search path.  If not, add it to the header search path since not all
# compilers search there by default.  Some compiler, on the other hand,
# complain if it is already in the built-in search path, and we would like to
# avoid the complaint, if possible.
#
# Furthermore, add a -L entry to LDFLAGS for /usr/local/lib if present.
# Finally, add /usr/local/lib to LD_LIBRARY_PATH if present since not all
# platforms do so by default. This will allow some tests to succeed which would
# otherwise fail. An example is the sizeof(wchar_t) check on Solaris, which
# attempts to run a test program. Without augmenting LD_LIBRARY_PATH, the test
# program would fail to run, citing inability to locate libstdc++.so.
#------------------------------------------------------------------------------
if test -d /usr/local/include; then
  { echo "$as_me:$LINENO: checking if -I/usr/local/include is usable" >&5
echo $ECHO_N "checking if -I/usr/local/include is usable... $ECHO_C" >&6; }
if test "${cs_cv_prog_cpp_local_include_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-I/usr/local/include@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_warnings $cs_cv_prog_cxx_enable_errors $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cpp_local_include=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	    cs_cv_prog_cpp_local_include_ok="$cs_cv_prog_cpp_local_include"
else
  cs_cv_prog_cpp_local_include=''
	    cs_cv_prog_cpp_local_include_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cpp_local_include_ok" >&5
echo "${ECHO_T}$cs_cv_prog_cpp_local_include_ok" >&6; }

else
  cs_cv_prog_cpp_local_include=''
fi


if test -n "$cs_cv_prog_cpp_local_include"; then
  cs_build_prop_val="$cs_cv_prog_cpp_local_include"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

    CPPFLAGS="$CPPFLAGS $cs_cv_prog_cpp_local_include"
fi


if test -d /usr/local/lib; then
  cs_build_prop_val="-L/usr/local/lib"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

    LDFLAGS="$LDFLAGS -L/usr/local/lib"
    LD_LIBRARY_PATH="$LD_LIBRARY_PATH$PATH_SEPARATOR/usr/local/lib"
    export LD_LIBRARY_PATH
fi




#------------------------------------------------------------------------------
# Check if va_copy() or __va_copy() is available.
#------------------------------------------------------------------------------
# CS_CHECK_VA_COPY(FUNCTION)


if test "" != yes; then
  { echo "$as_me:$LINENO: checking for va_copy" >&5
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
if test "${cs_cv_func_va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	    #include <stdarg.h>
int
main ()
{
va_list ap1; va_list ap2; va_copy(ap1,ap2)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_va_copy=yes
		cs_cv_func_va_copy_cflags=$cs_build_cflags
		cs_cv_func_va_copy_lflags=$cs_build_lflags
		cs_cv_func_va_copy_libs=$cs_build_libs
else
  cs_cv_func_va_copy=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func_va_copy" >&5
echo "${ECHO_T}$cs_cv_func_va_copy" >&6; }
else
  { echo "$as_me:$LINENO: checking for va_copy" >&5
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	    #include <stdarg.h>
int
main ()
{
va_list ap1; va_list ap2; va_copy(ap1,ap2)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_va_copy=yes
		cs_cv_func_va_copy_cflags=$cs_build_cflags
		cs_cv_func_va_copy_lflags=$cs_build_lflags
		cs_cv_func_va_copy_libs=$cs_build_libs
else
  cs_cv_func_va_copy=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func_va_copy" >&5
echo "${ECHO_T}$cs_cv_func_va_copy" >&6; }
fi

    if test $cs_cv_func_va_copy = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_VA_COPY
"
else
  cs_cv_func_va_copy_cflags=''
	cs_cv_func_va_copy_lflags=''
	cs_cv_func_va_copy_libs=''

fi

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for __va_copy" >&5
echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; }
if test "${cs_cv_func___va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	    #include <stdarg.h>
int
main ()
{
va_list ap1; va_list ap2; __va_copy(ap1,ap2)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func___va_copy=yes
		cs_cv_func___va_copy_cflags=$cs_build_cflags
		cs_cv_func___va_copy_lflags=$cs_build_lflags
		cs_cv_func___va_copy_libs=$cs_build_libs
else
  cs_cv_func___va_copy=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func___va_copy" >&5
echo "${ECHO_T}$cs_cv_func___va_copy" >&6; }
else
  { echo "$as_me:$LINENO: checking for __va_copy" >&5
echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	    #include <stdarg.h>
int
main ()
{
va_list ap1; va_list ap2; __va_copy(ap1,ap2)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func___va_copy=yes
		cs_cv_func___va_copy_cflags=$cs_build_cflags
		cs_cv_func___va_copy_lflags=$cs_build_lflags
		cs_cv_func___va_copy_libs=$cs_build_libs
else
  cs_cv_func___va_copy=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func___va_copy" >&5
echo "${ECHO_T}$cs_cv_func___va_copy" >&6; }
fi

    if test $cs_cv_func___va_copy = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE___VA_COPY
"
else
  cs_cv_func___va_copy_cflags=''
	cs_cv_func___va_copy_lflags=''
	cs_cv_func___va_copy_libs=''

fi




#------------------------------------------------------------------------------
# Check for X-Windows and several extensions. This check can identify both
# new-style modular X.Org installations and old-style monolithic installations,
# such as XFree86.
#------------------------------------------------------------------------------





    # Explicitly disable X checking on Windows to avoid discovering XFree86 in
    # case Cygwin is installed.  Doing so allows us to avoid Mesa's OpenGL
    # headers during the OpenGL check, and prefer Microsoft's OpenGL headers.
    # The Mesa OpenGL headers cause link errors because they do not employ
    # __stdcall.
    case $host_os in
	mingw*|cygwin*) with_x=no ;;
    esac

    # Explicitly disable X checking on MacOS/X in case the optional XFree86 is
    # installed since we want to avoid an undesirable dependency upon XFree86
    # in the CS executables and plugins.  If the user is actually
    # cross-building for Darwin on MacOS/X, then the --with-x option will
    # override this test (by setting cs_host_macosx to "no").
    if test x$cs_host_macosx = xyes; then
  with_x=no
fi


# Compatiblity: use --with-x param for individual X lib checks
if test -z "$with_x11"; then
  with_x11=$with_x
fi


# Newer X.org versions ship with pkgconfig packages, which will be consulted
# by CS_CHECK_LIB_WITH().

# Check whether --with-x11 was given.
if test "${with_x11+set}" = set; then
  withval=$with_x11;
fi


    # Backward compatibility: Recognize --with-libx11 as alias for --with-x11.
    if test -n "$with_libx11" &&
           test -z "$with_x11"; then
  with_x11="$with_libx11"
fi


    if test -z "$with_x11"; then
  with_x11=yes
fi

    if test "$with_x11" != no; then
  # If --with-x11 value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_x11" != "$cs_cv_with_x11"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_x11 = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes x11" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes x11... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_x11+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists x11; then
  cs_cv_prog_pkg_config_x11=yes
else
  cs_cv_prog_pkg_config_x11=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_x11" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_x11" >&6; }
	if test $cs_cv_prog_pkg_config_x11 = yes; then
  if test -z "$cs_cv_prog_pkg_config_x11_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags x11") >&5
  ($PKG_CONFIG --cflags x11) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs x11") >&5
  ($PKG_CONFIG --libs x11) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_x11_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_x11_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in x11-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_X11+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_X11"; then
  ac_cv_prog_CONFIG_X11="$CONFIG_X11" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_X11="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_X11=$ac_cv_prog_CONFIG_X11
if test -n "$CONFIG_X11"; then
  { echo "$as_me:$LINENO: result: $CONFIG_X11" >&5
echo "${ECHO_T}$CONFIG_X11" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_X11" && break
  done
fi
if test -z "$CONFIG_X11"; then
  ac_ct_CONFIG_X11=$CONFIG_X11
  for ac_prog in x11-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_X11+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_X11"; then
  ac_cv_prog_ac_ct_CONFIG_X11="$ac_ct_CONFIG_X11" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_X11="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_X11=$ac_cv_prog_ac_ct_CONFIG_X11
if test -n "$ac_ct_CONFIG_X11"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_X11" >&5
echo "${ECHO_T}$ac_ct_CONFIG_X11" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_X11" && break
done

  if test "x$ac_ct_CONFIG_X11" = x; then
    CONFIG_X11=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_X11=$ac_ct_CONFIG_X11
  fi
fi

    if test -n "$CONFIG_X11"; then
  if test -z "$cs_cv_prog_config_x11_ok"; then
  if $CONFIG_X11 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_x11_ok=yes
else
  cs_cv_prog_config_x11_ok=no
fi

fi

	if test $cs_cv_prog_config_x11_ok = yes; then
  if test -z "$cs_cv_prog_config_x11_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_X11 --cflags ") >&5
  ($CONFIG_X11 --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_X11 --libs ") >&5
  ($CONFIG_X11 --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_x11_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_x11_flags"
fi

fi


fi


	if test $with_x11 != yes; then
  cs_check_lib_paths=$with_x11
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "x11"; then
  cs_check_lib_libs="-lx11"
	cs_check_lib_framework="-framework x11"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "x11"; then
  cs_check_lib_libs="-lx11"
	cs_check_lib_framework="-framework x11"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "x11"; then
  cs_check_lib_libs="-lx11"
	cs_check_lib_framework="-framework x11"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libx11" >&5
echo $ECHO_N "checking for libx11... $ECHO_C" >&6; }
if test "${cs_cv_libx11+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main ()
{
XOpenDisplay (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libx11=yes
		cs_cv_libx11_cflags=$cs_build_cflags
		cs_cv_libx11_lflags=$cs_build_lflags
		cs_cv_libx11_libs=$cs_build_libs
else
  cs_cv_libx11=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libx11" >&5
echo "${ECHO_T}$cs_cv_libx11" >&6; }
else
  { echo "$as_me:$LINENO: checking for libx11" >&5
echo $ECHO_N "checking for libx11... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main ()
{
XOpenDisplay (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libx11=yes
		cs_cv_libx11_cflags=$cs_build_cflags
		cs_cv_libx11_lflags=$cs_build_lflags
		cs_cv_libx11_libs=$cs_build_libs
else
  cs_cv_libx11=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libx11" >&5
echo "${ECHO_T}$cs_cv_libx11" >&6; }
fi

    if test $cs_cv_libx11 = yes; then
  :
else
  cs_cv_libx11_cflags=''
	cs_cv_libx11_lflags=''
	cs_cv_libx11_libs=''

fi

else
  cs_cv_libx11=no
fi


    cs_cv_with_x11="$with_x11"


if test $cs_cv_libx11 = yes; then
  # Probably newer style modular X.org installation.
    if test -z "$with_xext"; then
  with_xext=$with_x
fi


# Check whether --with-xext was given.
if test "${with_xext+set}" = set; then
  withval=$with_xext;
fi


    # Backward compatibility: Recognize --with-libxext as alias for --with-xext.
    if test -n "$with_libxext" &&
           test -z "$with_xext"; then
  with_xext="$with_libxext"
fi


    if test -z "$with_xext"; then
  with_xext=yes
fi

    if test "$with_xext" != no; then
  # If --with-xext value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_xext" != "$cs_cv_with_xext"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_xext = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xext" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes xext... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_xext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists xext; then
  cs_cv_prog_pkg_config_xext=yes
else
  cs_cv_prog_pkg_config_xext=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xext" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_xext" >&6; }
	if test $cs_cv_prog_pkg_config_xext = yes; then
  if test -z "$cs_cv_prog_pkg_config_xext_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xext") >&5
  ($PKG_CONFIG --cflags xext) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs xext") >&5
  ($PKG_CONFIG --libs xext) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_xext_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_xext_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in xext-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_XEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_XEXT"; then
  ac_cv_prog_CONFIG_XEXT="$CONFIG_XEXT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_XEXT="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_XEXT=$ac_cv_prog_CONFIG_XEXT
if test -n "$CONFIG_XEXT"; then
  { echo "$as_me:$LINENO: result: $CONFIG_XEXT" >&5
echo "${ECHO_T}$CONFIG_XEXT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_XEXT" && break
  done
fi
if test -z "$CONFIG_XEXT"; then
  ac_ct_CONFIG_XEXT=$CONFIG_XEXT
  for ac_prog in xext-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_XEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_XEXT"; then
  ac_cv_prog_ac_ct_CONFIG_XEXT="$ac_ct_CONFIG_XEXT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_XEXT="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_XEXT=$ac_cv_prog_ac_ct_CONFIG_XEXT
if test -n "$ac_ct_CONFIG_XEXT"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_XEXT" >&5
echo "${ECHO_T}$ac_ct_CONFIG_XEXT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_XEXT" && break
done

  if test "x$ac_ct_CONFIG_XEXT" = x; then
    CONFIG_XEXT=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XEXT=$ac_ct_CONFIG_XEXT
  fi
fi

    if test -n "$CONFIG_XEXT"; then
  if test -z "$cs_cv_prog_config_xext_ok"; then
  if $CONFIG_XEXT --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_xext_ok=yes
else
  cs_cv_prog_config_xext_ok=no
fi

fi

	if test $cs_cv_prog_config_xext_ok = yes; then
  if test -z "$cs_cv_prog_config_xext_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_XEXT --cflags ") >&5
  ($CONFIG_XEXT --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_XEXT --libs ") >&5
  ($CONFIG_XEXT --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_xext_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_xext_flags"
fi

fi


fi


	if test $with_xext != yes; then
  cs_check_lib_paths=$with_xext
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "xext"; then
  cs_check_lib_libs="-lxext"
	cs_check_lib_framework="-framework xext"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "xext"; then
  cs_check_lib_libs="-lxext"
	cs_check_lib_framework="-framework xext"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "xext"; then
  cs_check_lib_libs="-lxext"
	cs_check_lib_framework="-framework xext"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libxext" >&5
echo $ECHO_N "checking for libxext... $ECHO_C" >&6; }
if test "${cs_cv_libxext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libx11_lflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libx11_libs $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
	    #include <X11/extensions/XShm.h>
int
main ()
{
XShmCreateImage(0, 0, 0, 0, 0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libx11_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libx11_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxext=yes
		cs_cv_libxext_cflags=$cs_build_cflags
		cs_cv_libxext_lflags=$cs_build_lflags
		cs_cv_libxext_libs=$cs_build_libs
else
  cs_cv_libxext=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libxext" >&5
echo "${ECHO_T}$cs_cv_libxext" >&6; }
else
  { echo "$as_me:$LINENO: checking for libxext" >&5
echo $ECHO_N "checking for libxext... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libx11_lflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libx11_libs $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
	    #include <X11/extensions/XShm.h>
int
main ()
{
XShmCreateImage(0, 0, 0, 0, 0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libx11_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libx11_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxext=yes
		cs_cv_libxext_cflags=$cs_build_cflags
		cs_cv_libxext_lflags=$cs_build_lflags
		cs_cv_libxext_libs=$cs_build_libs
else
  cs_cv_libxext=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libxext" >&5
echo "${ECHO_T}$cs_cv_libxext" >&6; }
fi

    if test $cs_cv_libxext = yes; then
  :
else
  cs_cv_libxext_cflags=''
	cs_cv_libxext_lflags=''
	cs_cv_libxext_libs=''

fi

else
  cs_cv_libxext=no
fi


    cs_cv_with_xext="$with_xext"
    if test "$cs_cv_libxext" = yes; then
  :
else
  $cs_cv_libx11_cflags
fi

    no_x=no
    X_CFLAGS="$cs_cv_libxext_cflags $cs_cv_libx11_cflags"
    X_LFLAGS="$cs_cv_libxext_lflags $cs_cv_libx11_lflags"
    X_LIBS="$cs_cv_libxext_libs $cs_cv_libx11_libs"

else
  # Probably an older style monolithic X11 installation.
    # Use old Autoconf built-in X11 detection.
    { echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6; }


# Check whether --with-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
  case $x_includes,$x_libraries in #(
    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
echo "$as_me: error: Cannot use X directory names containing '" >&2;}
   { (exit 1); exit 1; }; };; #(
    *,NONE | NONE,*) 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 -f -r conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  cat >Imakefile <<'_ACEOF'
incroot:
	@echo incroot='${INCROOT}'
usrlibdir:
	@echo usrlibdir='${USRLIBDIR}'
libdir:
	@echo libdir='${LIBDIR}'
_ACEOF
  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    for ac_var in incroot usrlibdir libdir; do
      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
    done
    # 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) ac_x_includes= ;;
	*) 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 -f -r 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 Xlib.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Xlib.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="-lX11 $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main ()
{
XrmInitialize ()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; 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
sed 's/^/| /' 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/libX11.$ac_extension"; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

case $ac_x_includes,$ac_x_libraries in #(
  no,* | *,no | *\'*)
    # Didn't find X, or a directory has "'" in its name.
    ac_cv_have_x="have_x=no";; #(
  *)
    # 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'"
esac
fi
;; #(
    *) have_x=yes;;
  esac
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  { echo "$as_me:$LINENO: 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:$LINENO: 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 <<\_ACEOF
#define X_DISPLAY_MISSING 1
_ACEOF

  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 . . . .
    { echo "$as_me:$LINENO: 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"
    ac_xsave_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
       X_LIBS="$X_LIBS -R$x_libraries"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	LIBS="$ac_xsave_LIBS -R $x_libraries"
       cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
	  X_LIBS="$X_LIBS -R $x_libraries"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: result: neither works" >&5
echo "${ECHO_T}neither works" >&6; }
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
    ac_c_werror_flag=$ac_xsave_c_werror_flag
    LIBS=$ac_xsave_LIBS
  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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_dnet_ntoa=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_stub_dnet_ntoa=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define gethostbyname innocuous_gethostbyname

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef gethostbyname

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
/* 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
#endif

int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nsl_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_bsd_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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 name server (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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define connect to an innocuous variant, in case <limits.h> declares connect.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define connect innocuous_connect

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef connect

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
/* 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
#endif

int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_connect=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_socket_connect=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define remove to an innocuous variant, in case <limits.h> declares remove.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define remove innocuous_remove

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef remove

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char remove ();
/* 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
#endif

int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_remove=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char remove ();
int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_posix_remove=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define shmat innocuous_shmat

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef shmat

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shmat ();
/* 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
#endif

int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_shmat=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shmat ();
int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ipc_shmat=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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:$LINENO: 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
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char IceConnectionNumber ();
int
main ()
{
return IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ICE_IceConnectionNumber=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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

    X_LFLAGS="$X_PRE_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
fi



if test "$no_x" != yes; then
  # We must be especially careful to instruct CS_EMIT_BUILD_PROPERTY() to
    # emit the following properties even if their values are empty.  This is
    # necessary because of the way that Jam performs "product-wise" variable
    # expansion.  For example, if X is "x" and Y is undefined, Jam will expand
    # "$(X) $(Y)" to "", whereas every other tool in the world will expand it
    # to "x ".  Since the emitted X11.CFLAGS, X11.LFLAGS, XFREE86VM.CFLAGS, and
    # XFREE86VM.LFLAGS properties reference the other variables by name, we
    # must ensure that those other variables are defined (even if only with an
    # empty string).
    cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}X11.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="$X_CFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}X11.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="$X_LIBS $X_LFLAGS"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}X11.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi



# Check whether --with-xxf86vm was given.
if test "${with_xxf86vm+set}" = set; then
  withval=$with_xxf86vm;
fi


    # Backward compatibility: Recognize --with-libxxf86vm as alias for --with-xxf86vm.
    if test -n "$with_libxxf86vm" &&
           test -z "$with_xxf86vm"; then
  with_xxf86vm="$with_libxxf86vm"
fi


    if test -z "$with_xxf86vm"; then
  with_xxf86vm=yes
fi

    if test "$with_xxf86vm" != no; then
  # If --with-xxf86vm value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_xxf86vm" != "$cs_cv_with_xxf86vm"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_xxf86vm = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xxf86vm" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes xxf86vm... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_xxf86vm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists xxf86vm; then
  cs_cv_prog_pkg_config_xxf86vm=yes
else
  cs_cv_prog_pkg_config_xxf86vm=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xxf86vm" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_xxf86vm" >&6; }
	if test $cs_cv_prog_pkg_config_xxf86vm = yes; then
  if test -z "$cs_cv_prog_pkg_config_xxf86vm_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xxf86vm") >&5
  ($PKG_CONFIG --cflags xxf86vm) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs xxf86vm") >&5
  ($PKG_CONFIG --libs xxf86vm) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_xxf86vm_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_xxf86vm_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in xxf86vm-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_XXF86VM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_XXF86VM"; then
  ac_cv_prog_CONFIG_XXF86VM="$CONFIG_XXF86VM" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_XXF86VM="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_XXF86VM=$ac_cv_prog_CONFIG_XXF86VM
if test -n "$CONFIG_XXF86VM"; then
  { echo "$as_me:$LINENO: result: $CONFIG_XXF86VM" >&5
echo "${ECHO_T}$CONFIG_XXF86VM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_XXF86VM" && break
  done
fi
if test -z "$CONFIG_XXF86VM"; then
  ac_ct_CONFIG_XXF86VM=$CONFIG_XXF86VM
  for ac_prog in xxf86vm-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_XXF86VM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_XXF86VM"; then
  ac_cv_prog_ac_ct_CONFIG_XXF86VM="$ac_ct_CONFIG_XXF86VM" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_XXF86VM="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_XXF86VM=$ac_cv_prog_ac_ct_CONFIG_XXF86VM
if test -n "$ac_ct_CONFIG_XXF86VM"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_XXF86VM" >&5
echo "${ECHO_T}$ac_ct_CONFIG_XXF86VM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_XXF86VM" && break
done

  if test "x$ac_ct_CONFIG_XXF86VM" = x; then
    CONFIG_XXF86VM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XXF86VM=$ac_ct_CONFIG_XXF86VM
  fi
fi

    if test -n "$CONFIG_XXF86VM"; then
  if test -z "$cs_cv_prog_config_xxf86vm_ok"; then
  if $CONFIG_XXF86VM --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_xxf86vm_ok=yes
else
  cs_cv_prog_config_xxf86vm_ok=no
fi

fi

	if test $cs_cv_prog_config_xxf86vm_ok = yes; then
  if test -z "$cs_cv_prog_config_xxf86vm_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_XXF86VM --cflags ") >&5
  ($CONFIG_XXF86VM --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_XXF86VM --libs ") >&5
  ($CONFIG_XXF86VM --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_xxf86vm_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_xxf86vm_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Xxf86vm" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes Xxf86vm... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_Xxf86vm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists Xxf86vm; then
  cs_cv_prog_pkg_config_Xxf86vm=yes
else
  cs_cv_prog_pkg_config_Xxf86vm=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Xxf86vm" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_Xxf86vm" >&6; }
	if test $cs_cv_prog_pkg_config_Xxf86vm = yes; then
  if test -z "$cs_cv_prog_pkg_config_Xxf86vm_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Xxf86vm") >&5
  ($PKG_CONFIG --cflags Xxf86vm) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs Xxf86vm") >&5
  ($PKG_CONFIG --libs Xxf86vm) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_Xxf86vm_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_Xxf86vm_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in Xxf86vm-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_XXF86VM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_XXF86VM"; then
  ac_cv_prog_CONFIG_XXF86VM="$CONFIG_XXF86VM" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_XXF86VM="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_XXF86VM=$ac_cv_prog_CONFIG_XXF86VM
if test -n "$CONFIG_XXF86VM"; then
  { echo "$as_me:$LINENO: result: $CONFIG_XXF86VM" >&5
echo "${ECHO_T}$CONFIG_XXF86VM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_XXF86VM" && break
  done
fi
if test -z "$CONFIG_XXF86VM"; then
  ac_ct_CONFIG_XXF86VM=$CONFIG_XXF86VM
  for ac_prog in Xxf86vm-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_XXF86VM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_XXF86VM"; then
  ac_cv_prog_ac_ct_CONFIG_XXF86VM="$ac_ct_CONFIG_XXF86VM" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_XXF86VM="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_XXF86VM=$ac_cv_prog_ac_ct_CONFIG_XXF86VM
if test -n "$ac_ct_CONFIG_XXF86VM"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_XXF86VM" >&5
echo "${ECHO_T}$ac_ct_CONFIG_XXF86VM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_XXF86VM" && break
done

  if test "x$ac_ct_CONFIG_XXF86VM" = x; then
    CONFIG_XXF86VM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XXF86VM=$ac_ct_CONFIG_XXF86VM
  fi
fi

    if test -n "$CONFIG_XXF86VM"; then
  if test -z "$cs_cv_prog_config_Xxf86vm_ok"; then
  if $CONFIG_XXF86VM --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_Xxf86vm_ok=yes
else
  cs_cv_prog_config_Xxf86vm_ok=no
fi

fi

	if test $cs_cv_prog_config_Xxf86vm_ok = yes; then
  if test -z "$cs_cv_prog_config_Xxf86vm_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_XXF86VM --cflags ") >&5
  ($CONFIG_XXF86VM --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_XXF86VM --libs ") >&5
  ($CONFIG_XXF86VM --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_Xxf86vm_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_Xxf86vm_flags"
fi

fi


fi


	if test $with_xxf86vm != yes; then
  cs_check_lib_paths=$with_xxf86vm
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "xxf86vm"; then
  cs_check_lib_libs="-lxxf86vm"
	cs_check_lib_framework="-framework xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "xxf86vm"; then
  cs_check_lib_libs="-lxxf86vm"
	cs_check_lib_framework="-framework xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "xxf86vm"; then
  cs_check_lib_libs="-lxxf86vm"
	cs_check_lib_framework="-framework xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xxf86vm"; then
  cs_check_lib_libs="-lXxf86vm"
	cs_check_lib_framework="-framework Xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xxf86vm"; then
  cs_check_lib_libs="-lXxf86vm"
	cs_check_lib_framework="-framework Xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xxf86vm"; then
  cs_check_lib_libs="-lXxf86vm"
	cs_check_lib_framework="-framework Xxf86vm"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libxxf86vm" >&5
echo $ECHO_N "checking for libxxf86vm... $ECHO_C" >&6; }
if test "${cs_cv_libxxf86vm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $X_CFLAGS $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $X_LFLAGS $cs_lflags_save"
	LIBS="$cs_libs_test $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define XK_MISCELLANY 1
	    #include <X11/Xlib.h>
	    #include <X11/Xutil.h>
	    #include <X11/Xatom.h>
	    #include <X11/extensions/xf86vmode.h>
int
main ()
{
XF86VidModeLockModeSwitch(0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $X_CFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $X_LFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxxf86vm=yes
		cs_cv_libxxf86vm_cflags=$cs_build_cflags
		cs_cv_libxxf86vm_lflags=$cs_build_lflags
		cs_cv_libxxf86vm_libs=$cs_build_libs
else
  cs_cv_libxxf86vm=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libxxf86vm" >&5
echo "${ECHO_T}$cs_cv_libxxf86vm" >&6; }
else
  { echo "$as_me:$LINENO: checking for libxxf86vm" >&5
echo $ECHO_N "checking for libxxf86vm... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $X_CFLAGS $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $X_LFLAGS $cs_lflags_save"
	LIBS="$cs_libs_test $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define XK_MISCELLANY 1
	    #include <X11/Xlib.h>
	    #include <X11/Xutil.h>
	    #include <X11/Xatom.h>
	    #include <X11/extensions/xf86vmode.h>
int
main ()
{
XF86VidModeLockModeSwitch(0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $X_CFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $X_LFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxxf86vm=yes
		cs_cv_libxxf86vm_cflags=$cs_build_cflags
		cs_cv_libxxf86vm_lflags=$cs_build_lflags
		cs_cv_libxxf86vm_libs=$cs_build_libs
else
  cs_cv_libxxf86vm=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libxxf86vm" >&5
echo "${ECHO_T}$cs_cv_libxxf86vm" >&6; }
fi

    if test $cs_cv_libxxf86vm = yes; then
  :
else
  cs_cv_libxxf86vm_cflags=''
	cs_cv_libxxf86vm_lflags=''
	cs_cv_libxxf86vm_libs=''

fi

else
  cs_cv_libxxf86vm=no
fi


    cs_cv_with_xxf86vm="$with_xxf86vm"
    if test "$cs_cv_libxxf86vm" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XFREE86VM.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libxxf86vm_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XFREE86VM.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libxxf86vm_libs $cs_cv_libxxf86vm_lflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XFREE86VM.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi



# Check whether --with-xaw7 was given.
if test "${with_xaw7+set}" = set; then
  withval=$with_xaw7;
fi


    # Backward compatibility: Recognize --with-libxaw7 as alias for --with-xaw7.
    if test -n "$with_libxaw7" &&
           test -z "$with_xaw7"; then
  with_xaw7="$with_libxaw7"
fi


    if test -z "$with_xaw7"; then
  with_xaw7=yes
fi

    if test "$with_xaw7" != no; then
  # If --with-xaw7 value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_xaw7" != "$cs_cv_with_xaw7"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_xaw7 = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xaw7" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes xaw7... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_xaw7+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists xaw7; then
  cs_cv_prog_pkg_config_xaw7=yes
else
  cs_cv_prog_pkg_config_xaw7=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xaw7" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_xaw7" >&6; }
	if test $cs_cv_prog_pkg_config_xaw7 = yes; then
  if test -z "$cs_cv_prog_pkg_config_xaw7_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xaw7") >&5
  ($PKG_CONFIG --cflags xaw7) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs xaw7") >&5
  ($PKG_CONFIG --libs xaw7) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_xaw7_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_xaw7_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in xaw7-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_XAW7+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_XAW7"; then
  ac_cv_prog_CONFIG_XAW7="$CONFIG_XAW7" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_XAW7="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_XAW7=$ac_cv_prog_CONFIG_XAW7
if test -n "$CONFIG_XAW7"; then
  { echo "$as_me:$LINENO: result: $CONFIG_XAW7" >&5
echo "${ECHO_T}$CONFIG_XAW7" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_XAW7" && break
  done
fi
if test -z "$CONFIG_XAW7"; then
  ac_ct_CONFIG_XAW7=$CONFIG_XAW7
  for ac_prog in xaw7-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_XAW7+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_XAW7"; then
  ac_cv_prog_ac_ct_CONFIG_XAW7="$ac_ct_CONFIG_XAW7" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_XAW7="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_XAW7=$ac_cv_prog_ac_ct_CONFIG_XAW7
if test -n "$ac_ct_CONFIG_XAW7"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_XAW7" >&5
echo "${ECHO_T}$ac_ct_CONFIG_XAW7" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_XAW7" && break
done

  if test "x$ac_ct_CONFIG_XAW7" = x; then
    CONFIG_XAW7=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XAW7=$ac_ct_CONFIG_XAW7
  fi
fi

    if test -n "$CONFIG_XAW7"; then
  if test -z "$cs_cv_prog_config_xaw7_ok"; then
  if $CONFIG_XAW7 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_xaw7_ok=yes
else
  cs_cv_prog_config_xaw7_ok=no
fi

fi

	if test $cs_cv_prog_config_xaw7_ok = yes; then
  if test -z "$cs_cv_prog_config_xaw7_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_XAW7 --cflags ") >&5
  ($CONFIG_XAW7 --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_XAW7 --libs ") >&5
  ($CONFIG_XAW7 --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_xaw7_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_xaw7_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Xaw" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes Xaw... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_Xaw+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists Xaw; then
  cs_cv_prog_pkg_config_Xaw=yes
else
  cs_cv_prog_pkg_config_Xaw=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Xaw" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_Xaw" >&6; }
	if test $cs_cv_prog_pkg_config_Xaw = yes; then
  if test -z "$cs_cv_prog_pkg_config_Xaw_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Xaw") >&5
  ($PKG_CONFIG --cflags Xaw) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs Xaw") >&5
  ($PKG_CONFIG --libs Xaw) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_Xaw_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_Xaw_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in Xaw-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_XAW+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_XAW"; then
  ac_cv_prog_CONFIG_XAW="$CONFIG_XAW" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_XAW="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_XAW=$ac_cv_prog_CONFIG_XAW
if test -n "$CONFIG_XAW"; then
  { echo "$as_me:$LINENO: result: $CONFIG_XAW" >&5
echo "${ECHO_T}$CONFIG_XAW" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_XAW" && break
  done
fi
if test -z "$CONFIG_XAW"; then
  ac_ct_CONFIG_XAW=$CONFIG_XAW
  for ac_prog in Xaw-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_XAW+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_XAW"; then
  ac_cv_prog_ac_ct_CONFIG_XAW="$ac_ct_CONFIG_XAW" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_XAW="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_XAW=$ac_cv_prog_ac_ct_CONFIG_XAW
if test -n "$ac_ct_CONFIG_XAW"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_XAW" >&5
echo "${ECHO_T}$ac_ct_CONFIG_XAW" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_XAW" && break
done

  if test "x$ac_ct_CONFIG_XAW" = x; then
    CONFIG_XAW=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XAW=$ac_ct_CONFIG_XAW
  fi
fi

    if test -n "$CONFIG_XAW"; then
  if test -z "$cs_cv_prog_config_Xaw_ok"; then
  if $CONFIG_XAW --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_Xaw_ok=yes
else
  cs_cv_prog_config_Xaw_ok=no
fi

fi

	if test $cs_cv_prog_config_Xaw_ok = yes; then
  if test -z "$cs_cv_prog_config_Xaw_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_XAW --cflags ") >&5
  ($CONFIG_XAW --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_XAW --libs ") >&5
  ($CONFIG_XAW --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_Xaw_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_Xaw_flags"
fi

fi


fi


	if test $with_xaw7 != yes; then
  cs_check_lib_paths=$with_xaw7
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "xaw7"; then
  cs_check_lib_libs="-lxaw7"
	cs_check_lib_framework="-framework xaw7"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "xaw7"; then
  cs_check_lib_libs="-lxaw7"
	cs_check_lib_framework="-framework xaw7"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "xaw7"; then
  cs_check_lib_libs="-lxaw7"
	cs_check_lib_framework="-framework xaw7"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xaw"; then
  cs_check_lib_libs="-lXaw"
	cs_check_lib_framework="-framework Xaw"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xaw"; then
  cs_check_lib_libs="-lXaw"
	cs_check_lib_framework="-framework Xaw"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "Xaw"; then
  cs_check_lib_libs="-lXaw"
	cs_check_lib_framework="-framework Xaw"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libxaw7" >&5
echo $ECHO_N "checking for libxaw7... $ECHO_C" >&6; }
if test "${cs_cv_libxaw7+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $X_CFLAGS $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $X_LFLAGS $cs_lflags_save"
	LIBS="$cs_libs_test $X_PRE_LIBS $X_LIBS -lXt -lX11 $X_EXTRA_LIBS $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Shell.h>
	    #include <X11/Xaw/Form.h>
int
main ()
{
XtVaGetValues(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $X_CFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $X_LFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $X_PRE_LIBS $X_LIBS -lXt -lX11 $X_EXTRA_LIBS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxaw7=yes
		cs_cv_libxaw7_cflags=$cs_build_cflags
		cs_cv_libxaw7_lflags=$cs_build_lflags
		cs_cv_libxaw7_libs=$cs_build_libs
else
  cs_cv_libxaw7=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libxaw7" >&5
echo "${ECHO_T}$cs_cv_libxaw7" >&6; }
else
  { echo "$as_me:$LINENO: checking for libxaw7" >&5
echo $ECHO_N "checking for libxaw7... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $X_CFLAGS $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $X_LFLAGS $cs_lflags_save"
	LIBS="$cs_libs_test $X_PRE_LIBS $X_LIBS -lXt -lX11 $X_EXTRA_LIBS $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Shell.h>
	    #include <X11/Xaw/Form.h>
int
main ()
{
XtVaGetValues(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $X_CFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $X_LFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $X_PRE_LIBS $X_LIBS -lXt -lX11 $X_EXTRA_LIBS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libxaw7=yes
		cs_cv_libxaw7_cflags=$cs_build_cflags
		cs_cv_libxaw7_lflags=$cs_build_lflags
		cs_cv_libxaw7_libs=$cs_build_libs
else
  cs_cv_libxaw7=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libxaw7" >&5
echo "${ECHO_T}$cs_cv_libxaw7" >&6; }
fi

    if test $cs_cv_libxaw7 = yes; then
  :
else
  cs_cv_libxaw7_cflags=''
	cs_cv_libxaw7_lflags=''
	cs_cv_libxaw7_libs=''

fi

else
  cs_cv_libxaw7=no
fi


    cs_cv_with_xaw7="$with_xaw7"
    if test "$cs_cv_libxaw7" = yes; then
  if test "$cs_cv_libxaw7" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XAW.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libxaw7_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XAW.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libxaw7_lflags $cs_cv_libxaw7_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}XAW.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for OpenGL and companions.  Also check if GLX extensions are supported
# and define the (backward) header property CSGL_EXT_STATIC_ASSERTION if they
# are _not_ supported. Finally, check if the some GL types are exported by
# the GL headers. Some are starting to show up in very modern headers, but are
# absent from most.
#
# IMPLEMENTATION NOTES
#
# GLU is not required or used by CrystalSpace itself, but certain 3rd party
# libraries may depend on it (notably Cg).
#------------------------------------------------------------------------------





    { echo "$as_me:$LINENO: checking for int32" >&5
echo $ECHO_N "checking for int32... $ECHO_C" >&6; }
if test "${ac_cv_type_int32+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
typedef int32 ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_int32=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_int32=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_int32" >&5
echo "${ECHO_T}$ac_cv_type_int32" >&6; }
if test $ac_cv_type_int32 = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_TYPE_INT32
_ACEOF

fi


for ac_header in windows.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if !HAVE_TYPE_INT32
    typedef long int32;
    #endif


#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_Header=no"
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


    # Apply plaform-specific flags if necessary.
    cs_gl_plat_cflags=''
    cs_gl_plat_lflags=''
    cs_gl_plat_libs=''
    if test -n "$cs_cv_libm_cflags$cs_cv_libm_lflags$cs_cv_libm_libs"; then
  cs_gl_plat_cflags="$cs_cv_libm_cflags $cs_gl_plat_cflags"
	cs_gl_plat_lflags="$cs_cv_libm_lflags $cs_gl_plat_lflags"
	cs_gl_plat_libs="$cs_cv_libm_libs $cs_gl_plat_libs"
fi

    if test $cs_cv_sys_pthread = yes; then
  cs_gl_plat_cflags="$cs_cv_sys_pthread_cflags $cs_gl_plat_cflags"
	cs_gl_plat_lflags="$cs_cv_sys_pthread_lflags $cs_gl_plat_lflags"
	cs_gl_plat_libs="$cs_cv_sys_pthread_libs $cs_gl_plat_libs"
fi

    if test "$no_x" != yes; then
  cs_gl_plat_cflags="$X_CFLAGS $cs_gl_plat_cflags"
	cs_gl_plat_lflags="$cs_gl_plat_lflags"
	cs_gl_plat_libs="
	    $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS $cs_gl_plat_libs"
fi


    # Mesa requested?

# Check whether --with-mesa was given.
if test "${with_mesa+set}" = set; then
  withval=$with_mesa;
else
  with_mesa=yes
fi


    if test $with_mesa != no; then
  cs_mesa_gl=`echo @@@-lMesaGL | sed 'y% %#%'`
fi


    # MacOS/X or Darwin?
    if test "x$cs_host_macosx" = "xyes"; then
  cs_osx_gl=`echo @-DCS_OPENGL_PATH=OpenGL@@-framework OpenGL | sed 'y% %#%'`
fi


    # Windows?
    if test $cs_host_family = windows; then
  cs_win32_gl=`echo @@@-lopengl32 | sed 'y% %#%'`
fi


    # Check for OpenGL.
    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for OpenGL" >&5
echo $ECHO_N "checking for OpenGL... $ECHO_C" >&6; }
if test "${cs_cv_libgl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_win32_gl \
	$cs_osx_gl \
	`echo @@@-lGL | sed 'y% %#%'` \
	`echo @@@-lgl | sed 'y% %#%'` \
	$cs_mesa_gl
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_gl_plat_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_gl_plat_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_gl_plat_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
glEnd()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_gl_plat_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_gl_plat_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_gl_plat_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl=yes
		cs_cv_libgl_cflags=$cs_build_cflags
		cs_cv_libgl_lflags=$cs_build_lflags
		cs_cv_libgl_libs=$cs_build_libs
else
  cs_cv_libgl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libgl" >&5
echo "${ECHO_T}$cs_cv_libgl" >&6; }
else
  { echo "$as_me:$LINENO: checking for OpenGL" >&5
echo $ECHO_N "checking for OpenGL... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_win32_gl \
	$cs_osx_gl \
	`echo @@@-lGL | sed 'y% %#%'` \
	`echo @@@-lgl | sed 'y% %#%'` \
	$cs_mesa_gl
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_gl_plat_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_gl_plat_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_gl_plat_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
glEnd()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_gl_plat_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_gl_plat_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_gl_plat_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl=yes
		cs_cv_libgl_cflags=$cs_build_cflags
		cs_cv_libgl_lflags=$cs_build_lflags
		cs_cv_libgl_libs=$cs_build_libs
else
  cs_cv_libgl=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libgl" >&5
echo "${ECHO_T}$cs_cv_libgl" >&6; }
fi

    if test $cs_cv_libgl = yes; then
  if test "$cs_cv_libgl" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GL.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libgl_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GL.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libgl_lflags $cs_cv_libgl_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GL.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libgl_cflags=''
	cs_cv_libgl_lflags=''
	cs_cv_libgl_libs=''

fi


if test $cs_cv_libgl = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLhandleARB" >&5
echo $ECHO_N "checking for GLhandleARB... $ECHO_C" >&6; }
if test "${cs_cv_libgl_GLhandleARB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLhandleARB x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLhandleARB=yes
		cs_cv_libgl_GLhandleARB_cflags=$cs_build_cflags
		cs_cv_libgl_GLhandleARB_lflags=$cs_build_lflags
		cs_cv_libgl_GLhandleARB_libs=$cs_build_libs
else
  cs_cv_libgl_GLhandleARB=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libgl_GLhandleARB" >&5
echo "${ECHO_T}$cs_cv_libgl_GLhandleARB" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLhandleARB" >&5
echo $ECHO_N "checking for GLhandleARB... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLhandleARB x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLhandleARB=yes
		cs_cv_libgl_GLhandleARB_cflags=$cs_build_cflags
		cs_cv_libgl_GLhandleARB_lflags=$cs_build_lflags
		cs_cv_libgl_GLhandleARB_libs=$cs_build_libs
else
  cs_cv_libgl_GLhandleARB=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libgl_GLhandleARB" >&5
echo "${ECHO_T}$cs_cv_libgl_GLhandleARB" >&6; }
fi

    if test $cs_cv_libgl_GLhandleARB = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_GLHANDLEARB_T
"
else
  cs_cv_libgl_GLhandleARB_cflags=''
	cs_cv_libgl_GLhandleARB_lflags=''
	cs_cv_libgl_GLhandleARB_libs=''

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLcharARB" >&5
echo $ECHO_N "checking for GLcharARB... $ECHO_C" >&6; }
if test "${cs_cv_libgl_GLcharARB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLcharARB x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLcharARB=yes
		cs_cv_libgl_GLcharARB_cflags=$cs_build_cflags
		cs_cv_libgl_GLcharARB_lflags=$cs_build_lflags
		cs_cv_libgl_GLcharARB_libs=$cs_build_libs
else
  cs_cv_libgl_GLcharARB=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libgl_GLcharARB" >&5
echo "${ECHO_T}$cs_cv_libgl_GLcharARB" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLcharARB" >&5
echo $ECHO_N "checking for GLcharARB... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLcharARB x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLcharARB=yes
		cs_cv_libgl_GLcharARB_cflags=$cs_build_cflags
		cs_cv_libgl_GLcharARB_lflags=$cs_build_lflags
		cs_cv_libgl_GLcharARB_libs=$cs_build_libs
else
  cs_cv_libgl_GLcharARB=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libgl_GLcharARB" >&5
echo "${ECHO_T}$cs_cv_libgl_GLcharARB" >&6; }
fi

    if test $cs_cv_libgl_GLcharARB = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_GLCHARARB_T
"
else
  cs_cv_libgl_GLcharARB_cflags=''
	cs_cv_libgl_GLcharARB_lflags=''
	cs_cv_libgl_GLcharARB_libs=''

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLchar" >&5
echo $ECHO_N "checking for GLchar... $ECHO_C" >&6; }
if test "${cs_cv_libgl_GLchar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLchar x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLchar=yes
		cs_cv_libgl_GLchar_cflags=$cs_build_cflags
		cs_cv_libgl_GLchar_lflags=$cs_build_lflags
		cs_cv_libgl_GLchar_libs=$cs_build_libs
else
  cs_cv_libgl_GLchar=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libgl_GLchar" >&5
echo "${ECHO_T}$cs_cv_libgl_GLchar" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLchar" >&5
echo $ECHO_N "checking for GLchar... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENGL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h)
    #else
    #include <GL/gl.h>
    #endif
int
main ()
{
GLchar x; (void)x;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libgl_GLchar=yes
		cs_cv_libgl_GLchar_cflags=$cs_build_cflags
		cs_cv_libgl_GLchar_lflags=$cs_build_lflags
		cs_cv_libgl_GLchar_libs=$cs_build_libs
else
  cs_cv_libgl_GLchar=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libgl_GLchar" >&5
echo "${ECHO_T}$cs_cv_libgl_GLchar" >&6; }
fi

    if test $cs_cv_libgl_GLchar = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_GLCHAR_T
"
else
  cs_cv_libgl_GLchar_cflags=''
	cs_cv_libgl_GLchar_lflags=''
	cs_cv_libgl_GLchar_libs=''

fi

fi


    if test $cs_cv_libgl = yes; then
  if test $with_mesa != no; then
  cs_mesa_glu=`echo @@@-lMesaGLU | sed 'y% %#%'`
fi


	# MacOS/X or Darwin?
	if test "x$cs_host_macosx" = "xyes"; then
  cs_osx_glu=`echo @-DCS_GLU_PATH=OpenGL@@-framework OpenGL | sed 'y% %#%'`
fi


	# Windows?
	if test $cs_host_family = windows; then
  cs_win32_glu=`echo @@@-lglu32 | sed 'y% %#%'`
fi


	# Check for GLU.
	if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLU" >&5
echo $ECHO_N "checking for GLU... $ECHO_C" >&6; }
if test "${cs_cv_libglu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_osx_glu \
	    `echo @@@ | sed 'y% %#%'` \
	    $cs_win32_glu \
	    `echo @@@-lGLU | sed 'y% %#%'` \
	    `echo @@@-lglu | sed 'y% %#%'` \
	    $cs_mesa_glu
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_GLU_PATH
    #include CS_HEADER_GLOBAL(CS_GLU_PATH,glu.h)
    #else
    #include <GL/glu.h>
    #endif
int
main ()
{
gluNewQuadric()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglu=yes
		cs_cv_libglu_cflags=$cs_build_cflags
		cs_cv_libglu_lflags=$cs_build_lflags
		cs_cv_libglu_libs=$cs_build_libs
else
  cs_cv_libglu=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libglu" >&5
echo "${ECHO_T}$cs_cv_libglu" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLU" >&5
echo $ECHO_N "checking for GLU... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_osx_glu \
	    `echo @@@ | sed 'y% %#%'` \
	    $cs_win32_glu \
	    `echo @@@-lGLU | sed 'y% %#%'` \
	    `echo @@@-lglu | sed 'y% %#%'` \
	    $cs_mesa_glu
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINDOWS_H
    #if !HAVE_TYPE_INT32
    typedef long int32;
    #endif
    #include <windows.h>
    #endif
    #ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_GLU_PATH
    #include CS_HEADER_GLOBAL(CS_GLU_PATH,glu.h)
    #else
    #include <GL/glu.h>
    #endif
int
main ()
{
gluNewQuadric()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglu=yes
		cs_cv_libglu_cflags=$cs_build_cflags
		cs_cv_libglu_lflags=$cs_build_lflags
		cs_cv_libglu_libs=$cs_build_libs
else
  cs_cv_libglu=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libglu" >&5
echo "${ECHO_T}$cs_cv_libglu" >&6; }
fi

    if test $cs_cv_libglu = yes; then
  if test "$cs_cv_libglu" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLU.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libglu_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLU.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libglu_lflags $cs_cv_libglu_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLU.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libglu_cflags=''
	cs_cv_libglu_lflags=''
	cs_cv_libglu_libs=''

fi

fi


    if test $cs_cv_libgl = yes; then
  if test $with_mesa != no; then
  cs_mesa_glx=`echo @@@-lMesaGLX | sed 'y% %#%'`
fi


        # Check for GLX.
	if test "$no_x" != yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLX" >&5
echo $ECHO_N "checking for GLX... $ECHO_C" >&6; }
if test "${cs_cv_libglx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
		`echo @@@-lGLX | sed 'y% %#%'` \
		`echo @@@-lglx | sed 'y% %#%'` \
		$cs_mesa_glx
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <GL/glx.h>
int
main ()
{
glXWaitGL()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglx=yes
		cs_cv_libglx_cflags=$cs_build_cflags
		cs_cv_libglx_lflags=$cs_build_lflags
		cs_cv_libglx_libs=$cs_build_libs
else
  cs_cv_libglx=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libglx" >&5
echo "${ECHO_T}$cs_cv_libglx" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLX" >&5
echo $ECHO_N "checking for GLX... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
		`echo @@@-lGLX | sed 'y% %#%'` \
		`echo @@@-lglx | sed 'y% %#%'` \
		$cs_mesa_glx
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <GL/glx.h>
int
main ()
{
glXWaitGL()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglx=yes
		cs_cv_libglx_cflags=$cs_build_cflags
		cs_cv_libglx_lflags=$cs_build_lflags
		cs_cv_libglx_libs=$cs_build_libs
else
  cs_cv_libglx=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libglx" >&5
echo "${ECHO_T}$cs_cv_libglx" >&6; }
fi

    if test $cs_cv_libglx = yes; then
  if test "$cs_cv_libglx" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLX.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libglx_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLX.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libglx_lflags $cs_cv_libglx_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}GLX.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libglx_cflags=''
	cs_cv_libglx_lflags=''
	cs_cv_libglx_libs=''

fi

fi

fi

# Check for GLX extensions.  Define CSGL_EXT_STATIC_ASSERTION if _not_ present.

    if test x$cs_cv_libglx = "xyes"; then
  # Check for GLX extensions.
	if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GLX extensions" >&5
echo $ECHO_N "checking for GLX extensions... $ECHO_C" >&6; }
if test "${cs_cv_libglx_extensions+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_libglx_cflags@$cs_cv_libglx_lflags@$cs_cv_libglx_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define GLX_GLXEXT_PROTOTYPES
		#include <GL/glx.h>
int
main ()
{
glXGetProcAddressARB(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglx_extensions=yes
		cs_cv_libglx_extensions_cflags=$cs_build_cflags
		cs_cv_libglx_extensions_lflags=$cs_build_lflags
		cs_cv_libglx_extensions_libs=$cs_build_libs
else
  cs_cv_libglx_extensions=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libglx_extensions" >&5
echo "${ECHO_T}$cs_cv_libglx_extensions" >&6; }
else
  { echo "$as_me:$LINENO: checking for GLX extensions" >&5
echo $ECHO_N "checking for GLX extensions... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_libglx_cflags@$cs_cv_libglx_lflags@$cs_cv_libglx_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define GLX_GLXEXT_PROTOTYPES
		#include <GL/glx.h>
int
main ()
{
glXGetProcAddressARB(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libglx_extensions=yes
		cs_cv_libglx_extensions_cflags=$cs_build_cflags
		cs_cv_libglx_extensions_lflags=$cs_build_lflags
		cs_cv_libglx_extensions_libs=$cs_build_libs
else
  cs_cv_libglx_extensions=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libglx_extensions" >&5
echo "${ECHO_T}$cs_cv_libglx_extensions" >&6; }
fi

    if test $cs_cv_libglx_extensions = yes; then
  :
else
  cs_cv_libglx_extensions_cflags=''
	cs_cv_libglx_extensions_lflags=''
	cs_cv_libglx_extensions_libs=''
	cs_header_text="${cs_header_text}#define CSGL_EXT_STATIC_ASSERTION
"
fi

fi




#------------------------------------------------------------------------------
# Check for DirectDraw.  At least one user (Jorrit) has a strange installation
# in which inclusion of <windows.h> fails if an int32 is not present, thus we
# must take this into account.  With Cygwin, we must check for the DirectX
# headers in /usr/include/directx.
#------------------------------------------------------------------------------
# CS_CHECK_DIRECTX([DSOUND-VERSION])


if test $cs_host_family = windows; then
  { echo "$as_me:$LINENO: checking for int32" >&5
echo $ECHO_N "checking for int32... $ECHO_C" >&6; }
if test "${ac_cv_type_int32+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
typedef int32 ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_int32=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_int32=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_int32" >&5
echo "${ECHO_T}$ac_cv_type_int32" >&6; }
if test $ac_cv_type_int32 = yes; then
  cat >>confdefs.h <<\_ACEOF
#define HAVE_TYPE_INT32 1
_ACEOF

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for DirectX" >&5
echo $ECHO_N "checking for DirectX... $ECHO_C" >&6; }
if test "${cs_cv_libdirectx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lddraw -ldsound -ldinput | sed 'y% %#%'` \
	`echo @-I/usr/include/directx@@-lddraw -ldsound -ldinput | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if !HAVE_TYPE_INT32
	    typedef long int32;
	    #endif
	    #define DIRECTINPUT_VERSION 0x0500
	    #include <windows.h>
	    #include <ddraw.h>
	    #include <dsound.h>
	    #include <dinput.h>
int
main ()
{
DirectDrawCreate(0,0,0);
	     DirectSoundCreate(0,0,0);
	     DirectInputCreate(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libdirectx=yes
		cs_cv_libdirectx_cflags=$cs_build_cflags
		cs_cv_libdirectx_lflags=$cs_build_lflags
		cs_cv_libdirectx_libs=$cs_build_libs
else
  cs_cv_libdirectx=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libdirectx" >&5
echo "${ECHO_T}$cs_cv_libdirectx" >&6; }
else
  { echo "$as_me:$LINENO: checking for DirectX" >&5
echo $ECHO_N "checking for DirectX... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lddraw -ldsound -ldinput | sed 'y% %#%'` \
	`echo @-I/usr/include/directx@@-lddraw -ldsound -ldinput | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if !HAVE_TYPE_INT32
	    typedef long int32;
	    #endif
	    #define DIRECTINPUT_VERSION 0x0500
	    #include <windows.h>
	    #include <ddraw.h>
	    #include <dsound.h>
	    #include <dinput.h>
int
main ()
{
DirectDrawCreate(0,0,0);
	     DirectSoundCreate(0,0,0);
	     DirectInputCreate(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libdirectx=yes
		cs_cv_libdirectx_cflags=$cs_build_cflags
		cs_cv_libdirectx_lflags=$cs_build_lflags
		cs_cv_libdirectx_libs=$cs_build_libs
else
  cs_cv_libdirectx=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libdirectx" >&5
echo "${ECHO_T}$cs_cv_libdirectx" >&6; }
fi

    if test $cs_cv_libdirectx = yes; then
  if test "$cs_cv_libdirectx" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libdirectx_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libdirectx_lflags $cs_cv_libdirectx_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libdirectx_cflags=''
	cs_cv_libdirectx_lflags=''
	cs_cv_libdirectx_libs=''

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for DirectX8" >&5
echo $ECHO_N "checking for DirectX8... $ECHO_C" >&6; }
if test "${cs_cv_libdirectx8+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lddraw -ldsound -ldinput | sed 'y% %#%'` \
	`echo @-I/usr/include/directx@@-lddraw -ldsound -ldinput | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if !HAVE_TYPE_INT32
	    typedef long int32;
	    #endif
	    #define DIRECTINPUT_VERSION 0x0500
	    #include <windows.h>
	    #include <ddraw.h>
	    #include <dsound.h>
	    #include <dinput.h>
int
main ()
{
DirectDrawCreate(0,0,0);
	     DirectSoundCreate8(0,0,0);
	     DirectInputCreate(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libdirectx8=yes
		cs_cv_libdirectx8_cflags=$cs_build_cflags
		cs_cv_libdirectx8_lflags=$cs_build_lflags
		cs_cv_libdirectx8_libs=$cs_build_libs
else
  cs_cv_libdirectx8=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libdirectx8" >&5
echo "${ECHO_T}$cs_cv_libdirectx8" >&6; }
else
  { echo "$as_me:$LINENO: checking for DirectX8" >&5
echo $ECHO_N "checking for DirectX8... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lddraw -ldsound -ldinput | sed 'y% %#%'` \
	`echo @-I/usr/include/directx@@-lddraw -ldsound -ldinput | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if !HAVE_TYPE_INT32
	    typedef long int32;
	    #endif
	    #define DIRECTINPUT_VERSION 0x0500
	    #include <windows.h>
	    #include <ddraw.h>
	    #include <dsound.h>
	    #include <dinput.h>
int
main ()
{
DirectDrawCreate(0,0,0);
	     DirectSoundCreate8(0,0,0);
	     DirectInputCreate(0,0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libdirectx8=yes
		cs_cv_libdirectx8_cflags=$cs_build_cflags
		cs_cv_libdirectx8_lflags=$cs_build_lflags
		cs_cv_libdirectx8_libs=$cs_build_libs
else
  cs_cv_libdirectx8=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libdirectx8" >&5
echo "${ECHO_T}$cs_cv_libdirectx8" >&6; }
fi

    if test $cs_cv_libdirectx8 = yes; then
  if test "$cs_cv_libdirectx8" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX8.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libdirectx8_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX8.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libdirectx8_lflags $cs_cv_libdirectx8_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}DIRECTX8.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libdirectx8_cflags=''
	cs_cv_libdirectx8_lflags=''
	cs_cv_libdirectx8_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for the Windows Multimedia library, used by the 'sndwaveout' plugin.
#------------------------------------------------------------------------------
if test $cs_host_family = windows; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking for waveout" >&5
echo $ECHO_N "checking for waveout... $ECHO_C" >&6; }
if test "${cs_cv_libwaveout+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lwinmm | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <windows.h>
	    #include <mmsystem.h>
int
main ()
{
waveOutOpen(0, 0, 0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwaveout=yes
		cs_cv_libwaveout_cflags=$cs_build_cflags
		cs_cv_libwaveout_lflags=$cs_build_lflags
		cs_cv_libwaveout_libs=$cs_build_libs
else
  cs_cv_libwaveout=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libwaveout" >&5
echo "${ECHO_T}$cs_cv_libwaveout" >&6; }
else
  { echo "$as_me:$LINENO: checking for waveout" >&5
echo $ECHO_N "checking for waveout... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@-lwinmm | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <windows.h>
	    #include <mmsystem.h>
int
main ()
{
waveOutOpen(0, 0, 0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwaveout=yes
		cs_cv_libwaveout_cflags=$cs_build_cflags
		cs_cv_libwaveout_lflags=$cs_build_lflags
		cs_cv_libwaveout_libs=$cs_build_libs
else
  cs_cv_libwaveout=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libwaveout" >&5
echo "${ECHO_T}$cs_cv_libwaveout" >&6; }
fi

    if test $cs_cv_libwaveout = yes; then
  if test "$cs_cv_libwaveout" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WAVEOUT.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libwaveout_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WAVEOUT.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libwaveout_lflags $cs_cv_libwaveout_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WAVEOUT.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libwaveout_cflags=''
	cs_cv_libwaveout_lflags=''
	cs_cv_libwaveout_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for zlib.  In addition to the standard installed locations, we also
# search CS/libs/zlib*.
#------------------------------------------------------------------------------

# Check whether --with-z was given.
if test "${with_z+set}" = set; then
  withval=$with_z;
fi


    # Backward compatibility: Recognize --with-libz as alias for --with-z.
    if test -n "$with_libz" &&
           test -z "$with_z"; then
  with_z="$with_libz"
fi


    if test -z "$with_z"; then
  with_z=yes
fi

    if test "$with_z" != no; then
  # If --with-z value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_z" != "$cs_cv_with_z"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_z = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes z" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes z... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_z+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists z; then
  cs_cv_prog_pkg_config_z=yes
else
  cs_cv_prog_pkg_config_z=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_z" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_z" >&6; }
	if test $cs_cv_prog_pkg_config_z = yes; then
  if test -z "$cs_cv_prog_pkg_config_z_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags z") >&5
  ($PKG_CONFIG --cflags z) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs z") >&5
  ($PKG_CONFIG --libs z) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_z_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_z_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in z-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_Z+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_Z"; then
  ac_cv_prog_CONFIG_Z="$CONFIG_Z" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_Z="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_Z=$ac_cv_prog_CONFIG_Z
if test -n "$CONFIG_Z"; then
  { echo "$as_me:$LINENO: result: $CONFIG_Z" >&5
echo "${ECHO_T}$CONFIG_Z" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_Z" && break
  done
fi
if test -z "$CONFIG_Z"; then
  ac_ct_CONFIG_Z=$CONFIG_Z
  for ac_prog in z-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_Z+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_Z"; then
  ac_cv_prog_ac_ct_CONFIG_Z="$ac_ct_CONFIG_Z" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_Z="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_Z=$ac_cv_prog_ac_ct_CONFIG_Z
if test -n "$ac_ct_CONFIG_Z"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_Z" >&5
echo "${ECHO_T}$ac_ct_CONFIG_Z" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_Z" && break
done

  if test "x$ac_ct_CONFIG_Z" = x; then
    CONFIG_Z=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_Z=$ac_ct_CONFIG_Z
  fi
fi

    if test -n "$CONFIG_Z"; then
  if test -z "$cs_cv_prog_config_z_ok"; then
  if $CONFIG_Z --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_z_ok=yes
else
  cs_cv_prog_config_z_ok=no
fi

fi

	if test $cs_cv_prog_config_z_ok = yes; then
  if test -z "$cs_cv_prog_config_z_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_Z --cflags ") >&5
  ($CONFIG_Z --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_Z --libs ") >&5
  ($CONFIG_Z --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_z_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_z_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes zlib" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes zlib... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_zlib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists zlib; then
  cs_cv_prog_pkg_config_zlib=yes
else
  cs_cv_prog_pkg_config_zlib=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_zlib" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_zlib" >&6; }
	if test $cs_cv_prog_pkg_config_zlib = yes; then
  if test -z "$cs_cv_prog_pkg_config_zlib_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags zlib") >&5
  ($PKG_CONFIG --cflags zlib) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs zlib") >&5
  ($PKG_CONFIG --libs zlib) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_zlib_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_zlib_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in zlib-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_ZLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_ZLIB"; then
  ac_cv_prog_CONFIG_ZLIB="$CONFIG_ZLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_ZLIB="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_ZLIB=$ac_cv_prog_CONFIG_ZLIB
if test -n "$CONFIG_ZLIB"; then
  { echo "$as_me:$LINENO: result: $CONFIG_ZLIB" >&5
echo "${ECHO_T}$CONFIG_ZLIB" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_ZLIB" && break
  done
fi
if test -z "$CONFIG_ZLIB"; then
  ac_ct_CONFIG_ZLIB=$CONFIG_ZLIB
  for ac_prog in zlib-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_ZLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_ZLIB"; then
  ac_cv_prog_ac_ct_CONFIG_ZLIB="$ac_ct_CONFIG_ZLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_ZLIB="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_ZLIB=$ac_cv_prog_ac_ct_CONFIG_ZLIB
if test -n "$ac_ct_CONFIG_ZLIB"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_ZLIB" >&5
echo "${ECHO_T}$ac_ct_CONFIG_ZLIB" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_ZLIB" && break
done

  if test "x$ac_ct_CONFIG_ZLIB" = x; then
    CONFIG_ZLIB=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ZLIB=$ac_ct_CONFIG_ZLIB
  fi
fi

    if test -n "$CONFIG_ZLIB"; then
  if test -z "$cs_cv_prog_config_zlib_ok"; then
  if $CONFIG_ZLIB --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_zlib_ok=yes
else
  cs_cv_prog_config_zlib_ok=no
fi

fi

	if test $cs_cv_prog_config_zlib_ok = yes; then
  if test -z "$cs_cv_prog_config_zlib_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_ZLIB --cflags ") >&5
  ($CONFIG_ZLIB --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_ZLIB --libs ") >&5
  ($CONFIG_ZLIB --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_zlib_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_zlib_flags"
fi

fi


fi


	if test $with_z != yes; then
  cs_check_lib_paths=$with_z
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/zlib*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "z"; then
  cs_check_lib_libs="-lz"
	cs_check_lib_framework="-framework z"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "z"; then
  cs_check_lib_libs="-lz"
	cs_check_lib_framework="-framework z"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "z"; then
  cs_check_lib_libs="-lz"
	cs_check_lib_framework="-framework z"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "zlib"; then
  cs_check_lib_libs="-lzlib"
	cs_check_lib_framework="-framework zlib"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "zlib"; then
  cs_check_lib_libs="-lzlib"
	cs_check_lib_framework="-framework zlib"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "zlib"; then
  cs_check_lib_libs="-lzlib"
	cs_check_lib_framework="-framework zlib"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libz" >&5
echo $ECHO_N "checking for libz... $ECHO_C" >&6; }
if test "${cs_cv_libz+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <zlib.h>
int
main ()
{
zlibVersion()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libz=yes
		cs_cv_libz_cflags=$cs_build_cflags
		cs_cv_libz_lflags=$cs_build_lflags
		cs_cv_libz_libs=$cs_build_libs
else
  cs_cv_libz=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libz" >&5
echo "${ECHO_T}$cs_cv_libz" >&6; }
else
  { echo "$as_me:$LINENO: checking for libz" >&5
echo $ECHO_N "checking for libz... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <zlib.h>
int
main ()
{
zlibVersion()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libz=yes
		cs_cv_libz_cflags=$cs_build_cflags
		cs_cv_libz_lflags=$cs_build_lflags
		cs_cv_libz_libs=$cs_build_libs
else
  cs_cv_libz=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libz" >&5
echo "${ECHO_T}$cs_cv_libz" >&6; }
fi

    if test $cs_cv_libz = yes; then
  :
else
  cs_cv_libz_cflags=''
	cs_cv_libz_lflags=''
	cs_cv_libz_libs=''

fi

else
  cs_cv_libz=no
fi


    cs_cv_with_z="$with_z"
    if test "$cs_cv_libz" = yes; then
  if test "$cs_cv_libz" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ZLIB.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libz_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ZLIB.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libz_lflags $cs_cv_libz_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ZLIB.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  { echo "$as_me:$LINENO: *** zlib not found; VFS will be unusable" >&5
echo "$as_me: *** zlib not found; VFS will be unusable" >&6;}
fi




#------------------------------------------------------------------------------
# Check for libpng.  In addition to the standard installed locations, we also
# search CS/libs/libpng*.  Some platforms, such as RedHat 8.x require libm.a to
# be linked with libpng, so use libm.a if available.
#------------------------------------------------------------------------------


if test "$cs_cv_libz" = yes; then


# Check whether --with-png was given.
if test "${with_png+set}" = set; then
  withval=$with_png;
fi


    # Backward compatibility: Recognize --with-libpng as alias for --with-png.
    if test -n "$with_libpng" &&
           test -z "$with_png"; then
  with_png="$with_libpng"
fi


    if test -z "$with_png"; then
  with_png=yes
fi

    if test "$with_png" != no; then
  # If --with-png value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_png" != "$cs_cv_with_png"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_png = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes png" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes png... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_png+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists png; then
  cs_cv_prog_pkg_config_png=yes
else
  cs_cv_prog_pkg_config_png=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_png" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_png" >&6; }
	if test $cs_cv_prog_pkg_config_png = yes; then
  if test -z "$cs_cv_prog_pkg_config_png_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags png") >&5
  ($PKG_CONFIG --cflags png) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs png") >&5
  ($PKG_CONFIG --libs png) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_png_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_png_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in png-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_PNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_PNG"; then
  ac_cv_prog_CONFIG_PNG="$CONFIG_PNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_PNG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_PNG=$ac_cv_prog_CONFIG_PNG
if test -n "$CONFIG_PNG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_PNG" >&5
echo "${ECHO_T}$CONFIG_PNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_PNG" && break
  done
fi
if test -z "$CONFIG_PNG"; then
  ac_ct_CONFIG_PNG=$CONFIG_PNG
  for ac_prog in png-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_PNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_PNG"; then
  ac_cv_prog_ac_ct_CONFIG_PNG="$ac_ct_CONFIG_PNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_PNG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_PNG=$ac_cv_prog_ac_ct_CONFIG_PNG
if test -n "$ac_ct_CONFIG_PNG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_PNG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_PNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_PNG" && break
done

  if test "x$ac_ct_CONFIG_PNG" = x; then
    CONFIG_PNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_PNG=$ac_ct_CONFIG_PNG
  fi
fi

    if test -n "$CONFIG_PNG"; then
  if test -z "$cs_cv_prog_config_png_ok"; then
  if $CONFIG_PNG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_png_ok=yes
else
  cs_cv_prog_config_png_ok=no
fi

fi

	if test $cs_cv_prog_config_png_ok = yes; then
  if test -z "$cs_cv_prog_config_png_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_PNG --cflags ") >&5
  ($CONFIG_PNG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_PNG --libs ") >&5
  ($CONFIG_PNG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_png_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_png_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libpng" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes libpng... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_libpng+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists libpng; then
  cs_cv_prog_pkg_config_libpng=yes
else
  cs_cv_prog_pkg_config_libpng=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libpng" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_libpng" >&6; }
	if test $cs_cv_prog_pkg_config_libpng = yes; then
  if test -z "$cs_cv_prog_pkg_config_libpng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libpng") >&5
  ($PKG_CONFIG --cflags libpng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs libpng") >&5
  ($PKG_CONFIG --libs libpng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_libpng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_libpng_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in libpng-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIBPNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIBPNG"; then
  ac_cv_prog_CONFIG_LIBPNG="$CONFIG_LIBPNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIBPNG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIBPNG=$ac_cv_prog_CONFIG_LIBPNG
if test -n "$CONFIG_LIBPNG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIBPNG" >&5
echo "${ECHO_T}$CONFIG_LIBPNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIBPNG" && break
  done
fi
if test -z "$CONFIG_LIBPNG"; then
  ac_ct_CONFIG_LIBPNG=$CONFIG_LIBPNG
  for ac_prog in libpng-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIBPNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIBPNG"; then
  ac_cv_prog_ac_ct_CONFIG_LIBPNG="$ac_ct_CONFIG_LIBPNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIBPNG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIBPNG=$ac_cv_prog_ac_ct_CONFIG_LIBPNG
if test -n "$ac_ct_CONFIG_LIBPNG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIBPNG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIBPNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIBPNG" && break
done

  if test "x$ac_ct_CONFIG_LIBPNG" = x; then
    CONFIG_LIBPNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBPNG=$ac_ct_CONFIG_LIBPNG
  fi
fi

    if test -n "$CONFIG_LIBPNG"; then
  if test -z "$cs_cv_prog_config_libpng_ok"; then
  if $CONFIG_LIBPNG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_libpng_ok=yes
else
  cs_cv_prog_config_libpng_ok=no
fi

fi

	if test $cs_cv_prog_config_libpng_ok = yes; then
  if test -z "$cs_cv_prog_config_libpng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBPNG --cflags ") >&5
  ($CONFIG_LIBPNG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBPNG --libs ") >&5
  ($CONFIG_LIBPNG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_libpng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_libpng_flags"
fi

fi


fi


	if test $with_png != yes; then
  cs_check_lib_paths=$with_png
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libpng*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "png"; then
  cs_check_lib_libs="-lpng"
	cs_check_lib_framework="-framework png"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "png"; then
  cs_check_lib_libs="-lpng"
	cs_check_lib_framework="-framework png"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "png"; then
  cs_check_lib_libs="-lpng"
	cs_check_lib_framework="-framework png"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "libpng"; then
  cs_check_lib_libs="-llibpng"
	cs_check_lib_framework="-framework libpng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "libpng"; then
  cs_check_lib_libs="-llibpng"
	cs_check_lib_framework="-framework libpng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "libpng"; then
  cs_check_lib_libs="-llibpng"
	cs_check_lib_framework="-framework libpng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libpng" >&5
echo $ECHO_N "checking for libpng... $ECHO_C" >&6; }
if test "${cs_cv_libpng+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libz_cflags $cs_cv_libm_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libz_lflags $cs_cv_libm_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libz_libs $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <png.h>
int
main ()
{
png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libz_cflags $cs_cv_libm_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libz_lflags $cs_cv_libm_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libz_libs $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libpng=yes
		cs_cv_libpng_cflags=$cs_build_cflags
		cs_cv_libpng_lflags=$cs_build_lflags
		cs_cv_libpng_libs=$cs_build_libs
else
  cs_cv_libpng=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libpng" >&5
echo "${ECHO_T}$cs_cv_libpng" >&6; }
else
  { echo "$as_me:$LINENO: checking for libpng" >&5
echo $ECHO_N "checking for libpng... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libz_cflags $cs_cv_libm_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libz_lflags $cs_cv_libm_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libz_libs $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <png.h>
int
main ()
{
png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libz_cflags $cs_cv_libm_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libz_lflags $cs_cv_libm_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libz_libs $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libpng=yes
		cs_cv_libpng_cflags=$cs_build_cflags
		cs_cv_libpng_lflags=$cs_build_lflags
		cs_cv_libpng_libs=$cs_build_libs
else
  cs_cv_libpng=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libpng" >&5
echo "${ECHO_T}$cs_cv_libpng" >&6; }
fi

    if test $cs_cv_libpng = yes; then
  :
else
  cs_cv_libpng_cflags=''
	cs_cv_libpng_lflags=''
	cs_cv_libpng_libs=''

fi

else
  cs_cv_libpng=no
fi


    cs_cv_with_png="$with_png"
    if test "$cs_cv_libpng" = yes; then
  if test "$cs_cv_libpng" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PNG.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libpng_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PNG.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libpng_lflags $cs_cv_libpng_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}PNG.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for libjpeg.  In addition to the standard installed locations, we also
# search CS/libs/*jpeg*.
#------------------------------------------------------------------------------

# Check whether --with-jpeg was given.
if test "${with_jpeg+set}" = set; then
  withval=$with_jpeg;
fi


    # Backward compatibility: Recognize --with-libjpeg as alias for --with-jpeg.
    if test -n "$with_libjpeg" &&
           test -z "$with_jpeg"; then
  with_jpeg="$with_libjpeg"
fi


    if test -z "$with_jpeg"; then
  with_jpeg=yes
fi

    if test "$with_jpeg" != no; then
  # If --with-jpeg value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_jpeg" != "$cs_cv_with_jpeg"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_jpeg = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes jpeg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes jpeg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_jpeg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists jpeg; then
  cs_cv_prog_pkg_config_jpeg=yes
else
  cs_cv_prog_pkg_config_jpeg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_jpeg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_jpeg" >&6; }
	if test $cs_cv_prog_pkg_config_jpeg = yes; then
  if test -z "$cs_cv_prog_pkg_config_jpeg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags jpeg") >&5
  ($PKG_CONFIG --cflags jpeg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs jpeg") >&5
  ($PKG_CONFIG --libs jpeg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_jpeg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_jpeg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in jpeg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_JPEG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_JPEG"; then
  ac_cv_prog_CONFIG_JPEG="$CONFIG_JPEG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_JPEG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_JPEG=$ac_cv_prog_CONFIG_JPEG
if test -n "$CONFIG_JPEG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_JPEG" >&5
echo "${ECHO_T}$CONFIG_JPEG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_JPEG" && break
  done
fi
if test -z "$CONFIG_JPEG"; then
  ac_ct_CONFIG_JPEG=$CONFIG_JPEG
  for ac_prog in jpeg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_JPEG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_JPEG"; then
  ac_cv_prog_ac_ct_CONFIG_JPEG="$ac_ct_CONFIG_JPEG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_JPEG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_JPEG=$ac_cv_prog_ac_ct_CONFIG_JPEG
if test -n "$ac_ct_CONFIG_JPEG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_JPEG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_JPEG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_JPEG" && break
done

  if test "x$ac_ct_CONFIG_JPEG" = x; then
    CONFIG_JPEG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_JPEG=$ac_ct_CONFIG_JPEG
  fi
fi

    if test -n "$CONFIG_JPEG"; then
  if test -z "$cs_cv_prog_config_jpeg_ok"; then
  if $CONFIG_JPEG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_jpeg_ok=yes
else
  cs_cv_prog_config_jpeg_ok=no
fi

fi

	if test $cs_cv_prog_config_jpeg_ok = yes; then
  if test -z "$cs_cv_prog_config_jpeg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_JPEG --cflags ") >&5
  ($CONFIG_JPEG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_JPEG --libs ") >&5
  ($CONFIG_JPEG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_jpeg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_jpeg_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libjpeg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes libjpeg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_libjpeg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists libjpeg; then
  cs_cv_prog_pkg_config_libjpeg=yes
else
  cs_cv_prog_pkg_config_libjpeg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libjpeg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_libjpeg" >&6; }
	if test $cs_cv_prog_pkg_config_libjpeg = yes; then
  if test -z "$cs_cv_prog_pkg_config_libjpeg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libjpeg") >&5
  ($PKG_CONFIG --cflags libjpeg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs libjpeg") >&5
  ($PKG_CONFIG --libs libjpeg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_libjpeg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_libjpeg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in libjpeg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIBJPEG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIBJPEG"; then
  ac_cv_prog_CONFIG_LIBJPEG="$CONFIG_LIBJPEG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIBJPEG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIBJPEG=$ac_cv_prog_CONFIG_LIBJPEG
if test -n "$CONFIG_LIBJPEG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIBJPEG" >&5
echo "${ECHO_T}$CONFIG_LIBJPEG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIBJPEG" && break
  done
fi
if test -z "$CONFIG_LIBJPEG"; then
  ac_ct_CONFIG_LIBJPEG=$CONFIG_LIBJPEG
  for ac_prog in libjpeg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIBJPEG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIBJPEG"; then
  ac_cv_prog_ac_ct_CONFIG_LIBJPEG="$ac_ct_CONFIG_LIBJPEG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIBJPEG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIBJPEG=$ac_cv_prog_ac_ct_CONFIG_LIBJPEG
if test -n "$ac_ct_CONFIG_LIBJPEG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIBJPEG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIBJPEG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIBJPEG" && break
done

  if test "x$ac_ct_CONFIG_LIBJPEG" = x; then
    CONFIG_LIBJPEG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBJPEG=$ac_ct_CONFIG_LIBJPEG
  fi
fi

    if test -n "$CONFIG_LIBJPEG"; then
  if test -z "$cs_cv_prog_config_libjpeg_ok"; then
  if $CONFIG_LIBJPEG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_libjpeg_ok=yes
else
  cs_cv_prog_config_libjpeg_ok=no
fi

fi

	if test $cs_cv_prog_config_libjpeg_ok = yes; then
  if test -z "$cs_cv_prog_config_libjpeg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBJPEG --cflags ") >&5
  ($CONFIG_LIBJPEG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBJPEG --libs ") >&5
  ($CONFIG_LIBJPEG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_libjpeg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_libjpeg_flags"
fi

fi


fi


	if test $with_jpeg != yes; then
  cs_check_lib_paths=$with_jpeg
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/*jpeg*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "jpeg"; then
  cs_check_lib_libs="-ljpeg"
	cs_check_lib_framework="-framework jpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "jpeg"; then
  cs_check_lib_libs="-ljpeg"
	cs_check_lib_framework="-framework jpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "jpeg"; then
  cs_check_lib_libs="-ljpeg"
	cs_check_lib_framework="-framework jpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "libjpeg"; then
  cs_check_lib_libs="-llibjpeg"
	cs_check_lib_framework="-framework libjpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "libjpeg"; then
  cs_check_lib_libs="-llibjpeg"
	cs_check_lib_framework="-framework libjpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "libjpeg"; then
  cs_check_lib_libs="-llibjpeg"
	cs_check_lib_framework="-framework libjpeg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libjpeg" >&5
echo $ECHO_N "checking for libjpeg... $ECHO_C" >&6; }
if test "${cs_cv_libjpeg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
	#include <stdio.h>
	#include <jpeglib.h>
int
main ()
{
jpeg_create_compress(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjpeg=yes
		cs_cv_libjpeg_cflags=$cs_build_cflags
		cs_cv_libjpeg_lflags=$cs_build_lflags
		cs_cv_libjpeg_libs=$cs_build_libs
else
  cs_cv_libjpeg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libjpeg" >&5
echo "${ECHO_T}$cs_cv_libjpeg" >&6; }
else
  { echo "$as_me:$LINENO: checking for libjpeg" >&5
echo $ECHO_N "checking for libjpeg... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
	#include <stdio.h>
	#include <jpeglib.h>
int
main ()
{
jpeg_create_compress(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjpeg=yes
		cs_cv_libjpeg_cflags=$cs_build_cflags
		cs_cv_libjpeg_lflags=$cs_build_lflags
		cs_cv_libjpeg_libs=$cs_build_libs
else
  cs_cv_libjpeg=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libjpeg" >&5
echo "${ECHO_T}$cs_cv_libjpeg" >&6; }
fi

    if test $cs_cv_libjpeg = yes; then
  :
else
  cs_cv_libjpeg_cflags=''
	cs_cv_libjpeg_lflags=''
	cs_cv_libjpeg_libs=''

fi

else
  cs_cv_libjpeg=no
fi


    cs_cv_with_jpeg="$with_jpeg"
    if test "$cs_cv_libjpeg" = yes; then
  if test "$cs_cv_libjpeg" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JPEG.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjpeg_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JPEG.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjpeg_lflags $cs_cv_libjpeg_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JPEG.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for libmng.  In addition to the standard installed locations, we also
# search CS/libs/libmng*. Note that libmng on some OpenBSD installations has a
# dependency on lcms (http://www.littlecms.com/), so we must check for this
# library, and utilize it explicitly if present.
#------------------------------------------------------------------------------

# Check whether --with-lcms was given.
if test "${with_lcms+set}" = set; then
  withval=$with_lcms;
fi


    # Backward compatibility: Recognize --with-liblcms as alias for --with-lcms.
    if test -n "$with_liblcms" &&
           test -z "$with_lcms"; then
  with_lcms="$with_liblcms"
fi


    if test -z "$with_lcms"; then
  with_lcms=yes
fi

    if test "$with_lcms" != no; then
  # If --with-lcms value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_lcms" != "$cs_cv_with_lcms"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_lcms = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lcms" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes lcms... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_lcms+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists lcms; then
  cs_cv_prog_pkg_config_lcms=yes
else
  cs_cv_prog_pkg_config_lcms=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lcms" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_lcms" >&6; }
	if test $cs_cv_prog_pkg_config_lcms = yes; then
  if test -z "$cs_cv_prog_pkg_config_lcms_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lcms") >&5
  ($PKG_CONFIG --cflags lcms) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs lcms") >&5
  ($PKG_CONFIG --libs lcms) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_lcms_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_lcms_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in lcms-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LCMS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LCMS"; then
  ac_cv_prog_CONFIG_LCMS="$CONFIG_LCMS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LCMS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LCMS=$ac_cv_prog_CONFIG_LCMS
if test -n "$CONFIG_LCMS"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LCMS" >&5
echo "${ECHO_T}$CONFIG_LCMS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LCMS" && break
  done
fi
if test -z "$CONFIG_LCMS"; then
  ac_ct_CONFIG_LCMS=$CONFIG_LCMS
  for ac_prog in lcms-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LCMS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LCMS"; then
  ac_cv_prog_ac_ct_CONFIG_LCMS="$ac_ct_CONFIG_LCMS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LCMS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LCMS=$ac_cv_prog_ac_ct_CONFIG_LCMS
if test -n "$ac_ct_CONFIG_LCMS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LCMS" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LCMS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LCMS" && break
done

  if test "x$ac_ct_CONFIG_LCMS" = x; then
    CONFIG_LCMS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LCMS=$ac_ct_CONFIG_LCMS
  fi
fi

    if test -n "$CONFIG_LCMS"; then
  if test -z "$cs_cv_prog_config_lcms_ok"; then
  if $CONFIG_LCMS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_lcms_ok=yes
else
  cs_cv_prog_config_lcms_ok=no
fi

fi

	if test $cs_cv_prog_config_lcms_ok = yes; then
  if test -z "$cs_cv_prog_config_lcms_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LCMS --cflags ") >&5
  ($CONFIG_LCMS --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LCMS --libs ") >&5
  ($CONFIG_LCMS --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_lcms_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_lcms_flags"
fi

fi


fi


	if test $with_lcms != yes; then
  cs_check_lib_paths=$with_lcms
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib /usr/include/lcms| /usr/local/include/lcms|"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "lcms"; then
  cs_check_lib_libs="-llcms"
	cs_check_lib_framework="-framework lcms"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "lcms"; then
  cs_check_lib_libs="-llcms"
	cs_check_lib_framework="-framework lcms"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "lcms"; then
  cs_check_lib_libs="-llcms"
	cs_check_lib_framework="-framework lcms"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for liblcms" >&5
echo $ECHO_N "checking for liblcms... $ECHO_C" >&6; }
if test "${cs_cv_liblcms+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lcms.h>
int
main ()
{
LPLUT p = cmsAllocLUT(); cmsFreeLUT(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_liblcms=yes
		cs_cv_liblcms_cflags=$cs_build_cflags
		cs_cv_liblcms_lflags=$cs_build_lflags
		cs_cv_liblcms_libs=$cs_build_libs
else
  cs_cv_liblcms=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_liblcms" >&5
echo "${ECHO_T}$cs_cv_liblcms" >&6; }
else
  { echo "$as_me:$LINENO: checking for liblcms" >&5
echo $ECHO_N "checking for liblcms... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lcms.h>
int
main ()
{
LPLUT p = cmsAllocLUT(); cmsFreeLUT(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_liblcms=yes
		cs_cv_liblcms_cflags=$cs_build_cflags
		cs_cv_liblcms_lflags=$cs_build_lflags
		cs_cv_liblcms_libs=$cs_build_libs
else
  cs_cv_liblcms=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_liblcms" >&5
echo "${ECHO_T}$cs_cv_liblcms" >&6; }
fi

    if test $cs_cv_liblcms = yes; then
  :
else
  cs_cv_liblcms_cflags=''
	cs_cv_liblcms_lflags=''
	cs_cv_liblcms_libs=''

fi

else
  cs_cv_liblcms=no
fi


    cs_cv_with_lcms="$with_lcms"



# Check whether --with-mng was given.
if test "${with_mng+set}" = set; then
  withval=$with_mng;
fi


    # Backward compatibility: Recognize --with-libmng as alias for --with-mng.
    if test -n "$with_libmng" &&
           test -z "$with_mng"; then
  with_mng="$with_libmng"
fi


    if test -z "$with_mng"; then
  with_mng=yes
fi

    if test "$with_mng" != no; then
  # If --with-mng value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_mng" != "$cs_cv_with_mng"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_mng = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes mng" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes mng... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_mng+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists mng; then
  cs_cv_prog_pkg_config_mng=yes
else
  cs_cv_prog_pkg_config_mng=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_mng" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_mng" >&6; }
	if test $cs_cv_prog_pkg_config_mng = yes; then
  if test -z "$cs_cv_prog_pkg_config_mng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags mng") >&5
  ($PKG_CONFIG --cflags mng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs mng") >&5
  ($PKG_CONFIG --libs mng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_mng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_mng_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in mng-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_MNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_MNG"; then
  ac_cv_prog_CONFIG_MNG="$CONFIG_MNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_MNG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_MNG=$ac_cv_prog_CONFIG_MNG
if test -n "$CONFIG_MNG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_MNG" >&5
echo "${ECHO_T}$CONFIG_MNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_MNG" && break
  done
fi
if test -z "$CONFIG_MNG"; then
  ac_ct_CONFIG_MNG=$CONFIG_MNG
  for ac_prog in mng-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_MNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_MNG"; then
  ac_cv_prog_ac_ct_CONFIG_MNG="$ac_ct_CONFIG_MNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_MNG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_MNG=$ac_cv_prog_ac_ct_CONFIG_MNG
if test -n "$ac_ct_CONFIG_MNG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_MNG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_MNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_MNG" && break
done

  if test "x$ac_ct_CONFIG_MNG" = x; then
    CONFIG_MNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_MNG=$ac_ct_CONFIG_MNG
  fi
fi

    if test -n "$CONFIG_MNG"; then
  if test -z "$cs_cv_prog_config_mng_ok"; then
  if $CONFIG_MNG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_mng_ok=yes
else
  cs_cv_prog_config_mng_ok=no
fi

fi

	if test $cs_cv_prog_config_mng_ok = yes; then
  if test -z "$cs_cv_prog_config_mng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_MNG --cflags ") >&5
  ($CONFIG_MNG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_MNG --libs ") >&5
  ($CONFIG_MNG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_mng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_mng_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libmng" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes libmng... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_libmng+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists libmng; then
  cs_cv_prog_pkg_config_libmng=yes
else
  cs_cv_prog_pkg_config_libmng=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libmng" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_libmng" >&6; }
	if test $cs_cv_prog_pkg_config_libmng = yes; then
  if test -z "$cs_cv_prog_pkg_config_libmng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libmng") >&5
  ($PKG_CONFIG --cflags libmng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs libmng") >&5
  ($PKG_CONFIG --libs libmng) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_libmng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_libmng_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in libmng-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIBMNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIBMNG"; then
  ac_cv_prog_CONFIG_LIBMNG="$CONFIG_LIBMNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIBMNG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIBMNG=$ac_cv_prog_CONFIG_LIBMNG
if test -n "$CONFIG_LIBMNG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIBMNG" >&5
echo "${ECHO_T}$CONFIG_LIBMNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIBMNG" && break
  done
fi
if test -z "$CONFIG_LIBMNG"; then
  ac_ct_CONFIG_LIBMNG=$CONFIG_LIBMNG
  for ac_prog in libmng-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIBMNG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIBMNG"; then
  ac_cv_prog_ac_ct_CONFIG_LIBMNG="$ac_ct_CONFIG_LIBMNG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIBMNG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIBMNG=$ac_cv_prog_ac_ct_CONFIG_LIBMNG
if test -n "$ac_ct_CONFIG_LIBMNG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIBMNG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIBMNG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIBMNG" && break
done

  if test "x$ac_ct_CONFIG_LIBMNG" = x; then
    CONFIG_LIBMNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBMNG=$ac_ct_CONFIG_LIBMNG
  fi
fi

    if test -n "$CONFIG_LIBMNG"; then
  if test -z "$cs_cv_prog_config_libmng_ok"; then
  if $CONFIG_LIBMNG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_libmng_ok=yes
else
  cs_cv_prog_config_libmng_ok=no
fi

fi

	if test $cs_cv_prog_config_libmng_ok = yes; then
  if test -z "$cs_cv_prog_config_libmng_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBMNG --cflags ") >&5
  ($CONFIG_LIBMNG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBMNG --libs ") >&5
  ($CONFIG_LIBMNG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_libmng_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_libmng_flags"
fi

fi


fi


	if test $with_mng != yes; then
  cs_check_lib_paths=$with_mng
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libmng*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "mng"; then
  cs_check_lib_libs="-lmng"
	cs_check_lib_framework="-framework mng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "mng"; then
  cs_check_lib_libs="-lmng"
	cs_check_lib_framework="-framework mng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "mng"; then
  cs_check_lib_libs="-lmng"
	cs_check_lib_framework="-framework mng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "libmng"; then
  cs_check_lib_libs="-llibmng"
	cs_check_lib_framework="-framework libmng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "libmng"; then
  cs_check_lib_libs="-llibmng"
	cs_check_lib_framework="-framework libmng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "libmng"; then
  cs_check_lib_libs="-llibmng"
	cs_check_lib_framework="-framework libmng"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libmng" >&5
echo $ECHO_N "checking for libmng... $ECHO_C" >&6; }
if test "${cs_cv_libmng+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_liblcms_cflags $cs_cv_libjpeg_cflags $cs_cv_libz_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_liblcms_lflags $cs_cv_libjpeg_lflags $cs_cv_libz_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_liblcms_libs $cs_cv_libjpeg_libs $cs_cv_libz_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <libmng.h>
int
main ()
{
mng_version_release()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_liblcms_cflags $cs_cv_libjpeg_cflags $cs_cv_libz_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_liblcms_lflags $cs_cv_libjpeg_lflags $cs_cv_libz_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_liblcms_libs $cs_cv_libjpeg_libs $cs_cv_libz_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libmng=yes
		cs_cv_libmng_cflags=$cs_build_cflags
		cs_cv_libmng_lflags=$cs_build_lflags
		cs_cv_libmng_libs=$cs_build_libs
else
  cs_cv_libmng=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libmng" >&5
echo "${ECHO_T}$cs_cv_libmng" >&6; }
else
  { echo "$as_me:$LINENO: checking for libmng" >&5
echo $ECHO_N "checking for libmng... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_liblcms_cflags $cs_cv_libjpeg_cflags $cs_cv_libz_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_liblcms_lflags $cs_cv_libjpeg_lflags $cs_cv_libz_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_liblcms_libs $cs_cv_libjpeg_libs $cs_cv_libz_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <libmng.h>
int
main ()
{
mng_version_release()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_liblcms_cflags $cs_cv_libjpeg_cflags $cs_cv_libz_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_liblcms_lflags $cs_cv_libjpeg_lflags $cs_cv_libz_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_liblcms_libs $cs_cv_libjpeg_libs $cs_cv_libz_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libmng=yes
		cs_cv_libmng_cflags=$cs_build_cflags
		cs_cv_libmng_lflags=$cs_build_lflags
		cs_cv_libmng_libs=$cs_build_libs
else
  cs_cv_libmng=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libmng" >&5
echo "${ECHO_T}$cs_cv_libmng" >&6; }
fi

    if test $cs_cv_libmng = yes; then
  :
else
  cs_cv_libmng_cflags=''
	cs_cv_libmng_lflags=''
	cs_cv_libmng_libs=''

fi

else
  cs_cv_libmng=no
fi


    cs_cv_with_mng="$with_mng"
    if test "$cs_cv_libmng" = yes; then
  if test "$cs_cv_libmng" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MNG.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libmng_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MNG.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libmng_lflags $cs_cv_libmng_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MNG.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for MikMod.  In addition to the standard installed locations, we also
# search CS/libs/libmikmod*.
#------------------------------------------------------------------------------

# Check whether --with-mikmod was given.
if test "${with_mikmod+set}" = set; then
  withval=$with_mikmod;
fi


    # Backward compatibility: Recognize --with-libmikmod as alias for --with-mikmod.
    if test -n "$with_libmikmod" &&
           test -z "$with_mikmod"; then
  with_mikmod="$with_libmikmod"
fi


    if test -z "$with_mikmod"; then
  with_mikmod=yes
fi

    if test "$with_mikmod" != no; then
  # If --with-mikmod value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_mikmod" != "$cs_cv_with_mikmod"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_mikmod = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes mikmod" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes mikmod... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_mikmod+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists mikmod; then
  cs_cv_prog_pkg_config_mikmod=yes
else
  cs_cv_prog_pkg_config_mikmod=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_mikmod" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_mikmod" >&6; }
	if test $cs_cv_prog_pkg_config_mikmod = yes; then
  if test -z "$cs_cv_prog_pkg_config_mikmod_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags mikmod") >&5
  ($PKG_CONFIG --cflags mikmod) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs mikmod") >&5
  ($PKG_CONFIG --libs mikmod) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_mikmod_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_mikmod_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in mikmod-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_MIKMOD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_MIKMOD"; then
  ac_cv_prog_CONFIG_MIKMOD="$CONFIG_MIKMOD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_MIKMOD="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_MIKMOD=$ac_cv_prog_CONFIG_MIKMOD
if test -n "$CONFIG_MIKMOD"; then
  { echo "$as_me:$LINENO: result: $CONFIG_MIKMOD" >&5
echo "${ECHO_T}$CONFIG_MIKMOD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_MIKMOD" && break
  done
fi
if test -z "$CONFIG_MIKMOD"; then
  ac_ct_CONFIG_MIKMOD=$CONFIG_MIKMOD
  for ac_prog in mikmod-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_MIKMOD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_MIKMOD"; then
  ac_cv_prog_ac_ct_CONFIG_MIKMOD="$ac_ct_CONFIG_MIKMOD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_MIKMOD="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_MIKMOD=$ac_cv_prog_ac_ct_CONFIG_MIKMOD
if test -n "$ac_ct_CONFIG_MIKMOD"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_MIKMOD" >&5
echo "${ECHO_T}$ac_ct_CONFIG_MIKMOD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_MIKMOD" && break
done

  if test "x$ac_ct_CONFIG_MIKMOD" = x; then
    CONFIG_MIKMOD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_MIKMOD=$ac_ct_CONFIG_MIKMOD
  fi
fi

    if test -n "$CONFIG_MIKMOD"; then
  if test -z "$cs_cv_prog_config_mikmod_ok"; then
  if $CONFIG_MIKMOD --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_mikmod_ok=yes
else
  cs_cv_prog_config_mikmod_ok=no
fi

fi

	if test $cs_cv_prog_config_mikmod_ok = yes; then
  if test -z "$cs_cv_prog_config_mikmod_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_MIKMOD --cflags ") >&5
  ($CONFIG_MIKMOD --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_MIKMOD --libs ") >&5
  ($CONFIG_MIKMOD --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_mikmod_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_mikmod_flags"
fi

fi


fi


	if test $with_mikmod != yes; then
  cs_check_lib_paths=$with_mikmod
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libmikmod*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "mikmod"; then
  cs_check_lib_libs="-lmikmod"
	cs_check_lib_framework="-framework mikmod"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "mikmod"; then
  cs_check_lib_libs="-lmikmod"
	cs_check_lib_framework="-framework mikmod"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "mikmod"; then
  cs_check_lib_libs="-lmikmod"
	cs_check_lib_framework="-framework mikmod"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libmikmod" >&5
echo $ECHO_N "checking for libmikmod... $ECHO_C" >&6; }
if test "${cs_cv_libmikmod+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <mikmod.h>
int
main ()
{
MikMod_Init("mikmodtest"); MikMod_Exit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libmikmod=yes
		cs_cv_libmikmod_cflags=$cs_build_cflags
		cs_cv_libmikmod_lflags=$cs_build_lflags
		cs_cv_libmikmod_libs=$cs_build_libs
else
  cs_cv_libmikmod=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libmikmod" >&5
echo "${ECHO_T}$cs_cv_libmikmod" >&6; }
else
  { echo "$as_me:$LINENO: checking for libmikmod" >&5
echo $ECHO_N "checking for libmikmod... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <mikmod.h>
int
main ()
{
MikMod_Init("mikmodtest"); MikMod_Exit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libmikmod=yes
		cs_cv_libmikmod_cflags=$cs_build_cflags
		cs_cv_libmikmod_lflags=$cs_build_lflags
		cs_cv_libmikmod_libs=$cs_build_libs
else
  cs_cv_libmikmod=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libmikmod" >&5
echo "${ECHO_T}$cs_cv_libmikmod" >&6; }
fi

    if test $cs_cv_libmikmod = yes; then
  :
else
  cs_cv_libmikmod_cflags=''
	cs_cv_libmikmod_lflags=''
	cs_cv_libmikmod_libs=''

fi

else
  cs_cv_libmikmod=no
fi


    cs_cv_with_mikmod="$with_mikmod"
    if test "$cs_cv_libmikmod" = yes; then
  if test "$cs_cv_libmikmod" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MIKMOD.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libmikmod_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MIKMOD.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libmikmod_lflags $cs_cv_libmikmod_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MIKMOD.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for Ogg/Vorbis.  In addition to the standard installed locations, we
# also search CS/libs/libogg*, CS/libs/libvorbis.*, CS/libs/libvorbisfile*.
#------------------------------------------------------------------------------

# Check whether --with-ogg was given.
if test "${with_ogg+set}" = set; then
  withval=$with_ogg;
fi


    # Backward compatibility: Recognize --with-libogg as alias for --with-ogg.
    if test -n "$with_libogg" &&
           test -z "$with_ogg"; then
  with_ogg="$with_libogg"
fi


    if test -z "$with_ogg"; then
  with_ogg=yes
fi

    if test "$with_ogg" != no; then
  # If --with-ogg value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_ogg" != "$cs_cv_with_ogg"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_ogg = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes ogg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes ogg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_ogg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists ogg; then
  cs_cv_prog_pkg_config_ogg=yes
else
  cs_cv_prog_pkg_config_ogg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_ogg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_ogg" >&6; }
	if test $cs_cv_prog_pkg_config_ogg = yes; then
  if test -z "$cs_cv_prog_pkg_config_ogg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags ogg") >&5
  ($PKG_CONFIG --cflags ogg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs ogg") >&5
  ($PKG_CONFIG --libs ogg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_ogg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_ogg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in ogg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_OGG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_OGG"; then
  ac_cv_prog_CONFIG_OGG="$CONFIG_OGG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_OGG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_OGG=$ac_cv_prog_CONFIG_OGG
if test -n "$CONFIG_OGG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_OGG" >&5
echo "${ECHO_T}$CONFIG_OGG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_OGG" && break
  done
fi
if test -z "$CONFIG_OGG"; then
  ac_ct_CONFIG_OGG=$CONFIG_OGG
  for ac_prog in ogg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_OGG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_OGG"; then
  ac_cv_prog_ac_ct_CONFIG_OGG="$ac_ct_CONFIG_OGG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_OGG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_OGG=$ac_cv_prog_ac_ct_CONFIG_OGG
if test -n "$ac_ct_CONFIG_OGG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_OGG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_OGG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_OGG" && break
done

  if test "x$ac_ct_CONFIG_OGG" = x; then
    CONFIG_OGG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_OGG=$ac_ct_CONFIG_OGG
  fi
fi

    if test -n "$CONFIG_OGG"; then
  if test -z "$cs_cv_prog_config_ogg_ok"; then
  if $CONFIG_OGG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_ogg_ok=yes
else
  cs_cv_prog_config_ogg_ok=no
fi

fi

	if test $cs_cv_prog_config_ogg_ok = yes; then
  if test -z "$cs_cv_prog_config_ogg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_OGG --cflags ") >&5
  ($CONFIG_OGG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_OGG --libs ") >&5
  ($CONFIG_OGG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_ogg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_ogg_flags"
fi

fi


fi


	if test $with_ogg != yes; then
  cs_check_lib_paths=$with_ogg
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libogg*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "ogg"; then
  cs_check_lib_libs="-logg"
	cs_check_lib_framework="-framework ogg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "ogg"; then
  cs_check_lib_libs="-logg"
	cs_check_lib_framework="-framework ogg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "ogg"; then
  cs_check_lib_libs="-logg"
	cs_check_lib_framework="-framework ogg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libogg" >&5
echo $ECHO_N "checking for libogg... $ECHO_C" >&6; }
if test "${cs_cv_libogg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ogg/ogg.h>
int
main ()
{
ogg_sync_state state; ogg_sync_init(&state);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libogg=yes
		cs_cv_libogg_cflags=$cs_build_cflags
		cs_cv_libogg_lflags=$cs_build_lflags
		cs_cv_libogg_libs=$cs_build_libs
else
  cs_cv_libogg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libogg" >&5
echo "${ECHO_T}$cs_cv_libogg" >&6; }
else
  { echo "$as_me:$LINENO: checking for libogg" >&5
echo $ECHO_N "checking for libogg... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ogg/ogg.h>
int
main ()
{
ogg_sync_state state; ogg_sync_init(&state);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libogg=yes
		cs_cv_libogg_cflags=$cs_build_cflags
		cs_cv_libogg_lflags=$cs_build_lflags
		cs_cv_libogg_libs=$cs_build_libs
else
  cs_cv_libogg=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libogg" >&5
echo "${ECHO_T}$cs_cv_libogg" >&6; }
fi

    if test $cs_cv_libogg = yes; then
  :
else
  cs_cv_libogg_cflags=''
	cs_cv_libogg_lflags=''
	cs_cv_libogg_libs=''

fi

else
  cs_cv_libogg=no
fi


    cs_cv_with_ogg="$with_ogg"
    if test "$cs_cv_libogg" = yes; then
  if test "$cs_cv_libogg" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OGG.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libogg_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OGG.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libogg_lflags $cs_cv_libogg_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OGG.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi


if test "$cs_cv_libogg" = yes; then

# Check whether --with-vorbis was given.
if test "${with_vorbis+set}" = set; then
  withval=$with_vorbis;
fi


    # Backward compatibility: Recognize --with-libvorbis as alias for --with-vorbis.
    if test -n "$with_libvorbis" &&
           test -z "$with_vorbis"; then
  with_vorbis="$with_libvorbis"
fi


    if test -z "$with_vorbis"; then
  with_vorbis=yes
fi

    if test "$with_vorbis" != no; then
  # If --with-vorbis value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_vorbis" != "$cs_cv_with_vorbis"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_vorbis = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes vorbis" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes vorbis... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_vorbis+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists vorbis; then
  cs_cv_prog_pkg_config_vorbis=yes
else
  cs_cv_prog_pkg_config_vorbis=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_vorbis" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_vorbis" >&6; }
	if test $cs_cv_prog_pkg_config_vorbis = yes; then
  if test -z "$cs_cv_prog_pkg_config_vorbis_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags vorbis") >&5
  ($PKG_CONFIG --cflags vorbis) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs vorbis") >&5
  ($PKG_CONFIG --libs vorbis) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_vorbis_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_vorbis_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in vorbis-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_VORBIS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_VORBIS"; then
  ac_cv_prog_CONFIG_VORBIS="$CONFIG_VORBIS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_VORBIS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_VORBIS=$ac_cv_prog_CONFIG_VORBIS
if test -n "$CONFIG_VORBIS"; then
  { echo "$as_me:$LINENO: result: $CONFIG_VORBIS" >&5
echo "${ECHO_T}$CONFIG_VORBIS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_VORBIS" && break
  done
fi
if test -z "$CONFIG_VORBIS"; then
  ac_ct_CONFIG_VORBIS=$CONFIG_VORBIS
  for ac_prog in vorbis-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_VORBIS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_VORBIS"; then
  ac_cv_prog_ac_ct_CONFIG_VORBIS="$ac_ct_CONFIG_VORBIS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_VORBIS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_VORBIS=$ac_cv_prog_ac_ct_CONFIG_VORBIS
if test -n "$ac_ct_CONFIG_VORBIS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_VORBIS" >&5
echo "${ECHO_T}$ac_ct_CONFIG_VORBIS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_VORBIS" && break
done

  if test "x$ac_ct_CONFIG_VORBIS" = x; then
    CONFIG_VORBIS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_VORBIS=$ac_ct_CONFIG_VORBIS
  fi
fi

    if test -n "$CONFIG_VORBIS"; then
  if test -z "$cs_cv_prog_config_vorbis_ok"; then
  if $CONFIG_VORBIS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_vorbis_ok=yes
else
  cs_cv_prog_config_vorbis_ok=no
fi

fi

	if test $cs_cv_prog_config_vorbis_ok = yes; then
  if test -z "$cs_cv_prog_config_vorbis_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_VORBIS --cflags ") >&5
  ($CONFIG_VORBIS --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_VORBIS --libs ") >&5
  ($CONFIG_VORBIS --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_vorbis_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_vorbis_flags"
fi

fi


fi


	if test $with_vorbis != yes; then
  cs_check_lib_paths=$with_vorbis
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libvorbis.*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbis"; then
  cs_check_lib_libs="-lvorbis"
	cs_check_lib_framework="-framework vorbis"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbis"; then
  cs_check_lib_libs="-lvorbis"
	cs_check_lib_framework="-framework vorbis"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbis"; then
  cs_check_lib_libs="-lvorbis"
	cs_check_lib_framework="-framework vorbis"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libvorbis" >&5
echo $ECHO_N "checking for libvorbis... $ECHO_C" >&6; }
if test "${cs_cv_libvorbis+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libogg_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libogg_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libogg_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <vorbis/codec.h>
int
main ()
{
vorbis_info info; vorbis_info_init(&info);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libogg_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libogg_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libogg_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvorbis=yes
		cs_cv_libvorbis_cflags=$cs_build_cflags
		cs_cv_libvorbis_lflags=$cs_build_lflags
		cs_cv_libvorbis_libs=$cs_build_libs
else
  cs_cv_libvorbis=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libvorbis" >&5
echo "${ECHO_T}$cs_cv_libvorbis" >&6; }
else
  { echo "$as_me:$LINENO: checking for libvorbis" >&5
echo $ECHO_N "checking for libvorbis... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libogg_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libogg_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libogg_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <vorbis/codec.h>
int
main ()
{
vorbis_info info; vorbis_info_init(&info);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libogg_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libogg_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libogg_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvorbis=yes
		cs_cv_libvorbis_cflags=$cs_build_cflags
		cs_cv_libvorbis_lflags=$cs_build_lflags
		cs_cv_libvorbis_libs=$cs_build_libs
else
  cs_cv_libvorbis=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libvorbis" >&5
echo "${ECHO_T}$cs_cv_libvorbis" >&6; }
fi

    if test $cs_cv_libvorbis = yes; then
  :
else
  cs_cv_libvorbis_cflags=''
	cs_cv_libvorbis_lflags=''
	cs_cv_libvorbis_libs=''

fi

else
  cs_cv_libvorbis=no
fi


    cs_cv_with_vorbis="$with_vorbis"
    if test "$cs_cv_libvorbis" = yes; then
  if test "$cs_cv_libvorbis" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBIS.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libvorbis_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBIS.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libvorbis_lflags $cs_cv_libvorbis_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBIS.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi


if test "$cs_cv_libvorbis" = yes; then

# Check whether --with-vorbisfile was given.
if test "${with_vorbisfile+set}" = set; then
  withval=$with_vorbisfile;
fi


    # Backward compatibility: Recognize --with-libvorbisfile as alias for --with-vorbisfile.
    if test -n "$with_libvorbisfile" &&
           test -z "$with_vorbisfile"; then
  with_vorbisfile="$with_libvorbisfile"
fi


    if test -z "$with_vorbisfile"; then
  with_vorbisfile=yes
fi

    if test "$with_vorbisfile" != no; then
  # If --with-vorbisfile value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_vorbisfile" != "$cs_cv_with_vorbisfile"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_vorbisfile = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes vorbisfile" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes vorbisfile... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_vorbisfile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists vorbisfile; then
  cs_cv_prog_pkg_config_vorbisfile=yes
else
  cs_cv_prog_pkg_config_vorbisfile=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_vorbisfile" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_vorbisfile" >&6; }
	if test $cs_cv_prog_pkg_config_vorbisfile = yes; then
  if test -z "$cs_cv_prog_pkg_config_vorbisfile_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags vorbisfile") >&5
  ($PKG_CONFIG --cflags vorbisfile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs vorbisfile") >&5
  ($PKG_CONFIG --libs vorbisfile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_vorbisfile_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_vorbisfile_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in vorbisfile-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_VORBISFILE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_VORBISFILE"; then
  ac_cv_prog_CONFIG_VORBISFILE="$CONFIG_VORBISFILE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_VORBISFILE="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_VORBISFILE=$ac_cv_prog_CONFIG_VORBISFILE
if test -n "$CONFIG_VORBISFILE"; then
  { echo "$as_me:$LINENO: result: $CONFIG_VORBISFILE" >&5
echo "${ECHO_T}$CONFIG_VORBISFILE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_VORBISFILE" && break
  done
fi
if test -z "$CONFIG_VORBISFILE"; then
  ac_ct_CONFIG_VORBISFILE=$CONFIG_VORBISFILE
  for ac_prog in vorbisfile-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_VORBISFILE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_VORBISFILE"; then
  ac_cv_prog_ac_ct_CONFIG_VORBISFILE="$ac_ct_CONFIG_VORBISFILE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_VORBISFILE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_VORBISFILE=$ac_cv_prog_ac_ct_CONFIG_VORBISFILE
if test -n "$ac_ct_CONFIG_VORBISFILE"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_VORBISFILE" >&5
echo "${ECHO_T}$ac_ct_CONFIG_VORBISFILE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_VORBISFILE" && break
done

  if test "x$ac_ct_CONFIG_VORBISFILE" = x; then
    CONFIG_VORBISFILE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_VORBISFILE=$ac_ct_CONFIG_VORBISFILE
  fi
fi

    if test -n "$CONFIG_VORBISFILE"; then
  if test -z "$cs_cv_prog_config_vorbisfile_ok"; then
  if $CONFIG_VORBISFILE --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_vorbisfile_ok=yes
else
  cs_cv_prog_config_vorbisfile_ok=no
fi

fi

	if test $cs_cv_prog_config_vorbisfile_ok = yes; then
  if test -z "$cs_cv_prog_config_vorbisfile_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_VORBISFILE --cflags ") >&5
  ($CONFIG_VORBISFILE --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_VORBISFILE --libs ") >&5
  ($CONFIG_VORBISFILE --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_vorbisfile_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_vorbisfile_flags"
fi

fi


fi


	if test $with_vorbisfile != yes; then
  cs_check_lib_paths=$with_vorbisfile
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libvorbisfile*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbisfile"; then
  cs_check_lib_libs="-lvorbisfile"
	cs_check_lib_framework="-framework vorbisfile"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbisfile"; then
  cs_check_lib_libs="-lvorbisfile"
	cs_check_lib_framework="-framework vorbisfile"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "vorbisfile"; then
  cs_check_lib_libs="-lvorbisfile"
	cs_check_lib_framework="-framework vorbisfile"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libvorbisfile" >&5
echo $ECHO_N "checking for libvorbisfile... $ECHO_C" >&6; }
if test "${cs_cv_libvorbisfile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libogg_cflags $cs_cv_libvorbis_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libogg_lflags $cs_cv_libvorbis_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libogg_libs $cs_cv_libvorbis_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <vorbis/vorbisfile.h>
	    #include <stdio.h>
int
main ()
{
OggVorbis_File file; ov_test(stdin, &file, "", 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libogg_cflags $cs_cv_libvorbis_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libogg_lflags $cs_cv_libvorbis_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libogg_libs $cs_cv_libvorbis_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvorbisfile=yes
		cs_cv_libvorbisfile_cflags=$cs_build_cflags
		cs_cv_libvorbisfile_lflags=$cs_build_lflags
		cs_cv_libvorbisfile_libs=$cs_build_libs
else
  cs_cv_libvorbisfile=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libvorbisfile" >&5
echo "${ECHO_T}$cs_cv_libvorbisfile" >&6; }
else
  { echo "$as_me:$LINENO: checking for libvorbisfile" >&5
echo $ECHO_N "checking for libvorbisfile... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libogg_cflags $cs_cv_libvorbis_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libogg_lflags $cs_cv_libvorbis_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libogg_libs $cs_cv_libvorbis_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <vorbis/vorbisfile.h>
	    #include <stdio.h>
int
main ()
{
OggVorbis_File file; ov_test(stdin, &file, "", 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libogg_cflags $cs_cv_libvorbis_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libogg_lflags $cs_cv_libvorbis_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libogg_libs $cs_cv_libvorbis_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvorbisfile=yes
		cs_cv_libvorbisfile_cflags=$cs_build_cflags
		cs_cv_libvorbisfile_lflags=$cs_build_lflags
		cs_cv_libvorbisfile_libs=$cs_build_libs
else
  cs_cv_libvorbisfile=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libvorbisfile" >&5
echo "${ECHO_T}$cs_cv_libvorbisfile" >&6; }
fi

    if test $cs_cv_libvorbisfile = yes; then
  :
else
  cs_cv_libvorbisfile_cflags=''
	cs_cv_libvorbisfile_lflags=''
	cs_cv_libvorbisfile_libs=''

fi

else
  cs_cv_libvorbisfile=no
fi


    cs_cv_with_vorbisfile="$with_vorbisfile"
    if test "$cs_cv_libvorbisfile" = yes; then
  if test "$cs_cv_libvorbisfile" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBISFILE.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libvorbisfile_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBISFILE.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libvorbisfile_lflags $cs_cv_libvorbisfile_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}VORBISFILE.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for lib3ds.  In addition to the standard installed locations, we also
# search CS/libs/lib3ds*.
#------------------------------------------------------------------------------





# Check whether --with-3ds was given.
if test "${with_3ds+set}" = set; then
  withval=$with_3ds;
fi


    # Backward compatibility: Recognize --with-lib3ds as alias for --with-3ds.
    if test -n "$with_lib3ds" &&
           test -z "$with_3ds"; then
  with_3ds="$with_lib3ds"
fi


    if test -z "$with_3ds"; then
  with_3ds=yes
fi

    if test "$with_3ds" != no; then
  # If --with-3ds value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_3ds" != "$cs_cv_with_3ds"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_3ds = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes 3ds" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes 3ds... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_3ds+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists 3ds; then
  cs_cv_prog_pkg_config_3ds=yes
else
  cs_cv_prog_pkg_config_3ds=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_3ds" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_3ds" >&6; }
	if test $cs_cv_prog_pkg_config_3ds = yes; then
  if test -z "$cs_cv_prog_pkg_config_3ds_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags 3ds") >&5
  ($PKG_CONFIG --cflags 3ds) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs 3ds") >&5
  ($PKG_CONFIG --libs 3ds) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_3ds_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_3ds_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in 3ds-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_3DS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_3DS"; then
  ac_cv_prog_CONFIG_3DS="$CONFIG_3DS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_3DS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_3DS=$ac_cv_prog_CONFIG_3DS
if test -n "$CONFIG_3DS"; then
  { echo "$as_me:$LINENO: result: $CONFIG_3DS" >&5
echo "${ECHO_T}$CONFIG_3DS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_3DS" && break
  done
fi
if test -z "$CONFIG_3DS"; then
  ac_ct_CONFIG_3DS=$CONFIG_3DS
  for ac_prog in 3ds-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_3DS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_3DS"; then
  ac_cv_prog_ac_ct_CONFIG_3DS="$ac_ct_CONFIG_3DS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_3DS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_3DS=$ac_cv_prog_ac_ct_CONFIG_3DS
if test -n "$ac_ct_CONFIG_3DS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_3DS" >&5
echo "${ECHO_T}$ac_ct_CONFIG_3DS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_3DS" && break
done

  if test "x$ac_ct_CONFIG_3DS" = x; then
    CONFIG_3DS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_3DS=$ac_ct_CONFIG_3DS
  fi
fi

    if test -n "$CONFIG_3DS"; then
  if test -z "$cs_cv_prog_config_3ds_ok"; then
  if $CONFIG_3DS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_3ds_ok=yes
else
  cs_cv_prog_config_3ds_ok=no
fi

fi

	if test $cs_cv_prog_config_3ds_ok = yes; then
  if test -z "$cs_cv_prog_config_3ds_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_3DS --cflags ") >&5
  ($CONFIG_3DS --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_3DS --libs ") >&5
  ($CONFIG_3DS --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_3ds_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_3ds_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lib3ds" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes lib3ds... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_lib3ds+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists lib3ds; then
  cs_cv_prog_pkg_config_lib3ds=yes
else
  cs_cv_prog_pkg_config_lib3ds=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lib3ds" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_lib3ds" >&6; }
	if test $cs_cv_prog_pkg_config_lib3ds = yes; then
  if test -z "$cs_cv_prog_pkg_config_lib3ds_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lib3ds") >&5
  ($PKG_CONFIG --cflags lib3ds) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs lib3ds") >&5
  ($PKG_CONFIG --libs lib3ds) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_lib3ds_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_lib3ds_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in lib3ds-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIB3DS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIB3DS"; then
  ac_cv_prog_CONFIG_LIB3DS="$CONFIG_LIB3DS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIB3DS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIB3DS=$ac_cv_prog_CONFIG_LIB3DS
if test -n "$CONFIG_LIB3DS"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIB3DS" >&5
echo "${ECHO_T}$CONFIG_LIB3DS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIB3DS" && break
  done
fi
if test -z "$CONFIG_LIB3DS"; then
  ac_ct_CONFIG_LIB3DS=$CONFIG_LIB3DS
  for ac_prog in lib3ds-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIB3DS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIB3DS"; then
  ac_cv_prog_ac_ct_CONFIG_LIB3DS="$ac_ct_CONFIG_LIB3DS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIB3DS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIB3DS=$ac_cv_prog_ac_ct_CONFIG_LIB3DS
if test -n "$ac_ct_CONFIG_LIB3DS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIB3DS" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIB3DS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIB3DS" && break
done

  if test "x$ac_ct_CONFIG_LIB3DS" = x; then
    CONFIG_LIB3DS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIB3DS=$ac_ct_CONFIG_LIB3DS
  fi
fi

    if test -n "$CONFIG_LIB3DS"; then
  if test -z "$cs_cv_prog_config_lib3ds_ok"; then
  if $CONFIG_LIB3DS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_lib3ds_ok=yes
else
  cs_cv_prog_config_lib3ds_ok=no
fi

fi

	if test $cs_cv_prog_config_lib3ds_ok = yes; then
  if test -z "$cs_cv_prog_config_lib3ds_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIB3DS --cflags ") >&5
  ($CONFIG_LIB3DS --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIB3DS --libs ") >&5
  ($CONFIG_LIB3DS --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_lib3ds_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_lib3ds_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lib3ds-120" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes lib3ds-120... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_lib3ds_120+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists lib3ds-120; then
  cs_cv_prog_pkg_config_lib3ds_120=yes
else
  cs_cv_prog_pkg_config_lib3ds_120=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lib3ds_120" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_lib3ds_120" >&6; }
	if test $cs_cv_prog_pkg_config_lib3ds_120 = yes; then
  if test -z "$cs_cv_prog_pkg_config_lib3ds_120_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lib3ds-120") >&5
  ($PKG_CONFIG --cflags lib3ds-120) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs lib3ds-120") >&5
  ($PKG_CONFIG --libs lib3ds-120) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_lib3ds_120_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_lib3ds_120_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in lib3ds-120-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIB3DS_120+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIB3DS_120"; then
  ac_cv_prog_CONFIG_LIB3DS_120="$CONFIG_LIB3DS_120" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIB3DS_120="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIB3DS_120=$ac_cv_prog_CONFIG_LIB3DS_120
if test -n "$CONFIG_LIB3DS_120"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIB3DS_120" >&5
echo "${ECHO_T}$CONFIG_LIB3DS_120" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIB3DS_120" && break
  done
fi
if test -z "$CONFIG_LIB3DS_120"; then
  ac_ct_CONFIG_LIB3DS_120=$CONFIG_LIB3DS_120
  for ac_prog in lib3ds-120-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIB3DS_120+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIB3DS_120"; then
  ac_cv_prog_ac_ct_CONFIG_LIB3DS_120="$ac_ct_CONFIG_LIB3DS_120" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIB3DS_120="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIB3DS_120=$ac_cv_prog_ac_ct_CONFIG_LIB3DS_120
if test -n "$ac_ct_CONFIG_LIB3DS_120"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIB3DS_120" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIB3DS_120" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIB3DS_120" && break
done

  if test "x$ac_ct_CONFIG_LIB3DS_120" = x; then
    CONFIG_LIB3DS_120=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIB3DS_120=$ac_ct_CONFIG_LIB3DS_120
  fi
fi

    if test -n "$CONFIG_LIB3DS_120"; then
  if test -z "$cs_cv_prog_config_lib3ds_120_ok"; then
  if $CONFIG_LIB3DS_120 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_lib3ds_120_ok=yes
else
  cs_cv_prog_config_lib3ds_120_ok=no
fi

fi

	if test $cs_cv_prog_config_lib3ds_120_ok = yes; then
  if test -z "$cs_cv_prog_config_lib3ds_120_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIB3DS_120 --cflags ") >&5
  ($CONFIG_LIB3DS_120 --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIB3DS_120 --libs ") >&5
  ($CONFIG_LIB3DS_120 --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_lib3ds_120_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_lib3ds_120_flags"
fi

fi


fi


	if test $with_3ds != yes; then
  cs_check_lib_paths=$with_3ds
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/lib3ds*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "3ds"; then
  cs_check_lib_libs="-l3ds"
	cs_check_lib_framework="-framework 3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "3ds"; then
  cs_check_lib_libs="-l3ds"
	cs_check_lib_framework="-framework 3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "3ds"; then
  cs_check_lib_libs="-l3ds"
	cs_check_lib_framework="-framework 3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds"; then
  cs_check_lib_libs="-llib3ds"
	cs_check_lib_framework="-framework lib3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds"; then
  cs_check_lib_libs="-llib3ds"
	cs_check_lib_framework="-framework lib3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds"; then
  cs_check_lib_libs="-llib3ds"
	cs_check_lib_framework="-framework lib3ds"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds-120"; then
  cs_check_lib_libs="-llib3ds-120"
	cs_check_lib_framework="-framework lib3ds-120"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds-120"; then
  cs_check_lib_libs="-llib3ds-120"
	cs_check_lib_framework="-framework lib3ds-120"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "lib3ds-120"; then
  cs_check_lib_libs="-llib3ds-120"
	cs_check_lib_framework="-framework lib3ds-120"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for lib3ds" >&5
echo $ECHO_N "checking for lib3ds... $ECHO_C" >&6; }
if test "${cs_cv_lib3ds+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lib3ds/file.h>
int
main ()
{
lib3ds_file_new();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_lib3ds=yes
		cs_cv_lib3ds_cflags=$cs_build_cflags
		cs_cv_lib3ds_lflags=$cs_build_lflags
		cs_cv_lib3ds_libs=$cs_build_libs
else
  cs_cv_lib3ds=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_lib3ds" >&5
echo "${ECHO_T}$cs_cv_lib3ds" >&6; }
else
  { echo "$as_me:$LINENO: checking for lib3ds" >&5
echo $ECHO_N "checking for lib3ds... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lib3ds/file.h>
int
main ()
{
lib3ds_file_new();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_lib3ds=yes
		cs_cv_lib3ds_cflags=$cs_build_cflags
		cs_cv_lib3ds_lflags=$cs_build_lflags
		cs_cv_lib3ds_libs=$cs_build_libs
else
  cs_cv_lib3ds=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_lib3ds" >&5
echo "${ECHO_T}$cs_cv_lib3ds" >&6; }
fi

    if test $cs_cv_lib3ds = yes; then
  :
else
  cs_cv_lib3ds_cflags=''
	cs_cv_lib3ds_lflags=''
	cs_cv_lib3ds_libs=''

fi

else
  cs_cv_lib3ds=no
fi


    cs_cv_with_3ds="$with_3ds"


if test $cs_cv_lib3ds = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if lib3ds is sufficiently recent" >&5
echo $ECHO_N "checking if lib3ds is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_lib3ds_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_lib3ds_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_lib3ds_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_lib3ds_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lib3ds/io.h>
int
main ()
{
lib3ds_io_free(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_lib3ds_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_lib3ds_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_lib3ds_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_lib3ds_recent=yes
		cs_cv_lib3ds_recent_cflags=$cs_build_cflags
		cs_cv_lib3ds_recent_lflags=$cs_build_lflags
		cs_cv_lib3ds_recent_libs=$cs_build_libs
else
  cs_cv_lib3ds_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_lib3ds_recent" >&5
echo "${ECHO_T}$cs_cv_lib3ds_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if lib3ds is sufficiently recent" >&5
echo $ECHO_N "checking if lib3ds is sufficiently recent... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_lib3ds_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_lib3ds_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_lib3ds_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <lib3ds/io.h>
int
main ()
{
lib3ds_io_free(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_lib3ds_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_lib3ds_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_lib3ds_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_lib3ds_recent=yes
		cs_cv_lib3ds_recent_cflags=$cs_build_cflags
		cs_cv_lib3ds_recent_lflags=$cs_build_lflags
		cs_cv_lib3ds_recent_libs=$cs_build_libs
else
  cs_cv_lib3ds_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_lib3ds_recent" >&5
echo "${ECHO_T}$cs_cv_lib3ds_recent" >&6; }
fi

    if test $cs_cv_lib3ds_recent = yes; then
  if test "$cs_cv_lib3ds" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}3DS.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_lib3ds_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}3DS.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_lib3ds_lflags $cs_cv_lib3ds_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}3DS.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_lib3ds_recent_cflags=''
	cs_cv_lib3ds_recent_lflags=''
	cs_cv_lib3ds_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for ODE.  In addition to the standard installed locations, we also
# search CS/libs/libode*.  Also check if it is a sufficiently recent version.
#------------------------------------------------------------------------------

# Check whether --with-ode was given.
if test "${with_ode+set}" = set; then
  withval=$with_ode;
fi


    # Backward compatibility: Recognize --with-libode as alias for --with-ode.
    if test -n "$with_libode" &&
           test -z "$with_ode"; then
  with_ode="$with_libode"
fi


    if test -z "$with_ode"; then
  with_ode=yes
fi

    if test "$with_ode" != no; then
  # If --with-ode value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_ode" != "$cs_cv_with_ode"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_ode = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes ode" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes ode... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_ode+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists ode; then
  cs_cv_prog_pkg_config_ode=yes
else
  cs_cv_prog_pkg_config_ode=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_ode" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_ode" >&6; }
	if test $cs_cv_prog_pkg_config_ode = yes; then
  if test -z "$cs_cv_prog_pkg_config_ode_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags ode") >&5
  ($PKG_CONFIG --cflags ode) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs ode") >&5
  ($PKG_CONFIG --libs ode) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_ode_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_ode_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in ode-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_ODE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_ODE"; then
  ac_cv_prog_CONFIG_ODE="$CONFIG_ODE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_ODE="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_ODE=$ac_cv_prog_CONFIG_ODE
if test -n "$CONFIG_ODE"; then
  { echo "$as_me:$LINENO: result: $CONFIG_ODE" >&5
echo "${ECHO_T}$CONFIG_ODE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_ODE" && break
  done
fi
if test -z "$CONFIG_ODE"; then
  ac_ct_CONFIG_ODE=$CONFIG_ODE
  for ac_prog in ode-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_ODE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_ODE"; then
  ac_cv_prog_ac_ct_CONFIG_ODE="$ac_ct_CONFIG_ODE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_ODE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_ODE=$ac_cv_prog_ac_ct_CONFIG_ODE
if test -n "$ac_ct_CONFIG_ODE"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_ODE" >&5
echo "${ECHO_T}$ac_ct_CONFIG_ODE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_ODE" && break
done

  if test "x$ac_ct_CONFIG_ODE" = x; then
    CONFIG_ODE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ODE=$ac_ct_CONFIG_ODE
  fi
fi

    if test -n "$CONFIG_ODE"; then
  if test -z "$cs_cv_prog_config_ode_ok"; then
  if $CONFIG_ODE --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_ode_ok=yes
else
  cs_cv_prog_config_ode_ok=no
fi

fi

	if test $cs_cv_prog_config_ode_ok = yes; then
  if test -z "$cs_cv_prog_config_ode_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_ODE --cflags ") >&5
  ($CONFIG_ODE --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_ODE --libs ") >&5
  ($CONFIG_ODE --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_ode_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_ode_flags"
fi

fi


fi


	if test $with_ode != yes; then
  cs_check_lib_paths=$with_ode
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib $srcdir/libs/libode*"
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "ode"; then
  cs_check_lib_libs="-lode"
	cs_check_lib_framework="-framework ode"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "ode"; then
  cs_check_lib_libs="-lode"
	cs_check_lib_framework="-framework ode"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "ode"; then
  cs_check_lib_libs="-lode"
	cs_check_lib_framework="-framework ode"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libode" >&5
echo $ECHO_N "checking for libode... $ECHO_C" >&6; }
if test "${cs_cv_libode+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dWorldCreate()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode=yes
		cs_cv_libode_cflags=$cs_build_cflags
		cs_cv_libode_lflags=$cs_build_lflags
		cs_cv_libode_libs=$cs_build_libs
else
  cs_cv_libode=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libode" >&5
echo "${ECHO_T}$cs_cv_libode" >&6; }
else
  { echo "$as_me:$LINENO: checking for libode" >&5
echo $ECHO_N "checking for libode... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dWorldCreate()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode=yes
		cs_cv_libode_cflags=$cs_build_cflags
		cs_cv_libode_lflags=$cs_build_lflags
		cs_cv_libode_libs=$cs_build_libs
else
  cs_cv_libode=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libode" >&5
echo "${ECHO_T}$cs_cv_libode" >&6; }
fi

    if test $cs_cv_libode = yes; then
  :
else
  cs_cv_libode_cflags=''
	cs_cv_libode_lflags=''
	cs_cv_libode_libs=''

fi

else
  cs_cv_libode=no
fi


    cs_cv_with_ode="$with_ode"


if test $cs_cv_libode = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if libode is built with OPCODE support" >&5
echo $ECHO_N "checking if libode is built with OPCODE support... $ECHO_C" >&6; }
if test "${cs_cv_libode_opcode+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libode_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libode_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libode_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dGeomTriMeshDataCreate();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libode_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libode_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libode_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode_opcode=yes
		cs_cv_libode_opcode_cflags=$cs_build_cflags
		cs_cv_libode_opcode_lflags=$cs_build_lflags
		cs_cv_libode_opcode_libs=$cs_build_libs
else
  cs_cv_libode_opcode=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libode_opcode" >&5
echo "${ECHO_T}$cs_cv_libode_opcode" >&6; }
else
  { echo "$as_me:$LINENO: checking if libode is built with OPCODE support" >&5
echo $ECHO_N "checking if libode is built with OPCODE support... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libode_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libode_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libode_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dGeomTriMeshDataCreate();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libode_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libode_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libode_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode_opcode=yes
		cs_cv_libode_opcode_cflags=$cs_build_cflags
		cs_cv_libode_opcode_lflags=$cs_build_lflags
		cs_cv_libode_opcode_libs=$cs_build_libs
else
  cs_cv_libode_opcode=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libode_opcode" >&5
echo "${ECHO_T}$cs_cv_libode_opcode" >&6; }
fi

    if test $cs_cv_libode_opcode = yes; then
  :
else
  cs_cv_libode_opcode_cflags=''
	cs_cv_libode_opcode_lflags=''
	cs_cv_libode_opcode_libs=''

fi

else
  cs_cv_libode_opcode=no
fi


if test $cs_cv_libode_opcode = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if libode is sufficiently recent" >&5
echo $ECHO_N "checking if libode is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_libode_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libode_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libode_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libode_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dGeomTriMeshGetTriangleCount(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libode_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libode_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libode_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode_recent=yes
		cs_cv_libode_recent_cflags=$cs_build_cflags
		cs_cv_libode_recent_lflags=$cs_build_lflags
		cs_cv_libode_recent_libs=$cs_build_libs
else
  cs_cv_libode_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libode_recent" >&5
echo "${ECHO_T}$cs_cv_libode_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if libode is sufficiently recent" >&5
echo $ECHO_N "checking if libode is sufficiently recent... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libode_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libode_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libode_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ode/ode.h>
int
main ()
{
dGeomTriMeshGetTriangleCount(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libode_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libode_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libode_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libode_recent=yes
		cs_cv_libode_recent_cflags=$cs_build_cflags
		cs_cv_libode_recent_lflags=$cs_build_lflags
		cs_cv_libode_recent_libs=$cs_build_libs
else
  cs_cv_libode_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libode_recent" >&5
echo "${ECHO_T}$cs_cv_libode_recent" >&6; }
fi

    if test $cs_cv_libode_recent = yes; then
  if test "$cs_cv_libode" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ODE.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libode_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ODE.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libode_lflags $cs_cv_libode_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ODE.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libode_recent_cflags=''
	cs_cv_libode_recent_lflags=''
	cs_cv_libode_recent_libs=''

fi

else
  cs_cv_libode_recent=no
fi




#------------------------------------------------------------------------------
# Check for bullet physics library.
#------------------------------------------------------------------------------

# Check whether --with-bullet was given.
if test "${with_bullet+set}" = set; then
  withval=$with_bullet;
fi


    # Backward compatibility: Recognize --with-libbullet as alias for --with-bullet.
    if test -n "$with_libbullet" &&
           test -z "$with_bullet"; then
  with_bullet="$with_libbullet"
fi


    if test -z "$with_bullet"; then
  with_bullet=yes
fi

    if test "$with_bullet" != no; then
  # If --with-bullet value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_bullet" != "$cs_cv_with_bullet"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_bullet = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bullet" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes bullet... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_bullet+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists bullet; then
  cs_cv_prog_pkg_config_bullet=yes
else
  cs_cv_prog_pkg_config_bullet=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bullet" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_bullet" >&6; }
	if test $cs_cv_prog_pkg_config_bullet = yes; then
  if test -z "$cs_cv_prog_pkg_config_bullet_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bullet") >&5
  ($PKG_CONFIG --cflags bullet) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs bullet") >&5
  ($PKG_CONFIG --libs bullet) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_bullet_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_bullet_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in bullet-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_BULLET+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_BULLET"; then
  ac_cv_prog_CONFIG_BULLET="$CONFIG_BULLET" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_BULLET="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_BULLET=$ac_cv_prog_CONFIG_BULLET
if test -n "$CONFIG_BULLET"; then
  { echo "$as_me:$LINENO: result: $CONFIG_BULLET" >&5
echo "${ECHO_T}$CONFIG_BULLET" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_BULLET" && break
  done
fi
if test -z "$CONFIG_BULLET"; then
  ac_ct_CONFIG_BULLET=$CONFIG_BULLET
  for ac_prog in bullet-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_BULLET+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_BULLET"; then
  ac_cv_prog_ac_ct_CONFIG_BULLET="$ac_ct_CONFIG_BULLET" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_BULLET="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_BULLET=$ac_cv_prog_ac_ct_CONFIG_BULLET
if test -n "$ac_ct_CONFIG_BULLET"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_BULLET" >&5
echo "${ECHO_T}$ac_ct_CONFIG_BULLET" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_BULLET" && break
done

  if test "x$ac_ct_CONFIG_BULLET" = x; then
    CONFIG_BULLET=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BULLET=$ac_ct_CONFIG_BULLET
  fi
fi

    if test -n "$CONFIG_BULLET"; then
  if test -z "$cs_cv_prog_config_bullet_ok"; then
  if $CONFIG_BULLET --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_bullet_ok=yes
else
  cs_cv_prog_config_bullet_ok=no
fi

fi

	if test $cs_cv_prog_config_bullet_ok = yes; then
  if test -z "$cs_cv_prog_config_bullet_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_BULLET --cflags ") >&5
  ($CONFIG_BULLET --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_BULLET --libs ") >&5
  ($CONFIG_BULLET --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_bullet_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_bullet_flags"
fi

fi


fi


	if test $with_bullet != yes; then
  cs_check_lib_paths=$with_bullet
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "bullet"; then
  cs_check_lib_libs="-lbullet"
	cs_check_lib_framework="-framework bullet"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "bullet"; then
  cs_check_lib_libs="-lbullet"
	cs_check_lib_framework="-framework bullet"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "bullet"; then
  cs_check_lib_libs="-lbullet"
	cs_check_lib_framework="-framework bullet"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libbullet" >&5
echo $ECHO_N "checking for libbullet... $ECHO_C" >&6; }
if test "${cs_cv_libbullet+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -lbulletccdphysics \
    -lbulletphysicsinterfacecommon \
    -lbulletdynamics \
    -lbullet $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

    #include <BroadphaseCollision/SimpleBroadphase.h>
    #include <CcdPhysics/CcdPhysicsController.h>
    #include <CcdPhysics/CcdPhysicsEnvironment.h>
    #include <CollisionDispatch/CollisionDispatcher.h>

int
main ()
{
CollisionDispatcher d;
    SimpleBroadphase b;
    CcdPhysicsEnvironment* e = new CcdPhysicsEnvironment (&d, &b)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -lbulletccdphysics \
    -lbulletphysicsinterfacecommon \
    -lbulletdynamics \
    -lbullet | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbullet=yes
		cs_cv_libbullet_cflags=$cs_build_cflags
		cs_cv_libbullet_lflags=$cs_build_lflags
		cs_cv_libbullet_libs=$cs_build_libs
else
  cs_cv_libbullet=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libbullet" >&5
echo "${ECHO_T}$cs_cv_libbullet" >&6; }
else
  { echo "$as_me:$LINENO: checking for libbullet" >&5
echo $ECHO_N "checking for libbullet... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -lbulletccdphysics \
    -lbulletphysicsinterfacecommon \
    -lbulletdynamics \
    -lbullet $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

    #include <BroadphaseCollision/SimpleBroadphase.h>
    #include <CcdPhysics/CcdPhysicsController.h>
    #include <CcdPhysics/CcdPhysicsEnvironment.h>
    #include <CollisionDispatch/CollisionDispatcher.h>

int
main ()
{
CollisionDispatcher d;
    SimpleBroadphase b;
    CcdPhysicsEnvironment* e = new CcdPhysicsEnvironment (&d, &b)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -lbulletccdphysics \
    -lbulletphysicsinterfacecommon \
    -lbulletdynamics \
    -lbullet | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbullet=yes
		cs_cv_libbullet_cflags=$cs_build_cflags
		cs_cv_libbullet_lflags=$cs_build_lflags
		cs_cv_libbullet_libs=$cs_build_libs
else
  cs_cv_libbullet=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libbullet" >&5
echo "${ECHO_T}$cs_cv_libbullet" >&6; }
fi

    if test $cs_cv_libbullet = yes; then
  :
else
  cs_cv_libbullet_cflags=''
	cs_cv_libbullet_lflags=''
	cs_cv_libbullet_libs=''

fi

else
  cs_cv_libbullet=no
fi


    cs_cv_with_bullet="$with_bullet"
    if test "$cs_cv_libbullet" = yes; then
  if test "$cs_cv_libbullet" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}BULLET.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbullet_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}BULLET.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbullet_lflags $cs_cv_libbullet_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}BULLET.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for OpenAL.
#------------------------------------------------------------------------------
# CS_AL_INCLUDE(CPP-MACRO,FALLBACK,HEADER)





    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for OpenAL" >&5
echo $ECHO_N "checking for OpenAL... $ECHO_C" >&6; }
if test "${cs_cv_libopenal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-DCS_OPENAL_PATH=OpenAL@@-framework OpenAL | sed 'y% %#%'` \
	`echo @@@-lopenal | sed 'y% %#%'` \
	`echo @@@-lopenal32 | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal32 | sed 'y% %#%'` \
	`echo @@@-lALut -lOpenAL32 | sed 'y% %#%'` \
	`echo @@@-lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-lopenal32 -ldsound | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal32 -ldsound | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_cv_libdl_libs $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENAL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENAL_PATH,alut.h)
    #else
    #include <AL/alut.h>
    #endif
int
main ()
{
alutInit(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs $cs_cv_libdl_libs $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libopenal=yes
		cs_cv_libopenal_cflags=$cs_build_cflags
		cs_cv_libopenal_lflags=$cs_build_lflags
		cs_cv_libopenal_libs=$cs_build_libs
else
  cs_cv_libopenal=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libopenal" >&5
echo "${ECHO_T}$cs_cv_libopenal" >&6; }
else
  { echo "$as_me:$LINENO: checking for OpenAL" >&5
echo $ECHO_N "checking for OpenAL... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-DCS_OPENAL_PATH=OpenAL@@-framework OpenAL | sed 'y% %#%'` \
	`echo @@@-lopenal | sed 'y% %#%'` \
	`echo @@@-lopenal32 | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal32 | sed 'y% %#%'` \
	`echo @@@-lALut -lOpenAL32 | sed 'y% %#%'` \
	`echo @@@-lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-lopenal32 -ldsound | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-lalut -lopenal32 -ldsound | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_sys_pthread_libs $cs_cv_libdl_libs $cs_cv_libm_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifndef CS_HEADER_GLOBAL
    #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
    #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
    #endif
    #ifdef CS_OPENAL_PATH
    #include CS_HEADER_GLOBAL(CS_OPENAL_PATH,alut.h)
    #else
    #include <AL/alut.h>
    #endif
int
main ()
{
alutInit(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_sys_pthread_libs $cs_cv_libdl_libs $cs_cv_libm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libopenal=yes
		cs_cv_libopenal_cflags=$cs_build_cflags
		cs_cv_libopenal_lflags=$cs_build_lflags
		cs_cv_libopenal_libs=$cs_build_libs
else
  cs_cv_libopenal=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libopenal" >&5
echo "${ECHO_T}$cs_cv_libopenal" >&6; }
fi

    if test $cs_cv_libopenal = yes; then
  if test "$cs_cv_libopenal" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OPENAL.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libopenal_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OPENAL.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libopenal_lflags $cs_cv_libopenal_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OPENAL.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libopenal_cflags=''
	cs_cv_libopenal_lflags=''
	cs_cv_libopenal_libs=''

fi




#------------------------------------------------------------------------------
# Check for FreeType2. Note that on MacOS/X, Fink strangely installs
# `freetype-config' in the unusual location /sw/lib/freetype2/bin, thus we
# augment PATH so that CS_CHECK_LIB_WITH() will be able to find it if present.
#------------------------------------------------------------------------------
PATH=$PATH$PATH_SEPARATOR/sw/lib/freetype2/bin
export PATH


# Check whether --with-freetype2 was given.
if test "${with_freetype2+set}" = set; then
  withval=$with_freetype2;
fi


    # Backward compatibility: Recognize --with-libfreetype2 as alias for --with-freetype2.
    if test -n "$with_libfreetype2" &&
           test -z "$with_freetype2"; then
  with_freetype2="$with_libfreetype2"
fi


    if test -z "$with_freetype2"; then
  with_freetype2=yes
fi

    if test "$with_freetype2" != no; then
  # If --with-freetype2 value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_freetype2" != "$cs_cv_with_freetype2"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_freetype2 = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes freetype2" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes freetype2... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_freetype2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists freetype2; then
  cs_cv_prog_pkg_config_freetype2=yes
else
  cs_cv_prog_pkg_config_freetype2=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_freetype2" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_freetype2" >&6; }
	if test $cs_cv_prog_pkg_config_freetype2 = yes; then
  if test -z "$cs_cv_prog_pkg_config_freetype2_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags freetype2") >&5
  ($PKG_CONFIG --cflags freetype2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs freetype2") >&5
  ($PKG_CONFIG --libs freetype2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_freetype2_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_freetype2_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in freetype2-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_FREETYPE2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_FREETYPE2"; then
  ac_cv_prog_CONFIG_FREETYPE2="$CONFIG_FREETYPE2" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_FREETYPE2="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_FREETYPE2=$ac_cv_prog_CONFIG_FREETYPE2
if test -n "$CONFIG_FREETYPE2"; then
  { echo "$as_me:$LINENO: result: $CONFIG_FREETYPE2" >&5
echo "${ECHO_T}$CONFIG_FREETYPE2" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_FREETYPE2" && break
  done
fi
if test -z "$CONFIG_FREETYPE2"; then
  ac_ct_CONFIG_FREETYPE2=$CONFIG_FREETYPE2
  for ac_prog in freetype2-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_FREETYPE2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_FREETYPE2"; then
  ac_cv_prog_ac_ct_CONFIG_FREETYPE2="$ac_ct_CONFIG_FREETYPE2" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_FREETYPE2="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_FREETYPE2=$ac_cv_prog_ac_ct_CONFIG_FREETYPE2
if test -n "$ac_ct_CONFIG_FREETYPE2"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_FREETYPE2" >&5
echo "${ECHO_T}$ac_ct_CONFIG_FREETYPE2" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_FREETYPE2" && break
done

  if test "x$ac_ct_CONFIG_FREETYPE2" = x; then
    CONFIG_FREETYPE2=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_FREETYPE2=$ac_ct_CONFIG_FREETYPE2
  fi
fi

    if test -n "$CONFIG_FREETYPE2"; then
  if test -z "$cs_cv_prog_config_freetype2_ok"; then
  if $CONFIG_FREETYPE2 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_freetype2_ok=yes
else
  cs_cv_prog_config_freetype2_ok=no
fi

fi

	if test $cs_cv_prog_config_freetype2_ok = yes; then
  if test -z "$cs_cv_prog_config_freetype2_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_FREETYPE2 --cflags ") >&5
  ($CONFIG_FREETYPE2 --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_FREETYPE2 --libs ") >&5
  ($CONFIG_FREETYPE2 --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_freetype2_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_freetype2_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes freetype" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes freetype... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_freetype+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists freetype; then
  cs_cv_prog_pkg_config_freetype=yes
else
  cs_cv_prog_pkg_config_freetype=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_freetype" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_freetype" >&6; }
	if test $cs_cv_prog_pkg_config_freetype = yes; then
  if test -z "$cs_cv_prog_pkg_config_freetype_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags freetype") >&5
  ($PKG_CONFIG --cflags freetype) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs freetype") >&5
  ($PKG_CONFIG --libs freetype) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_freetype_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_freetype_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in freetype-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_FREETYPE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_FREETYPE"; then
  ac_cv_prog_CONFIG_FREETYPE="$CONFIG_FREETYPE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_FREETYPE="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_FREETYPE=$ac_cv_prog_CONFIG_FREETYPE
if test -n "$CONFIG_FREETYPE"; then
  { echo "$as_me:$LINENO: result: $CONFIG_FREETYPE" >&5
echo "${ECHO_T}$CONFIG_FREETYPE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_FREETYPE" && break
  done
fi
if test -z "$CONFIG_FREETYPE"; then
  ac_ct_CONFIG_FREETYPE=$CONFIG_FREETYPE
  for ac_prog in freetype-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_FREETYPE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_FREETYPE"; then
  ac_cv_prog_ac_ct_CONFIG_FREETYPE="$ac_ct_CONFIG_FREETYPE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_FREETYPE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_FREETYPE=$ac_cv_prog_ac_ct_CONFIG_FREETYPE
if test -n "$ac_ct_CONFIG_FREETYPE"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_FREETYPE" >&5
echo "${ECHO_T}$ac_ct_CONFIG_FREETYPE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_FREETYPE" && break
done

  if test "x$ac_ct_CONFIG_FREETYPE" = x; then
    CONFIG_FREETYPE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_FREETYPE=$ac_ct_CONFIG_FREETYPE
  fi
fi

    if test -n "$CONFIG_FREETYPE"; then
  if test -z "$cs_cv_prog_config_freetype_ok"; then
  if $CONFIG_FREETYPE --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_freetype_ok=yes
else
  cs_cv_prog_config_freetype_ok=no
fi

fi

	if test $cs_cv_prog_config_freetype_ok = yes; then
  if test -z "$cs_cv_prog_config_freetype_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_FREETYPE --cflags ") >&5
  ($CONFIG_FREETYPE --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_FREETYPE --libs ") >&5
  ($CONFIG_FREETYPE --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_freetype_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_freetype_flags"
fi

fi


fi


	if test $with_freetype2 != yes; then
  cs_check_lib_paths=$with_freetype2
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype2"; then
  cs_check_lib_libs="-lfreetype2"
	cs_check_lib_framework="-framework freetype2"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype2"; then
  cs_check_lib_libs="-lfreetype2"
	cs_check_lib_framework="-framework freetype2"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype2"; then
  cs_check_lib_libs="-lfreetype2"
	cs_check_lib_framework="-framework freetype2"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype"; then
  cs_check_lib_libs="-lfreetype"
	cs_check_lib_framework="-framework freetype"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype"; then
  cs_check_lib_libs="-lfreetype"
	cs_check_lib_framework="-framework freetype"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "freetype"; then
  cs_check_lib_libs="-lfreetype"
	cs_check_lib_framework="-framework freetype"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libfreetype2" >&5
echo $ECHO_N "checking for libfreetype2... $ECHO_C" >&6; }
if test "${cs_cv_libfreetype2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
	#include FT_FREETYPE_H
int
main ()
{
FT_Library p; FT_Init_FreeType(&p); FT_Done_FreeType(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libfreetype2=yes
		cs_cv_libfreetype2_cflags=$cs_build_cflags
		cs_cv_libfreetype2_lflags=$cs_build_lflags
		cs_cv_libfreetype2_libs=$cs_build_libs
else
  cs_cv_libfreetype2=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libfreetype2" >&5
echo "${ECHO_T}$cs_cv_libfreetype2" >&6; }
else
  { echo "$as_me:$LINENO: checking for libfreetype2" >&5
echo $ECHO_N "checking for libfreetype2... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
	#include FT_FREETYPE_H
int
main ()
{
FT_Library p; FT_Init_FreeType(&p); FT_Done_FreeType(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libfreetype2=yes
		cs_cv_libfreetype2_cflags=$cs_build_cflags
		cs_cv_libfreetype2_lflags=$cs_build_lflags
		cs_cv_libfreetype2_libs=$cs_build_libs
else
  cs_cv_libfreetype2=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libfreetype2" >&5
echo "${ECHO_T}$cs_cv_libfreetype2" >&6; }
fi

    if test $cs_cv_libfreetype2 = yes; then
  :
else
  cs_cv_libfreetype2_cflags=''
	cs_cv_libfreetype2_lflags=''
	cs_cv_libfreetype2_libs=''

fi

else
  cs_cv_libfreetype2=no
fi


    cs_cv_with_freetype2="$with_freetype2"


if test $cs_cv_libfreetype2 = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if freetype2 is sufficiently recent" >&5
echo $ECHO_N "checking if freetype2 is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_freetype2_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libfreetype2_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libfreetype2_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libfreetype2_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
	    #include FT_FREETYPE_H
	    #include FT_GLYPH_H
	    #include FT_MODULE_H
int
main ()
{
return
	    FT_LOAD_TARGET_MONO|FT_RENDER_MODE_NORMAL|FT_ENCODING_UNICODE
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libfreetype2_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libfreetype2_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libfreetype2_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_freetype2_recent=yes
		cs_cv_freetype2_recent_cflags=$cs_build_cflags
		cs_cv_freetype2_recent_lflags=$cs_build_lflags
		cs_cv_freetype2_recent_libs=$cs_build_libs
else
  cs_cv_freetype2_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_freetype2_recent" >&5
echo "${ECHO_T}$cs_cv_freetype2_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if freetype2 is sufficiently recent" >&5
echo $ECHO_N "checking if freetype2 is sufficiently recent... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libfreetype2_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libfreetype2_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libfreetype2_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ft2build.h>
	    #include FT_FREETYPE_H
	    #include FT_GLYPH_H
	    #include FT_MODULE_H
int
main ()
{
return
	    FT_LOAD_TARGET_MONO|FT_RENDER_MODE_NORMAL|FT_ENCODING_UNICODE
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libfreetype2_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libfreetype2_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libfreetype2_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_freetype2_recent=yes
		cs_cv_freetype2_recent_cflags=$cs_build_cflags
		cs_cv_freetype2_recent_lflags=$cs_build_lflags
		cs_cv_freetype2_recent_libs=$cs_build_libs
else
  cs_cv_freetype2_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_freetype2_recent" >&5
echo "${ECHO_T}$cs_cv_freetype2_recent" >&6; }
fi

    if test $cs_cv_freetype2_recent = yes; then
  if test "$cs_cv_libfreetype2" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}FT2.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libfreetype2_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}FT2.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libfreetype2_lflags $cs_cv_libfreetype2_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}FT2.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_freetype2_recent_cflags=''
	cs_cv_freetype2_recent_lflags=''
	cs_cv_freetype2_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# For Mingw, test if we need to link explicitly with libmingwex.a.  Older
# versions of Mingw did not have this library, whereas newer interim versions
# supply it but do not link automatically with it.  The very newest versions
# link with libmingwex.a automatically.  To see if libmingwex.a is required, we
# try calling opendir(), which exists in libming32.a for older releases, and in
# libmingwex.a for newer releases.
#------------------------------------------------------------------------------



    case $host_os in
	mingw*)
	    { echo "$as_me:$LINENO: checking for libmingwex" >&5
echo $ECHO_N "checking for libmingwex... $ECHO_C" >&6; }
if test "${cs_cv_libmingwex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` `echo @@@-lmingwex | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <dirent.h>
int
main ()
{
opendir("");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	if test -n "$cs_build_libs"; then
  cs_cv_libmingwex=yes
else
  cs_cv_libmingwex=no
fi

else
  cs_cv_libmingwex=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libmingwex" >&5
echo "${ECHO_T}$cs_cv_libmingwex" >&6; }
	    ;;
	*) cs_cv_libmingwex=no ;;
    esac
if test $cs_cv_libmingwex = yes; then
  cs_build_prop_val="-lmingwex"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi




#------------------------------------------------------------------------------
# Check for Cal3D.
#------------------------------------------------------------------------------

# Check whether --with-cal3d was given.
if test "${with_cal3d+set}" = set; then
  withval=$with_cal3d;
fi


    # Backward compatibility: Recognize --with-libcal3d as alias for --with-cal3d.
    if test -n "$with_libcal3d" &&
           test -z "$with_cal3d"; then
  with_cal3d="$with_libcal3d"
fi


    if test -z "$with_cal3d"; then
  with_cal3d=yes
fi

    if test "$with_cal3d" != no; then
  # If --with-cal3d value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_cal3d" != "$cs_cv_with_cal3d"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_cal3d = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cal3d" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cal3d... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cal3d+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cal3d; then
  cs_cv_prog_pkg_config_cal3d=yes
else
  cs_cv_prog_pkg_config_cal3d=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cal3d" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cal3d" >&6; }
	if test $cs_cv_prog_pkg_config_cal3d = yes; then
  if test -z "$cs_cv_prog_pkg_config_cal3d_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cal3d") >&5
  ($PKG_CONFIG --cflags cal3d) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cal3d") >&5
  ($PKG_CONFIG --libs cal3d) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cal3d_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cal3d_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cal3d-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CAL3D+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CAL3D"; then
  ac_cv_prog_CONFIG_CAL3D="$CONFIG_CAL3D" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CAL3D="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CAL3D=$ac_cv_prog_CONFIG_CAL3D
if test -n "$CONFIG_CAL3D"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CAL3D" >&5
echo "${ECHO_T}$CONFIG_CAL3D" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CAL3D" && break
  done
fi
if test -z "$CONFIG_CAL3D"; then
  ac_ct_CONFIG_CAL3D=$CONFIG_CAL3D
  for ac_prog in cal3d-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CAL3D+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CAL3D"; then
  ac_cv_prog_ac_ct_CONFIG_CAL3D="$ac_ct_CONFIG_CAL3D" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CAL3D="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CAL3D=$ac_cv_prog_ac_ct_CONFIG_CAL3D
if test -n "$ac_ct_CONFIG_CAL3D"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CAL3D" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CAL3D" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CAL3D" && break
done

  if test "x$ac_ct_CONFIG_CAL3D" = x; then
    CONFIG_CAL3D=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAL3D=$ac_ct_CONFIG_CAL3D
  fi
fi

    if test -n "$CONFIG_CAL3D"; then
  if test -z "$cs_cv_prog_config_cal3d_ok"; then
  if $CONFIG_CAL3D --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cal3d_ok=yes
else
  cs_cv_prog_config_cal3d_ok=no
fi

fi

	if test $cs_cv_prog_config_cal3d_ok = yes; then
  if test -z "$cs_cv_prog_config_cal3d_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CAL3D --cflags ") >&5
  ($CONFIG_CAL3D --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CAL3D --libs ") >&5
  ($CONFIG_CAL3D --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cal3d_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cal3d_flags"
fi

fi


fi


	if test $with_cal3d != yes; then
  cs_check_lib_paths=$with_cal3d
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cal3d"; then
  cs_check_lib_libs="-lcal3d"
	cs_check_lib_framework="-framework cal3d"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cal3d"; then
  cs_check_lib_libs="-lcal3d"
	cs_check_lib_framework="-framework cal3d"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cal3d"; then
  cs_check_lib_libs="-lcal3d"
	cs_check_lib_framework="-framework cal3d"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libcal3d" >&5
echo $ECHO_N "checking for libcal3d... $ECHO_C" >&6; }
if test "${cs_cv_libcal3d+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cal3d/cal3d.h>
int
main ()
{
CalModel* m = 0; m->getMixer();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcal3d=yes
		cs_cv_libcal3d_cflags=$cs_build_cflags
		cs_cv_libcal3d_lflags=$cs_build_lflags
		cs_cv_libcal3d_libs=$cs_build_libs
else
  cs_cv_libcal3d=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libcal3d" >&5
echo "${ECHO_T}$cs_cv_libcal3d" >&6; }
else
  { echo "$as_me:$LINENO: checking for libcal3d" >&5
echo $ECHO_N "checking for libcal3d... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cal3d/cal3d.h>
int
main ()
{
CalModel* m = 0; m->getMixer();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcal3d=yes
		cs_cv_libcal3d_cflags=$cs_build_cflags
		cs_cv_libcal3d_lflags=$cs_build_lflags
		cs_cv_libcal3d_libs=$cs_build_libs
else
  cs_cv_libcal3d=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libcal3d" >&5
echo "${ECHO_T}$cs_cv_libcal3d" >&6; }
fi

    if test $cs_cv_libcal3d = yes; then
  :
else
  cs_cv_libcal3d_cflags=''
	cs_cv_libcal3d_lflags=''
	cs_cv_libcal3d_libs=''

fi

else
  cs_cv_libcal3d=no
fi


    cs_cv_with_cal3d="$with_cal3d"


if test $cs_cv_libcal3d = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if cal3d is sufficiently recent" >&5
echo $ECHO_N "checking if cal3d is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_cal3d_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libcal3d_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcal3d_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcal3d_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cal3d/cal3d.h>
int
main ()
{
int x = LOADER_FLIP_WINDING;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libcal3d_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcal3d_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcal3d_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_cal3d_recent=yes
		cs_cv_cal3d_recent_cflags=$cs_build_cflags
		cs_cv_cal3d_recent_lflags=$cs_build_lflags
		cs_cv_cal3d_recent_libs=$cs_build_libs
else
  cs_cv_cal3d_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_cal3d_recent" >&5
echo "${ECHO_T}$cs_cv_cal3d_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if cal3d is sufficiently recent" >&5
echo $ECHO_N "checking if cal3d is sufficiently recent... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libcal3d_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcal3d_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcal3d_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cal3d/cal3d.h>
int
main ()
{
int x = LOADER_FLIP_WINDING;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libcal3d_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcal3d_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcal3d_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_cal3d_recent=yes
		cs_cv_cal3d_recent_cflags=$cs_build_cflags
		cs_cv_cal3d_recent_lflags=$cs_build_lflags
		cs_cv_cal3d_recent_libs=$cs_build_libs
else
  cs_cv_cal3d_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_cal3d_recent" >&5
echo "${ECHO_T}$cs_cv_cal3d_recent" >&6; }
fi

    if test $cs_cv_cal3d_recent = yes; then
  if test "$cs_cv_libcal3d" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CAL3D.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcal3d_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CAL3D.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcal3d_lflags $cs_cv_libcal3d_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CAL3D.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_cal3d_recent_cflags=''
	cs_cv_cal3d_recent_lflags=''
	cs_cv_cal3d_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for SDL.
#------------------------------------------------------------------------------

# Check whether --with-sdl was given.
if test "${with_sdl+set}" = set; then
  withval=$with_sdl;
fi


    # Backward compatibility: Recognize --with-libsdl as alias for --with-sdl.
    if test -n "$with_libsdl" &&
           test -z "$with_sdl"; then
  with_sdl="$with_libsdl"
fi


    if test -z "$with_sdl"; then
  with_sdl=yes
fi

    if test "$with_sdl" != no; then
  # If --with-sdl value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_sdl" != "$cs_cv_with_sdl"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_sdl = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes sdl" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes sdl... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_sdl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists sdl; then
  cs_cv_prog_pkg_config_sdl=yes
else
  cs_cv_prog_pkg_config_sdl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_sdl" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_sdl" >&6; }
	if test $cs_cv_prog_pkg_config_sdl = yes; then
  if test -z "$cs_cv_prog_pkg_config_sdl_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags sdl") >&5
  ($PKG_CONFIG --cflags sdl) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs sdl") >&5
  ($PKG_CONFIG --libs sdl) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_sdl_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_sdl_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in sdl-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_SDL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_SDL"; then
  ac_cv_prog_CONFIG_SDL="$CONFIG_SDL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_SDL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_SDL=$ac_cv_prog_CONFIG_SDL
if test -n "$CONFIG_SDL"; then
  { echo "$as_me:$LINENO: result: $CONFIG_SDL" >&5
echo "${ECHO_T}$CONFIG_SDL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_SDL" && break
  done
fi
if test -z "$CONFIG_SDL"; then
  ac_ct_CONFIG_SDL=$CONFIG_SDL
  for ac_prog in sdl-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_SDL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_SDL"; then
  ac_cv_prog_ac_ct_CONFIG_SDL="$ac_ct_CONFIG_SDL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_SDL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_SDL=$ac_cv_prog_ac_ct_CONFIG_SDL
if test -n "$ac_ct_CONFIG_SDL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_SDL" >&5
echo "${ECHO_T}$ac_ct_CONFIG_SDL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_SDL" && break
done

  if test "x$ac_ct_CONFIG_SDL" = x; then
    CONFIG_SDL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_SDL=$ac_ct_CONFIG_SDL
  fi
fi

    if test -n "$CONFIG_SDL"; then
  if test -z "$cs_cv_prog_config_sdl_ok"; then
  if $CONFIG_SDL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_sdl_ok=yes
else
  cs_cv_prog_config_sdl_ok=no
fi

fi

	if test $cs_cv_prog_config_sdl_ok = yes; then
  if test -z "$cs_cv_prog_config_sdl_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_SDL --cflags ") >&5
  ($CONFIG_SDL --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_SDL --libs ") >&5
  ($CONFIG_SDL --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_sdl_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_sdl_flags"
fi

fi


fi


	if test $with_sdl != yes; then
  cs_check_lib_paths=$with_sdl
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "sdl"; then
  cs_check_lib_libs="-lsdl"
	cs_check_lib_framework="-framework sdl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "sdl"; then
  cs_check_lib_libs="-lsdl"
	cs_check_lib_framework="-framework sdl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "sdl"; then
  cs_check_lib_libs="-lsdl"
	cs_check_lib_framework="-framework sdl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libsdl" >&5
echo $ECHO_N "checking for libsdl... $ECHO_C" >&6; }
if test "${cs_cv_libsdl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <SDL.h>
	#undef main
int
main ()
{
SDL_Init(0); SDL_Quit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libsdl=yes
		cs_cv_libsdl_cflags=$cs_build_cflags
		cs_cv_libsdl_lflags=$cs_build_lflags
		cs_cv_libsdl_libs=$cs_build_libs
else
  cs_cv_libsdl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libsdl" >&5
echo "${ECHO_T}$cs_cv_libsdl" >&6; }
else
  { echo "$as_me:$LINENO: checking for libsdl" >&5
echo $ECHO_N "checking for libsdl... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <SDL.h>
	#undef main
int
main ()
{
SDL_Init(0); SDL_Quit();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libsdl=yes
		cs_cv_libsdl_cflags=$cs_build_cflags
		cs_cv_libsdl_lflags=$cs_build_lflags
		cs_cv_libsdl_libs=$cs_build_libs
else
  cs_cv_libsdl=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libsdl" >&5
echo "${ECHO_T}$cs_cv_libsdl" >&6; }
fi

    if test $cs_cv_libsdl = yes; then
  :
else
  cs_cv_libsdl_cflags=''
	cs_cv_libsdl_lflags=''
	cs_cv_libsdl_libs=''

fi

else
  cs_cv_libsdl=no
fi


    cs_cv_with_sdl="$with_sdl"


if test $cs_cv_libsdl = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if SDL is sufficiently recent" >&5
echo $ECHO_N "checking if SDL is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_sdl_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libsdl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libsdl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libsdl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <SDL.h>
	    #undef main
int
main ()
{
SDL_EnableKeyRepeat(0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libsdl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libsdl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libsdl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sdl_recent=yes
		cs_cv_sdl_recent_cflags=$cs_build_cflags
		cs_cv_sdl_recent_lflags=$cs_build_lflags
		cs_cv_sdl_recent_libs=$cs_build_libs
else
  cs_cv_sdl_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sdl_recent" >&5
echo "${ECHO_T}$cs_cv_sdl_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if SDL is sufficiently recent" >&5
echo $ECHO_N "checking if SDL is sufficiently recent... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libsdl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libsdl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libsdl_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <SDL.h>
	    #undef main
int
main ()
{
SDL_EnableKeyRepeat(0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libsdl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libsdl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libsdl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sdl_recent=yes
		cs_cv_sdl_recent_cflags=$cs_build_cflags
		cs_cv_sdl_recent_lflags=$cs_build_lflags
		cs_cv_sdl_recent_libs=$cs_build_libs
else
  cs_cv_sdl_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_sdl_recent" >&5
echo "${ECHO_T}$cs_cv_sdl_recent" >&6; }
fi

    if test $cs_cv_sdl_recent = yes; then
  if test "$cs_cv_libsdl" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SDL.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libsdl_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SDL.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libsdl_lflags $cs_cv_libsdl_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SDL.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_sdl_recent_cflags=''
	cs_cv_sdl_recent_lflags=''
	cs_cv_sdl_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for wxWidgets. Also check if it was built with OpenGL support since it
# is required by the Crystal Space wxWidgets canvas.
#
# IMPLEMENTATION NOTE
#
# On Windows, wx-config's --gl-libs options incorrectly emits a reference to a
# non-existent library (wxmsw_glxxx.lib). To handle this broken case, we first
# try the result of --libs and --gl-libs together; if that fails, then we try
# only --libs augmented with the results of our own OpenGL checks. On more
# recent WX versions it seems that on Win32 both the libraries from --gl-libs
# and the OpenGL checks are needed - the last case.
#------------------------------------------------------------------------------

# Check whether --with-wx was given.
if test "${with_wx+set}" = set; then
  withval=$with_wx;
fi


    # Backward compatibility: Recognize --with-libwx as alias for --with-wx.
    if test -n "$with_libwx" &&
           test -z "$with_wx"; then
  with_wx="$with_libwx"
fi


    if test -z "$with_wx"; then
  with_wx=yes
fi

    if test "$with_wx" != no; then
  # If --with-wx value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_wx" != "$cs_cv_with_wx"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_wx = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes wx" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes wx... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_wx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists wx; then
  cs_cv_prog_pkg_config_wx=yes
else
  cs_cv_prog_pkg_config_wx=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_wx" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_wx" >&6; }
	if test $cs_cv_prog_pkg_config_wx = yes; then
  if test -z "$cs_cv_prog_pkg_config_wx_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags wx") >&5
  ($PKG_CONFIG --cflags wx) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs wx") >&5
  ($PKG_CONFIG --libs wx) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_wx_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_wx_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in wx-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_WX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_WX"; then
  ac_cv_prog_CONFIG_WX="$CONFIG_WX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_WX="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_WX=$ac_cv_prog_CONFIG_WX
if test -n "$CONFIG_WX"; then
  { echo "$as_me:$LINENO: result: $CONFIG_WX" >&5
echo "${ECHO_T}$CONFIG_WX" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_WX" && break
  done
fi
if test -z "$CONFIG_WX"; then
  ac_ct_CONFIG_WX=$CONFIG_WX
  for ac_prog in wx-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_WX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_WX"; then
  ac_cv_prog_ac_ct_CONFIG_WX="$ac_ct_CONFIG_WX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_WX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_WX=$ac_cv_prog_ac_ct_CONFIG_WX
if test -n "$ac_ct_CONFIG_WX"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_WX" >&5
echo "${ECHO_T}$ac_ct_CONFIG_WX" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_WX" && break
done

  if test "x$ac_ct_CONFIG_WX" = x; then
    CONFIG_WX=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_WX=$ac_ct_CONFIG_WX
  fi
fi

    if test -n "$CONFIG_WX"; then
  if test -z "$cs_cv_prog_config_wx_ok"; then
  if $CONFIG_WX --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_wx_ok=yes
else
  cs_cv_prog_config_wx_ok=no
fi

fi

	if test $cs_cv_prog_config_wx_ok = yes; then
  if test -z "$cs_cv_prog_config_wx_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_WX --cflags ") >&5
  ($CONFIG_WX --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_WX --libs ") >&5
  ($CONFIG_WX --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_wx_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_wx_flags"
fi

fi


fi


	if test $with_wx != yes; then
  cs_check_lib_paths=$with_wx
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "wx"; then
  cs_check_lib_libs="-lwx"
	cs_check_lib_framework="-framework wx"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "wx"; then
  cs_check_lib_libs="-lwx"
	cs_check_lib_framework="-framework wx"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "wx"; then
  cs_check_lib_libs="-lwx"
	cs_check_lib_framework="-framework wx"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libwx" >&5
echo $ECHO_N "checking for libwx... $ECHO_C" >&6; }
if test "${cs_cv_libwx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include "wx/wxprec.h"
	#ifdef __BORLANDC__
	#pragma hdrstop
	#endif
	#ifndef WX_PRECOMP
	#include "wx/wx.h"
	#endif

int
main ()
{
wxWindow* p = 0; int w,h; p->GetClientSize(&w,&h);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwx=yes
		cs_cv_libwx_cflags=$cs_build_cflags
		cs_cv_libwx_lflags=$cs_build_lflags
		cs_cv_libwx_libs=$cs_build_libs
else
  cs_cv_libwx=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libwx" >&5
echo "${ECHO_T}$cs_cv_libwx" >&6; }
else
  { echo "$as_me:$LINENO: checking for libwx" >&5
echo $ECHO_N "checking for libwx... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include "wx/wxprec.h"
	#ifdef __BORLANDC__
	#pragma hdrstop
	#endif
	#ifndef WX_PRECOMP
	#include "wx/wx.h"
	#endif

int
main ()
{
wxWindow* p = 0; int w,h; p->GetClientSize(&w,&h);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwx=yes
		cs_cv_libwx_cflags=$cs_build_cflags
		cs_cv_libwx_lflags=$cs_build_lflags
		cs_cv_libwx_libs=$cs_build_libs
else
  cs_cv_libwx=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libwx" >&5
echo "${ECHO_T}$cs_cv_libwx" >&6; }
fi

    if test $cs_cv_libwx = yes; then
  :
else
  cs_cv_libwx_cflags=''
	cs_cv_libwx_lflags=''
	cs_cv_libwx_libs=''

fi

else
  cs_cv_libwx=no
fi


    cs_cv_with_wx="$with_wx"


if test $cs_cv_libwx = yes; then
  if test -z "$cs_cv_libwx_opengl"; then
  if test -n "$CONFIG_WX"; then
  cs_cv_libwx_gllibs=`{ (echo "$as_me:$LINENO: \$CONFIG_WX --gl-libs") >&5
  ($CONFIG_WX --gl-libs) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
else
  cs_cv_libwx_gllibs=''
fi

fi

    if test "" != yes; then
  { echo "$as_me:$LINENO: checking if wxWidgets is built with OpenGL support" >&5
echo $ECHO_N "checking if wxWidgets is built with OpenGL support... $ECHO_C" >&6; }
if test "${cs_cv_libwx_opengl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_libwx_cflags@$cs_cv_libwx_lflags@$cs_cv_libwx_libs   $cs_cv_libwx_gllibs | sed 'y% %#%'` \
	`echo @$cs_cv_libwx_cflags $cs_cv_libglu_cflags@$cs_cv_libwx_lflags $cs_cv_libglu_lflags@$cs_cv_libwx_libs   $cs_cv_libglu_libs | sed 'y% %#%'`  \
	`echo @$cs_cv_libwx_cflags $cs_cv_libglu_cflags@$cs_cv_libwx_lflags $cs_cv_libglu_lflags@$cs_cv_libwx_libs   $cs_cv_libwx_gllibs $cs_cv_libglu_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include "wx/wxprec.h"
	    #ifdef __BORLANDC__
	    #pragma hdrstop
	    #endif
	    #ifndef WX_PRECOMP
	    #include "wx/wx.h"
	    #endif
	    #include "wx/glcanvas.h"

int
main ()
{
wxGLCanvas* f = new wxGLCanvas(0, wxID_ANY); glVertex3f(0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwx_opengl=yes
		cs_cv_libwx_opengl_cflags=$cs_build_cflags
		cs_cv_libwx_opengl_lflags=$cs_build_lflags
		cs_cv_libwx_opengl_libs=$cs_build_libs
else
  cs_cv_libwx_opengl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libwx_opengl" >&5
echo "${ECHO_T}$cs_cv_libwx_opengl" >&6; }
else
  { echo "$as_me:$LINENO: checking if wxWidgets is built with OpenGL support" >&5
echo $ECHO_N "checking if wxWidgets is built with OpenGL support... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @$cs_cv_libwx_cflags@$cs_cv_libwx_lflags@$cs_cv_libwx_libs   $cs_cv_libwx_gllibs | sed 'y% %#%'` \
	`echo @$cs_cv_libwx_cflags $cs_cv_libglu_cflags@$cs_cv_libwx_lflags $cs_cv_libglu_lflags@$cs_cv_libwx_libs   $cs_cv_libglu_libs | sed 'y% %#%'`  \
	`echo @$cs_cv_libwx_cflags $cs_cv_libglu_cflags@$cs_cv_libwx_lflags $cs_cv_libglu_lflags@$cs_cv_libwx_libs   $cs_cv_libwx_gllibs $cs_cv_libglu_libs | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include "wx/wxprec.h"
	    #ifdef __BORLANDC__
	    #pragma hdrstop
	    #endif
	    #ifndef WX_PRECOMP
	    #include "wx/wx.h"
	    #endif
	    #include "wx/glcanvas.h"

int
main ()
{
wxGLCanvas* f = new wxGLCanvas(0, wxID_ANY); glVertex3f(0,0,0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libwx_opengl=yes
		cs_cv_libwx_opengl_cflags=$cs_build_cflags
		cs_cv_libwx_opengl_lflags=$cs_build_lflags
		cs_cv_libwx_opengl_libs=$cs_build_libs
else
  cs_cv_libwx_opengl=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libwx_opengl" >&5
echo "${ECHO_T}$cs_cv_libwx_opengl" >&6; }
fi

    if test $cs_cv_libwx_opengl = yes; then
  :
else
  cs_cv_libwx_opengl_cflags=''
	cs_cv_libwx_opengl_lflags=''
	cs_cv_libwx_opengl_libs=''

fi

else
  cs_cv_libwx_opengl=no
fi


if test $cs_cv_libwx_opengl = yes; then
  if test "$cs_cv_libwx_opengl" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WX.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libwx_opengl_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WX.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libwx_opengl_lflags $cs_cv_libwx_opengl_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}WX.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#----------------------------------------------------------------------------
# Check for CEGUI.
#----------------------------------------------------------------------------

# Check whether --with-CEGUI was given.
if test "${with_CEGUI+set}" = set; then
  withval=$with_CEGUI;
fi


    # Backward compatibility: Recognize --with-libCEGUI as alias for --with-CEGUI.
    if test -n "$with_libCEGUI" &&
           test -z "$with_CEGUI"; then
  with_CEGUI="$with_libCEGUI"
fi


    if test -z "$with_CEGUI"; then
  with_CEGUI=yes
fi

    if test "$with_CEGUI" != no; then
  # If --with-CEGUI value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_CEGUI" != "$cs_cv_with_CEGUI"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_CEGUI = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CEGUI" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CEGUI... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CEGUI+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CEGUI; then
  cs_cv_prog_pkg_config_CEGUI=yes
else
  cs_cv_prog_pkg_config_CEGUI=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CEGUI" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CEGUI" >&6; }
	if test $cs_cv_prog_pkg_config_CEGUI = yes; then
  if test -z "$cs_cv_prog_pkg_config_CEGUI_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CEGUI") >&5
  ($PKG_CONFIG --cflags CEGUI) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CEGUI") >&5
  ($PKG_CONFIG --libs CEGUI) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CEGUI_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CEGUI_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CEGUI-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CEGUI+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CEGUI"; then
  ac_cv_prog_CONFIG_CEGUI="$CONFIG_CEGUI" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CEGUI="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CEGUI=$ac_cv_prog_CONFIG_CEGUI
if test -n "$CONFIG_CEGUI"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CEGUI" >&5
echo "${ECHO_T}$CONFIG_CEGUI" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CEGUI" && break
  done
fi
if test -z "$CONFIG_CEGUI"; then
  ac_ct_CONFIG_CEGUI=$CONFIG_CEGUI
  for ac_prog in CEGUI-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CEGUI+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CEGUI"; then
  ac_cv_prog_ac_ct_CONFIG_CEGUI="$ac_ct_CONFIG_CEGUI" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CEGUI="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CEGUI=$ac_cv_prog_ac_ct_CONFIG_CEGUI
if test -n "$ac_ct_CONFIG_CEGUI"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CEGUI" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CEGUI" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CEGUI" && break
done

  if test "x$ac_ct_CONFIG_CEGUI" = x; then
    CONFIG_CEGUI=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CEGUI=$ac_ct_CONFIG_CEGUI
  fi
fi

    if test -n "$CONFIG_CEGUI"; then
  if test -z "$cs_cv_prog_config_CEGUI_ok"; then
  if $CONFIG_CEGUI --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CEGUI_ok=yes
else
  cs_cv_prog_config_CEGUI_ok=no
fi

fi

	if test $cs_cv_prog_config_CEGUI_ok = yes; then
  if test -z "$cs_cv_prog_config_CEGUI_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CEGUI --cflags ") >&5
  ($CONFIG_CEGUI --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CEGUI --libs ") >&5
  ($CONFIG_CEGUI --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CEGUI_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CEGUI_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CEGUIBase" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CEGUIBase... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CEGUIBase+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CEGUIBase; then
  cs_cv_prog_pkg_config_CEGUIBase=yes
else
  cs_cv_prog_pkg_config_CEGUIBase=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CEGUIBase" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CEGUIBase" >&6; }
	if test $cs_cv_prog_pkg_config_CEGUIBase = yes; then
  if test -z "$cs_cv_prog_pkg_config_CEGUIBase_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CEGUIBase") >&5
  ($PKG_CONFIG --cflags CEGUIBase) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CEGUIBase") >&5
  ($PKG_CONFIG --libs CEGUIBase) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CEGUIBase_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CEGUIBase_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CEGUIBase-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CEGUIBASE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CEGUIBASE"; then
  ac_cv_prog_CONFIG_CEGUIBASE="$CONFIG_CEGUIBASE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CEGUIBASE="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CEGUIBASE=$ac_cv_prog_CONFIG_CEGUIBASE
if test -n "$CONFIG_CEGUIBASE"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CEGUIBASE" >&5
echo "${ECHO_T}$CONFIG_CEGUIBASE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CEGUIBASE" && break
  done
fi
if test -z "$CONFIG_CEGUIBASE"; then
  ac_ct_CONFIG_CEGUIBASE=$CONFIG_CEGUIBASE
  for ac_prog in CEGUIBase-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CEGUIBASE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CEGUIBASE"; then
  ac_cv_prog_ac_ct_CONFIG_CEGUIBASE="$ac_ct_CONFIG_CEGUIBASE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CEGUIBASE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CEGUIBASE=$ac_cv_prog_ac_ct_CONFIG_CEGUIBASE
if test -n "$ac_ct_CONFIG_CEGUIBASE"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CEGUIBASE" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CEGUIBASE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CEGUIBASE" && break
done

  if test "x$ac_ct_CONFIG_CEGUIBASE" = x; then
    CONFIG_CEGUIBASE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CEGUIBASE=$ac_ct_CONFIG_CEGUIBASE
  fi
fi

    if test -n "$CONFIG_CEGUIBASE"; then
  if test -z "$cs_cv_prog_config_CEGUIBase_ok"; then
  if $CONFIG_CEGUIBASE --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CEGUIBase_ok=yes
else
  cs_cv_prog_config_CEGUIBase_ok=no
fi

fi

	if test $cs_cv_prog_config_CEGUIBase_ok = yes; then
  if test -z "$cs_cv_prog_config_CEGUIBase_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CEGUIBASE --cflags ") >&5
  ($CONFIG_CEGUIBASE --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CEGUIBASE --libs ") >&5
  ($CONFIG_CEGUIBASE --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CEGUIBase_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CEGUIBase_flags"
fi

fi


fi


	if test $with_CEGUI != yes; then
  cs_check_lib_paths=$with_CEGUI
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUI"; then
  cs_check_lib_libs="-lCEGUI"
	cs_check_lib_framework="-framework CEGUI"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUI"; then
  cs_check_lib_libs="-lCEGUI"
	cs_check_lib_framework="-framework CEGUI"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUI"; then
  cs_check_lib_libs="-lCEGUI"
	cs_check_lib_framework="-framework CEGUI"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUIBase"; then
  cs_check_lib_libs="-lCEGUIBase"
	cs_check_lib_framework="-framework CEGUIBase"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUIBase"; then
  cs_check_lib_libs="-lCEGUIBase"
	cs_check_lib_framework="-framework CEGUIBase"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CEGUIBase"; then
  cs_check_lib_libs="-lCEGUIBase"
	cs_check_lib_framework="-framework CEGUIBase"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libCEGUI" >&5
echo $ECHO_N "checking for libCEGUI... $ECHO_C" >&6; }
if test "${cs_cv_libCEGUI+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <CEGUI.h>
int
main ()
{
CEGUI::WindowManager::getSingleton();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCEGUI=yes
		cs_cv_libCEGUI_cflags=$cs_build_cflags
		cs_cv_libCEGUI_lflags=$cs_build_lflags
		cs_cv_libCEGUI_libs=$cs_build_libs
else
  cs_cv_libCEGUI=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libCEGUI" >&5
echo "${ECHO_T}$cs_cv_libCEGUI" >&6; }
else
  { echo "$as_me:$LINENO: checking for libCEGUI" >&5
echo $ECHO_N "checking for libCEGUI... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <CEGUI.h>
int
main ()
{
CEGUI::WindowManager::getSingleton();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCEGUI=yes
		cs_cv_libCEGUI_cflags=$cs_build_cflags
		cs_cv_libCEGUI_lflags=$cs_build_lflags
		cs_cv_libCEGUI_libs=$cs_build_libs
else
  cs_cv_libCEGUI=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libCEGUI" >&5
echo "${ECHO_T}$cs_cv_libCEGUI" >&6; }
fi

    if test $cs_cv_libCEGUI = yes; then
  :
else
  cs_cv_libCEGUI_cflags=''
	cs_cv_libCEGUI_lflags=''
	cs_cv_libCEGUI_libs=''

fi

else
  cs_cv_libCEGUI=no
fi


    cs_cv_with_CEGUI="$with_CEGUI"


if test $cs_cv_libCEGUI = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if CEGUI is sufficiently recent" >&5
echo $ECHO_N "checking if CEGUI is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_CEGUI_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libCEGUI_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCEGUI_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCEGUI_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <falagard/CEGUIFalWidgetLookManager.h>
int
main ()
{
CEGUI::WidgetLookManager::getSingleton();
	    #if (CEGUI_VERSION_MAJOR == 0) && (CEGUI_VERSION_MINOR < 5)
	    who took the ram from the ramalamadingdong?
	    #endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCEGUI_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCEGUI_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCEGUI_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_CEGUI_recent=yes
		cs_cv_CEGUI_recent_cflags=$cs_build_cflags
		cs_cv_CEGUI_recent_lflags=$cs_build_lflags
		cs_cv_CEGUI_recent_libs=$cs_build_libs
else
  cs_cv_CEGUI_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_CEGUI_recent" >&5
echo "${ECHO_T}$cs_cv_CEGUI_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if CEGUI is sufficiently recent" >&5
echo $ECHO_N "checking if CEGUI is sufficiently recent... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libCEGUI_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCEGUI_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCEGUI_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <falagard/CEGUIFalWidgetLookManager.h>
int
main ()
{
CEGUI::WidgetLookManager::getSingleton();
	    #if (CEGUI_VERSION_MAJOR == 0) && (CEGUI_VERSION_MINOR < 5)
	    who took the ram from the ramalamadingdong?
	    #endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCEGUI_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCEGUI_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCEGUI_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_CEGUI_recent=yes
		cs_cv_CEGUI_recent_cflags=$cs_build_cflags
		cs_cv_CEGUI_recent_lflags=$cs_build_lflags
		cs_cv_CEGUI_recent_libs=$cs_build_libs
else
  cs_cv_CEGUI_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_CEGUI_recent" >&5
echo "${ECHO_T}$cs_cv_CEGUI_recent" >&6; }
fi

    if test $cs_cv_CEGUI_recent = yes; then
  if test "$cs_cv_libCEGUI" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CEGUI.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libCEGUI_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CEGUI.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libCEGUI_lflags $cs_cv_libCEGUI_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CEGUI.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_CEGUI_recent_cflags=''
	cs_cv_CEGUI_recent_lflags=''
	cs_cv_CEGUI_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check if GNU/Linux joystick API is present.
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking for GNU/Linux joystick API" >&5
echo $ECHO_N "checking for GNU/Linux joystick API... $ECHO_C" >&6; }
if test "${cs_cv_sys_linux_joystick+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fcntl.h>
	    #include <sys/ioctl.h>
	    #include <linux/joystick.h>
int
main ()
{
unsigned char axes;
	    unsigned char buttons;
	    int version;
	    char name[128];
	    int fd;
	    struct js_event js;
	    (void)js;
	    ioctl(fd, JSIOCGVERSION, &version);
	    ioctl(fd, JSIOCGAXES, &axes);
	    ioctl(fd, JSIOCGBUTTONS, &buttons);
	    ioctl(fd, JSIOCGNAME(128), name);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_linux_joystick=yes
		cs_cv_sys_linux_joystick_cflags=$cs_build_cflags
		cs_cv_sys_linux_joystick_lflags=$cs_build_lflags
		cs_cv_sys_linux_joystick_libs=$cs_build_libs
else
  cs_cv_sys_linux_joystick=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_linux_joystick" >&5
echo "${ECHO_T}$cs_cv_sys_linux_joystick" >&6; }
else
  { echo "$as_me:$LINENO: checking for GNU/Linux joystick API" >&5
echo $ECHO_N "checking for GNU/Linux joystick API... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fcntl.h>
	    #include <sys/ioctl.h>
	    #include <linux/joystick.h>
int
main ()
{
unsigned char axes;
	    unsigned char buttons;
	    int version;
	    char name[128];
	    int fd;
	    struct js_event js;
	    (void)js;
	    ioctl(fd, JSIOCGVERSION, &version);
	    ioctl(fd, JSIOCGAXES, &axes);
	    ioctl(fd, JSIOCGBUTTONS, &buttons);
	    ioctl(fd, JSIOCGNAME(128), name);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_linux_joystick=yes
		cs_cv_sys_linux_joystick_cflags=$cs_build_cflags
		cs_cv_sys_linux_joystick_lflags=$cs_build_lflags
		cs_cv_sys_linux_joystick_libs=$cs_build_libs
else
  cs_cv_sys_linux_joystick=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_sys_linux_joystick" >&5
echo "${ECHO_T}$cs_cv_sys_linux_joystick" >&6; }
fi

    if test $cs_cv_sys_linux_joystick = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LINUXJOYSTICK.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_sys_linux_joystick_cflags=''
	cs_cv_sys_linux_joystick_lflags=''
	cs_cv_sys_linux_joystick_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for Cg shader package.
#------------------------------------------------------------------------------





# Check whether --with-Cg was given.
if test "${with_Cg+set}" = set; then
  withval=$with_Cg;
fi


    # Backward compatibility: Recognize --with-libCg as alias for --with-Cg.
    if test -n "$with_libCg" &&
           test -z "$with_Cg"; then
  with_Cg="$with_libCg"
fi


    if test -z "$with_Cg"; then
  with_Cg=yes
fi

    if test "$with_Cg" != no; then
  # If --with-Cg value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_Cg" != "$cs_cv_with_Cg"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_Cg = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Cg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes Cg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_Cg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists Cg; then
  cs_cv_prog_pkg_config_Cg=yes
else
  cs_cv_prog_pkg_config_Cg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Cg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_Cg" >&6; }
	if test $cs_cv_prog_pkg_config_Cg = yes; then
  if test -z "$cs_cv_prog_pkg_config_Cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Cg") >&5
  ($PKG_CONFIG --cflags Cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs Cg") >&5
  ($PKG_CONFIG --libs Cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_Cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_Cg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in Cg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in Cg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_Cg_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_Cg_ok=yes
else
  cs_cv_prog_config_Cg_ok=no
fi

fi

	if test $cs_cv_prog_config_Cg_ok = yes; then
  if test -z "$cs_cv_prog_config_Cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_Cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_Cg_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cg; then
  cs_cv_prog_pkg_config_cg=yes
else
  cs_cv_prog_pkg_config_cg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cg" >&6; }
	if test $cs_cv_prog_pkg_config_cg = yes; then
  if test -z "$cs_cv_prog_pkg_config_cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cg") >&5
  ($PKG_CONFIG --cflags cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cg") >&5
  ($PKG_CONFIG --libs cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in cg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_cg_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cg_ok=yes
else
  cs_cv_prog_config_cg_ok=no
fi

fi

	if test $cs_cv_prog_config_cg_ok = yes; then
  if test -z "$cs_cv_prog_config_cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cg_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CG" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CG... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CG; then
  cs_cv_prog_pkg_config_CG=yes
else
  cs_cv_prog_pkg_config_CG=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CG" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CG" >&6; }
	if test $cs_cv_prog_pkg_config_CG = yes; then
  if test -z "$cs_cv_prog_pkg_config_CG_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CG") >&5
  ($PKG_CONFIG --cflags CG) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CG") >&5
  ($PKG_CONFIG --libs CG) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CG_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CG_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CG-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in CG-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_CG_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CG_ok=yes
else
  cs_cv_prog_config_CG_ok=no
fi

fi

	if test $cs_cv_prog_config_CG_ok = yes; then
  if test -z "$cs_cv_prog_config_CG_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CG_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CG_flags"
fi

fi


fi


	if test $with_Cg != yes; then
  cs_check_lib_paths=$with_Cg
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libCg" >&5
echo $ECHO_N "checking for libCg... $ECHO_C" >&6; }
if test "${cs_cv_libCg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libm_cflags $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libm_lflags $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libm_libs   $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
int
main ()
{
CGcontext c = cgCreateContext()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libm_cflags $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libm_lflags $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libm_libs   $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCg=yes
		cs_cv_libCg_cflags=$cs_build_cflags
		cs_cv_libCg_lflags=$cs_build_lflags
		cs_cv_libCg_libs=$cs_build_libs
else
  cs_cv_libCg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libCg" >&5
echo "${ECHO_T}$cs_cv_libCg" >&6; }
else
  { echo "$as_me:$LINENO: checking for libCg" >&5
echo $ECHO_N "checking for libCg... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libm_cflags $cs_cv_sys_pthread_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libm_lflags $cs_cv_sys_pthread_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libm_libs   $cs_cv_sys_pthread_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
int
main ()
{
CGcontext c = cgCreateContext()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libm_cflags $cs_cv_sys_pthread_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libm_lflags $cs_cv_sys_pthread_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libm_libs   $cs_cv_sys_pthread_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCg=yes
		cs_cv_libCg_cflags=$cs_build_cflags
		cs_cv_libCg_lflags=$cs_build_lflags
		cs_cv_libCg_libs=$cs_build_libs
else
  cs_cv_libCg=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libCg" >&5
echo "${ECHO_T}$cs_cv_libCg" >&6; }
fi

    if test $cs_cv_libCg = yes; then
  :
else
  cs_cv_libCg_cflags=''
	cs_cv_libCg_lflags=''
	cs_cv_libCg_libs=''

fi

else
  cs_cv_libCg=no
fi


    cs_cv_with_Cg="$with_Cg"


    if test $cs_cv_libCg = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if Cg is sufficiently recent" >&5
echo $ECHO_N "checking if Cg is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_libCg_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libCg_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCg_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCg_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
int
main ()
{
cgSetErrorHandler(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCg_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCg_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCg_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCg_recent=yes
		cs_cv_libCg_recent_cflags=$cs_build_cflags
		cs_cv_libCg_recent_lflags=$cs_build_lflags
		cs_cv_libCg_recent_libs=$cs_build_libs
else
  cs_cv_libCg_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libCg_recent" >&5
echo "${ECHO_T}$cs_cv_libCg_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if Cg is sufficiently recent" >&5
echo $ECHO_N "checking if Cg is sufficiently recent... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libCg_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCg_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCg_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
int
main ()
{
cgSetErrorHandler(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCg_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCg_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCg_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCg_recent=yes
		cs_cv_libCg_recent_cflags=$cs_build_cflags
		cs_cv_libCg_recent_lflags=$cs_build_lflags
		cs_cv_libCg_recent_libs=$cs_build_libs
else
  cs_cv_libCg_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libCg_recent" >&5
echo "${ECHO_T}$cs_cv_libCg_recent" >&6; }
fi

    if test $cs_cv_libCg_recent = yes; then
  :
else
  cs_cv_libCg_recent_cflags=''
	cs_cv_libCg_recent_lflags=''
	cs_cv_libCg_recent_libs=''

fi

else
  cs_cv_libCg_recent=no
fi


    if test $cs_cv_libCg_recent = yes; then

# Check whether --with-CgGL was given.
if test "${with_CgGL+set}" = set; then
  withval=$with_CgGL;
fi


    # Backward compatibility: Recognize --with-libCgGL as alias for --with-CgGL.
    if test -n "$with_libCgGL" &&
           test -z "$with_CgGL"; then
  with_CgGL="$with_libCgGL"
fi


    if test -z "$with_CgGL"; then
  with_CgGL=yes
fi

    if test "$with_CgGL" != no; then
  # If --with-CgGL value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_CgGL" != "$cs_cv_with_CgGL"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_CgGL = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CgGL" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CgGL... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CgGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CgGL; then
  cs_cv_prog_pkg_config_CgGL=yes
else
  cs_cv_prog_pkg_config_CgGL=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CgGL" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CgGL" >&6; }
	if test $cs_cv_prog_pkg_config_CgGL = yes; then
  if test -z "$cs_cv_prog_pkg_config_CgGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CgGL") >&5
  ($PKG_CONFIG --cflags CgGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CgGL") >&5
  ($PKG_CONFIG --libs CgGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CgGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CgGL_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CgGL-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CGGL"; then
  ac_cv_prog_CONFIG_CGGL="$CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CGGL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CGGL=$ac_cv_prog_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
echo "${ECHO_T}$CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CGGL" && break
  done
fi
if test -z "$CONFIG_CGGL"; then
  ac_ct_CONFIG_CGGL=$CONFIG_CGGL
  for ac_prog in CgGL-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CGGL"; then
  ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_ct_CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CGGL=$ac_cv_prog_ac_ct_CONFIG_CGGL
if test -n "$ac_ct_CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CGGL" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CGGL" && break
done

  if test "x$ac_ct_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_ct_CONFIG_CGGL
  fi
fi

    if test -n "$CONFIG_CGGL"; then
  if test -z "$cs_cv_prog_config_CgGL_ok"; then
  if $CONFIG_CGGL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CgGL_ok=yes
else
  cs_cv_prog_config_CgGL_ok=no
fi

fi

	if test $cs_cv_prog_config_CgGL_ok = yes; then
  if test -z "$cs_cv_prog_config_CgGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CgGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CgGL_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cggl" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cggl... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cggl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cggl; then
  cs_cv_prog_pkg_config_cggl=yes
else
  cs_cv_prog_pkg_config_cggl=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cggl" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cggl" >&6; }
	if test $cs_cv_prog_pkg_config_cggl = yes; then
  if test -z "$cs_cv_prog_pkg_config_cggl_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cggl") >&5
  ($PKG_CONFIG --cflags cggl) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cggl") >&5
  ($PKG_CONFIG --libs cggl) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cggl_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cggl_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cggl-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CGGL"; then
  ac_cv_prog_CONFIG_CGGL="$CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CGGL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CGGL=$ac_cv_prog_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
echo "${ECHO_T}$CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CGGL" && break
  done
fi
if test -z "$CONFIG_CGGL"; then
  ac_ct_CONFIG_CGGL=$CONFIG_CGGL
  for ac_prog in cggl-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CGGL"; then
  ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_ct_CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CGGL=$ac_cv_prog_ac_ct_CONFIG_CGGL
if test -n "$ac_ct_CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CGGL" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CGGL" && break
done

  if test "x$ac_ct_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_ct_CONFIG_CGGL
  fi
fi

    if test -n "$CONFIG_CGGL"; then
  if test -z "$cs_cv_prog_config_cggl_ok"; then
  if $CONFIG_CGGL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cggl_ok=yes
else
  cs_cv_prog_config_cggl_ok=no
fi

fi

	if test $cs_cv_prog_config_cggl_ok = yes; then
  if test -z "$cs_cv_prog_config_cggl_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cggl_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cggl_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cgGL" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cgGL... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cgGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cgGL; then
  cs_cv_prog_pkg_config_cgGL=yes
else
  cs_cv_prog_pkg_config_cgGL=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cgGL" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cgGL" >&6; }
	if test $cs_cv_prog_pkg_config_cgGL = yes; then
  if test -z "$cs_cv_prog_pkg_config_cgGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cgGL") >&5
  ($PKG_CONFIG --cflags cgGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cgGL") >&5
  ($PKG_CONFIG --libs cgGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cgGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cgGL_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cgGL-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CGGL"; then
  ac_cv_prog_CONFIG_CGGL="$CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CGGL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CGGL=$ac_cv_prog_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
echo "${ECHO_T}$CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CGGL" && break
  done
fi
if test -z "$CONFIG_CGGL"; then
  ac_ct_CONFIG_CGGL=$CONFIG_CGGL
  for ac_prog in cgGL-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CGGL"; then
  ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_ct_CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CGGL=$ac_cv_prog_ac_ct_CONFIG_CGGL
if test -n "$ac_ct_CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CGGL" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CGGL" && break
done

  if test "x$ac_ct_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_ct_CONFIG_CGGL
  fi
fi

    if test -n "$CONFIG_CGGL"; then
  if test -z "$cs_cv_prog_config_cgGL_ok"; then
  if $CONFIG_CGGL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cgGL_ok=yes
else
  cs_cv_prog_config_cgGL_ok=no
fi

fi

	if test $cs_cv_prog_config_cgGL_ok = yes; then
  if test -z "$cs_cv_prog_config_cgGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cgGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cgGL_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CGGL" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CGGL... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CGGL; then
  cs_cv_prog_pkg_config_CGGL=yes
else
  cs_cv_prog_pkg_config_CGGL=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CGGL" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CGGL" >&6; }
	if test $cs_cv_prog_pkg_config_CGGL = yes; then
  if test -z "$cs_cv_prog_pkg_config_CGGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CGGL") >&5
  ($PKG_CONFIG --cflags CGGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CGGL") >&5
  ($PKG_CONFIG --libs CGGL) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CGGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CGGL_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CGGL-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CGGL"; then
  ac_cv_prog_CONFIG_CGGL="$CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CGGL="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CGGL=$ac_cv_prog_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
echo "${ECHO_T}$CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CGGL" && break
  done
fi
if test -z "$CONFIG_CGGL"; then
  ac_ct_CONFIG_CGGL=$CONFIG_CGGL
  for ac_prog in CGGL-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CGGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CGGL"; then
  ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_ct_CONFIG_CGGL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CGGL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CGGL=$ac_cv_prog_ac_ct_CONFIG_CGGL
if test -n "$ac_ct_CONFIG_CGGL"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CGGL" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CGGL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CGGL" && break
done

  if test "x$ac_ct_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_ct_CONFIG_CGGL
  fi
fi

    if test -n "$CONFIG_CGGL"; then
  if test -z "$cs_cv_prog_config_CGGL_ok"; then
  if $CONFIG_CGGL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CGGL_ok=yes
else
  cs_cv_prog_config_CGGL_ok=no
fi

fi

	if test $cs_cv_prog_config_CGGL_ok = yes; then
  if test -z "$cs_cv_prog_config_CGGL_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CGGL_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CGGL_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Cg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes Cg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_Cg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists Cg; then
  cs_cv_prog_pkg_config_Cg=yes
else
  cs_cv_prog_pkg_config_Cg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Cg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_Cg" >&6; }
	if test $cs_cv_prog_pkg_config_Cg = yes; then
  if test -z "$cs_cv_prog_pkg_config_Cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Cg") >&5
  ($PKG_CONFIG --cflags Cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs Cg") >&5
  ($PKG_CONFIG --libs Cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_Cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_Cg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in Cg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in Cg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_Cg_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_Cg_ok=yes
else
  cs_cv_prog_config_Cg_ok=no
fi

fi

	if test $cs_cv_prog_config_Cg_ok = yes; then
  if test -z "$cs_cv_prog_config_Cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_Cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_Cg_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cg" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cg... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cg+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cg; then
  cs_cv_prog_pkg_config_cg=yes
else
  cs_cv_prog_pkg_config_cg=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cg" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cg" >&6; }
	if test $cs_cv_prog_pkg_config_cg = yes; then
  if test -z "$cs_cv_prog_pkg_config_cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cg") >&5
  ($PKG_CONFIG --cflags cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cg") >&5
  ($PKG_CONFIG --libs cg) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cg_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in cg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_cg_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cg_ok=yes
else
  cs_cv_prog_config_cg_ok=no
fi

fi

	if test $cs_cv_prog_config_cg_ok = yes; then
  if test -z "$cs_cv_prog_config_cg_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cg_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cg_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CG" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes CG... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists CG; then
  cs_cv_prog_pkg_config_CG=yes
else
  cs_cv_prog_pkg_config_CG=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CG" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_CG" >&6; }
	if test $cs_cv_prog_pkg_config_CG = yes; then
  if test -z "$cs_cv_prog_pkg_config_CG_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CG") >&5
  ($PKG_CONFIG --cflags CG) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs CG") >&5
  ($PKG_CONFIG --libs CG) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_CG_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_CG_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in CG-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CG"; then
  ac_cv_prog_CONFIG_CG="$CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CG=$ac_cv_prog_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
echo "${ECHO_T}$CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CG" && break
  done
fi
if test -z "$CONFIG_CG"; then
  ac_ct_CONFIG_CG=$CONFIG_CG
  for ac_prog in CG-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CG"; then
  ac_cv_prog_ac_ct_CONFIG_CG="$ac_ct_CONFIG_CG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CG=$ac_cv_prog_ac_ct_CONFIG_CG
if test -n "$ac_ct_CONFIG_CG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CG" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CG" && break
done

  if test "x$ac_ct_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_ct_CONFIG_CG
  fi
fi

    if test -n "$CONFIG_CG"; then
  if test -z "$cs_cv_prog_config_CG_ok"; then
  if $CONFIG_CG --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_CG_ok=yes
else
  cs_cv_prog_config_CG_ok=no
fi

fi

	if test $cs_cv_prog_config_CG_ok = yes; then
  if test -z "$cs_cv_prog_config_CG_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_CG_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_CG_flags"
fi

fi


fi


	if test $with_CgGL != yes; then
  cs_check_lib_paths=$with_CgGL
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CgGL"; then
  cs_check_lib_libs="-lCgGL"
	cs_check_lib_framework="-framework CgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CgGL"; then
  cs_check_lib_libs="-lCgGL"
	cs_check_lib_framework="-framework CgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CgGL"; then
  cs_check_lib_libs="-lCgGL"
	cs_check_lib_framework="-framework CgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cggl"; then
  cs_check_lib_libs="-lcggl"
	cs_check_lib_framework="-framework cggl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cggl"; then
  cs_check_lib_libs="-lcggl"
	cs_check_lib_framework="-framework cggl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cggl"; then
  cs_check_lib_libs="-lcggl"
	cs_check_lib_framework="-framework cggl"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cgGL"; then
  cs_check_lib_libs="-lcgGL"
	cs_check_lib_framework="-framework cgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cgGL"; then
  cs_check_lib_libs="-lcgGL"
	cs_check_lib_framework="-framework cgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cgGL"; then
  cs_check_lib_libs="-lcgGL"
	cs_check_lib_framework="-framework cgGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CGGL"; then
  cs_check_lib_libs="-lCGGL"
	cs_check_lib_framework="-framework CGGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CGGL"; then
  cs_check_lib_libs="-lCGGL"
	cs_check_lib_framework="-framework CGGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CGGL"; then
  cs_check_lib_libs="-lCGGL"
	cs_check_lib_framework="-framework CGGL"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "Cg"; then
  cs_check_lib_libs="-lCg"
	cs_check_lib_framework="-framework Cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cg"; then
  cs_check_lib_libs="-lcg"
	cs_check_lib_framework="-framework cg"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "CG"; then
  cs_check_lib_libs="-lCG"
	cs_check_lib_framework="-framework CG"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libCgGL" >&5
echo $ECHO_N "checking for libCgGL... $ECHO_C" >&6; }
if test "${cs_cv_libCgGL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libCg_cflags $cs_cv_libgl_cflags $cs_cv_libglu_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCg_lflags $cs_cv_libgl_lflags $cs_cv_libglu_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCg_libs   $cs_cv_libgl_libs   $cs_cv_libglu_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
		#include <Cg/cgGL.h>
int
main ()
{
CGprogram p; cgGLBindProgram(p)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCg_cflags $cs_cv_libgl_cflags $cs_cv_libglu_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCg_lflags $cs_cv_libgl_lflags $cs_cv_libglu_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCg_libs   $cs_cv_libgl_libs   $cs_cv_libglu_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCgGL=yes
		cs_cv_libCgGL_cflags=$cs_build_cflags
		cs_cv_libCgGL_lflags=$cs_build_lflags
		cs_cv_libCgGL_libs=$cs_build_libs
else
  cs_cv_libCgGL=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libCgGL" >&5
echo "${ECHO_T}$cs_cv_libCgGL" >&6; }
else
  { echo "$as_me:$LINENO: checking for libCgGL" >&5
echo $ECHO_N "checking for libCgGL... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libCg_cflags $cs_cv_libgl_cflags $cs_cv_libglu_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libCg_lflags $cs_cv_libgl_lflags $cs_cv_libglu_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libCg_libs   $cs_cv_libgl_libs   $cs_cv_libglu_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <Cg/cg.h>
		#include <Cg/cgGL.h>
int
main ()
{
CGprogram p; cgGLBindProgram(p)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libCg_cflags $cs_cv_libgl_cflags $cs_cv_libglu_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libCg_lflags $cs_cv_libgl_lflags $cs_cv_libglu_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libCg_libs   $cs_cv_libgl_libs   $cs_cv_libglu_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libCgGL=yes
		cs_cv_libCgGL_cflags=$cs_build_cflags
		cs_cv_libCgGL_lflags=$cs_build_lflags
		cs_cv_libCgGL_libs=$cs_build_libs
else
  cs_cv_libCgGL=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libCgGL" >&5
echo "${ECHO_T}$cs_cv_libCgGL" >&6; }
fi

    if test $cs_cv_libCgGL = yes; then
  :
else
  cs_cv_libCgGL_cflags=''
	cs_cv_libCgGL_lflags=''
	cs_cv_libCgGL_libs=''

fi

else
  cs_cv_libCgGL=no
fi


    cs_cv_with_CgGL="$with_CgGL"
    if test "$cs_cv_libCgGL" = yes; then
  if test "$cs_cv_libCgGL" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CG.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libCgGL_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CG.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libCgGL_lflags $cs_cv_libCgGL_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CG.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for OpenSoundSystem (OSS).
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then
  if test "${ac_cv_header_soundcard_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for soundcard.h" >&5
echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking soundcard.h usability" >&5
echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <soundcard.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking soundcard.h presence" >&5
echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <soundcard.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: soundcard.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for soundcard.h" >&5
echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_soundcard_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; }

fi
if test $ac_cv_header_soundcard_h = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SOUNDCARD_H
"
	cs_cv_header_soundcard_h=yes
else
  if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5
echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <sys/soundcard.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5
echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/soundcard.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: sys/soundcard.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: sys/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_sys_soundcard_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; }

fi
if test $ac_cv_header_sys_soundcard_h = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SYS_SOUNDCARD_H
"
	    cs_cv_header_soundcard_h=yes
else
  if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
echo $ECHO_N "checking for machine/soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_machine_soundcard_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking machine/soundcard.h usability" >&5
echo $ECHO_N "checking machine/soundcard.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <machine/soundcard.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking machine/soundcard.h presence" >&5
echo $ECHO_N "checking machine/soundcard.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <machine/soundcard.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: machine/soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: machine/soundcard.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: machine/soundcard.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: machine/soundcard.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: machine/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: machine/soundcard.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: machine/soundcard.h: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
echo $ECHO_N "checking for machine/soundcard.h... $ECHO_C" >&6; }
if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_machine_soundcard_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
echo "${ECHO_T}$ac_cv_header_machine_soundcard_h" >&6; }

fi
if test $ac_cv_header_machine_soundcard_h = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_MACHINE_SOUNDCARD_H
"
		  cs_cv_header_soundcard_h=yes
else
  cs_cv_header_soundcard_h=no
fi


fi


fi



    if test $cs_cv_header_soundcard_h = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OSS.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for JACK daemon jackasyn library (JACKASYN).
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then

# Check whether --with-jackasyn was given.
if test "${with_jackasyn+set}" = set; then
  withval=$with_jackasyn;
fi


    # Backward compatibility: Recognize --with-libjackasyn as alias for --with-jackasyn.
    if test -n "$with_libjackasyn" &&
           test -z "$with_jackasyn"; then
  with_jackasyn="$with_libjackasyn"
fi


    if test -z "$with_jackasyn"; then
  with_jackasyn=yes
fi

    if test "$with_jackasyn" != no; then
  # If --with-jackasyn value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_jackasyn" != "$cs_cv_with_jackasyn"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_jackasyn = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes jackasyn" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes jackasyn... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_jackasyn+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists jackasyn; then
  cs_cv_prog_pkg_config_jackasyn=yes
else
  cs_cv_prog_pkg_config_jackasyn=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_jackasyn" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_jackasyn" >&6; }
	if test $cs_cv_prog_pkg_config_jackasyn = yes; then
  if test -z "$cs_cv_prog_pkg_config_jackasyn_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags jackasyn") >&5
  ($PKG_CONFIG --cflags jackasyn) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs jackasyn") >&5
  ($PKG_CONFIG --libs jackasyn) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_jackasyn_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_jackasyn_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in jackasyn-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_JACKASYN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_JACKASYN"; then
  ac_cv_prog_CONFIG_JACKASYN="$CONFIG_JACKASYN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_JACKASYN="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_JACKASYN=$ac_cv_prog_CONFIG_JACKASYN
if test -n "$CONFIG_JACKASYN"; then
  { echo "$as_me:$LINENO: result: $CONFIG_JACKASYN" >&5
echo "${ECHO_T}$CONFIG_JACKASYN" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_JACKASYN" && break
  done
fi
if test -z "$CONFIG_JACKASYN"; then
  ac_ct_CONFIG_JACKASYN=$CONFIG_JACKASYN
  for ac_prog in jackasyn-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_JACKASYN+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_JACKASYN"; then
  ac_cv_prog_ac_ct_CONFIG_JACKASYN="$ac_ct_CONFIG_JACKASYN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_JACKASYN="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_JACKASYN=$ac_cv_prog_ac_ct_CONFIG_JACKASYN
if test -n "$ac_ct_CONFIG_JACKASYN"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_JACKASYN" >&5
echo "${ECHO_T}$ac_ct_CONFIG_JACKASYN" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_JACKASYN" && break
done

  if test "x$ac_ct_CONFIG_JACKASYN" = x; then
    CONFIG_JACKASYN=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_JACKASYN=$ac_ct_CONFIG_JACKASYN
  fi
fi

    if test -n "$CONFIG_JACKASYN"; then
  if test -z "$cs_cv_prog_config_jackasyn_ok"; then
  if $CONFIG_JACKASYN --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_jackasyn_ok=yes
else
  cs_cv_prog_config_jackasyn_ok=no
fi

fi

	if test $cs_cv_prog_config_jackasyn_ok = yes; then
  if test -z "$cs_cv_prog_config_jackasyn_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_JACKASYN --cflags ") >&5
  ($CONFIG_JACKASYN --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_JACKASYN --libs ") >&5
  ($CONFIG_JACKASYN --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_jackasyn_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_jackasyn_flags"
fi

fi


fi


	if test $with_jackasyn != yes; then
  cs_check_lib_paths=$with_jackasyn
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "jackasyn"; then
  cs_check_lib_libs="-ljackasyn"
	cs_check_lib_framework="-framework jackasyn"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "jackasyn"; then
  cs_check_lib_libs="-ljackasyn"
	cs_check_lib_framework="-framework jackasyn"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "jackasyn"; then
  cs_check_lib_libs="-ljackasyn"
	cs_check_lib_framework="-framework jackasyn"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libjackasyn" >&5
echo $ECHO_N "checking for libjackasyn... $ECHO_C" >&6; }
if test "${cs_cv_libjackasyn+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	      #include <libjackoss.h>
int
main ()
{
jackoss_open("/dev/dsp",1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjackasyn=yes
		cs_cv_libjackasyn_cflags=$cs_build_cflags
		cs_cv_libjackasyn_lflags=$cs_build_lflags
		cs_cv_libjackasyn_libs=$cs_build_libs
else
  cs_cv_libjackasyn=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libjackasyn" >&5
echo "${ECHO_T}$cs_cv_libjackasyn" >&6; }
else
  { echo "$as_me:$LINENO: checking for libjackasyn" >&5
echo $ECHO_N "checking for libjackasyn... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	      #include <libjackoss.h>
int
main ()
{
jackoss_open("/dev/dsp",1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjackasyn=yes
		cs_cv_libjackasyn_cflags=$cs_build_cflags
		cs_cv_libjackasyn_lflags=$cs_build_lflags
		cs_cv_libjackasyn_libs=$cs_build_libs
else
  cs_cv_libjackasyn=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libjackasyn" >&5
echo "${ECHO_T}$cs_cv_libjackasyn" >&6; }
fi

    if test $cs_cv_libjackasyn = yes; then
  :
else
  cs_cv_libjackasyn_cflags=''
	cs_cv_libjackasyn_lflags=''
	cs_cv_libjackasyn_libs=''

fi

else
  cs_cv_libjackasyn=no
fi


    cs_cv_with_jackasyn="$with_jackasyn"
    if test "$cs_cv_libjackasyn" = yes; then
  if test "$cs_cv_libjackasyn" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JACKASYN.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjackasyn_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JACKASYN.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjackasyn_lflags $cs_cv_libjackasyn_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JACKASYN.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for Advanced GNU/Linux Sound Architecture (ALSA).
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then

# Check whether --with-asound was given.
if test "${with_asound+set}" = set; then
  withval=$with_asound;
fi


    # Backward compatibility: Recognize --with-libasound as alias for --with-asound.
    if test -n "$with_libasound" &&
           test -z "$with_asound"; then
  with_asound="$with_libasound"
fi


    if test -z "$with_asound"; then
  with_asound=yes
fi

    if test "$with_asound" != no; then
  # If --with-asound value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_asound" != "$cs_cv_with_asound"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_asound = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes asound" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes asound... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_asound+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists asound; then
  cs_cv_prog_pkg_config_asound=yes
else
  cs_cv_prog_pkg_config_asound=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_asound" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_asound" >&6; }
	if test $cs_cv_prog_pkg_config_asound = yes; then
  if test -z "$cs_cv_prog_pkg_config_asound_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags asound") >&5
  ($PKG_CONFIG --cflags asound) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs asound") >&5
  ($PKG_CONFIG --libs asound) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_asound_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_asound_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in asound-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_ASOUND+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_ASOUND"; then
  ac_cv_prog_CONFIG_ASOUND="$CONFIG_ASOUND" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_ASOUND="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_ASOUND=$ac_cv_prog_CONFIG_ASOUND
if test -n "$CONFIG_ASOUND"; then
  { echo "$as_me:$LINENO: result: $CONFIG_ASOUND" >&5
echo "${ECHO_T}$CONFIG_ASOUND" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_ASOUND" && break
  done
fi
if test -z "$CONFIG_ASOUND"; then
  ac_ct_CONFIG_ASOUND=$CONFIG_ASOUND
  for ac_prog in asound-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_ASOUND+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_ASOUND"; then
  ac_cv_prog_ac_ct_CONFIG_ASOUND="$ac_ct_CONFIG_ASOUND" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_ASOUND="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_ASOUND=$ac_cv_prog_ac_ct_CONFIG_ASOUND
if test -n "$ac_ct_CONFIG_ASOUND"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_ASOUND" >&5
echo "${ECHO_T}$ac_ct_CONFIG_ASOUND" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_ASOUND" && break
done

  if test "x$ac_ct_CONFIG_ASOUND" = x; then
    CONFIG_ASOUND=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ASOUND=$ac_ct_CONFIG_ASOUND
  fi
fi

    if test -n "$CONFIG_ASOUND"; then
  if test -z "$cs_cv_prog_config_asound_ok"; then
  if $CONFIG_ASOUND --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_asound_ok=yes
else
  cs_cv_prog_config_asound_ok=no
fi

fi

	if test $cs_cv_prog_config_asound_ok = yes; then
  if test -z "$cs_cv_prog_config_asound_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_ASOUND --cflags ") >&5
  ($CONFIG_ASOUND --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_ASOUND --libs ") >&5
  ($CONFIG_ASOUND --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_asound_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_asound_flags"
fi

fi


fi


	if test $with_asound != yes; then
  cs_check_lib_paths=$with_asound
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "asound"; then
  cs_check_lib_libs="-lasound"
	cs_check_lib_framework="-framework asound"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "asound"; then
  cs_check_lib_libs="-lasound"
	cs_check_lib_framework="-framework asound"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "asound"; then
  cs_check_lib_libs="-lasound"
	cs_check_lib_framework="-framework asound"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libasound" >&5
echo $ECHO_N "checking for libasound... $ECHO_C" >&6; }
if test "${cs_cv_libasound+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <alsa/asoundlib.h>
int
main ()
{
snd_pcm_hw_params_t* p; snd_pcm_hw_params_alloca(&p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libasound=yes
		cs_cv_libasound_cflags=$cs_build_cflags
		cs_cv_libasound_lflags=$cs_build_lflags
		cs_cv_libasound_libs=$cs_build_libs
else
  cs_cv_libasound=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libasound" >&5
echo "${ECHO_T}$cs_cv_libasound" >&6; }
else
  { echo "$as_me:$LINENO: checking for libasound" >&5
echo $ECHO_N "checking for libasound... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <alsa/asoundlib.h>
int
main ()
{
snd_pcm_hw_params_t* p; snd_pcm_hw_params_alloca(&p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libasound=yes
		cs_cv_libasound_cflags=$cs_build_cflags
		cs_cv_libasound_lflags=$cs_build_lflags
		cs_cv_libasound_libs=$cs_build_libs
else
  cs_cv_libasound=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libasound" >&5
echo "${ECHO_T}$cs_cv_libasound" >&6; }
fi

    if test $cs_cv_libasound = yes; then
  :
else
  cs_cv_libasound_cflags=''
	cs_cv_libasound_lflags=''
	cs_cv_libasound_libs=''

fi

else
  cs_cv_libasound=no
fi


    cs_cv_with_asound="$with_asound"
    if test "$cs_cv_libasound" = yes; then
  if test "$cs_cv_libasound" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ALSA.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libasound_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ALSA.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libasound_lflags $cs_cv_libasound_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ALSA.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi

fi




#------------------------------------------------------------------------------
# Check for Colour Ascii Art library (libcaca).
#------------------------------------------------------------------------------

# Check whether --with-caca was given.
if test "${with_caca+set}" = set; then
  withval=$with_caca;
fi


    # Backward compatibility: Recognize --with-libcaca as alias for --with-caca.
    if test -n "$with_libcaca" &&
           test -z "$with_caca"; then
  with_caca="$with_libcaca"
fi


    if test -z "$with_caca"; then
  with_caca=yes
fi

    if test "$with_caca" != no; then
  # If --with-caca value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_caca" != "$cs_cv_with_caca"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_caca = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes caca" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes caca... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_caca+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists caca; then
  cs_cv_prog_pkg_config_caca=yes
else
  cs_cv_prog_pkg_config_caca=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_caca" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_caca" >&6; }
	if test $cs_cv_prog_pkg_config_caca = yes; then
  if test -z "$cs_cv_prog_pkg_config_caca_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags caca") >&5
  ($PKG_CONFIG --cflags caca) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs caca") >&5
  ($PKG_CONFIG --libs caca) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_caca_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_caca_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in caca-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CACA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CACA"; then
  ac_cv_prog_CONFIG_CACA="$CONFIG_CACA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CACA="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CACA=$ac_cv_prog_CONFIG_CACA
if test -n "$CONFIG_CACA"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CACA" >&5
echo "${ECHO_T}$CONFIG_CACA" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CACA" && break
  done
fi
if test -z "$CONFIG_CACA"; then
  ac_ct_CONFIG_CACA=$CONFIG_CACA
  for ac_prog in caca-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CACA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CACA"; then
  ac_cv_prog_ac_ct_CONFIG_CACA="$ac_ct_CONFIG_CACA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CACA="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CACA=$ac_cv_prog_ac_ct_CONFIG_CACA
if test -n "$ac_ct_CONFIG_CACA"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CACA" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CACA" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CACA" && break
done

  if test "x$ac_ct_CONFIG_CACA" = x; then
    CONFIG_CACA=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CACA=$ac_ct_CONFIG_CACA
  fi
fi

    if test -n "$CONFIG_CACA"; then
  if test -z "$cs_cv_prog_config_caca_ok"; then
  if $CONFIG_CACA --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_caca_ok=yes
else
  cs_cv_prog_config_caca_ok=no
fi

fi

	if test $cs_cv_prog_config_caca_ok = yes; then
  if test -z "$cs_cv_prog_config_caca_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CACA --cflags ") >&5
  ($CONFIG_CACA --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CACA --libs ") >&5
  ($CONFIG_CACA --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_caca_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_caca_flags"
fi

fi

		if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libcaca" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes libcaca... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_libcaca+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists libcaca; then
  cs_cv_prog_pkg_config_libcaca=yes
else
  cs_cv_prog_pkg_config_libcaca=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libcaca" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_libcaca" >&6; }
	if test $cs_cv_prog_pkg_config_libcaca = yes; then
  if test -z "$cs_cv_prog_pkg_config_libcaca_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libcaca") >&5
  ($PKG_CONFIG --cflags libcaca) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs libcaca") >&5
  ($PKG_CONFIG --libs libcaca) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_libcaca_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_libcaca_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in libcaca-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_LIBCACA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_LIBCACA"; then
  ac_cv_prog_CONFIG_LIBCACA="$CONFIG_LIBCACA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_LIBCACA="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_LIBCACA=$ac_cv_prog_CONFIG_LIBCACA
if test -n "$CONFIG_LIBCACA"; then
  { echo "$as_me:$LINENO: result: $CONFIG_LIBCACA" >&5
echo "${ECHO_T}$CONFIG_LIBCACA" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_LIBCACA" && break
  done
fi
if test -z "$CONFIG_LIBCACA"; then
  ac_ct_CONFIG_LIBCACA=$CONFIG_LIBCACA
  for ac_prog in libcaca-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_LIBCACA+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_LIBCACA"; then
  ac_cv_prog_ac_ct_CONFIG_LIBCACA="$ac_ct_CONFIG_LIBCACA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_LIBCACA="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_LIBCACA=$ac_cv_prog_ac_ct_CONFIG_LIBCACA
if test -n "$ac_ct_CONFIG_LIBCACA"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_LIBCACA" >&5
echo "${ECHO_T}$ac_ct_CONFIG_LIBCACA" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_LIBCACA" && break
done

  if test "x$ac_ct_CONFIG_LIBCACA" = x; then
    CONFIG_LIBCACA=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBCACA=$ac_ct_CONFIG_LIBCACA
  fi
fi

    if test -n "$CONFIG_LIBCACA"; then
  if test -z "$cs_cv_prog_config_libcaca_ok"; then
  if $CONFIG_LIBCACA --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_libcaca_ok=yes
else
  cs_cv_prog_config_libcaca_ok=no
fi

fi

	if test $cs_cv_prog_config_libcaca_ok = yes; then
  if test -z "$cs_cv_prog_config_libcaca_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBCACA --cflags ") >&5
  ($CONFIG_LIBCACA --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_LIBCACA --libs ") >&5
  ($CONFIG_LIBCACA --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_libcaca_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_libcaca_flags"
fi

fi


fi


	if test $with_caca != yes; then
  cs_check_lib_paths=$with_caca
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "caca"; then
  cs_check_lib_libs="-lcaca"
	cs_check_lib_framework="-framework caca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "caca"; then
  cs_check_lib_libs="-lcaca"
	cs_check_lib_framework="-framework caca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "caca"; then
  cs_check_lib_libs="-lcaca"
	cs_check_lib_framework="-framework caca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done
	    for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "libcaca"; then
  cs_check_lib_libs="-llibcaca"
	cs_check_lib_framework="-framework libcaca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "libcaca"; then
  cs_check_lib_libs="-llibcaca"
	cs_check_lib_framework="-framework libcaca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "libcaca"; then
  cs_check_lib_libs="-llibcaca"
	cs_check_lib_framework="-framework libcaca"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libcaca" >&5
echo $ECHO_N "checking for libcaca... $ECHO_C" >&6; }
if test "${cs_cv_libcaca+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <caca.h>
int
main ()
{
caca_init(); caca_end();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcaca=yes
		cs_cv_libcaca_cflags=$cs_build_cflags
		cs_cv_libcaca_lflags=$cs_build_lflags
		cs_cv_libcaca_libs=$cs_build_libs
else
  cs_cv_libcaca=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libcaca" >&5
echo "${ECHO_T}$cs_cv_libcaca" >&6; }
else
  { echo "$as_me:$LINENO: checking for libcaca" >&5
echo $ECHO_N "checking for libcaca... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <caca.h>
int
main ()
{
caca_init(); caca_end();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcaca=yes
		cs_cv_libcaca_cflags=$cs_build_cflags
		cs_cv_libcaca_lflags=$cs_build_lflags
		cs_cv_libcaca_libs=$cs_build_libs
else
  cs_cv_libcaca=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libcaca" >&5
echo "${ECHO_T}$cs_cv_libcaca" >&6; }
fi

    if test $cs_cv_libcaca = yes; then
  :
else
  cs_cv_libcaca_cflags=''
	cs_cv_libcaca_lflags=''
	cs_cv_libcaca_libs=''

fi

else
  cs_cv_libcaca=no
fi


    cs_cv_with_caca="$with_caca"
    if test "$cs_cv_libcaca" = yes; then
  if test "$cs_cv_libcaca" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBCACA.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcaca_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBCACA.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcaca_lflags $cs_cv_libcaca_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBCACA.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check for SpiderMonkey JavaScript library.
#------------------------------------------------------------------------------
case $cs_host_family in
    windows) cs_spidermonkey_platform='XP_WIN' ;;
    *) cs_spidermonkey_platform='XP_UNIX' ;;
esac


# Check whether --with-js was given.
if test "${with_js+set}" = set; then
  withval=$with_js;
fi


    # Backward compatibility: Recognize --with-libjs as alias for --with-js.
    if test -n "$with_libjs" &&
           test -z "$with_js"; then
  with_js="$with_libjs"
fi


    if test -z "$with_js"; then
  with_js=yes
fi

    if test "$with_js" != no; then
  # If --with-js value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_js" != "$cs_cv_with_js"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_js = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes js" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes js... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_js+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists js; then
  cs_cv_prog_pkg_config_js=yes
else
  cs_cv_prog_pkg_config_js=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_js" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_js" >&6; }
	if test $cs_cv_prog_pkg_config_js = yes; then
  if test -z "$cs_cv_prog_pkg_config_js_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags js") >&5
  ($PKG_CONFIG --cflags js) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs js") >&5
  ($PKG_CONFIG --libs js) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_js_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_js_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in js-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_JS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_JS"; then
  ac_cv_prog_CONFIG_JS="$CONFIG_JS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_JS="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_JS=$ac_cv_prog_CONFIG_JS
if test -n "$CONFIG_JS"; then
  { echo "$as_me:$LINENO: result: $CONFIG_JS" >&5
echo "${ECHO_T}$CONFIG_JS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_JS" && break
  done
fi
if test -z "$CONFIG_JS"; then
  ac_ct_CONFIG_JS=$CONFIG_JS
  for ac_prog in js-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_JS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_JS"; then
  ac_cv_prog_ac_ct_CONFIG_JS="$ac_ct_CONFIG_JS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_JS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_JS=$ac_cv_prog_ac_ct_CONFIG_JS
if test -n "$ac_ct_CONFIG_JS"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_JS" >&5
echo "${ECHO_T}$ac_ct_CONFIG_JS" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_JS" && break
done

  if test "x$ac_ct_CONFIG_JS" = x; then
    CONFIG_JS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_JS=$ac_ct_CONFIG_JS
  fi
fi

    if test -n "$CONFIG_JS"; then
  if test -z "$cs_cv_prog_config_js_ok"; then
  if $CONFIG_JS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_js_ok=yes
else
  cs_cv_prog_config_js_ok=no
fi

fi

	if test $cs_cv_prog_config_js_ok = yes; then
  if test -z "$cs_cv_prog_config_js_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_JS --cflags ") >&5
  ($CONFIG_JS --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_JS --libs ") >&5
  ($CONFIG_JS --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_js_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_js_flags"
fi

fi


fi


	if test $with_js != yes; then
  cs_check_lib_paths=$with_js
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "js"; then
  cs_check_lib_libs="-ljs"
	cs_check_lib_framework="-framework js"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "js"; then
  cs_check_lib_libs="-ljs"
	cs_check_lib_framework="-framework js"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "js"; then
  cs_check_lib_libs="-ljs"
	cs_check_lib_framework="-framework js"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libjs" >&5
echo $ECHO_N "checking for libjs... $ECHO_C" >&6; }
if test "${cs_cv_libjs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test -D$cs_spidermonkey_platform $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <js/jsapi.h>
int
main ()
{
JS_NewRuntime(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test -D$cs_spidermonkey_platform | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjs=yes
		cs_cv_libjs_cflags=$cs_build_cflags
		cs_cv_libjs_lflags=$cs_build_lflags
		cs_cv_libjs_libs=$cs_build_libs
else
  cs_cv_libjs=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libjs" >&5
echo "${ECHO_T}$cs_cv_libjs" >&6; }
else
  { echo "$as_me:$LINENO: checking for libjs" >&5
echo $ECHO_N "checking for libjs... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test -D$cs_spidermonkey_platform $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <js/jsapi.h>
int
main ()
{
JS_NewRuntime(0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test -D$cs_spidermonkey_platform | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libjs=yes
		cs_cv_libjs_cflags=$cs_build_cflags
		cs_cv_libjs_lflags=$cs_build_lflags
		cs_cv_libjs_libs=$cs_build_libs
else
  cs_cv_libjs=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libjs" >&5
echo "${ECHO_T}$cs_cv_libjs" >&6; }
fi

    if test $cs_cv_libjs = yes; then
  :
else
  cs_cv_libjs_cflags=''
	cs_cv_libjs_lflags=''
	cs_cv_libjs_libs=''

fi

else
  cs_cv_libjs=no
fi


    cs_cv_with_js="$with_js"
    if test "$cs_cv_libjs" = yes; then
  if test "$cs_cv_libjs" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JS.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjs_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JS.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libjs_lflags $cs_cv_libjs_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}JS.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check if regular expressions are available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking for regexp support" >&5
echo $ECHO_N "checking for regexp support... $ECHO_C" >&6; }
if test "${cs_cv_regexp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <regex.h>
int
main ()
{
regex_t re; regcomp (&re, 0, 0); regexec (&re, 0, 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_regexp=yes
		cs_cv_regexp_cflags=$cs_build_cflags
		cs_cv_regexp_lflags=$cs_build_lflags
		cs_cv_regexp_libs=$cs_build_libs
else
  cs_cv_regexp=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_regexp" >&5
echo "${ECHO_T}$cs_cv_regexp" >&6; }
else
  { echo "$as_me:$LINENO: checking for regexp support" >&5
echo $ECHO_N "checking for regexp support... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <regex.h>
int
main ()
{
regex_t re; regcomp (&re, 0, 0); regexec (&re, 0, 0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_regexp=yes
		cs_cv_regexp_cflags=$cs_build_cflags
		cs_cv_regexp_lflags=$cs_build_lflags
		cs_cv_regexp_libs=$cs_build_libs
else
  cs_cv_regexp=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_regexp" >&5
echo "${ECHO_T}$cs_cv_regexp" >&6; }
fi

    if test $cs_cv_regexp = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_REGEX
"
    cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}REGEX.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_regexp_cflags=''
	cs_cv_regexp_lflags=''
	cs_cv_regexp_libs=''

fi




#------------------------------------------------------------------------------
# Check if backtrace() is available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking for backtrace" >&5
echo $ECHO_N "checking for backtrace... $ECHO_C" >&6; }
if test "${cs_cv_backtrace+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <execinfo.h>
int
main ()
{
void* foo; int x; x = backtrace (&foo, 0);
	backtrace_symbols (&foo, x);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_backtrace=yes
		cs_cv_backtrace_cflags=$cs_build_cflags
		cs_cv_backtrace_lflags=$cs_build_lflags
		cs_cv_backtrace_libs=$cs_build_libs
else
  cs_cv_backtrace=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_backtrace" >&5
echo "${ECHO_T}$cs_cv_backtrace" >&6; }
else
  { echo "$as_me:$LINENO: checking for backtrace" >&5
echo $ECHO_N "checking for backtrace... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <execinfo.h>
int
main ()
{
void* foo; int x; x = backtrace (&foo, 0);
	backtrace_symbols (&foo, x);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_backtrace=yes
		cs_cv_backtrace_cflags=$cs_build_cflags
		cs_cv_backtrace_lflags=$cs_build_lflags
		cs_cv_backtrace_libs=$cs_build_libs
else
  cs_cv_backtrace=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_backtrace" >&5
echo "${ECHO_T}$cs_cv_backtrace" >&6; }
fi

    if test $cs_cv_backtrace = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_BACKTRACE
"
    cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}BACKTRACE.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

else
  cs_cv_backtrace_cflags=''
	cs_cv_backtrace_lflags=''
	cs_cv_backtrace_libs=''

fi




#------------------------------------------------------------------------------
# Check if setenv() is available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking for setenv" >&5
echo $ECHO_N "checking for setenv... $ECHO_C" >&6; }
if test "${cs_cv_setenv+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <stdlib.h>
int
main ()
{
setenv(0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_setenv=yes
		cs_cv_setenv_cflags=$cs_build_cflags
		cs_cv_setenv_lflags=$cs_build_lflags
		cs_cv_setenv_libs=$cs_build_libs
else
  cs_cv_setenv=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_setenv" >&5
echo "${ECHO_T}$cs_cv_setenv" >&6; }
else
  { echo "$as_me:$LINENO: checking for setenv" >&5
echo $ECHO_N "checking for setenv... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <stdlib.h>
int
main ()
{
setenv(0, 0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_setenv=yes
		cs_cv_setenv_cflags=$cs_build_cflags
		cs_cv_setenv_lflags=$cs_build_lflags
		cs_cv_setenv_libs=$cs_build_libs
else
  cs_cv_setenv=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_setenv" >&5
echo "${ECHO_T}$cs_cv_setenv" >&6; }
fi

    if test $cs_cv_setenv = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SETENV
"
else
  cs_cv_setenv_cflags=''
	cs_cv_setenv_lflags=''
	cs_cv_setenv_libs=''

fi




#------------------------------------------------------------------------------
# Check for a couple of memory-related functions.
#------------------------------------------------------------------------------
if test "" != yes; then
  { echo "$as_me:$LINENO: checking for _aligned_malloc" >&5
echo $ECHO_N "checking for _aligned_malloc... $ECHO_C" >&6; }
if test "${cs_cv__aligned_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <malloc.h>
int
main ()
{
_aligned_malloc(0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv__aligned_malloc=yes
		cs_cv__aligned_malloc_cflags=$cs_build_cflags
		cs_cv__aligned_malloc_lflags=$cs_build_lflags
		cs_cv__aligned_malloc_libs=$cs_build_libs
else
  cs_cv__aligned_malloc=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv__aligned_malloc" >&5
echo "${ECHO_T}$cs_cv__aligned_malloc" >&6; }
else
  { echo "$as_me:$LINENO: checking for _aligned_malloc" >&5
echo $ECHO_N "checking for _aligned_malloc... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#include <malloc.h>
int
main ()
{
_aligned_malloc(0, 0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv__aligned_malloc=yes
		cs_cv__aligned_malloc_cflags=$cs_build_cflags
		cs_cv__aligned_malloc_lflags=$cs_build_lflags
		cs_cv__aligned_malloc_libs=$cs_build_libs
else
  cs_cv__aligned_malloc=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv__aligned_malloc" >&5
echo "${ECHO_T}$cs_cv__aligned_malloc" >&6; }
fi

    if test $cs_cv__aligned_malloc = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE__ALIGNED_MALLOC
"
else
  cs_cv__aligned_malloc_cflags=''
	cs_cv__aligned_malloc_lflags=''
	cs_cv__aligned_malloc_libs=''

fi




#------------------------------------------------------------------------------
# Check whether malloc.h can be included without a warning.
#------------------------------------------------------------------------------
if test "$cs_cv_prog_cxx_enable_warnings $cs_cv_prog_cxx_enable_errors" != yes; then
  { echo "$as_me:$LINENO: checking if <malloc.h> can be included" >&5
echo $ECHO_N "checking if <malloc.h> can be included... $ECHO_C" >&6; }
if test "${cs_cv_malloc_h_includeable+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <malloc.h>
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_malloc_h_includeable=yes
		cs_cv_malloc_h_includeable_cflags=$cs_build_cflags
		cs_cv_malloc_h_includeable_lflags=$cs_build_lflags
		cs_cv_malloc_h_includeable_libs=$cs_build_libs
else
  cs_cv_malloc_h_includeable=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_malloc_h_includeable" >&5
echo "${ECHO_T}$cs_cv_malloc_h_includeable" >&6; }
else
  { echo "$as_me:$LINENO: checking if <malloc.h> can be included" >&5
echo $ECHO_N "checking if <malloc.h> can be included... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <malloc.h>
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_malloc_h_includeable=yes
		cs_cv_malloc_h_includeable_cflags=$cs_build_cflags
		cs_cv_malloc_h_includeable_lflags=$cs_build_lflags
		cs_cv_malloc_h_includeable_libs=$cs_build_libs
else
  cs_cv_malloc_h_includeable=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_malloc_h_includeable" >&5
echo "${ECHO_T}$cs_cv_malloc_h_includeable" >&6; }
fi

    if test $cs_cv_malloc_h_includeable = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_MALLOC_H
"
else
  cs_cv_malloc_h_includeable_cflags=''
	cs_cv_malloc_h_includeable_lflags=''
	cs_cv_malloc_h_includeable_libs=''

fi




#------------------------------------------------------------------------------
# Check if cxxabi.h is available and if the abi::__cxa_demangle() function is
# available.
#------------------------------------------------------------------------------
ac_ext=cpp
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


for ac_header in cxxabi.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 if test "" != yes; then
  { echo "$as_me:$LINENO: checking for abi::__cxa_demangle" >&5
echo $ECHO_N "checking for abi::__cxa_demangle... $ECHO_C" >&6; }
if test "${cs_cv_abi_cxa_demangle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cxxabi.h>
int
main ()
{
abi::__cxa_demangle(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    ac_ext=cpp
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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_abi_cxa_demangle=yes
		cs_cv_abi_cxa_demangle_cflags=$cs_build_cflags
		cs_cv_abi_cxa_demangle_lflags=$cs_build_lflags
		cs_cv_abi_cxa_demangle_libs=$cs_build_libs
else
  cs_cv_abi_cxa_demangle=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_abi_cxa_demangle" >&5
echo "${ECHO_T}$cs_cv_abi_cxa_demangle" >&6; }
else
  { echo "$as_me:$LINENO: checking for abi::__cxa_demangle" >&5
echo $ECHO_N "checking for abi::__cxa_demangle... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cxxabi.h>
int
main ()
{
abi::__cxa_demangle(0, 0, 0, 0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    ac_ext=cpp
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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_abi_cxa_demangle=yes
		cs_cv_abi_cxa_demangle_cflags=$cs_build_cflags
		cs_cv_abi_cxa_demangle_lflags=$cs_build_lflags
		cs_cv_abi_cxa_demangle_libs=$cs_build_libs
else
  cs_cv_abi_cxa_demangle=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_abi_cxa_demangle" >&5
echo "${ECHO_T}$cs_cv_abi_cxa_demangle" >&6; }
fi

    if test $cs_cv_abi_cxa_demangle = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_ABI_CXA_DEMANGLE
"
else
  cs_cv_abi_cxa_demangle_cflags=''
	cs_cv_abi_cxa_demangle_lflags=''
	cs_cv_abi_cxa_demangle_libs=''

fi

fi

done

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




#------------------------------------------------------------------------------
# Check if TemplateToolkit2 is installed (needed for MSVC project generation).
#------------------------------------------------------------------------------

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in perl5 perl
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PERL"; then
  ac_cv_prog_PERL="$PERL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PERL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
PERL=$ac_cv_prog_PERL
if test -n "$PERL"; then
  { echo "$as_me:$LINENO: result: $PERL" >&5
echo "${ECHO_T}$PERL" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$PERL" && break
done

    if test -n "$PERL"; then
  { echo "$as_me:$LINENO: checking for TemplateToolkit" >&5
echo $ECHO_N "checking for TemplateToolkit... $ECHO_C" >&6; }
if test "${cs_cv_perl_tt2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if { (echo "$as_me:$LINENO: \$PERL -M'Template 2.11' -MTemplate::Plugin -e 0 1>&2") >&5
  ($PERL -M'Template 2.11' -MTemplate::Plugin -e 0 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_cv_perl_tt2=yes
else
  cs_cv_perl_tt2=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_perl_tt2" >&5
echo "${ECHO_T}$cs_cv_perl_tt2" >&6; }

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    for ac_prog in ttree
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_TTREE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TTREE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TTREE="$TTREE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_TTREE="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
TTREE=$ac_cv_path_TTREE
if test -n "$TTREE"; then
  { echo "$as_me:$LINENO: result: $TTREE" >&5
echo "${ECHO_T}$TTREE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$TTREE" && break
done

	if test $cs_cv_perl_tt2 = yes && test -n "$TTREE"; then
  cs_build_prop_val="$TTREE"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}TTREE ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi




#------------------------------------------------------------------------------
# Check if CppUnit, the unit-testing framework is available. If so,
# unit-testing will be enabled automatically for any application, plugin, and
# library which has a subdirectory named "t/". The subdirectory should contain
# CppUnit test fragments with file extension ".t".
#------------------------------------------------------------------------------

# Check whether --with-cppunit was given.
if test "${with_cppunit+set}" = set; then
  withval=$with_cppunit;
fi


    # Backward compatibility: Recognize --with-libcppunit as alias for --with-cppunit.
    if test -n "$with_libcppunit" &&
           test -z "$with_cppunit"; then
  with_cppunit="$with_libcppunit"
fi


    if test -z "$with_cppunit"; then
  with_cppunit=yes
fi

    if test "$with_cppunit" != no; then
  # If --with-cppunit value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_cppunit" != "$cs_cv_with_cppunit"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_cppunit = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cppunit" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes cppunit... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_cppunit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists cppunit; then
  cs_cv_prog_pkg_config_cppunit=yes
else
  cs_cv_prog_pkg_config_cppunit=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cppunit" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_cppunit" >&6; }
	if test $cs_cv_prog_pkg_config_cppunit = yes; then
  if test -z "$cs_cv_prog_pkg_config_cppunit_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cppunit") >&5
  ($PKG_CONFIG --cflags cppunit) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs cppunit") >&5
  ($PKG_CONFIG --libs cppunit) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cppunit_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_cppunit_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in cppunit-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_CPPUNIT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_CPPUNIT"; then
  ac_cv_prog_CONFIG_CPPUNIT="$CONFIG_CPPUNIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_CPPUNIT="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_CPPUNIT=$ac_cv_prog_CONFIG_CPPUNIT
if test -n "$CONFIG_CPPUNIT"; then
  { echo "$as_me:$LINENO: result: $CONFIG_CPPUNIT" >&5
echo "${ECHO_T}$CONFIG_CPPUNIT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_CPPUNIT" && break
  done
fi
if test -z "$CONFIG_CPPUNIT"; then
  ac_ct_CONFIG_CPPUNIT=$CONFIG_CPPUNIT
  for ac_prog in cppunit-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_CPPUNIT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_CPPUNIT"; then
  ac_cv_prog_ac_ct_CONFIG_CPPUNIT="$ac_ct_CONFIG_CPPUNIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_CPPUNIT="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_CPPUNIT=$ac_cv_prog_ac_ct_CONFIG_CPPUNIT
if test -n "$ac_ct_CONFIG_CPPUNIT"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_CPPUNIT" >&5
echo "${ECHO_T}$ac_ct_CONFIG_CPPUNIT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_CPPUNIT" && break
done

  if test "x$ac_ct_CONFIG_CPPUNIT" = x; then
    CONFIG_CPPUNIT=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CPPUNIT=$ac_ct_CONFIG_CPPUNIT
  fi
fi

    if test -n "$CONFIG_CPPUNIT"; then
  if test -z "$cs_cv_prog_config_cppunit_ok"; then
  if $CONFIG_CPPUNIT --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cppunit_ok=yes
else
  cs_cv_prog_config_cppunit_ok=no
fi

fi

	if test $cs_cv_prog_config_cppunit_ok = yes; then
  if test -z "$cs_cv_prog_config_cppunit_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_CPPUNIT --cflags ") >&5
  ($CONFIG_CPPUNIT --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_CPPUNIT --libs ") >&5
  ($CONFIG_CPPUNIT --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cppunit_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_cppunit_flags"
fi

fi


fi


	if test $with_cppunit != yes; then
  cs_check_lib_paths=$with_cppunit
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "cppunit"; then
  cs_check_lib_libs="-lcppunit"
	cs_check_lib_framework="-framework cppunit"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "cppunit"; then
  cs_check_lib_libs="-lcppunit"
	cs_check_lib_framework="-framework cppunit"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "cppunit"; then
  cs_check_lib_libs="-lcppunit"
	cs_check_lib_framework="-framework cppunit"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libcppunit" >&5
echo $ECHO_N "checking for libcppunit... $ECHO_C" >&6; }
if test "${cs_cv_libcppunit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cppunit/ui/text/TestRunner.h>
int
main ()
{
CppUnit::TextUi::TestRunner r; r.run();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcppunit=yes
		cs_cv_libcppunit_cflags=$cs_build_cflags
		cs_cv_libcppunit_lflags=$cs_build_lflags
		cs_cv_libcppunit_libs=$cs_build_libs
else
  cs_cv_libcppunit=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libcppunit" >&5
echo "${ECHO_T}$cs_cv_libcppunit" >&6; }
else
  { echo "$as_me:$LINENO: checking for libcppunit" >&5
echo $ECHO_N "checking for libcppunit... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cppunit/ui/text/TestRunner.h>
int
main ()
{
CppUnit::TextUi::TestRunner r; r.run();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcppunit=yes
		cs_cv_libcppunit_cflags=$cs_build_cflags
		cs_cv_libcppunit_lflags=$cs_build_lflags
		cs_cv_libcppunit_libs=$cs_build_libs
else
  cs_cv_libcppunit=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libcppunit" >&5
echo "${ECHO_T}$cs_cv_libcppunit" >&6; }
fi

    if test $cs_cv_libcppunit = yes; then
  :
else
  cs_cv_libcppunit_cflags=''
	cs_cv_libcppunit_lflags=''
	cs_cv_libcppunit_libs=''

fi

else
  cs_cv_libcppunit=no
fi


    cs_cv_with_cppunit="$with_cppunit"


    if test $cs_cv_libcppunit = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if cppunit is sufficiently recent" >&5
echo $ECHO_N "checking if cppunit is sufficiently recent... $ECHO_C" >&6; }
if test "${cs_cv_libcppunit_recent+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libcppunit_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcppunit_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcppunit_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cppunit/BriefTestProgressListener.h>
int
main ()
{
CppUnit::BriefTestProgressListener b; b.startTest(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libcppunit_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcppunit_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcppunit_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcppunit_recent=yes
		cs_cv_libcppunit_recent_cflags=$cs_build_cflags
		cs_cv_libcppunit_recent_lflags=$cs_build_lflags
		cs_cv_libcppunit_recent_libs=$cs_build_libs
else
  cs_cv_libcppunit_recent=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libcppunit_recent" >&5
echo "${ECHO_T}$cs_cv_libcppunit_recent" >&6; }
else
  { echo "$as_me:$LINENO: checking if cppunit is sufficiently recent" >&5
echo $ECHO_N "checking if cppunit is sufficiently recent... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_libcppunit_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcppunit_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcppunit_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cppunit/BriefTestProgressListener.h>
int
main ()
{
CppUnit::BriefTestProgressListener b; b.startTest(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libcppunit_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcppunit_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcppunit_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcppunit_recent=yes
		cs_cv_libcppunit_recent_cflags=$cs_build_cflags
		cs_cv_libcppunit_recent_lflags=$cs_build_lflags
		cs_cv_libcppunit_recent_libs=$cs_build_libs
else
  cs_cv_libcppunit_recent=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libcppunit_recent" >&5
echo "${ECHO_T}$cs_cv_libcppunit_recent" >&6; }
fi

    if test $cs_cv_libcppunit_recent = yes; then
  if test "$cs_cv_libcppunit" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CPPUNIT.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcppunit_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CPPUNIT.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libcppunit_lflags $cs_cv_libcppunit_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CPPUNIT.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_libcppunit_recent_cflags=''
	cs_cv_libcppunit_recent_lflags=''
	cs_cv_libcppunit_recent_libs=''

fi

fi




#------------------------------------------------------------------------------
# Determine if plugin modules must implement main().  This is needed on some
# platforms to ensure that global constructors and functions which initialize
# global variables in the plugin module get invoked.
#
# IMPLEMENTATION NOTES
#
# Currently, we answer this question by making the (potentially incorrect)
# assumption that plugins on platforms other than Windows, MacOS/X, and Darwin
# require main().  In the future, we should use a proper test to make this
# determination.
#------------------------------------------------------------------------------



    { echo "$as_me:$LINENO: checking if plugins require main()" >&5
echo $ECHO_N "checking if plugins require main()... $ECHO_C" >&6; }
if test "${cs_cv_sys_plugin_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $host_os in
	    mingw*|cygwin*) cs_cv_sys_plugin_main=no ;;
	    darwin*) cs_cv_sys_plugin_main=no ;;
	    # Everything else is assumed to be Unix or Unix-like.
	    *) cs_cv_sys_plugin_main=yes ;;
	esac
fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_plugin_main" >&5
echo "${ECHO_T}$cs_cv_sys_plugin_main" >&6; }
    if test $cs_cv_sys_plugin_main = yes; then
  cs_header_text="${cs_header_text}#define CS_UNIX_PLUGIN_REQUIRES_MAIN
"
fi




#------------------------------------------------------------------------------
# Check for sizeof(long) to determine whether the platform is 32 or 64 bit.
# Also needed by the PRIx99 macros provided by CS.
#------------------------------------------------------------------------------


{ echo "$as_me:$LINENO: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6; }
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
typedef long ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_long=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6; }

# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ echo "$as_me:$LINENO: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo=`expr $ac_mid + 1`
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			ac_mid=`expr 2 '*' $ac_mid + 1`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_hi=`expr '(' $ac_mid ')' - 1`
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			ac_mid=`expr 2 '*' $ac_mid`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo= ac_hi=
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo=`expr '(' $ac_mid ')' + 1`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') if test "$ac_cv_type_long" = yes; then
     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
   else
     ac_cv_sizeof_long=0
   fi ;;
esac
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef long ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
    {
      long int i = longval ();
      if (i != ((long int) (sizeof (ac__type_sizeof_))))
	return 1;
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ((long int) (sizeof (ac__type_sizeof_))))
	return 1;
      fprintf (f, "%lu\n", i);
    }
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
if test "$ac_cv_type_long" = yes; then
     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
   else
     ac_cv_sizeof_long=0
   fi
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.val
fi
{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


    if test $ac_cv_sizeof_long = 8; then
  cs_long_bits=64
else
  cs_long_bits=32
fi

cs_header_text="${cs_header_text}#define CS_PROCESSOR_SIZE $cs_long_bits
"
cs_build_prop_val="$cs_long_bits"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}TARGET.PROCESSORSIZE ?= \"$cs_build_prop_val\" ;
"
fi

cs_header_text="${cs_header_text}#define CS_LONG_SIZE $ac_cv_sizeof_long
"



#------------------------------------------------------------------------------
# Determine host CPU.
#
# CS_CHECK_HOST_CPU
#	Set the shell variable cs_host_cpu to a normalized form of the CPU name
#	returned by config.guess/config.sub.  Also takes the normalized name,
#	uppercases and appends it to the string "CS_PROCESSOR_" to form a name
#	suitable for the C preprocessor.  Assigns this value to the shell
#	variable cs_host_cpu_cpp_define.  Typically, Crystal Space's conception
#	of CPU name is the same as that returned by config.guess/config.sub,
#	but there may be exceptions as seen in the `case' statement.
#------------------------------------------------------------------------------



    case $host_cpu in
	[Ii][3-9]86*|[Xx]86*) cs_host_cpu=x86 ;;
	powerpc*) cs_host_cpu=powerpc ;;
	*) cs_host_cpu=$host_cpu ;;
    esac
    cs_host_cpu_normalized="`echo "$cs_host_cpu" | $as_tr_cpp`"
cs_build_prop_val="$cs_host_cpu_normalized"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}TARGET.PROCESSOR ?= \"$cs_build_prop_val\" ;
"
fi

cs_header_text="${cs_header_text}#define CS_PROCESSOR_$cs_host_cpu_normalized
"
cs_header_text="${cs_header_text}#define CS_PROCESSOR_NAME \"$cs_host_cpu\"
"

if test $cs_host_cpu = x86; then
  cs_header_text="${cs_header_text}#define CS_HAVE_MMX
"
fi




#------------------------------------------------------------------------------
# Check host endianess.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
 bogus endian macros
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_c_bigendian=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	# It does not; compile a test program.
if test "$cross_compiling" = yes; then
  # try to guess the endianness by grepping values into an object file
  ac_cv_c_bigendian=unknown
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
int
main ()
{
 _ascii (); _ebcdic ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
  ac_cv_c_bigendian=yes
fi
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  if test "$ac_cv_c_bigendian" = unknown; then
    ac_cv_c_bigendian=no
  else
    # finding both strings is unlikely to happen, but who knows?
    ac_cv_c_bigendian=unknown
  fi
fi
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long int l;
    char c[sizeof (long int)];
  } u;
  u.l = 1;
  return u.c[sizeof (long int) - 1] == 1;

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in
  yes)
    cs_header_text="${cs_header_text}#define CS_BIG_ENDIAN
" ;;
  no)
    cs_header_text="${cs_header_text}#define CS_LITTLE_ENDIAN
" ;;
  *)
    { { echo "$as_me:$LINENO: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&5
echo "$as_me: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
   { (exit 1); exit 1; }; } ;;
esac




#------------------------------------------------------------------------------
# Check if stdint.h is available and if the INT64_C() macro is available.
#------------------------------------------------------------------------------

for ac_header in stdint.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_STDINT_H
"
    if test "" != yes; then
  { echo "$as_me:$LINENO: checking for INT64_C" >&5
echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6; }
if test "${cs_cv_c_int64+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define __STDC_CONSTANT_MACROS
            #define __STDC_LIMIT_MACROS
            #include <stdint.h>
int
main ()
{
(void)INT64_C(0x100000000)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_int64=yes
		cs_cv_c_int64_cflags=$cs_build_cflags
		cs_cv_c_int64_lflags=$cs_build_lflags
		cs_cv_c_int64_libs=$cs_build_libs
else
  cs_cv_c_int64=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_c_int64" >&5
echo "${ECHO_T}$cs_cv_c_int64" >&6; }
else
  { echo "$as_me:$LINENO: checking for INT64_C" >&5
echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define __STDC_CONSTANT_MACROS
            #define __STDC_LIMIT_MACROS
            #include <stdint.h>
int
main ()
{
(void)INT64_C(0x100000000)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_int64=yes
		cs_cv_c_int64_cflags=$cs_build_cflags
		cs_cv_c_int64_lflags=$cs_build_lflags
		cs_cv_c_int64_libs=$cs_build_libs
else
  cs_cv_c_int64=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_c_int64" >&5
echo "${ECHO_T}$cs_cv_c_int64" >&6; }
fi

    if test $cs_cv_c_int64 = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_INT64_C
"
else
  cs_cv_c_int64_cflags=''
	cs_cv_c_int64_lflags=''
	cs_cv_c_int64_libs=''

fi

fi

done




#------------------------------------------------------------------------------
# Check if intptr_t, uintptr_t, intmax_t and uintmax_t are available.
#------------------------------------------------------------------------------

for ac_header in stdint.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in inttypes.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_INTTYPES_H
"
fi

done

{ echo "$as_me:$LINENO: checking for intptr_t" >&5
echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; }
if test "${ac_cv_type_intptr_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
    #ifdef HAVE_INTTYPES_H
    #include <inttypes.h>
    #endif
    #ifdef HAVE_STDINT_H
    #include <stdint.h>
    #endif
    #ifdef HAVE_SYS_TYPES_H
    #include <sys/types.h>
    #endif

typedef intptr_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_intptr_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_intptr_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; }
if test $ac_cv_type_intptr_t = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_INTPTR_T
"
fi

{ echo "$as_me:$LINENO: checking for intmax_t" >&5
echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; }
if test "${ac_cv_type_intmax_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
    #ifdef HAVE_INTTYPES_H
    #include <inttypes.h>
    #endif
    #ifdef HAVE_STDINT_H
    #include <stdint.h>
    #endif
    #ifdef HAVE_SYS_TYPES_H
    #include <sys/types.h>
    #endif

typedef intmax_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_intmax_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_intmax_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; }
if test $ac_cv_type_intmax_t = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_INTMAX_T
"
fi




#------------------------------------------------------------------------------
# Check if the PRIx99 printf()-formatting adjunct macros are available.
#------------------------------------------------------------------------------

for ac_header in inttypes.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for PRIx99 macros" >&5
echo $ECHO_N "checking for PRIx99 macros... $ECHO_C" >&6; }
if test "${cs_cv_c_format_macros+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
	#define __STDC_FORMAT_MACROS
	#if HAVE_INTTYPES_H
        #include <inttypes.h>
	#endif

int
main ()
{
char const* s = "widget %" PRIu32 " toggled";
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_format_macros=yes
		cs_cv_c_format_macros_cflags=$cs_build_cflags
		cs_cv_c_format_macros_lflags=$cs_build_lflags
		cs_cv_c_format_macros_libs=$cs_build_libs
else
  cs_cv_c_format_macros=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_c_format_macros" >&5
echo "${ECHO_T}$cs_cv_c_format_macros" >&6; }
else
  { echo "$as_me:$LINENO: checking for PRIx99 macros" >&5
echo $ECHO_N "checking for PRIx99 macros... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stddef.h>
	#define __STDC_FORMAT_MACROS
	#if HAVE_INTTYPES_H
        #include <inttypes.h>
	#endif

int
main ()
{
char const* s = "widget %" PRIu32 " toggled";
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_format_macros=yes
		cs_cv_c_format_macros_cflags=$cs_build_cflags
		cs_cv_c_format_macros_lflags=$cs_build_lflags
		cs_cv_c_format_macros_libs=$cs_build_libs
else
  cs_cv_c_format_macros=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_c_format_macros" >&5
echo "${ECHO_T}$cs_cv_c_format_macros" >&6; }
fi

    if test $cs_cv_c_format_macros = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_C_FORMAT_MACROS
"
else
  cs_cv_c_format_macros_cflags=''
	cs_cv_c_format_macros_lflags=''
	cs_cv_c_format_macros_libs=''

fi




#------------------------------------------------------------------------------
# Check if the types wchar_t and wint_t are available; also determine the size
# of wchar_t.  These types might be built-in, or they might come from the
# wchar.h or wctype.h header files.  Also determine availability of wcslen(),
# fputws(), fwide() and wcsrtombs().
#------------------------------------------------------------------------------


ac_ext=cpp
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



for ac_header in wchar.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_WCHAR_H
"
fi

done


for ac_header in wctype.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_WCTYPE_H
"
fi

done


{ echo "$as_me:$LINENO: checking for wint_t" >&5
echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; }
if test "${ac_cv_type_wint_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WCHAR_H
    #include <wchar.h>
    #endif
    #if HAVE_WCTYPE_H
    #include <wctype.h>
    #endif


typedef wint_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_wint_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_wint_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_wint_t" >&5
echo "${ECHO_T}$ac_cv_type_wint_t" >&6; }
if test $ac_cv_type_wint_t = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WINT_T
"
fi


{ echo "$as_me:$LINENO: checking for wchar_t" >&5
echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
if test "${ac_cv_type_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WCHAR_H
    #include <wchar.h>
    #endif
    #if HAVE_WCTYPE_H
    #include <wctype.h>
    #endif


typedef wchar_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_wchar_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_wchar_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
if test $ac_cv_type_wchar_t = yes; then
  cs_type_wchar_t=yes
else
  cs_type_wchar_t=no
fi


if test $cs_type_wchar_t = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WCHAR_T
"
    { echo "$as_me:$LINENO: checking for wcslen" >&5
echo $ECHO_N "checking for wcslen... $ECHO_C" >&6; }
if test "${ac_cv_func_wcslen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define wcslen to an innocuous variant, in case <limits.h> declares wcslen.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define wcslen innocuous_wcslen

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char wcslen (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef wcslen

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char wcslen ();
/* 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_wcslen || defined __stub___wcslen
choke me
#endif

int
main ()
{
return wcslen ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_wcslen=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_wcslen=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_wcslen" >&5
echo "${ECHO_T}$ac_cv_func_wcslen" >&6; }
if test $ac_cv_func_wcslen = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WCSLEN
"
fi

    { echo "$as_me:$LINENO: checking for fputws" >&5
echo $ECHO_N "checking for fputws... $ECHO_C" >&6; }
if test "${ac_cv_func_fputws+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define fputws to an innocuous variant, in case <limits.h> declares fputws.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define fputws innocuous_fputws

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char fputws (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef fputws

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fputws ();
/* 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_fputws || defined __stub___fputws
choke me
#endif

int
main ()
{
return fputws ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_fputws=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_fputws=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_fputws" >&5
echo "${ECHO_T}$ac_cv_func_fputws" >&6; }
if test $ac_cv_func_fputws = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FPUTWS
"
fi

    { echo "$as_me:$LINENO: checking for fwide" >&5
echo $ECHO_N "checking for fwide... $ECHO_C" >&6; }
if test "${ac_cv_func_fwide+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define fwide to an innocuous variant, in case <limits.h> declares fwide.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define fwide innocuous_fwide

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char fwide (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef fwide

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fwide ();
/* 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_fwide || defined __stub___fwide
choke me
#endif

int
main ()
{
return fwide ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_fwide=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_fwide=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_fwide" >&5
echo "${ECHO_T}$ac_cv_func_fwide" >&6; }
if test $ac_cv_func_fwide = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FWIDE
"
fi

    { echo "$as_me:$LINENO: checking for wcsrtombs" >&5
echo $ECHO_N "checking for wcsrtombs... $ECHO_C" >&6; }
if test "${ac_cv_func_wcsrtombs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define wcsrtombs to an innocuous variant, in case <limits.h> declares wcsrtombs.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define wcsrtombs innocuous_wcsrtombs

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char wcsrtombs (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef wcsrtombs

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char wcsrtombs ();
/* 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_wcsrtombs || defined __stub___wcsrtombs
choke me
#endif

int
main ()
{
return wcsrtombs ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_func_wcsrtombs=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_wcsrtombs=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_wcsrtombs" >&5
echo "${ECHO_T}$ac_cv_func_wcsrtombs" >&6; }
if test $ac_cv_func_wcsrtombs = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WCSRTOMBS
"
fi

    { echo "$as_me:$LINENO: checking for wchar_t" >&5
echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
if test "${ac_cv_type_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
typedef wchar_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_wchar_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_wchar_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }

# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
if test "${ac_cv_sizeof_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo=`expr $ac_mid + 1`
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			ac_mid=`expr 2 '*' $ac_mid + 1`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_hi=`expr '(' $ac_mid ')' - 1`
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			ac_mid=`expr 2 '*' $ac_mid`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo= ac_hi=
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_lo=`expr '(' $ac_mid ')' + 1`
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_wchar_t=$ac_lo;;
'') if test "$ac_cv_type_wchar_t" = yes; then
     { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
   else
     ac_cv_sizeof_wchar_t=0
   fi ;;
esac
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
   typedef wchar_t ac__type_sizeof_;
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
    {
      long int i = longval ();
      if (i != ((long int) (sizeof (ac__type_sizeof_))))
	return 1;
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ((long int) (sizeof (ac__type_sizeof_))))
	return 1;
      fprintf (f, "%lu\n", i);
    }
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_wchar_t=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
if test "$ac_cv_type_wchar_t" = yes; then
     { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
   else
     ac_cv_sizeof_wchar_t=0
   fi
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.val
fi
{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
_ACEOF


    cs_header_text="${cs_header_text}#define CS_WCHAR_T_SIZE $ac_cv_sizeof_wchar_t
"
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




#------------------------------------------------------------------------------
# Check if MAXPATHLEN is defined by the system headers.
#------------------------------------------------------------------------------

for ac_header in sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_SYS_PARAM_H
"
fi

done

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for MAXPATHLEN" >&5
echo $ECHO_N "checking for MAXPATHLEN... $ECHO_C" >&6; }
if test "${cs_cv_c_macro_maxpathlen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	#if HAVE_SYS_PARAM_H
	#include <sys/param.h>
	#endif
int
main ()
{
char s[MAXPATHLEN]; (void)s;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_macro_maxpathlen=yes
		cs_cv_c_macro_maxpathlen_cflags=$cs_build_cflags
		cs_cv_c_macro_maxpathlen_lflags=$cs_build_lflags
		cs_cv_c_macro_maxpathlen_libs=$cs_build_libs
else
  cs_cv_c_macro_maxpathlen=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_c_macro_maxpathlen" >&5
echo "${ECHO_T}$cs_cv_c_macro_maxpathlen" >&6; }
else
  { echo "$as_me:$LINENO: checking for MAXPATHLEN" >&5
echo $ECHO_N "checking for MAXPATHLEN... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
	#if HAVE_SYS_PARAM_H
	#include <sys/param.h>
	#endif
int
main ()
{
char s[MAXPATHLEN]; (void)s;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_c_macro_maxpathlen=yes
		cs_cv_c_macro_maxpathlen_cflags=$cs_build_cflags
		cs_cv_c_macro_maxpathlen_lflags=$cs_build_lflags
		cs_cv_c_macro_maxpathlen_libs=$cs_build_libs
else
  cs_cv_c_macro_maxpathlen=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_c_macro_maxpathlen" >&5
echo "${ECHO_T}$cs_cv_c_macro_maxpathlen" >&6; }
fi

    if test $cs_cv_c_macro_maxpathlen = yes; then
  cs_header_text="${cs_header_text}#define CS_MAXPATHLEN MAXPATHLEN
"
else
  cs_cv_c_macro_maxpathlen_cflags=''
	cs_cv_c_macro_maxpathlen_lflags=''
	cs_cv_c_macro_maxpathlen_libs=''

fi




#------------------------------------------------------------------------------
# Check for BSD-style socket support.  Also test for presence of type
# socklen_t.  Note that we must not include both <winsock.h> and the Unix
# socket-related headers at the same time on Cygwin even though they both exist
# since the inclusion of both results in errors about structures and functions
# defined differently between <winsock.h> and the other headers.  Therefore, if
# <winsock.h> is present, we include only it, otherwise we include the Unix
# socket-related headers.  A related problem also occurs with the check for
# presence of <winsock.h> on Cygwin, thus this check is handled specially.  For
# this check, the "default-includes" normally used by AC_CHECK_HEADER() are
# suppressed.  This prevents complaints about structures and functions in
# <winsock.h> being defined differently by <sys/types.h> and <unistd.h>
#------------------------------------------------------------------------------



for ac_header in winsock.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* no default includes */

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_Header=no"
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done









for ac_header in unistd.h \
    sys/types.h \
    sys/socket.h \
    sys/ioctl.h \
    netinet/in.h \
    arpa/inet.h \
    netdb.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


if test "" != yes; then
  { echo "$as_me:$LINENO: checking for socket support" >&5
echo $ECHO_N "checking for socket support... $ECHO_C" >&6; }
if test "${cs_cv_sys_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
    `echo @@@-lsocket | sed 'y% %#%'` \
    `echo @@@-lsocket -lnsl | sed 'y% %#%'` \
    `echo @@@-lwsock32 | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINSOCK_H
	#include <winsock.h>
	#else
	#if HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#if HAVE_NETINET_IN_H
	#include <netinet/in.h>
	#endif
	#if HAVE_ARPA_INET_H
	#include <arpa/inet.h>
	#endif
	#if HAVE_SYS_SOCKET_H
	#include <sys/socket.h>
	#endif
	#endif
int
main ()
{
struct in_addr a; inet_ntoa(a); socket(0,0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_socket=yes
		cs_cv_sys_socket_cflags=$cs_build_cflags
		cs_cv_sys_socket_lflags=$cs_build_lflags
		cs_cv_sys_socket_libs=$cs_build_libs
else
  cs_cv_sys_socket=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_sys_socket" >&5
echo "${ECHO_T}$cs_cv_sys_socket" >&6; }
else
  { echo "$as_me:$LINENO: checking for socket support" >&5
echo $ECHO_N "checking for socket support... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` \
    `echo @@@-lsocket | sed 'y% %#%'` \
    `echo @@@-lsocket -lnsl | sed 'y% %#%'` \
    `echo @@@-lwsock32 | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_WINSOCK_H
	#include <winsock.h>
	#else
	#if HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#if HAVE_NETINET_IN_H
	#include <netinet/in.h>
	#endif
	#if HAVE_ARPA_INET_H
	#include <arpa/inet.h>
	#endif
	#if HAVE_SYS_SOCKET_H
	#include <sys/socket.h>
	#endif
	#endif
int
main ()
{
struct in_addr a; inet_ntoa(a); socket(0,0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_sys_socket=yes
		cs_cv_sys_socket_cflags=$cs_build_cflags
		cs_cv_sys_socket_lflags=$cs_build_lflags
		cs_cv_sys_socket_libs=$cs_build_libs
else
  cs_cv_sys_socket=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_sys_socket" >&5
echo "${ECHO_T}$cs_cv_sys_socket" >&6; }
fi

    if test $cs_cv_sys_socket = yes; then
  if test "$cs_cv_sys_socket" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SOCKET.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_sys_socket_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SOCKET.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_sys_socket_lflags $cs_cv_sys_socket_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}SOCKET.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

else
  cs_cv_sys_socket_cflags=''
	cs_cv_sys_socket_lflags=''
	cs_cv_sys_socket_libs=''

fi


if test $cs_cv_sys_socket = yes; then
  { echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
if test "${ac_cv_type_socklen_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_UNISTD_H
	#include <unistd.h>
	#endif
	#if HAVE_SYS_TYPES_H
	#include <sys/types.h>
	#endif
	#if HAVE_SYS_SOCKET_H
	#include <sys/socket.h>
	#endif
	#if HAVE_SYS_IOCTL_H
	#include <sys/ioctl.h>
	#endif
	#if HAVE_NETINET_IN_H
	#include <netinet/in.h>
	#endif
	#if HAVE_NETDB_H
	#include <netdb.h>
	#endif


typedef socklen_t ac__type_new_;
int
main ()
{
if ((ac__type_new_ *) 0)
  return 0;
if (sizeof (ac__type_new_))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_socklen_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_socklen_t=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
if test $ac_cv_type_socklen_t = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SOCKLEN_T
"
fi

fi




#------------------------------------------------------------------------------
# Check if byteswap.h is available, which contains optimized byte swapping
# functions (used for endian conversion).
#------------------------------------------------------------------------------

for ac_header in byteswap.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_BYTESWAP_H
"
fi

done




#------------------------------------------------------------------------------
# Check how to declare functions and types deprecated.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to declare deprecations" >&5
echo $ECHO_N "checking how to declare deprecations... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_declare_deprecated+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_declare_deprecated='no'
	if test "$cs_cv_prog_cxx_declare_deprecated" = no; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((deprecated)) void f();
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_declare_deprecated='__attribute__((deprecated))'
else
  cs_cv_prog_cxx_declare_deprecated='no'
fi

fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_deprecated" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_declare_deprecated" >&6; }
    if test $cs_cv_prog_cxx_declare_deprecated != no; then
  cs_header_text="${cs_header_text}#define CS_DEPRECATED_METHOD $cs_cv_prog_cxx_declare_deprecated
"
    cs_header_text="${cs_header_text}#define CS_DEPRECATED_TYPE $cs_cv_prog_cxx_declare_deprecated
"
fi




#------------------------------------------------------------------------------
# Check how to declare functions and types perfectly constant (not affected by
# any global state and always returning the same value for the same input).
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to declare const functions" >&5
echo $ECHO_N "checking how to declare const functions... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_declare_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_declare_const='no'
	if test "$cs_cv_prog_cxx_declare_const" = no; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((const)) void f();
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_declare_const='__attribute__((const))'
else
  cs_cv_prog_cxx_declare_const='no'
fi

fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_const" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_declare_const" >&6; }
    if test $cs_cv_prog_cxx_declare_const != no; then
  cs_header_text="${cs_header_text}#define CS_CONST_METHOD $cs_cv_prog_cxx_declare_const
"
fi




#------------------------------------------------------------------------------
# Check how to declare functions and types pure (not affected by any global
# state).
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking how to declare pure functions" >&5
echo $ECHO_N "checking how to declare pure functions... $ECHO_C" >&6; }
if test "${cs_cv_prog_cxx_declare_pure+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cs_cv_prog_cxx_declare_pure='no'
	if test "$cs_cv_prog_cxx_declare_pure" = no; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
__attribute__((pure)) void f();
int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_declare_pure='__attribute__((pure))'
else
  cs_cv_prog_cxx_declare_pure='no'
fi

fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_pure" >&5
echo "${ECHO_T}$cs_cv_prog_cxx_declare_pure" >&6; }
    if test $cs_cv_prog_cxx_declare_pure != no; then
  cs_header_text="${cs_header_text}#define CS_PURE_METHOD $cs_cv_prog_cxx_declare_pure
"
fi




#------------------------------------------------------------------------------
# CS_CHECK_QSQRT
#	Check if compiler is able to understand the assembly code in csqsqrt.h.
#	The MacOS/X PowerPC version of csQsqrt() requires the
#	-force_cpusubtype_ALL flag, so we use that flag when available.  Sets
#	the shell variable cs_cv_cxx_qsqrt_ok to "yes" if csqsqrt.h is usable,
#	otherwise "no".
#------------------------------------------------------------------------------





    { echo "$as_me:$LINENO: checking if assembly-coded csQsqrt() compiles" >&5
echo $ECHO_N "checking if assembly-coded csQsqrt() compiles... $ECHO_C" >&6; }
if test "${cs_cv_cxx_qsqrt_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test $ac_compiler_gnu = yes; then
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @-I$srcdir/include@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_force_cpusubtype_all $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#define CS_PROCESSOR_$cs_host_cpu_normalized
		    #define CS_COMPILER_GCC
		    #define __CS_CSSYSDEF_H__
		    #include <csqsqrt.h>
int
main ()
{
float n = csQsqrt(1.0f); (void)n;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_force_cpusubtype_all | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_cxx_qsqrt_ok=yes
else
  cs_cv_cxx_qsqrt_ok=no
fi

else
  cs_cv_cxx_qsqrt_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_cxx_qsqrt_ok" >&5
echo "${ECHO_T}$cs_cv_cxx_qsqrt_ok" >&6; }
if test $cs_cv_cxx_qsqrt_ok = no; then
  cs_header_text="${cs_header_text}#define CS_NO_QSQRT
"
fi




#------------------------------------------------------------------------------
# Check how to determine whether a floating point value is finite.
#------------------------------------------------------------------------------
# CS_CHECK_FINITE(FUNCTION)


if test "" != yes; then
  { echo "$as_me:$LINENO: checking for std::isfinite" >&5
echo $ECHO_N "checking for std::isfinite... $ECHO_C" >&6; }
if test "${cs_cv_func_std__isfinite+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	#include <cmath>
	#endif
	#if HAVE_MATH_H
	#include <math.h>
	#endif
	#if HAVE_IEEEFP_H
	#include <ieeefp.h>
	#endif
int
main ()
{
float f; std::isfinite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_std__isfinite=yes
		cs_cv_func_std__isfinite_cflags=$cs_build_cflags
		cs_cv_func_std__isfinite_lflags=$cs_build_lflags
		cs_cv_func_std__isfinite_libs=$cs_build_libs
else
  cs_cv_func_std__isfinite=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func_std__isfinite" >&5
echo "${ECHO_T}$cs_cv_func_std__isfinite" >&6; }
else
  { echo "$as_me:$LINENO: checking for std::isfinite" >&5
echo $ECHO_N "checking for std::isfinite... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	#include <cmath>
	#endif
	#if HAVE_MATH_H
	#include <math.h>
	#endif
	#if HAVE_IEEEFP_H
	#include <ieeefp.h>
	#endif
int
main ()
{
float f; std::isfinite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_std__isfinite=yes
		cs_cv_func_std__isfinite_cflags=$cs_build_cflags
		cs_cv_func_std__isfinite_lflags=$cs_build_lflags
		cs_cv_func_std__isfinite_libs=$cs_build_libs
else
  cs_cv_func_std__isfinite=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func_std__isfinite" >&5
echo "${ECHO_T}$cs_cv_func_std__isfinite" >&6; }
fi

    if test $cs_cv_func_std__isfinite = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_STD__ISFINITE
"
else
  cs_cv_func_std__isfinite_cflags=''
	cs_cv_func_std__isfinite_lflags=''
	cs_cv_func_std__isfinite_libs=''

fi


if test "" != yes; then
  { echo "$as_me:$LINENO: checking for isfinite" >&5
echo $ECHO_N "checking for isfinite... $ECHO_C" >&6; }
if test "${cs_cv_func_isfinite+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; isfinite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_isfinite=yes
		cs_cv_func_isfinite_cflags=$cs_build_cflags
		cs_cv_func_isfinite_lflags=$cs_build_lflags
		cs_cv_func_isfinite_libs=$cs_build_libs
else
  cs_cv_func_isfinite=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func_isfinite" >&5
echo "${ECHO_T}$cs_cv_func_isfinite" >&6; }
else
  { echo "$as_me:$LINENO: checking for isfinite" >&5
echo $ECHO_N "checking for isfinite... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; isfinite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_isfinite=yes
		cs_cv_func_isfinite_cflags=$cs_build_cflags
		cs_cv_func_isfinite_lflags=$cs_build_lflags
		cs_cv_func_isfinite_libs=$cs_build_libs
else
  cs_cv_func_isfinite=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func_isfinite" >&5
echo "${ECHO_T}$cs_cv_func_isfinite" >&6; }
fi

    if test $cs_cv_func_isfinite = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_ISFINITE
"
else
  cs_cv_func_isfinite_cflags=''
	cs_cv_func_isfinite_lflags=''
	cs_cv_func_isfinite_libs=''

fi

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for finitef" >&5
echo $ECHO_N "checking for finitef... $ECHO_C" >&6; }
if test "${cs_cv_func_finitef+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; finitef(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_finitef=yes
		cs_cv_func_finitef_cflags=$cs_build_cflags
		cs_cv_func_finitef_lflags=$cs_build_lflags
		cs_cv_func_finitef_libs=$cs_build_libs
else
  cs_cv_func_finitef=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func_finitef" >&5
echo "${ECHO_T}$cs_cv_func_finitef" >&6; }
else
  { echo "$as_me:$LINENO: checking for finitef" >&5
echo $ECHO_N "checking for finitef... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; finitef(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_finitef=yes
		cs_cv_func_finitef_cflags=$cs_build_cflags
		cs_cv_func_finitef_lflags=$cs_build_lflags
		cs_cv_func_finitef_libs=$cs_build_libs
else
  cs_cv_func_finitef=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func_finitef" >&5
echo "${ECHO_T}$cs_cv_func_finitef" >&6; }
fi

    if test $cs_cv_func_finitef = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FINITEF
"
else
  cs_cv_func_finitef_cflags=''
	cs_cv_func_finitef_lflags=''
	cs_cv_func_finitef_libs=''

fi

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for finite" >&5
echo $ECHO_N "checking for finite... $ECHO_C" >&6; }
if test "${cs_cv_func_finite+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; finite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_finite=yes
		cs_cv_func_finite_cflags=$cs_build_cflags
		cs_cv_func_finite_lflags=$cs_build_lflags
		cs_cv_func_finite_libs=$cs_build_libs
else
  cs_cv_func_finite=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func_finite" >&5
echo "${ECHO_T}$cs_cv_func_finite" >&6; }
else
  { echo "$as_me:$LINENO: checking for finite" >&5
echo $ECHO_N "checking for finite... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; finite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func_finite=yes
		cs_cv_func_finite_cflags=$cs_build_cflags
		cs_cv_func_finite_lflags=$cs_build_lflags
		cs_cv_func_finite_libs=$cs_build_libs
else
  cs_cv_func_finite=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func_finite" >&5
echo "${ECHO_T}$cs_cv_func_finite" >&6; }
fi

    if test $cs_cv_func_finite = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FINITE
"
else
  cs_cv_func_finite_cflags=''
	cs_cv_func_finite_lflags=''
	cs_cv_func_finite_libs=''

fi

if test "" != yes; then
  { echo "$as_me:$LINENO: checking for _finite" >&5
echo $ECHO_N "checking for _finite... $ECHO_C" >&6; }
if test "${cs_cv_func__finite+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; _finite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func__finite=yes
		cs_cv_func__finite_cflags=$cs_build_cflags
		cs_cv_func__finite_lflags=$cs_build_lflags
		cs_cv_func__finite_libs=$cs_build_libs
else
  cs_cv_func__finite=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_func__finite" >&5
echo "${ECHO_T}$cs_cv_func__finite" >&6; }
else
  { echo "$as_me:$LINENO: checking for _finite" >&5
echo $ECHO_N "checking for _finite... $ECHO_C" >&6; }
	    ac_ext=cpp
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

    cs_cflags_save="$CXXFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CXXFLAGS="$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test  $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if HAVE_CMATH
	    #include <cmath>
	    #endif
	    #if HAVE_MATH_H
	    #include <math.h>
	    #endif
	    #if HAVE_IEEEFP_H
	    #include <ieeefp.h>
	    #endif
int
main ()
{
float f; _finite(f)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CXXFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_prog_cxx_enable_pedantic | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_func__finite=yes
		cs_cv_func__finite_cflags=$cs_build_cflags
		cs_cv_func__finite_lflags=$cs_build_lflags
		cs_cv_func__finite_libs=$cs_build_libs
else
  cs_cv_func__finite=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_func__finite" >&5
echo "${ECHO_T}$cs_cv_func__finite" >&6; }
fi

    if test $cs_cv_func__finite = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE__FINITE
"
else
  cs_cv_func__finite_cflags=''
	cs_cv_func__finite_lflags=''
	cs_cv_func__finite_libs=''

fi




#------------------------------------------------------------------------------
# Determine if plugin meta-information should be embedded directly into plugin
# modules or if it should exist in stand-alone .csplugin files.
#------------------------------------------------------------------------------



for ac_header in elf.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_elf_h=yes
else
  cs_header_elf_h=no
fi

done

    { echo "$as_me:$LINENO: checking whether to embed plugin meta-information" >&5
echo $ECHO_N "checking whether to embed plugin meta-information... $ECHO_C" >&6; }
    case $cs_host_target in
	unix) if test $cs_header_elf_h = yes; then
  cs_embed_meta_info_default=yes
else
  cs_embed_meta_info_default=no
fi
 ;;
	*) cs_embed_meta_info_default=yes ;;
    esac
    # Check whether --enable-meta-info-embedding was given.
if test "${enable_meta_info_embedding+set}" = set; then
  enableval=$enable_meta_info_embedding;
else
  enable_meta_info_embedding=$cs_embed_meta_info_default
fi

    { echo "$as_me:$LINENO: result: $enable_meta_info_embedding" >&5
echo "${ECHO_T}$enable_meta_info_embedding" >&6; }
    cs_build_prop_val="$enable_meta_info_embedding"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}EMBED_META ?= \"$cs_build_prop_val\" ;
"
fi

    if test $enable_meta_info_embedding = yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in windres
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_WINDRES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_WINDRES="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
  { echo "$as_me:$LINENO: result: $WINDRES" >&5
echo "${ECHO_T}$WINDRES" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$WINDRES" && break
  done
fi
if test -z "$WINDRES"; then
  ac_ct_WINDRES=$WINDRES
  for ac_prog in windres
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_WINDRES"; then
  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_WINDRES="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
if test -n "$ac_ct_WINDRES"; then
  { echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
echo "${ECHO_T}$ac_ct_WINDRES" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_WINDRES" && break
done

  if test "x$ac_ct_WINDRES" = x; then
    WINDRES=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    WINDRES=$ac_ct_WINDRES
  fi
fi

    cs_build_prop_val="$WINDRES"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.WINDRES ?= \"$cs_build_prop_val\" ;
"
fi



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in objcopy
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_OBJCOPY+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$OBJCOPY"; then
  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
  { echo "$as_me:$LINENO: result: $OBJCOPY" >&5
echo "${ECHO_T}$OBJCOPY" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$OBJCOPY" && break
  done
fi
if test -z "$OBJCOPY"; then
  ac_ct_OBJCOPY=$OBJCOPY
  for ac_prog in objcopy
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_OBJCOPY"; then
  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
if test -n "$ac_ct_OBJCOPY"; then
  { echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
echo "${ECHO_T}$ac_ct_OBJCOPY" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_OBJCOPY" && break
done

  if test "x$ac_ct_OBJCOPY" = x; then
    OBJCOPY=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    OBJCOPY=$ac_ct_OBJCOPY
  fi
fi

    if test -n "$OBJCOPY"; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}OBJCOPY.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

        cs_build_prop_val="$OBJCOPY"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}CMD.OBJCOPY ?= \"$cs_build_prop_val\" ;
"
fi

fi

        if test $cs_header_elf_h = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}ELF.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

else
  case $host_os in
	        mingw*|cygwin*) ;;
		*)

# Check whether --with-bfd was given.
if test "${with_bfd+set}" = set; then
  withval=$with_bfd;
fi


    # Backward compatibility: Recognize --with-libbfd as alias for --with-bfd.
    if test -n "$with_libbfd" &&
           test -z "$with_bfd"; then
  with_bfd="$with_libbfd"
fi


    if test -z "$with_bfd"; then
  with_bfd=yes
fi

    if test "$with_bfd" != no; then
  # If --with-bfd value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_bfd" != "$cs_cv_with_bfd"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_bfd = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bfd" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes bfd... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_bfd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists bfd; then
  cs_cv_prog_pkg_config_bfd=yes
else
  cs_cv_prog_pkg_config_bfd=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bfd" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_bfd" >&6; }
	if test $cs_cv_prog_pkg_config_bfd = yes; then
  if test -z "$cs_cv_prog_pkg_config_bfd_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bfd") >&5
  ($PKG_CONFIG --cflags bfd) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs bfd") >&5
  ($PKG_CONFIG --libs bfd) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_bfd_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_bfd_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in bfd-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_BFD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_BFD"; then
  ac_cv_prog_CONFIG_BFD="$CONFIG_BFD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_BFD="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_BFD=$ac_cv_prog_CONFIG_BFD
if test -n "$CONFIG_BFD"; then
  { echo "$as_me:$LINENO: result: $CONFIG_BFD" >&5
echo "${ECHO_T}$CONFIG_BFD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_BFD" && break
  done
fi
if test -z "$CONFIG_BFD"; then
  ac_ct_CONFIG_BFD=$CONFIG_BFD
  for ac_prog in bfd-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_BFD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_BFD"; then
  ac_cv_prog_ac_ct_CONFIG_BFD="$ac_ct_CONFIG_BFD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_BFD="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_BFD=$ac_cv_prog_ac_ct_CONFIG_BFD
if test -n "$ac_ct_CONFIG_BFD"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_BFD" >&5
echo "${ECHO_T}$ac_ct_CONFIG_BFD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_BFD" && break
done

  if test "x$ac_ct_CONFIG_BFD" = x; then
    CONFIG_BFD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BFD=$ac_ct_CONFIG_BFD
  fi
fi

    if test -n "$CONFIG_BFD"; then
  if test -z "$cs_cv_prog_config_bfd_ok"; then
  if $CONFIG_BFD --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_bfd_ok=yes
else
  cs_cv_prog_config_bfd_ok=no
fi

fi

	if test $cs_cv_prog_config_bfd_ok = yes; then
  if test -z "$cs_cv_prog_config_bfd_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_BFD --cflags ") >&5
  ($CONFIG_BFD --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_BFD --libs ") >&5
  ($CONFIG_BFD --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_bfd_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_bfd_flags"
fi

fi


fi


	if test $with_bfd != yes; then
  cs_check_lib_paths=$with_bfd
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libbfd" >&5
echo $ECHO_N "checking for libbfd... $ECHO_C" >&6; }
if test "${cs_cv_libbfd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -liberty $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd_init();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -liberty | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd=yes
		cs_cv_libbfd_cflags=$cs_build_cflags
		cs_cv_libbfd_lflags=$cs_build_lflags
		cs_cv_libbfd_libs=$cs_build_libs
else
  cs_cv_libbfd=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
echo "${ECHO_T}$cs_cv_libbfd" >&6; }
else
  { echo "$as_me:$LINENO: checking for libbfd" >&5
echo $ECHO_N "checking for libbfd... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -liberty $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd_init();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -liberty | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd=yes
		cs_cv_libbfd_cflags=$cs_build_cflags
		cs_cv_libbfd_lflags=$cs_build_lflags
		cs_cv_libbfd_libs=$cs_build_libs
else
  cs_cv_libbfd=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
echo "${ECHO_T}$cs_cv_libbfd" >&6; }
fi

    if test $cs_cv_libbfd = yes; then
  :
else
  cs_cv_libbfd_cflags=''
	cs_cv_libbfd_lflags=''
	cs_cv_libbfd_libs=''

fi

else
  cs_cv_libbfd=no
fi


    cs_cv_with_bfd="$with_bfd"


    if test $cs_cv_libbfd = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if libbfd is usable" >&5
echo $ECHO_N "checking if libbfd is usable... $ECHO_C" >&6; }
if test "${cs_cv_libbfd_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` `echo @@-L/usr/lib@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libbfd_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbfd_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbfd_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd* p;
		asection* s;
		bfd_init();
		p = bfd_openr(0,0);
		bfd_check_format(p,bfd_object);
		bfd_get_section_by_name(p,0);
		bfd_section_size(p,s);
		bfd_get_section_contents(p,s,0,0,0);
		bfd_close(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libbfd_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbfd_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbfd_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd_ok=yes
		cs_cv_libbfd_ok_cflags=$cs_build_cflags
		cs_cv_libbfd_ok_lflags=$cs_build_lflags
		cs_cv_libbfd_ok_libs=$cs_build_libs
else
  cs_cv_libbfd_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
echo "${ECHO_T}$cs_cv_libbfd_ok" >&6; }
else
  { echo "$as_me:$LINENO: checking if libbfd is usable" >&5
echo $ECHO_N "checking if libbfd is usable... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` `echo @@-L/usr/lib@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libbfd_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbfd_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbfd_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd* p;
		asection* s;
		bfd_init();
		p = bfd_openr(0,0);
		bfd_check_format(p,bfd_object);
		bfd_get_section_by_name(p,0);
		bfd_section_size(p,s);
		bfd_get_section_contents(p,s,0,0,0);
		bfd_close(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libbfd_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbfd_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbfd_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd_ok=yes
		cs_cv_libbfd_ok_cflags=$cs_build_cflags
		cs_cv_libbfd_ok_lflags=$cs_build_lflags
		cs_cv_libbfd_ok_libs=$cs_build_libs
else
  cs_cv_libbfd_ok=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
echo "${ECHO_T}$cs_cv_libbfd_ok" >&6; }
fi

    if test $cs_cv_libbfd_ok = yes; then
  :
else
  cs_cv_libbfd_ok_cflags=''
	cs_cv_libbfd_ok_lflags=''
	cs_cv_libbfd_ok_libs=''

fi

else
  cs_cv_libbfd_ok=no
fi


    if test $cs_cv_libbfd_ok = yes; then
  if test "$cs_cv_libbfd_ok" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbfd_ok_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbfd_ok_lflags $cs_cv_libbfd_ok_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

	cs_build_prop_val="$cs_cv_libbfd_ok_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}EMBED_META.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

			cs_build_prop_val="$cs_cv_libbfd_ok_lflags $cs_cv_libbfd_ok_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}EMBED_META.LFLAGS += \"$cs_build_prop_val\" ;
"
fi

fi

		    ;;
	    esac
fi

fi

if test $enable_meta_info_embedding = yes; then
  cs_header_text="${cs_header_text}#define CS_EMBED_PLUGIN_META
"
    cs_build_prop_val="\$(EMBED_META.CFLAGS)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

    cs_build_prop_val="\$(EMBED_META.LFLAGS)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.LFLAGS += \"$cs_build_prop_val\" ;
"
fi


for ac_header in elf.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    ( cat <<\_ASBOX
## ------------------------------------------------- ##
## Report this to crystal-main@lists.sourceforge.net ##
## ------------------------------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_ELF_H
"
fi

done

    if test "$cs_cv_libbfd_ok" = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_LIBBFD
"
fi

fi




#------------------------------------------------------------------------------
# Determine build mode; either "optimize", "debug", or "profile".
#------------------------------------------------------------------------------
# Check whether --enable-optimize was given.
if test "${enable_optimize+set}" = set; then
  enableval=$enable_optimize; test "$enableval" = "yes" && cs_build_mode=optimize
fi


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


# Check whether --enable-profile was given.
if test "${enable_profile+set}" = set; then
  enableval=$enable_profile; test "$enableval" = "yes" && cs_build_mode=profile
fi


# Check whether --enable-mode was given.
if test "${enable_mode+set}" = set; then
  enableval=$enable_mode; case $enableval in
	optimize|debug|profile) cs_build_mode=$enableval ;;
	*) 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 overridden 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { echo "$as_me:$LINENO: error:     unrecognized mode --enable-mode=$enableval; use
    \`optimize', \`debug', or \`profile'" >&5
echo "$as_me: error:     unrecognized mode --enable-mode=$enableval; use
    \`optimize', \`debug', or \`profile'" >&2;}
   { (exit 1); exit 1; }; } ;;
    esac
fi


{ echo "$as_me:$LINENO: checking build mode" >&5
echo $ECHO_N "checking build mode... $ECHO_C" >&6; }
if test "${cs_build_mode+set}" = set; then
  :
else
  cs_build_mode=optimize
fi

{ echo "$as_me:$LINENO: result: $cs_build_mode" >&5
echo "${ECHO_T}$cs_build_mode" >&6; }
cs_build_prop_val="$cs_build_mode"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MODE ?= \"$cs_build_prop_val\" ;
"
fi




#------------------------------------------------------------------------------
# Check for libbfd in debug mode on Windows so that CS_ASSERT() can dump a
# meaningful traceback in addition to emitting the failed condition. (On Linux,
# backtrace() is used instead.)
#
# ***WARNING***
#
# libbfd caries a GPL license which is incompatible with Crystal Space's LGPL
# license. We only enable this feature in debug mode as a diagnostic aid during
# the development cycle. When a project is ready for release, it should be
# built in optimize mode.
#------------------------------------------------------------------------------
if test $cs_build_mode = debug; then
  case $host_os in
	mingw*|cygwin*)

# Check whether --with-bfd was given.
if test "${with_bfd+set}" = set; then
  withval=$with_bfd;
fi


    # Backward compatibility: Recognize --with-libbfd as alias for --with-bfd.
    if test -n "$with_libbfd" &&
           test -z "$with_bfd"; then
  with_bfd="$with_libbfd"
fi


    if test -z "$with_bfd"; then
  with_bfd=yes
fi

    if test "$with_bfd" != no; then
  # If --with-bfd value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_bfd" != "$cs_cv_with_bfd"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	cs_check_lib_flags=''
	if test $with_bfd = yes; then
  if test "$cs_prog_pkg_config_checked" != yes; then

    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in pkg-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$PKG_CONFIG"; then
  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PKG_CONFIG="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$PKG_CONFIG" && break
  done
fi
if test -z "$PKG_CONFIG"; then
  ac_ct_PKG_CONFIG=$PKG_CONFIG
  for ac_prog in pkg-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_PKG_CONFIG"; then
  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_PKG_CONFIG="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_PKG_CONFIG" && break
done

  if test "x$ac_ct_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	PKG_CONFIG_PATH="/usr/local/lib/pkgconfig$PATH_SEPARATOR/sw/lib/pkgconfig$PATH_SEPARATOR/opt/local/lib/pkgconfig$PATH_SEPARATOR/opt/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
	cs_prog_pkg_config_checked=yes
fi

    if test -z "$cs_cv_prog_pkg_config_ok"; then
  if test -n "$PKG_CONFIG"; then
  if $PKG_CONFIG --atleast-pkgconfig-version=0.9.0; then
  cs_cv_prog_pkg_config_ok=yes
else
  cs_cv_prog_pkg_config_ok=no
fi

else
  cs_cv_prog_pkg_config_ok=no
fi

fi

    if test $cs_cv_prog_pkg_config_ok = yes; then
  { echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bfd" >&5
echo $ECHO_N "checking if $PKG_CONFIG recognizes bfd... $ECHO_C" >&6; }
if test "${cs_cv_prog_pkg_config_bfd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if $PKG_CONFIG --exists bfd; then
  cs_cv_prog_pkg_config_bfd=yes
else
  cs_cv_prog_pkg_config_bfd=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bfd" >&5
echo "${ECHO_T}$cs_cv_prog_pkg_config_bfd" >&6; }
	if test $cs_cv_prog_pkg_config_bfd = yes; then
  if test -z "$cs_cv_prog_pkg_config_bfd_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bfd") >&5
  ($PKG_CONFIG --cflags bfd) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$PKG_CONFIG --libs bfd") >&5
  ($PKG_CONFIG --libs bfd) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_bfd_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_pkg_config_bfd_flags"
fi

fi


    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in bfd-config
  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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CONFIG_BFD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CONFIG_BFD"; then
  ac_cv_prog_CONFIG_BFD="$CONFIG_BFD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CONFIG_BFD="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONFIG_BFD=$ac_cv_prog_CONFIG_BFD
if test -n "$CONFIG_BFD"; then
  { echo "$as_me:$LINENO: result: $CONFIG_BFD" >&5
echo "${ECHO_T}$CONFIG_BFD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    test -n "$CONFIG_BFD" && break
  done
fi
if test -z "$CONFIG_BFD"; then
  ac_ct_CONFIG_BFD=$CONFIG_BFD
  for ac_prog in bfd-config
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:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CONFIG_BFD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CONFIG_BFD"; then
  ac_cv_prog_ac_ct_CONFIG_BFD="$ac_ct_CONFIG_BFD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CONFIG_BFD="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CONFIG_BFD=$ac_cv_prog_ac_ct_CONFIG_BFD
if test -n "$ac_ct_CONFIG_BFD"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_BFD" >&5
echo "${ECHO_T}$ac_ct_CONFIG_BFD" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CONFIG_BFD" && break
done

  if test "x$ac_ct_CONFIG_BFD" = x; then
    CONFIG_BFD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BFD=$ac_ct_CONFIG_BFD
  fi
fi

    if test -n "$CONFIG_BFD"; then
  if test -z "$cs_cv_prog_config_bfd_ok"; then
  if $CONFIG_BFD --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_bfd_ok=yes
else
  cs_cv_prog_config_bfd_ok=no
fi

fi

	if test $cs_cv_prog_config_bfd_ok = yes; then
  if test -z "$cs_cv_prog_config_bfd_flags"; then
  cs_check_lib_cflag=`{ (echo "$as_me:$LINENO: \$CONFIG_BFD --cflags ") >&5
  ($CONFIG_BFD --cflags ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ (echo "$as_me:$LINENO: \$CONFIG_BFD --libs ") >&5
  ($CONFIG_BFD --libs ) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_bfd_flags=`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`
fi

    cs_check_lib_flags="$cs_check_lib_flags $cs_cv_prog_config_bfd_flags"
fi

fi


fi


	if test $with_bfd != yes; then
  cs_check_lib_paths=$with_bfd
else
  cs_check_lib_paths="| /usr/local/include|/usr/local/lib \
    /sw/include|/sw/lib \
    /opt/local/include|/opt/local/lib \
    /opt/include|/opt/lib "
fi

	for cs_lib_item in $cs_check_lib_paths
    do
	case $cs_lib_item in
	    *\|*)
    set filler `echo "$cs_lib_item" | awk 'BEGIN { FS="|" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_check_incdir=''
else
  if test "$1" = filler; then
  cs_check_incdir=''
else
  cs_check_incdir=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_check_libdir=''
else
  if test "$1" = filler; then
  cs_check_libdir=''
else
  cs_check_libdir=$1
fi

	shift
fi

		if test -n "$cs_check_incdir"; then
  cs_check_lib_cflag="-I$cs_check_incdir"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_check_libdir"; then
  cs_check_lib_lflag="-L$cs_check_libdir"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	    *)  if test -n "$cs_lib_item/include"; then
  cs_check_lib_cflag="-I$cs_lib_item/include"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item/lib"; then
  cs_check_lib_lflag="-L$cs_lib_item/lib"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		if test -n "$cs_lib_item"; then
  cs_check_lib_cflag="-I$cs_lib_item"
else
  cs_check_lib_cflag=''
fi

    if test -n "$cs_lib_item"; then
  cs_check_lib_lflag="-L$cs_lib_item"
else
  cs_check_lib_lflag=''
fi

    if test -n "bfd"; then
  cs_check_lib_libs="-lbfd"
	cs_check_lib_framework="-framework bfd"
else
  cs_check_lib_libs=''
	cs_check_lib_framework=''
fi

    cs_check_lib_flags="$cs_check_lib_flags
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_framework | sed 'y% %#%'`
	`echo @$cs_check_lib_cflag@$cs_check_lib_lflag@$cs_check_lib_libs | sed 'y% %#%'`"
		;;
	esac
    done


	if test "$cs_ignore_cache" != yes; then
  { echo "$as_me:$LINENO: checking for libbfd" >&5
echo $ECHO_N "checking for libbfd... $ECHO_C" >&6; }
if test "${cs_cv_libbfd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -liberty $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd_init();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -liberty | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd=yes
		cs_cv_libbfd_cflags=$cs_build_cflags
		cs_cv_libbfd_lflags=$cs_build_lflags
		cs_cv_libbfd_libs=$cs_build_libs
else
  cs_cv_libbfd=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
echo "${ECHO_T}$cs_cv_libbfd" >&6; }
else
  { echo "$as_me:$LINENO: checking for libbfd" >&5
echo $ECHO_N "checking for libbfd... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in $cs_check_lib_flags
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test  $cs_cflags_save"
	LDFLAGS="$cs_lflags_test  $cs_lflags_save"
	LIBS="$cs_libs_test -liberty $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd_init();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test  | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test -liberty | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd=yes
		cs_cv_libbfd_cflags=$cs_build_cflags
		cs_cv_libbfd_lflags=$cs_build_lflags
		cs_cv_libbfd_libs=$cs_build_libs
else
  cs_cv_libbfd=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
echo "${ECHO_T}$cs_cv_libbfd" >&6; }
fi

    if test $cs_cv_libbfd = yes; then
  :
else
  cs_cv_libbfd_cflags=''
	cs_cv_libbfd_lflags=''
	cs_cv_libbfd_libs=''

fi

else
  cs_cv_libbfd=no
fi


    cs_cv_with_bfd="$with_bfd"


    if test $cs_cv_libbfd = yes; then
  if test "" != yes; then
  { echo "$as_me:$LINENO: checking if libbfd is usable" >&5
echo $ECHO_N "checking if libbfd is usable... $ECHO_C" >&6; }
if test "${cs_cv_libbfd_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` `echo @@-L/usr/lib@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libbfd_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbfd_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbfd_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd* p;
		asection* s;
		bfd_init();
		p = bfd_openr(0,0);
		bfd_check_format(p,bfd_object);
		bfd_get_section_by_name(p,0);
		bfd_section_size(p,s);
		bfd_get_section_contents(p,s,0,0,0);
		bfd_close(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libbfd_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbfd_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbfd_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd_ok=yes
		cs_cv_libbfd_ok_cflags=$cs_build_cflags
		cs_cv_libbfd_ok_lflags=$cs_build_lflags
		cs_cv_libbfd_ok_libs=$cs_build_libs
else
  cs_cv_libbfd_ok=no
fi

fi
{ echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
echo "${ECHO_T}$cs_cv_libbfd_ok" >&6; }
else
  { echo "$as_me:$LINENO: checking if libbfd is usable" >&5
echo $ECHO_N "checking if libbfd is usable... $ECHO_C" >&6; }
	    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

    cs_cflags_save="$CFLAGS"
    cs_lflags_save="$LDFLAGS"
    cs_libs_save="$LIBS"
    cs_build_ok=no


    for cs_build_item in `echo @@@ | sed 'y% %#%'` `echo @@-L/usr/lib@ | sed 'y% %#%'`
    do

    set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" }
	{ for (i=1; i <= NF; ++i)
	    { if ($i == "") print "filler"; else print $i } }'`
    shift
    if test $# -eq 0; then
  cs_dummy=''
else
  if test "$1" = filler; then
  cs_dummy=''
else
  cs_dummy=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_cflags_test=''
else
  if test "$1" = filler; then
  cs_cflags_test=''
else
  cs_cflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_lflags_test=''
else
  if test "$1" = filler; then
  cs_lflags_test=''
else
  cs_lflags_test=$1
fi

	shift
fi
if test $# -eq 0; then
  cs_libs_test=''
else
  if test "$1" = filler; then
  cs_libs_test=''
else
  cs_libs_test=$1
fi

	shift
fi

    cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'`
    cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'`
    cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'`

	CFLAGS="$cs_cflags_test $cs_cv_libbfd_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbfd_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbfd_libs $cs_libs_save"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <bfd.h>
int
main ()
{
bfd* p;
		asection* s;
		bfd_init();
		p = bfd_openr(0,0);
		bfd_check_format(p,bfd_object);
		bfd_get_section_by_name(p,0);
		bfd_section_size(p,s);
		bfd_get_section_contents(p,s,0,0,0);
		bfd_close(p);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  cs_build_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	if test $cs_build_ok = yes; then
  break
fi

    done


    CFLAGS=$cs_cflags_save
    LDFLAGS=$cs_lflags_save
    LIBS=$cs_libs_save
    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 $cs_build_ok = yes; then
  cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libbfd_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbfd_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbfd_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libbfd_ok=yes
		cs_cv_libbfd_ok_cflags=$cs_build_cflags
		cs_cv_libbfd_ok_lflags=$cs_build_lflags
		cs_cv_libbfd_ok_libs=$cs_build_libs
else
  cs_cv_libbfd_ok=no
fi

	    { echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
echo "${ECHO_T}$cs_cv_libbfd_ok" >&6; }
fi

    if test $cs_cv_libbfd_ok = yes; then
  :
else
  cs_cv_libbfd_ok_cflags=''
	cs_cv_libbfd_ok_lflags=''
	cs_cv_libbfd_ok_libs=''

fi

else
  cs_cv_libbfd_ok=no
fi


    if test $cs_cv_libbfd_ok = yes; then
  if test "$cs_cv_libbfd_ok" = yes; then
  cs_build_prop_val="yes"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.AVAILABLE ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbfd_ok_cflags"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.CFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

	cs_build_prop_val="$cs_cv_libbfd_ok_lflags $cs_cv_libbfd_ok_libs"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}LIBBFD.LFLAGS ?= \"$cs_build_prop_val\" ;
"
fi

fi

	cs_header_text="${cs_header_text}#define CS_HAVE_LIBBFD
"
		cs_debug_libbfd=yes
else
  cs_debug_libbfd=no
fi

	    ;;
	*) cs_debug_libbfd=no ;;
    esac
else
  cs_debug_libbfd=no
fi




#------------------------------------------------------------------------------
# Determine whether ptmalloc should be disabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to enable ptmalloc" >&5
echo $ECHO_N "checking whether to enable ptmalloc... $ECHO_C" >&6; }
# Check whether --enable-ptmalloc was given.
if test "${enable_ptmalloc+set}" = set; then
  enableval=$enable_ptmalloc;
else
  enable_ptmalloc=yes
fi

{ echo "$as_me:$LINENO: result: $enable_ptmalloc" >&5
echo "${ECHO_T}$enable_ptmalloc" >&6; }
if test $enable_ptmalloc != yes; then
  cs_header_text="${cs_header_text}#define CS_NO_PTMALLOC
"
fi




#------------------------------------------------------------------------------
# Determine if extensive memory debugger should be enabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to use extensive memory debugger" >&5
echo $ECHO_N "checking whether to use extensive memory debugger... $ECHO_C" >&6; }
# Check whether --enable-extensive-memory-debugger was given.
if test "${enable_extensive_memory_debugger+set}" = set; then
  enableval=$enable_extensive_memory_debugger;
else
  enable_extensive_memory_debugger=no
fi

{ echo "$as_me:$LINENO: result: $enable_extensive_memory_debugger" >&5
echo "${ECHO_T}$enable_extensive_memory_debugger" >&6; }
cs_build_prop_val="$enable_extensive_memory_debugger"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}EXTENSIVE_MEMDEBUG ?= \"$cs_build_prop_val\" ;
"
fi

if test $enable_extensive_memory_debugger = yes; then
  cs_header_text="${cs_header_text}#define CS_EXTENSIVE_MEMDEBUG
"
fi




#------------------------------------------------------------------------------
# Determine if memory tracker should be enabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to use memory tracker" >&5
echo $ECHO_N "checking whether to use memory tracker... $ECHO_C" >&6; }
# Check whether --enable-memory-tracker was given.
if test "${enable_memory_tracker+set}" = set; then
  enableval=$enable_memory_tracker;
else
  enable_memory_tracker=no
fi

{ echo "$as_me:$LINENO: result: $enable_memory_tracker" >&5
echo "${ECHO_T}$enable_memory_tracker" >&6; }
cs_build_prop_val="$enable_memory_tracker"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}MEMORY_TRACKER ?= \"$cs_build_prop_val\" ;
"
fi

if test $enable_memory_tracker = yes; then
  cs_header_text="${cs_header_text}#define CS_MEMORY_TRACKER
"
fi




#------------------------------------------------------------------------------
# Determine if reference tracker should be enabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to use reference tracker" >&5
echo $ECHO_N "checking whether to use reference tracker... $ECHO_C" >&6; }
# Check whether --enable-ref-tracker was given.
if test "${enable_ref_tracker+set}" = set; then
  enableval=$enable_ref_tracker;
else
  enable_ref_tracker=no
fi

{ echo "$as_me:$LINENO: result: $enable_ref_tracker" >&5
echo "${ECHO_T}$enable_ref_tracker" >&6; }
cs_build_prop_val="$enable_ref_tracker"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}REF_TRACKER ?= \"$cs_build_prop_val\" ;
"
fi

if test $enable_ref_tracker = yes; then
  cs_header_text="${cs_header_text}#define CS_REF_TRACKER
"
fi




#------------------------------------------------------------------------------
# Determine if leak guard should be enabled.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to use leak guard" >&5
echo $ECHO_N "checking whether to use leak guard... $ECHO_C" >&6; }
# Check whether --enable-leak-guard was given.
if test "${enable_leak_guard+set}" = set; then
  enableval=$enable_leak_guard;
else
  enable_leak_guard=no
fi

{ echo "$as_me:$LINENO: result: $enable_leak_guard" >&5
echo "${ECHO_T}$enable_leak_guard" >&6; }
if test $enable_leak_guard = yes; then
  cs_header_text="${cs_header_text}#define CS_USE_LEAK_GUARD
"
fi




#------------------------------------------------------------------------------
# Determine whether link libraries should be static or shared.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval=$enable_shared;
else
  enable_shared=no
fi

{ echo "$as_me:$LINENO: result: $enable_shared" >&5
echo "${ECHO_T}$enable_shared" >&6; }
cs_build_prop_val="$enable_shared"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}BUILD_SHARED_LIBS ?= \"$cs_build_prop_val\" ;
"
fi

if test $enable_shared = yes; then
  cs_header_text="${cs_header_text}#define CS_BUILD_SHARED_LIBS
"
fi




#------------------------------------------------------------------------------
# Determine if the "make" emulation layer should be synthesized.
#------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking whether to emulate makefiles" >&5
echo $ECHO_N "checking whether to emulate makefiles... $ECHO_C" >&6; }
# Check whether --enable-make-emulation was given.
if test "${enable_make_emulation+set}" = set; then
  enableval=$enable_make_emulation;
else
  enable_make_emulation=yes
fi

{ echo "$as_me:$LINENO: result: $enable_make_emulation" >&5
echo "${ECHO_T}$enable_make_emulation" >&6; }



#------------------------------------------------------------------------------
# Boilerplate: csconfig.h
#------------------------------------------------------------------------------
cs_header_text="// File generated automatically.
#ifndef __CS_CSCONFIG_H__
#define __CS_CSCONFIG_H__
${cs_header_text}"

cs_header_text="${cs_header_text}#define CS_PACKAGE_NAME \"$PACKAGE_NAME\"
"
cs_header_text="${cs_header_text}#define CS_PACKAGE_VERSION \"$PACKAGE_VERSION\"
"
cs_header_text="${cs_header_text}#endif // __CS_CSCONFIG_H__
"



#------------------------------------------------------------------------------
# Boilerplate: Jamconfig
#------------------------------------------------------------------------------
cs_build_prop_val="\$(COMPILER.CFLAGS.MANDATORY)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.CFLAGS += \"$cs_build_prop_val\" ;
"
fi

cs_build_prop_val="\$(COMPILER.C++FLAGS.MANDATORY)"
    cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    if test -n "$cs_build_prop_val"; then
  cs_jamconfig_text="${cs_jamconfig_text}COMPILER.C++FLAGS += \"$cs_build_prop_val\" ;
"
fi

cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_NAME ?= \"$PACKAGE_NAME\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_VERSION ?= \"$PACKAGE_VERSION\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_STRING ?= \"$PACKAGE_STRING\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_BUGREPORT ?= \"$PACKAGE_BUGREPORT\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_LONGNAME ?= \"$PACKAGE_LONGNAME\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_HOMEPAGE ?= \"$PACKAGE_HOMEPAGE\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_COPYRIGHT ?= \"$PACKAGE_COPYRIGHT\" ;
"
    for cs_veritem in 1 0; do
	cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_VERSION_LIST += \"$cs_veritem\" ;
"
    done


# Handle the case when no prefix is given, and the special case when a path
# contains more than 2 slashes, these paths seem to be correct but Jam fails
# on them.
if test $prefix = NONE; then
  cs_install_prefix="$ac_default_prefix"
else
  cs_install_prefix=`echo "$prefix" | sed -e 's:///*:/:g'`
fi

if test $exec_prefix = NONE; then
  cs_install_exec_prefix="\$(prefix)"
else
  cs_install_exec_prefix=`echo "$exec_prefix" | sed -e 's:///*:/:g'`
fi


cs_jamconfig_text="${cs_jamconfig_text}prefix ?= \"`echo "$cs_install_prefix" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}exec_prefix ?= \"`echo "$cs_install_exec_prefix" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}bindir ?= \"`echo "$bindir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}sbindir ?= \"`echo "$sbindir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}libexecdir ?= \"`echo "$libexecdir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}datadir ?= \"`echo "$datadir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}sysconfdir ?= \"`echo "$sysconfdir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}sharedstatedir ?= \"`echo "$sharedstatedir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}localstatedir ?= \"`echo "$localstatedir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}libdir ?= \"`echo "$libdir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}includedir ?= \"`echo "$includedir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}oldincludedir ?= \"`echo "$oldincludedir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}infodir ?= \"`echo "$infodir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"
cs_jamconfig_text="${cs_jamconfig_text}mandir ?= \"`echo "$mandir" | sed 's/\${\([a-zA-Z_][a-zA-Z_]*\)}/$(\1)/g;s/\\\\/\\\\\\\\/g'`\" ;
"




#------------------------------------------------------------------------------
# Output generated files.
#------------------------------------------------------------------------------
ac_config_commands="$ac_config_commands include/csconfig.h"

ac_config_commands="$ac_config_commands Jamconfig"

ac_config_files="$ac_config_files Jamfile"




#------------------------------------------------------------------------------
# In order to avoid alienating users by forcing them to install and use Jam, we
# perform the following actions:
#
# (1) If the user does not have Jam installed, we build it on his behalf from a
#     copy of the Jam sources residing in $srcdir/apps/tools/jam, and place the
#     executable in the root of the build directory.
#
# (2) Synthesize a makefile which implements all of top-level user-visible
#     targets provided by the Jam system.  The makefile simply forwards these
#     target invocations over to Jam.
#------------------------------------------------------------------------------
# (1)




if test "$CS_NEED_LOCAL_JAM" = yes && test $enable_make_emulation = yes; then

    case $host_os in
	mingw*) JAM_CFLAGS="$JAM_CFLAGS -DMSYS" ;;
	cygwin*) JAM_CFLAGS="$JAM_CFLAGS -D__cygwin__" ;;
    esac
    JAM_CFLAGS=`echo x$JAM_CFLAGS | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    ac_config_commands="$ac_config_commands jam$EXEEXT"

fi


# (2)


if test $enable_make_emulation = yes; then
  ac_config_commands="$ac_config_commands Makefile"

fi




#------------------------------------------------------------------------------
# Finalization.
#------------------------------------------------------------------------------
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 overridden 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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  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}'

# 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 branch to the quote section.  Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
t clear
:clear
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
t quote
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
	g
	s/^\n//
	s/\n/ /g
	p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`


ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# 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
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi




# PATH needs CR
# 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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# CDPATH.
$as_unset CDPATH



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, and appends
  # trailing '-' during substitution so that $LINENO is not a special
  # case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
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$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p'
elif mkdirs . 2>/dev/null; then
  as_mkdir_p='mkdirs'
else
  as_mkdir_p=''
fi
test -d ./-p && rmdir ./-p

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
        test -d "$1/.";
      else
	case $1 in
        -*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

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

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


exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by crystalspace $as_me 1.0, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
# Files that config.status was made for.
config_files="$ac_config_files"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
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 and configuration settings, then exit
  -q, --quiet      do not print progress messages
  -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>."

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

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# 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[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    echo "$ac_cs_version"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
    ac_need_defaults=false;;
  --he | --h |  --help | --hel | -h )
    echo "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) { 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"
     ac_need_defaults=false ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  CONFIG_SHELL=$SHELL
  export CONFIG_SHELL
  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS
#
cs_header_text='$cs_header_text'
	cs_dir=`$as_dirname -- include/csconfig.h ||
$as_expr Xinclude/csconfig.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 Xinclude/csconfig.h : 'X\(//\)[^/]' \| \
	 Xinclude/csconfig.h : 'X\(//\)$' \| \
	 Xinclude/csconfig.h : 'X\(/\)' \| . 2>/dev/null ||
echo Xinclude/csconfig.h |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	{ if test -n "\$as_mkdir_p"; then
    \$as_mkdir_p \$cs_dir
  else
    as_dir=\$cs_dir
    as_dirs=
    while test ! -d "\$as_dir"; do
      as_dirs="\$as_dir \$as_dirs"
      as_dir=\`\$as_dirname -- "\$as_dir" ||
\$as_expr X"\$as_dir" : 'X\\(.*^/\\)//*^/^/*/*\$' \\| \\
	 X"\$as_dir" : 'X\\(//\\)^/' \\| \\
	 X"\$as_dir" : 'X\\(//\\)\$' \\| \\
	 X"\$as_dir" : 'X\\(/\\)' \\| . 2>/dev/null ||
echo X"\$as_dir" |
    sed '/^X\\(.*^/\\)\\/\\/*^/^/*\\/*\$/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\/\\)^/.*/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\/\\)\$/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\).*/{
	    s//\\1/
	    q
	  }
	  s/.*/./; q'\`
    done
    test ! -n "\$as_dirs" || mkdir \$as_dirs
  fi || { { echo "\$as_me:\$LINENO: error: cannot create directory \$cs_dir" >&5
echo "\$as_me: error: cannot create directory \$cs_dir" >&2;}
   { (exit 1); exit 1; }; }; }

cs_jamconfig_text='$cs_jamconfig_text'
	cs_dir=`$as_dirname -- Jamconfig ||
$as_expr XJamconfig : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 XJamconfig : 'X\(//\)[^/]' \| \
	 XJamconfig : 'X\(//\)$' \| \
	 XJamconfig : 'X\(/\)' \| . 2>/dev/null ||
echo XJamconfig |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	{ if test -n "\$as_mkdir_p"; then
    \$as_mkdir_p \$cs_dir
  else
    as_dir=\$cs_dir
    as_dirs=
    while test ! -d "\$as_dir"; do
      as_dirs="\$as_dir \$as_dirs"
      as_dir=\`\$as_dirname -- "\$as_dir" ||
\$as_expr X"\$as_dir" : 'X\\(.*^/\\)//*^/^/*/*\$' \\| \\
	 X"\$as_dir" : 'X\\(//\\)^/' \\| \\
	 X"\$as_dir" : 'X\\(//\\)\$' \\| \\
	 X"\$as_dir" : 'X\\(/\\)' \\| . 2>/dev/null ||
echo X"\$as_dir" |
    sed '/^X\\(.*^/\\)\\/\\/*^/^/*\\/*\$/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\/\\)^/.*/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\/\\)\$/{
	    s//\\1/
	    q
	  }
	  /^X\\(\\/\\).*/{
	    s//\\1/
	    q
	  }
	  s/.*/./; q'\`
    done
    test ! -n "\$as_dirs" || mkdir \$as_dirs
  fi || { { echo "\$as_me:\$LINENO: error: cannot create directory \$cs_dir" >&5
echo "\$as_me: error: cannot create directory \$cs_dir" >&2;}
   { (exit 1); exit 1; }; }; }

MAKE=$MAKE
	EXEEXT=$EXEEXT
	CC="$CC"
	JAM_CFLAGS="$JAM_CFLAGS"
	JAM_EXE0NAME=./jam0$EXEEXT
JAM=$JAM

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "include/csconfig.h") CONFIG_COMMANDS="$CONFIG_COMMANDS include/csconfig.h" ;;
    "Jamconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS Jamconfig" ;;
    "Jamfile") CONFIG_FILES="$CONFIG_FILES Jamfile" ;;
    "jam$EXEEXT") CONFIG_COMMANDS="$CONFIG_COMMANDS jam$EXEEXT" ;;
    "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;

  *) { { echo "$as_me:$LINENO: 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

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp=
  trap 'exit_status=$?
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} ||
{
   echo "$me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

#
# Set up the sed scripts for 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

_ACEOF



ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
SHELL!$SHELL$ac_delim
PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
PACKAGE_NAME!$PACKAGE_NAME$ac_delim
PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
PACKAGE_STRING!$PACKAGE_STRING$ac_delim
PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
exec_prefix!$exec_prefix$ac_delim
prefix!$prefix$ac_delim
program_transform_name!$program_transform_name$ac_delim
bindir!$bindir$ac_delim
sbindir!$sbindir$ac_delim
libexecdir!$libexecdir$ac_delim
datarootdir!$datarootdir$ac_delim
datadir!$datadir$ac_delim
sysconfdir!$sysconfdir$ac_delim
sharedstatedir!$sharedstatedir$ac_delim
localstatedir!$localstatedir$ac_delim
includedir!$includedir$ac_delim
oldincludedir!$oldincludedir$ac_delim
docdir!$docdir$ac_delim
infodir!$infodir$ac_delim
htmldir!$htmldir$ac_delim
dvidir!$dvidir$ac_delim
pdfdir!$pdfdir$ac_delim
psdir!$psdir$ac_delim
libdir!$libdir$ac_delim
localedir!$localedir$ac_delim
mandir!$mandir$ac_delim
DEFS!$DEFS$ac_delim
ECHO_C!$ECHO_C$ac_delim
ECHO_N!$ECHO_N$ac_delim
ECHO_T!$ECHO_T$ac_delim
LIBS!$LIBS$ac_delim
build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim
build!$build$ac_delim
build_cpu!$build_cpu$ac_delim
build_vendor!$build_vendor$ac_delim
build_os!$build_os$ac_delim
host!$host$ac_delim
host_cpu!$host_cpu$ac_delim
host_vendor!$host_vendor$ac_delim
host_os!$host_os$ac_delim
CC!$CC$ac_delim
CFLAGS!$CFLAGS$ac_delim
LDFLAGS!$LDFLAGS$ac_delim
CPPFLAGS!$CPPFLAGS$ac_delim
ac_ct_CC!$ac_ct_CC$ac_delim
EXEEXT!$EXEEXT$ac_delim
OBJEXT!$OBJEXT$ac_delim
CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
LD!$LD$ac_delim
ac_ct_LD!$ac_ct_LD$ac_delim
CPP!$CPP$ac_delim
CXXCPP!$CXXCPP$ac_delim
RANLIB!$RANLIB$ac_delim
DLLTOOL!$DLLTOOL$ac_delim
ac_ct_DLLTOOL!$ac_ct_DLLTOOL$ac_delim
DLLWRAP!$DLLWRAP$ac_delim
ac_ct_DLLWRAP!$ac_ct_DLLWRAP$ac_delim
WINDRES!$WINDRES$ac_delim
ac_ct_WINDRES!$ac_ct_WINDRES$ac_delim
STRINGS!$STRINGS$ac_delim
ac_ct_STRINGS!$ac_ct_STRINGS$ac_delim
OBJCOPY!$OBJCOPY$ac_delim
ac_ct_OBJCOPY!$ac_ct_OBJCOPY$ac_delim
LIBTOOL_TEST!$LIBTOOL_TEST$ac_delim
ac_ct_LIBTOOL_TEST!$ac_ct_LIBTOOL_TEST$ac_delim
LIBTOOL_PATH!$LIBTOOL_PATH$ac_delim
LIBTOOL!$LIBTOOL$ac_delim
ac_ct_LIBTOOL!$ac_ct_LIBTOOL$ac_delim
CS_LT_APPLE!$CS_LT_APPLE$ac_delim
APPLE_LIBTOOL!$APPLE_LIBTOOL$ac_delim
MKDIR!$MKDIR$ac_delim
MKDIRS!$MKDIRS$ac_delim
INSTALL!$INSTALL$ac_delim
TEXI2DVI!$TEXI2DVI$ac_delim
TEXI2PDF!$TEXI2PDF$ac_delim
DVIPS!$DVIPS$ac_delim
DVIPDF!$DVIPDF$ac_delim
MAKEINFO!$MAKEINFO$ac_delim
DOXYGEN!$DOXYGEN$ac_delim
DOT!$DOT$ac_delim
ac_ct_DOT!$ac_ct_DOT$ac_delim
FLEX!$FLEX$ac_delim
BISON!$BISON$ac_delim
HHC!$HHC$ac_delim
ac_ct_HHC!$ac_ct_HHC$ac_delim
SWIG!$SWIG$ac_delim
JAM!$JAM$ac_delim
MAKE!$MAKE$ac_delim
CSLIBS_CONFIG!$CSLIBS_CONFIG$ac_delim
ac_ct_CSLIBS_CONFIG!$ac_ct_CSLIBS_CONFIG$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
PERL!$PERL$ac_delim
PYTHON!$PYTHON$ac_delim
JAVA!$JAVA$ac_delim
JAVAC!$JAVAC$ac_delim
ANT!$ANT$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
ac_ct_PKG_CONFIG!$ac_ct_PKG_CONFIG$ac_delim
CONFIG_X11!$CONFIG_X11$ac_delim
ac_ct_CONFIG_X11!$ac_ct_CONFIG_X11$ac_delim
CONFIG_XEXT!$CONFIG_XEXT$ac_delim
ac_ct_CONFIG_XEXT!$ac_ct_CONFIG_XEXT$ac_delim
XMKMF!$XMKMF$ac_delim
X_CFLAGS!$X_CFLAGS$ac_delim
X_PRE_LIBS!$X_PRE_LIBS$ac_delim
X_LIBS!$X_LIBS$ac_delim
X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
CONFIG_XXF86VM!$CONFIG_XXF86VM$ac_delim
ac_ct_CONFIG_XXF86VM!$ac_ct_CONFIG_XXF86VM$ac_delim
CONFIG_XAW7!$CONFIG_XAW7$ac_delim
ac_ct_CONFIG_XAW7!$ac_ct_CONFIG_XAW7$ac_delim
CONFIG_XAW!$CONFIG_XAW$ac_delim
ac_ct_CONFIG_XAW!$ac_ct_CONFIG_XAW$ac_delim
CONFIG_Z!$CONFIG_Z$ac_delim
ac_ct_CONFIG_Z!$ac_ct_CONFIG_Z$ac_delim
CONFIG_ZLIB!$CONFIG_ZLIB$ac_delim
ac_ct_CONFIG_ZLIB!$ac_ct_CONFIG_ZLIB$ac_delim
CONFIG_PNG!$CONFIG_PNG$ac_delim
ac_ct_CONFIG_PNG!$ac_ct_CONFIG_PNG$ac_delim
CONFIG_LIBPNG!$CONFIG_LIBPNG$ac_delim
ac_ct_CONFIG_LIBPNG!$ac_ct_CONFIG_LIBPNG$ac_delim
CONFIG_JPEG!$CONFIG_JPEG$ac_delim
ac_ct_CONFIG_JPEG!$ac_ct_CONFIG_JPEG$ac_delim
CONFIG_LIBJPEG!$CONFIG_LIBJPEG$ac_delim
ac_ct_CONFIG_LIBJPEG!$ac_ct_CONFIG_LIBJPEG$ac_delim
CONFIG_LCMS!$CONFIG_LCMS$ac_delim
ac_ct_CONFIG_LCMS!$ac_ct_CONFIG_LCMS$ac_delim
CONFIG_MNG!$CONFIG_MNG$ac_delim
ac_ct_CONFIG_MNG!$ac_ct_CONFIG_MNG$ac_delim
CONFIG_LIBMNG!$CONFIG_LIBMNG$ac_delim
ac_ct_CONFIG_LIBMNG!$ac_ct_CONFIG_LIBMNG$ac_delim
CONFIG_MIKMOD!$CONFIG_MIKMOD$ac_delim
ac_ct_CONFIG_MIKMOD!$ac_ct_CONFIG_MIKMOD$ac_delim
CONFIG_OGG!$CONFIG_OGG$ac_delim
ac_ct_CONFIG_OGG!$ac_ct_CONFIG_OGG$ac_delim
CONFIG_VORBIS!$CONFIG_VORBIS$ac_delim
ac_ct_CONFIG_VORBIS!$ac_ct_CONFIG_VORBIS$ac_delim
CONFIG_VORBISFILE!$CONFIG_VORBISFILE$ac_delim
ac_ct_CONFIG_VORBISFILE!$ac_ct_CONFIG_VORBISFILE$ac_delim
CONFIG_3DS!$CONFIG_3DS$ac_delim
ac_ct_CONFIG_3DS!$ac_ct_CONFIG_3DS$ac_delim
CONFIG_LIB3DS!$CONFIG_LIB3DS$ac_delim
ac_ct_CONFIG_LIB3DS!$ac_ct_CONFIG_LIB3DS$ac_delim
CONFIG_LIB3DS_120!$CONFIG_LIB3DS_120$ac_delim
ac_ct_CONFIG_LIB3DS_120!$ac_ct_CONFIG_LIB3DS_120$ac_delim
CONFIG_ODE!$CONFIG_ODE$ac_delim
ac_ct_CONFIG_ODE!$ac_ct_CONFIG_ODE$ac_delim
CONFIG_BULLET!$CONFIG_BULLET$ac_delim
ac_ct_CONFIG_BULLET!$ac_ct_CONFIG_BULLET$ac_delim
CONFIG_FREETYPE2!$CONFIG_FREETYPE2$ac_delim
ac_ct_CONFIG_FREETYPE2!$ac_ct_CONFIG_FREETYPE2$ac_delim
CONFIG_FREETYPE!$CONFIG_FREETYPE$ac_delim
ac_ct_CONFIG_FREETYPE!$ac_ct_CONFIG_FREETYPE$ac_delim
CONFIG_CAL3D!$CONFIG_CAL3D$ac_delim
ac_ct_CONFIG_CAL3D!$ac_ct_CONFIG_CAL3D$ac_delim
CONFIG_SDL!$CONFIG_SDL$ac_delim
ac_ct_CONFIG_SDL!$ac_ct_CONFIG_SDL$ac_delim
CONFIG_WX!$CONFIG_WX$ac_delim
ac_ct_CONFIG_WX!$ac_ct_CONFIG_WX$ac_delim
CONFIG_CEGUI!$CONFIG_CEGUI$ac_delim
ac_ct_CONFIG_CEGUI!$ac_ct_CONFIG_CEGUI$ac_delim
CONFIG_CEGUIBASE!$CONFIG_CEGUIBASE$ac_delim
ac_ct_CONFIG_CEGUIBASE!$ac_ct_CONFIG_CEGUIBASE$ac_delim
CONFIG_CG!$CONFIG_CG$ac_delim
ac_ct_CONFIG_CG!$ac_ct_CONFIG_CG$ac_delim
CONFIG_CGGL!$CONFIG_CGGL$ac_delim
ac_ct_CONFIG_CGGL!$ac_ct_CONFIG_CGGL$ac_delim
CONFIG_JACKASYN!$CONFIG_JACKASYN$ac_delim
ac_ct_CONFIG_JACKASYN!$ac_ct_CONFIG_JACKASYN$ac_delim
CONFIG_ASOUND!$CONFIG_ASOUND$ac_delim
ac_ct_CONFIG_ASOUND!$ac_ct_CONFIG_ASOUND$ac_delim
CONFIG_CACA!$CONFIG_CACA$ac_delim
ac_ct_CONFIG_CACA!$ac_ct_CONFIG_CACA$ac_delim
CONFIG_LIBCACA!$CONFIG_LIBCACA$ac_delim
ac_ct_CONFIG_LIBCACA!$ac_ct_CONFIG_LIBCACA$ac_delim
CONFIG_JS!$CONFIG_JS$ac_delim
ac_ct_CONFIG_JS!$ac_ct_CONFIG_JS$ac_delim
TTREE!$TTREE$ac_delim
CONFIG_CPPUNIT!$CONFIG_CPPUNIT$ac_delim
ac_ct_CONFIG_CPPUNIT!$ac_ct_CONFIG_CPPUNIT$ac_delim
CONFIG_BFD!$CONFIG_BFD$ac_delim
ac_ct_CONFIG_BFD!$ac_ct_CONFIG_BFD$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
:end
s/|#_!!_#|//g
CEOF$ac_eof
_ACEOF


# 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

cat >>$CONFIG_STATUS <<\_ACEOF
fi # test -n "$CONFIG_FILES"


for ac_tag in  :F $CONFIG_FILES      :C $CONFIG_COMMANDS
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
echo "$as_me: error: Invalid tag $ac_tag." >&2;}
   { (exit 1); exit 1; }; };;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
echo "$as_me: error: cannot find input file: $ac_f" >&2;}
   { (exit 1); exit 1; }; };;
      esac
      ac_file_inputs="$ac_file_inputs $ac_f"
    done

    # 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 by config.status.  */
    configure_input="Generated from "`IFS=:
	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    fi

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin";;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$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 -n "$as_mkdir_p"; then
    $as_mkdir_p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=

case `sed -n '/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p
' $ac_file_inputs` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
    s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF
  sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s&@configure_input@&$configure_input&;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&5
echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&2;}

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out"; rm -f "$tmp/out";;
  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
  esac
 ;;


  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
echo "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "include/csconfig.h":C) echo $ECHO_N "$cs_header_text$ECHO_C" > $tmp/tcache
	if diff include/csconfig.h $tmp/tcache >/dev/null 2>&1; then
  { echo "$as_me:$LINENO: include/csconfig.h is unchanged" >&5
echo "$as_me: include/csconfig.h is unchanged" >&6;}
else
  rm -f include/csconfig.h
	    cp $tmp/tcache include/csconfig.h
fi

	rm -f $tmp/tcache ;;
    "Jamconfig":C) echo $ECHO_N "$cs_jamconfig_text$ECHO_C" > $tmp/tcache
	if diff Jamconfig $tmp/tcache >/dev/null 2>&1; then
  { echo "$as_me:$LINENO: Jamconfig is unchanged" >&5
echo "$as_me: Jamconfig is unchanged" >&6;}
else
  rm -f Jamconfig
	    cp $tmp/tcache Jamconfig
fi

	rm -f $tmp/tcache ;;
    "jam$EXEEXT":C) rm -rf jambuild
    { if test -n "$as_mkdir_p"; then
    $as_mkdir_p jambuild
  else
    as_dir=jambuild
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory jambuild" >&5
echo "$as_me: error: cannot create directory jambuild" >&2;}
   { (exit 1); exit 1; }; }; }

    for jamsrc in $srcdir/apps/tools/jam/*; do
	if test -f $jamsrc; then
  cp $jamsrc jambuild
fi

    done
    # Yacc might not be installed, so ensure that Jam does not try to use it.
    YACC=
    export YACC
    rm -f jam$EXEEXT
    if { (echo "$as_me:$LINENO: cd jambuild &&
	    \$MAKE CC=\"\$CC\" CFLAGS=\"\$JAM_CFLAGS\" EXENAME=\$JAM_EXE0NAME 1>&2") >&5
  (cd jambuild &&
	    $MAKE CC="$CC" CFLAGS="$JAM_CFLAGS" EXENAME=$JAM_EXE0NAME 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_built_jam=`echo jambuild/bin.*/jam$EXEEXT`
	if test -f $cs_built_jam; then
  cp $cs_built_jam jam$EXEEXT
else
  { { echo "$as_me:$LINENO: error: failed to build jam; please install manually" >&5
echo "$as_me: error: failed to build jam; please install manually" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  { { echo "$as_me:$LINENO: error: failed to build jam; please install manually" >&5
echo "$as_me: error: failed to build jam; please install manually" >&2;}
   { (exit 1); exit 1; }; }
fi

    rm -rf jambuild ;;
    "Makefile":C) if { (echo "$as_me:$LINENO: \"\$JAM\" -sDUMPTARGETS_FILE=\$tmp/jcache dumptargets 1>&2") >&5
  ("$JAM" -sDUMPTARGETS_FILE=$tmp/jcache dumptargets 1>&2) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  jam_targets=all
	while read jam_line; do
	    jam_targets="$jam_targets $jam_line"
	done < $tmp/jcache
	cat << 'EOF' >Makefile
# Auto-generated; do not modify.
TO_NULL = >/dev/null 2>&1
RUN_JAM = \
  silent='-d0'; \
  loud='-dx'; \
  $(JAM) -h | grep '(x)commands' $(TO_NULL) || loud='-d+2'; \
  makeflags=`echo $$MAKEFLAGS | \
    sed 's/--[^ ][^ ]*//g;s/[^ ][^ ]*=.*//g'`; \
  jamflags=''; \
  echo "x$$makeflags" | grep k $(TO_NULL) || jamflags="-q $$jamflags"; \
  echo "x$$makeflags" | grep s $(TO_NULL) || jamflags="$$loud $$jamflags"; \
  echo "x$$makeflags" | grep s $(TO_NULL) && jamflags="$$silent $$jamflags"; \
  $(JAM) $$jamflags
EOF
	echo "JAM = $JAM" >>Makefile
	for jam_target in $jam_targets; do
	    echo ".PHONY: $jam_target" >>Makefile
	    echo "$jam_target:" >>Makefile
	    case $jam_target in
	        help) echo '	@$(JAM)'" $jam_target" >>Makefile ;;
	        *) echo '	@$(RUN_JAM)'" $jam_target" >>Makefile ;;
	    esac
	done
else
  { echo "$as_me:$LINENO: WARNING: failed to create makefile emulation layer" >&5
echo "$as_me: WARNING: failed to create makefile emulation layer" >&2;}
fi

    rm -f $tmp/jcache ;;

  esac
done # for ac_tag


{ (exit 0); exit 0; }
_ACEOF
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=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || 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




#------------------------------------------------------------------------------
# In case libbfd is used for debugging, emit a message notifying developers
# that libbfd is GPL, along with its inherent consequences.
#------------------------------------------------------------------------------
if test $cs_debug_libbfd = yes; then
  { echo "$as_me:$LINENO:
***
*** This debug build is linked against libbfd, a GPL-licensed library.
***
libbfd is used for non-critical development and debugging aids and is thus, by
default, enabled in debug, but not optimize or release builds.  Be aware of
licensing issues from linking against a GPL library: usually, for development
work this is not problematic, however, you should not ship this build or any
binary statically linked against a Crystal Space library if you are not using a
GPL-compatible license.  If you really must ship a debug build of Crystal Space
(as opposed to a release build), you can avoid licensing issues by disabling
use of libbfd with the --without-bfd configure option.
" >&5
echo "$as_me:
***
*** This debug build is linked against libbfd, a GPL-licensed library.
***
libbfd is used for non-critical development and debugging aids and is thus, by
default, enabled in debug, but not optimize or release builds.  Be aware of
licensing issues from linking against a GPL library: usually, for development
work this is not problematic, however, you should not ship this build or any
binary statically linked against a Crystal Space library if you are not using a
GPL-compatible license.  If you really must ship a debug build of Crystal Space
(as opposed to a release build), you can avoid licensing issues by disabling
use of libbfd with the --without-bfd configure option.
" >&6;}
fi

