#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for crystalspace 1.4.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, 2007, 2008 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=:
  # Pre-4.2 versions of Zsh do 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

as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
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.)
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
  $as_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.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# 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 ||
$as_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=:
  # Pre-4.2 versions of Zsh do 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=:
  # Pre-4.2 versions of Zsh do 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 bug-autoconf@gnu.org about your system,
  echo including any error possibly output before this message.
  echo This can help us improve future autoconf versions.
  echo Configuration will now proceed without shell functions.
}



  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" ||
    { $as_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 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  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
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.4.0'
PACKAGE_STRING='crystalspace 1.4.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='LTLIBOBJS
LIBOBJS
CONFIG_BFD
CONFIG_CPPUNIT
TTREE
CONFIG_LIBCACA
CONFIG_CACA
CONFIG_LIBCUCUL
CONFIG_CUCUL
CONFIG_ASOUND
CONFIG_JACKASYN
CONFIG_CGGL
CONFIG_CG
CONFIG_GTKP_2_0
CONFIG_GTK
CONFIG_CEGUIBASE
CONFIG_CEGUI
CONFIG_WX
CONFIG_SDL
CONFIG_CAL3D
CONFIG_FREETYPE
CONFIG_FREETYPE2
CONFIG_BULLETDYNAMICS
CONFIG_BULLET
CONFIG_ODE
CONFIG_LIB3DS_120
CONFIG_LIB3DS
CONFIG_3DS
CONFIG_SPEEX
CONFIG_VORBISFILE
CONFIG_VORBIS
CONFIG_OGG
CONFIG_VGVM
CONFIG_CAIROMM_1_0
CONFIG_CAIROMM_1
CONFIG_CAIROMM
CONFIG_CAIRO
CONFIG_LIBMNG
CONFIG_MNG
CONFIG_LCMS
CONFIG_LIBJPEG
CONFIG_JPEG
CONFIG_LIBPNG
CONFIG_PNG
CONFIG_ZLIB
CONFIG_Z
CONFIG_XAW
CONFIG_XAW7
CONFIG_XXF86VM
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
CONFIG_XEXT
CONFIG_X11
ac_ct_PKG_CONFIG
PKG_CONFIG
ANT
JAVAC
JAVA
ac_ct_PYTHON
PYTHON
PERL
EGREP
GREP
ac_ct_CSLIBS_CONFIG
CSLIBS_CONFIG
MAKE
JAM
ac_ct_SUBVERSION
SUBVERSION
BASH
RELAYTOOL
CONVERT
ICOTOOL
RSVG
SWIG
ac_ct_HHC
HHC
BISON
FLEX
ac_ct_DOT
DOT
DOXYGEN
MAKEINFO
DVIPDF
DVIPS
TEXI2PDF
TEXI2DVI
LN_S
INSTALL
MKDIRS
MKDIR
APPLE_LIBTOOL
CS_LT_APPLE
ac_ct_LIBTOOL
LIBTOOL
LIBTOOL_PATH
ac_ct_LIBTOOL_TEST
LIBTOOL_TEST
ac_ct_OBJCOPY
OBJCOPY
ac_ct_STRINGS
STRINGS
ac_ct_WINDRES
WINDRES
ac_ct_DLLWRAP
DLLWRAP
ac_ct_DLLTOOL
DLLTOOL
RANLIB
CXXCPP
CPP
ac_ct_LD
LD
ac_ct_CXX
CXXFLAGS
CXX
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
CS_TOP_BUILDDIR
CS_TOP_SRCDIR
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL
CRYSTAL_TOOLS_PREFIX'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_mno_cygwin
enable_as_needed
enable_gc_sections
enable_relaytool
enable_static_baselibs
enable_universal_binary
with_perl
with_python
with_java
enable_cpu_specific_optimizations
enable_optimize
enable_debug
enable_profile
enable_mode
enable_separate_debug_info
enable_optimize_mode_debug_info
with_x11
with_xext
with_x
with_xxf86vm
with_xaw7
with_mesa
with_z
with_png
with_jpeg
with_lcms
with_mng
with_cairo
with_cairomm
with_vgvm
with_ogg
with_vorbis
with_vorbisfile
with_speex
with_3ds
with_ode
with_bullet
with_freetype2
with_cal3d
with_sdl
with_wx
with_CEGUI
with_GTK
with_Cg
with_CgGL
with_jackasyn
with_asound
with_cucul
with_caca
with_cppunit
enable_meta_info_embedding
with_bfd
enable_ptmalloc
enable_extensive_memory_debugger
enable_checking_allocations
enable_memory_tracker
enable_ref_tracker
enable_leak_guard
enable_shared
enable_make_emulation
'
      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
ac_unrecognized_opts=
ac_unrecognized_sep=
# 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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
   { (exit 1); exit 1; }; }
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
   { (exit 1); exit 1; }; }
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
   { (exit 1); exit 1; }; }
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
   { (exit 1); exit 1; }; }
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=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 ;;

  -*) { $as_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 &&
      { $as_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.
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      $as_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'`
  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
   { (exit 1); exit 1; }; }
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
   { (exit 1); exit 1; }; } ;;
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
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
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  { $as_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
    $as_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 .` ||
  { $as_echo "$as_me: error: working directory cannot be determined" >&2
   { (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  { $as_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 -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
    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 .."
  { $as_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" || { $as_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.4.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.4.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --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 YES)
  --enable-gc-sections    Utilize --gc-sections linker flag for some targets
                          (default YES)
  --enable-relaytool      enable use of relaytool for some libraries (default
                          YES)
  --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-universal-binary
                          build Mac OS X universal binaries (default YES on
                          Mac OS X with universal SDK installed, else NO)
  --enable-cpu-specific-optimizations=level
                          enable CPU-specific optimizations; recognized levels
                          are `no', `minimum' or `min', `maximum' or `max',
                          `native' (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). The `native' option select optimizations
                          specific for the compiling machine (thus giving a
                          fairly unportable executable).
  --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-separate-debug-info
                          split debug information into separate files.
                          (default YES if binutils >= 2.17 and build mode not
                          'profile', 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-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-checking-allocations
                          make allocations by default `checking' if the
                          extensive memory debugger is enabled (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 (default YES on
                          Win32 and Linux, NO otherwise)
  --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 (default YES)
  --with-x11=dir          specify additional location to search libx11 if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-xext=dir         specify additional location to search libxext if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-x                use the X Window System
  --with-xxf86vm=dir      specify additional location to search libxxf86vm if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-xaw7=dir         specify additional location to search libxaw7 if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-mesa             use Mesa OpenGL library if available (default YES)
  --with-z=dir            specify additional location to search libz if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-png=dir          specify additional location to search libpng if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-jpeg=dir         specify additional location to search libjpeg if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-lcms=dir         specify additional location to search liblcms if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-mng=dir          specify additional location to search libmng if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-cairo=dir        specify additional location to search libcairo if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-cairomm=dir      specify additional location to search libcairomm if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-vgvm=dir         specify additional location to search libvgvm if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-ogg=dir          specify additional location to search libogg if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-vorbis=dir       specify additional location to search libvorbis if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-vorbisfile=dir   specify additional location to search libvorbisfile
                          if not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-speex=dir        specify additional location to search libspeex if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-3ds=dir          specify additional location to search lib3ds if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-ode=dir          specify additional location to search libode if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-bullet=dir       specify additional location to search libbullet if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-freetype2=dir    specify additional location to search libfreetype2
                          if not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-cal3d=dir        specify additional location to search libcal3d if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-sdl=dir          specify additional location to search libsdl if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-wx=dir           specify additional location to search libwx if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-CEGUI=dir        specify additional location to search libCEGUI if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-GTK=dir          specify additional location to search libGTK if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-Cg=dir           specify additional location to search libCg if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-CgGL=dir         specify additional location to search libCgGL if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-jackasyn=dir     specify additional location to search libjackasyn if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-asound=dir       specify additional location to search libasound if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-cucul=dir        specify additional location to search libcucul if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-caca=dir         specify additional location to search libcaca if not
                          detected automatically; directories searched include
                          dir/include, dir/lib, and dir
  --with-cppunit=dir      specify additional location to search libcppunit if
                          not detected automatically; directories searched
                          include dir/include, dir/lib, and dir
  --with-bfd=dir          specify additional location to search libbfd if not
                          detected automatically; directories searched include
                          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" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_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
      $as_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.4.0
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 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.4.0, which was
generated by GNU Autoconf 2.63.  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=.
  $as_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=`$as_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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      $as_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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	$as_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 &&
      $as_echo "$as_me: caught signal $ac_signal"
    $as_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 an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
  ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
  ac_site_file1=$prefix/share/config.site
  ac_site_file2=$prefix/etc/config.site
else
  ac_site_file1=$ac_default_prefix/share/config.site
  ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
  test "x$ac_site_file" = xNONE && continue
  if test -r "$ac_site_file"; then
    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
$as_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
    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
$as_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,)
      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
$as_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
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`$as_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
  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
$as_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-2008 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
  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in mk/autoconf \"$srcdir\"/mk/autoconf" >&5
$as_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 ||
  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
   { (exit 1); exit 1; }; }

{ $as_echo "$as_me:$LINENO: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if test "${ac_cv_build+set}" = set; then
  $as_echo_n "(cached) " >&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 &&
  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
$as_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` ||
  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
$as_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


{ $as_echo "$as_me:$LINENO: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
if test "${ac_cv_host+set}" = set; then
  $as_echo_n "(cached) " >&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` ||
    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi

fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
$as_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


CS_TOP_SRCDIR=$(
    cs_indir=`echo "x$srcdir" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
    ac_dir="$cs_indir"
    pwd -W >/dev/null 2>&1 && ac_pwd_w="pwd -W" || ac_pwd_w=pwd
    until ac_val=`exec 2>/dev/null; cd "$ac_dir" && $ac_pwd_w`
    do
       ac_dir=`$as_dirname -- "$ac_dir" ||
$as_expr X"$ac_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_dir" : 'X\(//\)[^/]' \| \
	 X"$ac_dir" : 'X\(//\)$' \| \
	 X"$ac_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    done
    ac_dir=`echo "$ac_dir" | sed 's?^[./]*??'`
    ac_val=`echo "$ac_val" | sed 's?/*$??'`
    cs_outdir=`echo "$cs_indir" | sed "s?^[./]*$ac_dir/*?$ac_val/?"';s?/*$??'`
    echo $cs_outdir
    )

    CS_TOP_BUILDDIR=.





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

    { $as_echo "$as_me:$LINENO: checking whether to enable -mno-cygwin" >&5
$as_echo_n "checking whether to enable -mno-cygwin... " >&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

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



    # Magic to suppress automatic addition of undesirable flags by Autoconf.
    CFLAGS="$CFLAGS"

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
$as_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.
$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_compiler -V >&5") 2>&5
  ac_status=$?
  $as_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.out.dSYM 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.
{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_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 | *.dSYM | *.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

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

{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
$as_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.
{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_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
	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_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
$as_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
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }

rm -f -r a.out a.out.dSYM 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.
{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }

{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_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 | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
$as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  $as_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 | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
$as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
$as_echo "$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
{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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)
    { $as_echo "$as_me:$LINENO: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$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

	if test "$ac_compiler_gnu" = yes; then
  cs_compiler_name_c=GCC
else
  cs_compiler_name_c=`$as_echo "$CC" | $as_tr_cpp`
fi

    cs_build_prop_val="$cs_compiler_name_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}COMPILER.C.TYPE ?= $cs_build_prop_val ;
"
fi

    cs_build_prop_val="$cs_compiler_name_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}COMPILER.TYPE = $cs_build_prop_val ;
"
fi


	# Check if compiler recognizes -pipe directive.
	{ $as_echo "$as_me:$LINENO: checking if $CC accepts -pipe" >&5
$as_echo_n "checking if $CC accepts -pipe... " >&6; }
if test "${cs_cv_prog_cc_pipe_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-pipe@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cc_pipe=''
            cs_cv_prog_cc_pipe_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cc_pipe_ok" >&5
$as_echo "$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


        # Check if compiler recognizes Sparc v9 CPU. Ugly to pollute
        # project-agnostic C compiler check, but it is needed by assembly code
        # implementing Sparc atomic threading operations, and it should not
        # hurt if the option is not recognized.
	case $host_cpu in
	    sparc*)
		{ $as_echo "$as_me:$LINENO: checking if $CC handles Sparc v9" >&5
$as_echo_n "checking if $CC handles Sparc v9... " >&6; }
if test "${cs_cv_prog_cc_sparc_v9_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-mcpu=v9@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 @-mcpu=v9@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_sparc_v9=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_cc_sparc_v9_ok="$cs_cv_prog_cc_sparc_v9"
else
  cs_cv_prog_cc_sparc_v9=''
		cs_cv_prog_cc_sparc_v9_ok=no
fi

else
  cs_cv_prog_cc_sparc_v9=''
            cs_cv_prog_cc_sparc_v9_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cc_sparc_v9_ok" >&5
$as_echo "$cs_cv_prog_cc_sparc_v9_ok" >&6; }
    if test "$cs_cv_prog_cc_sparc_v9_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cc_sparc_v9"
    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

		;;
	esac

fi



    # Magic to suppress automatic addition of undesirable flags by Autoconf.
    CXXFLAGS="$CXXFLAGS"

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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

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

{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if test "${ac_cv_prog_cxx_g+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$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

	if test "$ac_compiler_gnu" = yes; then
  cs_compiler_name_cxx=GCC
else
  cs_compiler_name_cxx=`$as_echo "$CXX" | $as_tr_cpp`
fi

    cs_build_prop_val="$cs_compiler_name_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}COMPILER.C++.TYPE ?= $cs_build_prop_val ;
"
fi

    cs_build_prop_val="$cs_compiler_name_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}COMPILER.TYPE = $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.
	{ $as_echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
$as_echo_n "checking how to treat C++ warnings as errors... " >&6; }
if test "${cs_cv_prog_cxx_pic_werror_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Werror@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_pic_werror=''
            cs_cv_prog_cxx_pic_werror_ok=no
fi

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

    { $as_echo "$as_me:$LINENO: checking how to enable C++ PIC generation" >&5
$as_echo_n "checking how to enable C++ PIC generation... " >&6; }
if test "${cs_cv_prog_cxx_pic_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fPIC@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_build_ok=no
else
  cs_build_ok=yes
fi

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


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_pic=''
            cs_cv_prog_cxx_pic_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_pic_ok" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LD" >&5
$as_echo "$LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
$as_echo "$ac_ct_LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    LD=$ac_ct_LD
  fi
fi

    if test -n "$LD"; then
  # Apple linker is not GNU-compatible. Further, on Leopard, -v emits
        # to stderr rather than stdout. Handle these anomalies.
        if echo `ld -v 2>&1` | grep GNU 2>&1 > /dev/null; then
  # binutils versions come in the flavors X.Y as well as X.Y.Z
	    { $as_echo "$as_me:$LINENO: checking if binutils version >= 2.17" >&5
$as_echo_n "checking if binutils version >= 2.17... " >&6; }
if test "${cs_cv_prog_binutils_version_2_17_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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]*\.[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]*\.[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]*\.[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=.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]*\.[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.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.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.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]*\.[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]*\.[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]*\.[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=.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]*/!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.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.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.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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_is_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_min_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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 ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_6" ">=" "$cs_prog_binutils_min_ver_6" >/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_6" ">=" "$cs_prog_binutils_is_ver_6" >/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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_17_ok_annotated" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if binutils version >= 2.16.91" >&5
$as_echo_n "checking if binutils version >= 2.16.91... " >&6; }
if test "${cs_cv_prog_binutils_version_2_16_91_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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]*\.[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]*\.[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]*\.[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=.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]*\.[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.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.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]*\.[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]*\.[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]*\.[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=.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]*/!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.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.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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_is_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_min_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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 ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_6" ">=" "$cs_prog_binutils_min_ver_6" >/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_6" ">=" "$cs_prog_binutils_is_ver_6" >/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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&5
$as_echo "$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

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



    if test "$cs_prog_path_prepared" != yes; then
  cs_prog_path_prepared=yes
	PATH="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LD" >&5
$as_echo "$LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
$as_echo "$ac_ct_LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    LD=$ac_ct_LD
  fi
fi

    cs_build_prop_val="$LD"
    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.LD ?= $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 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.
    { $as_echo "$as_me:$LINENO: checking if -shared is accepted" >&5
$as_echo_n "checking if -shared is accepted... " >&6; }
if test "${cs_cv_prog_link_shared_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-shared $cs_cv_prog_cxx_pic@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_build_ok=no
else
  cs_build_ok=yes
fi

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


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_shared=''
            cs_cv_prog_link_shared_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_shared_ok" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if -soname is accepted" >&5
$as_echo_n "checking if -soname is accepted... " >&6; }
if test "${cs_cv_prog_link_soname+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_soname" >&5
$as_echo "$cs_cv_prog_link_soname" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if -soname is accepted" >&5
$as_echo_n "checking if -soname is accepted... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_soname" >&5
$as_echo "$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 conf$$.resp
    echo "" > conf$$.resp
    { $as_echo "$as_me:$LINENO: checking if response files are accepted" >&5
$as_echo_n "checking if response files are accepted... " >&6; }
if test "${cs_cv_prog_link_respfile+set}" = set; then
  $as_echo_n "(cached) " >&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_lflags_save="$LDFLAGS"
	LDFLAGS="-Wl,@conf$$.resp $cs_lflags_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_cv_prog_link_respfile=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	cs_cv_prog_link_respfile=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
	LDFLAGS=$cs_lflags_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

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_respfile" >&5
$as_echo "$cs_cv_prog_link_respfile" >&6; }
    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

fi

    rm -f conf$$.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=yes
fi

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

	if test "$cs_cv_binutils_2_17" = "yes"; then
  { $as_echo "$as_me:$LINENO: checking if --as-needed is supported" >&5
$as_echo_n "checking if --as-needed is supported... " >&6; }
if test "${cs_cv_prog_link_as_needed_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wl,--as-needed@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_as_needed=''
            cs_cv_prog_link_as_needed_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_as_needed_ok" >&5
$as_echo "$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

	    { $as_echo "$as_me:$LINENO: checking if --no-as-needed is supported" >&5
$as_echo_n "checking if --no-as-needed is supported... " >&6; }
if test "${cs_cv_prog_link_no_as_needed_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wl,--no-as-needed@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_no_as_needed=''
            cs_cv_prog_link_no_as_needed_ok=no
fi

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

fi

fi


    # Check if linker supports --gc-sections.
    # Check whether --enable-gc-sections was given.
if test "${enable_gc_sections+set}" = set; then
  enableval=$enable_gc_sections;
fi

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

    if test "$enable_gc_sections" != "no"; then
  { $as_echo "$as_me:$LINENO: checking if --gc-sections is supported" >&5
$as_echo_n "checking if --gc-sections is supported... " >&6; }
if test "${cs_cv_prog_link_gc_sections_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wl,--gc-sections@@ | sed 'y% %#%'`"; 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 @-Wl,--gc-sections@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_gc_sections=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_link_gc_sections_ok="$cs_cv_prog_link_gc_sections"
else
  cs_cv_prog_link_gc_sections=''
		cs_cv_prog_link_gc_sections_ok=no
fi

else
  cs_cv_prog_link_gc_sections=''
            cs_cv_prog_link_gc_sections_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_gc_sections_ok" >&5
$as_echo "$cs_cv_prog_link_gc_sections_ok" >&6; }
    if test "$cs_cv_prog_link_gc_sections_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_link_gc_sections"
    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.GC_SECTIONS ?= $cs_build_prop_val ;
"
fi

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
{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&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
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
$as_echo "$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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
$as_echo "$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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
$as_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_header_text="${cs_header_text}#define CS_COMPILER_GCC
"
fi

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



#------------------------------------------------------------------------------
# Check for common tools.
#------------------------------------------------------------------------------
# The default RANLIB in Jambase is wrong on some platforms, and is also
    # unsuitable during cross-compilation, so value is set unconditionally.
    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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
$as_echo "$RANLIB" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
$as_echo "$ac_ct_RANLIB" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DLLTOOL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
$as_echo "$DLLTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
$as_echo "$ac_ct_DLLTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DLLWRAP+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
$as_echo "$DLLWRAP" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
$as_echo "$ac_ct_DLLWRAP" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_WINDRES+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
$as_echo "$WINDRES" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
$as_echo "$ac_ct_WINDRES" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRINGS+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $STRINGS" >&5
$as_echo "$STRINGS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRINGS+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRINGS" >&5
$as_echo "$ac_ct_STRINGS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OBJCOPY+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
$as_echo "$OBJCOPY" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
$as_echo "$ac_ct_OBJCOPY" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LIBTOOL_TEST+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LIBTOOL_TEST" >&5
$as_echo "$LIBTOOL_TEST" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_LIBTOOL_TEST+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIBTOOL_TEST" >&5
$as_echo "$ac_ct_LIBTOOL_TEST" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_LIBTOOL_PATH+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LIBTOOL_PATH" >&5
$as_echo "$LIBTOOL_PATH" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


	if test -n "$LIBTOOL_PATH"; then
  { $as_echo "$as_me:$LINENO: checking classification of $LIBTOOL_PATH" >&5
$as_echo_n "checking classification of $LIBTOOL_PATH... " >&6; }
	if { ($as_echo "$as_me:$LINENO: \$LIBTOOL_PATH --version 1>&2") >&5
  ($LIBTOOL_PATH --version 1>&2) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  { $as_echo "$as_me:$LINENO: result: gnu" >&5
$as_echo "gnu" >&6; }
	    LIBTOOL="$LIBTOOL_PATH"
else
  { $as_echo "$as_me:$LINENO: result: apple" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LIBTOOL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LIBTOOL" >&5
$as_echo "$LIBTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIBTOOL" >&5
$as_echo "$ac_ct_LIBTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CS_LT_APPLE+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CS_LT_APPLE" >&5
$as_echo "$CS_LT_APPLE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


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

else
  { $as_echo "$as_me:$LINENO: result: apple" >&5
$as_echo "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

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


    { $as_echo "$as_me:$LINENO: checking how to create a directory tree" >&5
$as_echo_n "checking how to create a directory tree... " >&6; }
if test "${cs_cv_shell_mkdir_p+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_shell_mkdir_p" >&5
$as_echo "$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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $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" &&
      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { $as_echo "$as_me:$LINENO: error: do not know how to create a directory tree" >&5
$as_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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_INSTALL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
$as_echo "$INSTALL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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

    { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
$as_echo "no, using $LN_S" >&6; }
fi

    cs_build_prop_val="$LN_S"
    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}LN_S ?= $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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_TEXI2DVI+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $TEXI2DVI" >&5
$as_echo "$TEXI2DVI" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_TEXI2PDF+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $TEXI2PDF" >&5
$as_echo "$TEXI2PDF" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DVIPS+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DVIPS" >&5
$as_echo "$DVIPS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DVIPDF+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DVIPDF" >&5
$as_echo "$DVIPDF" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_MAKEINFO+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $MAKEINFO" >&5
$as_echo "$MAKEINFO" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DOXYGEN+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DOXYGEN" >&5
$as_echo "$DOXYGEN" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DOT+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $DOT" >&5
$as_echo "$DOT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_DOT+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_DOT" >&5
$as_echo "$ac_ct_DOT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_FLEX+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $FLEX" >&5
$as_echo "$FLEX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_BISON+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $BISON" >&5
$as_echo "$BISON" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BISON" && break
done

if test -n "$BISON"; then
  { $as_echo "$as_me:$LINENO: checking if bison version >= 1.35" >&5
$as_echo_n "checking if bison version >= 1.35... " >&6; }
if test "${cs_cv_prog_bison_version_1_35_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_bison_version_1_35_ok_annotated" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_HHC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $HHC" >&5
$as_echo "$HHC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_HHC+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_HHC" >&5
$as_echo "$ac_ct_HHC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_SWIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $SWIG" >&5
$as_echo "$SWIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$SWIG" && break
done

if test -n "$SWIG"; then
  { $as_echo "$as_me:$LINENO: checking if swig version >= 1.3.21" >&5
$as_echo_n "checking if swig version >= 1.3.21... " >&6; }
if test "${cs_cv_prog_swig_version_1_3_21_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_swig_version_1_3_21_ok_annotated" >&5
$as_echo "$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

        cs_build_prop_val="$cs_prog_swig_version"
    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.VERSION ?= $cs_build_prop_val ;
"
fi

fi

fi


# rsvg: for svg to png conversion

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

    for ac_prog in rsvg
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RSVG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$RSVG"; then
  ac_cv_prog_RSVG="$RSVG" # 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_RSVG="$ac_prog"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
RSVG=$ac_cv_prog_RSVG
if test -n "$RSVG"; then
  { $as_echo "$as_me:$LINENO: result: $RSVG" >&5
$as_echo "$RSVG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$RSVG" && break
done

    cs_build_prop_val="$RSVG"
    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.RSVG ?= $cs_build_prop_val ;
"
fi


    # icotool: for creating Win32 ICO files

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

    for ac_prog in icotool
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ICOTOOL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$ICOTOOL"; then
  ac_cv_prog_ICOTOOL="$ICOTOOL" # 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_ICOTOOL="$ac_prog"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ICOTOOL=$ac_cv_prog_ICOTOOL
if test -n "$ICOTOOL"; then
  { $as_echo "$as_me:$LINENO: result: $ICOTOOL" >&5
$as_echo "$ICOTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ICOTOOL" && break
done

    cs_build_prop_val="$ICOTOOL"
    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.ICOTOOL ?= $cs_build_prop_val ;
"
fi


    # convert: for various image manipulations from both the svg conversion and
    #  ICO creation.

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

    for ac_prog in convert
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CONVERT+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$CONVERT"; then
  ac_cv_prog_CONVERT="$CONVERT" # 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_CONVERT="$ac_prog"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
CONVERT=$ac_cv_prog_CONVERT
if test -n "$CONVERT"; then
  { $as_echo "$as_me:$LINENO: result: $CONVERT" >&5
$as_echo "$CONVERT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CONVERT" && break
done

    cs_build_prop_val="$CONVERT"
    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.CONVERT ?= $cs_build_prop_val ;
"
fi


# Note that CS comes with a copy of relaytool that, compared to the
# current (as of 2007-09-18) version from apbuild-2.0.5, has some
# additions and small fixes applied. Thus, prefer the version that
# ships with CS.
# Check whether --enable-relaytool was given.
if test "${enable_relaytool+set}" = set; then
  enableval=$enable_relaytool;
fi

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

    if test "$enable_relaytool" != "no"; 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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}relaytool", so it can be a program name with args.
set dummy ${ac_tool_prefix}relaytool; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_RELAYTOOL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $RELAYTOOL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_RELAYTOOL="$RELAYTOOL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     ${srcdir}/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin$PATH_SEPARATOR${srcdir}/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_RELAYTOOL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
RELAYTOOL=$ac_cv_path_RELAYTOOL
if test -n "$RELAYTOOL"; then
  { $as_echo "$as_me:$LINENO: result: $RELAYTOOL" >&5
$as_echo "$RELAYTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_RELAYTOOL"; then
  ac_pt_RELAYTOOL=$RELAYTOOL
  # Extract the first word of "relaytool", so it can be a program name with args.
set dummy relaytool; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_RELAYTOOL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_RELAYTOOL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_RELAYTOOL="$ac_pt_RELAYTOOL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in     ${srcdir}/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/sw/bin$PATH_SEPARATOR${srcdir}/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_ac_pt_RELAYTOOL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_RELAYTOOL=$ac_cv_path_ac_pt_RELAYTOOL
if test -n "$ac_pt_RELAYTOOL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_RELAYTOOL" >&5
$as_echo "$ac_pt_RELAYTOOL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_RELAYTOOL" = x; then
    RELAYTOOL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    RELAYTOOL=$ac_pt_RELAYTOOL
  fi
else
  RELAYTOOL="$ac_cv_path_RELAYTOOL"
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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    for ac_prog in bash
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_BASH+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$BASH"; then
  ac_cv_prog_BASH="$BASH" # 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_BASH="$ac_prog"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
BASH=$ac_cv_prog_BASH
if test -n "$BASH"; then
  { $as_echo "$as_me:$LINENO: result: $BASH" >&5
$as_echo "$BASH" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BASH" && break
done

	if test -n "$BASH"; then
  cs_build_prop_val="$BASH $RELAYTOOL"
    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.RELAYTOOL ?= \"$cs_build_prop_val\" ;
"
fi

fi

fi


#------------------------------------------------------------------------------
# Check for subversion and, if available, whether the source directory is an
# SVN checkout.
#------------------------------------------------------------------------------

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

    if test -n "$ac_tool_prefix"; then
  for ac_prog in svn
  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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_SUBVERSION+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$SUBVERSION"; then
  ac_cv_prog_SUBVERSION="$SUBVERSION" # 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_SUBVERSION="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
SUBVERSION=$ac_cv_prog_SUBVERSION
if test -n "$SUBVERSION"; then
  { $as_echo "$as_me:$LINENO: result: $SUBVERSION" >&5
$as_echo "$SUBVERSION" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$SUBVERSION" && break
  done
fi
if test -z "$SUBVERSION"; then
  ac_ct_SUBVERSION=$SUBVERSION
  for ac_prog in svn
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_SUBVERSION+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_SUBVERSION"; then
  ac_cv_prog_ac_ct_SUBVERSION="$ac_ct_SUBVERSION" # 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_SUBVERSION="$ac_prog"
    $as_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_SUBVERSION=$ac_cv_prog_ac_ct_SUBVERSION
if test -n "$ac_ct_SUBVERSION"; then
  { $as_echo "$as_me:$LINENO: result: $ac_ct_SUBVERSION" >&5
$as_echo "$ac_ct_SUBVERSION" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_SUBVERSION" && break
done

  if test "x$ac_ct_SUBVERSION" = x; then
    SUBVERSION=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    SUBVERSION=$ac_ct_SUBVERSION
  fi
fi

if test -n "$SUBVERSION"; then
  { $as_echo "$as_me:$LINENO: checking whether ${srcdir} is an SVN checkout" >&5
$as_echo_n "checking whether ${srcdir} is an SVN checkout... " >&6; }
if test "${cs_cv_source_is_svn+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if { ac_try='$SUBVERSION info ${srcdir} > /dev/null'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_cv_source_is_svn=yes
else
  cs_cv_source_is_svn=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_source_is_svn" >&5
$as_echo "$cs_cv_source_is_svn" >&6; }
else
  cs_cv_source_is_svn=no
fi

cs_build_prop_val="$cs_cv_source_is_svn"
    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}SOURCE_IS_SVN ?= $cs_build_prop_val ;
"
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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_JAM+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $JAM" >&5
$as_echo "$JAM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$JAM" && break
done

if test -n "$JAM"; then
  { $as_echo "$as_me:$LINENO: checking if jam version >= 2.4" >&5
$as_echo_n "checking if jam version >= 2.4... " >&6; }
if test "${cs_cv_prog_jam_version_2_4_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_jam_version_2_4_ok_annotated" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_MAKE+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $MAKE" >&5
$as_echo "$MAKE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CSLIBS_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $CSLIBS_CONFIG" >&5
$as_echo "$CSLIBS_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CSLIBS_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_CSLIBS_CONFIG" >&5
$as_echo "$ac_ct_CSLIBS_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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

        { $as_echo "$as_me:$LINENO: checking for cslibs package" >&5
$as_echo_n "checking for cslibs package... " >&6; }
if test "${cs_cv_cslibs+set}" = set; then
  $as_echo_n "(cached) " >&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=`{ ($as_echo "$as_me:$LINENO: \$CSLIBS_CONFIG --cflags \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --cflags $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	       cs_cv_cslibs_lflags=`{ ($as_echo "$as_me:$LINENO: \$CSLIBS_CONFIG --lflags \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --lflags $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	       cs_cv_cslibs_binpath=`{ ($as_echo "$as_me:$LINENO: \$CSLIBS_CONFIG --binpath \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --binpath $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
               if $CSLIBS_CONFIG --incpath >/dev/null 2>&1; then
  cs_cv_cslibs_incpath=`{ ($as_echo "$as_me:$LINENO: \$CSLIBS_CONFIG --incpath \$cs_cv_cslibs_compiler") >&5
  ($CSLIBS_CONFIG --incpath $cs_cv_cslibs_compiler) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
else
  cs_cv_cslibs_incpath=''
fi

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

else
  cs_cv_cslibs=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_cslibs" >&5
$as_echo "$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 (libc, 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


{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -z "$GREP"; then
  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
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_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
  if test -z "$ac_cv_path_GREP"; then
    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
  fi
else
  ac_cv_path_GREP=$GREP
fi

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


{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  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
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_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
  if test -z "$ac_cv_path_EGREP"; then
    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
$as_echo "$as_me: error: no acceptable egrep 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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

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


fi
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done



for ac_header in cmath
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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



{ $as_echo "$as_me:$LINENO: checking for fopen in -lc" >&5
$as_echo_n "checking for fopen in -lc... " >&6; }
if test "${ac_cv_lib_c_fopen+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc  $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 fopen ();
int
main ()
{
return fopen ();
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_c_fopen=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_c_fopen=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_fopen" >&5
$as_echo "$ac_cv_lib_c_fopen" >&6; }
if test "x$ac_cv_lib_c_fopen" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBC 1
_ACEOF

  LIBS="-lc $LIBS"

fi

    if test $ac_cv_lib_c_fopen = yes; then
  cs_build_prop_val="-lc"
    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


    { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5
$as_echo_n "checking for pow in -lm... " >&6; }
if test "${ac_cv_lib_m_pow+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_m_pow=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_m_pow=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
$as_echo "$ac_cv_lib_m_pow" >&6; }
if test "x$ac_cv_lib_m_pow" = x""yes; then
  cs_cv_libm_libs=-lm
else
  cs_cv_libm_libs=
fi

    { $as_echo "$as_me:$LINENO: checking for cosf in -lm" >&5
$as_echo_n "checking for cosf in -lm... " >&6; }
if test "${ac_cv_lib_m_cosf+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_m_cosf=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_m_cosf=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cosf" >&5
$as_echo "$ac_cv_lib_m_cosf" >&6; }
if test "x$ac_cv_lib_m_cosf" = x""yes; then
  cs_cv_libm_libs=-lm
fi

    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



{ $as_echo "$as_me:$LINENO: checking for cosf in -lmx" >&5
$as_echo_n "checking for cosf in -lmx... " >&6; }
if test "${ac_cv_lib_mx_cosf+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_mx_cosf=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_mx_cosf=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mx_cosf" >&5
$as_echo "$ac_cv_lib_mx_cosf" >&6; }
if test "x$ac_cv_lib_mx_cosf" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMX 1
_ACEOF

  LIBS="-lmx $LIBS"

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


    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_dl_dlopen=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dl_dlopen=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
  cs_cv_libdl_libs=-ldl
else
  cs_cv_libdl_libs=
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



{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nsl_gethostbyname=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF

  LIBS="-lnsl $LIBS"

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


    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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_dl_dlopen = yes; then
  { $as_echo "$as_me:$LINENO: checking for dladdr in -ldl" >&5
$as_echo_n "checking for dladdr in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dladdr+set}" = set; then
  $as_echo_n "(cached) " >&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 dladdr ();
int
main ()
{
return dladdr ();
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_dl_dladdr=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dl_dladdr=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dladdr" >&5
$as_echo "$ac_cv_lib_dl_dladdr" >&6; }
if test "x$ac_cv_lib_dl_dladdr" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_DLADDR
"
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
  { $as_echo "$as_me:$LINENO: checking for pthread" >&5
$as_echo_n "checking for pthread... " >&6; }
if test "${cs_cv_sys_pthread+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_pthread" >&5
$as_echo "$cs_cv_sys_pthread" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for pthread" >&5
$as_echo_n "checking for pthread... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sys_pthread" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for pthread recursive mutexes" >&5
$as_echo_n "checking for pthread recursive mutexes... " >&6; }
if test "${cs_cv_sys_pthread_mutex_recursive+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_pthread_mutex_recursive" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for pthread_atfork support" >&5
$as_echo_n "checking for pthread_atfork support... " >&6; }
if test "${cs_cv_sys_pthread_atfork+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_pthread_atfork" >&5
$as_echo "$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
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to link base g++ libraries statically" >&5
$as_echo_n "checking whether to link base g++ libraries statically... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_static_baselibs" >&5
$as_echo "$enable_static_baselibs" >&6; }
if test $enable_static_baselibs = yes; then
  { $as_echo "$as_me:$LINENO: checking for -static-libgcc" >&5
$as_echo_n "checking for -static-libgcc... " >&6; }
if test "${cs_cv_prog_link_static_libgcc_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-static-libgcc@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_static_libgcc=''
            cs_cv_prog_link_static_libgcc_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_static_libgcc_ok" >&5
$as_echo "$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`
    { $as_echo "$as_me:$LINENO: checking for static libstdc++" >&5
$as_echo_n "checking for static libstdc++... " >&6; }
if test "${cs_cv_prog_link_static_libstdcxx_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @$libstdcxx@@ | sed 'y% %#%'`"; 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 @$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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_static_libstdcxx=''
            cs_cv_prog_link_static_libstdcxx_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_static_libstdcxx_ok" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for RTLD_NOW" >&5
$as_echo_n "checking for RTLD_NOW... " >&6; }
if test "${cs_cv_sys_rtld_now+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_rtld_now" >&5
$as_echo "$cs_cv_sys_rtld_now" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for RTLD_NOW" >&5
$as_echo_n "checking for RTLD_NOW... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sys_rtld_now" >&5
$as_echo "$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 platforms: Unix, Windows, Mac OS X.
# Recognized families: Unix, Windows.
#------------------------------------------------------------------------------


    case $host_cpu in
        [Ii][3-9]86*|[Xx]86*) cs_host_cpu=x86 ;;
        powerpc*) cs_host_cpu=powerpc ;;
        sparc*) cs_host_cpu=sparc ;;
        mips*) cs_host_cpu=mips ;;
        alpha*) cs_host_cpu=alpha ;;
        *) cs_host_cpu=$host_cpu ;;
    esac
    cs_host_cpu_normalized="`$as_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_host_os_normalized=''
    case $host_os in
        mingw*|cygwin*)
            cs_host_target=win32gcc
            cs_host_family=windows
            ;;
        darwin*)




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

    { $as_echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
$as_echo_n "checking for Carbon/Carbon.h... " >&6; }
if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
$as_echo "$ac_cv_header_Carbon_Carbon_h" >&6; }
if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then
  cs_host_macosx=yes
else
  cs_host_macosx=no
fi



    if test $cs_host_macosx = yes; then
  { $as_echo "$as_me:$LINENO: checking for --with-x" >&5
$as_echo_n "checking for --with-x... " >&6; }
	if test "${with_x+set}" = set && test "$with_x" = "yes"; then
  { $as_echo "$as_me:$LINENO: result: yes (assume Darwin)" >&5
$as_echo "yes (assume Darwin)" >&6; }
	    cs_host_macosx=no
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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


	{ $as_echo "$as_me:$LINENO: checking for Objective-C compiler" >&5
$as_echo_n "checking for Objective-C compiler... " >&6; }
if test "${cs_cv_prog_objc+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_objc="$CC"
fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_objc" >&5
$as_echo "$cs_cv_prog_objc" >&6; }
	cs_build_prop_val="$cs_cv_prog_objc"
    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.OBJC ?= $cs_build_prop_val ;
"
fi

	{ $as_echo "$as_me:$LINENO: checking for Objective-C++ compiler" >&5
$as_echo_n "checking for Objective-C++ compiler... " >&6; }
if test "${cs_cv_prog_objcxx+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_objcxx="$CXX"
fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_objcxx" >&5
$as_echo "$cs_cv_prog_objcxx" >&6; }
	cs_build_prop_val="$cs_cv_prog_objcxx"
    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.OBJC++ ?= $cs_build_prop_val ;
"
fi

else
  cs_host_target=unix
	cs_host_family=unix
fi

            if test "$cs_host_target" = macosx &&
	   test "$cross_compiling" != yes &&
	   test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then
  cs_universal_binary_default=yes
else
  cs_universal_binary_default=no
fi

    { $as_echo "$as_me:$LINENO: checking whether to build universal binaries" >&5
$as_echo_n "checking whether to build universal binaries... " >&6; }
    # Check whether --enable-universal-binary was given.
if test "${enable_universal_binary+set}" = set; then
  enableval=$enable_universal_binary; cs_universal_binary=$enableval
else
  cs_universal_binary=$cs_universal_binary_default
fi

    { $as_echo "$as_me:$LINENO: result: $cs_universal_binary" >&5
$as_echo "$cs_universal_binary" >&6; }
    if test "$cs_universal_binary" = yes; then

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

	CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc "
	CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc "
	LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc "
	cs_header_text="${cs_header_text}#define CS_UNIVERSAL_BINARY
"
	cs_build_prop_val="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc "
    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="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc "
    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="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc "
    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

            ;;
        *)
            # 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="`$as_echo "$cs_host_os_normalized" | $as_tr_cpp`"
    cs_build_prop_val="$cs_host_os_normalized_uc"
    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.OS ?= $cs_build_prop_val ;
"
fi

    cs_build_prop_val="$cs_host_os_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.OS.NORMALIZED ?= $cs_build_prop_val ;
"
fi



case $cs_host_target in
    macosx)
        cs_header_text="${cs_header_text}#define CS_PLATFORM_MACOSX
"
        # Assume that CoreAudio is always available on Mac OS 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

        ;;
esac
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
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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PERL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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 is experimental/testing 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
  { $as_echo "$as_me:$LINENO: checking for perl ExtUtils::Embed module" >&5
$as_echo_n "checking for perl ExtUtils::Embed module... " >&6; }
if test "${cs_cv_perl_mod_embed+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if { ($as_echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e 0 1>&2") >&5
  ($PERL -MExtUtils::Embed -e 0 1>&2) 2>&5
  ac_status=$?
  $as_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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_perl_mod_embed" >&5
$as_echo "$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

	{ $as_echo "$as_me:$LINENO: checking for perl DynaLoader module" >&5
$as_echo_n "checking for perl DynaLoader module... " >&6; }
if test "${cs_cv_perl_mod_dynaloader+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if { ($as_echo "$as_me:$LINENO: \$PERL -MDynaLoader -e 0 1>&2") >&5
  ($PERL -MDynaLoader -e 0 1>&2) 2>&5
  ac_status=$?
  $as_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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_perl_mod_dynaloader" >&5
$as_echo "$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.
	{ $as_echo "$as_me:$LINENO: Recommend you install a recent release of Perl 5." >&5
$as_echo "$as_me: Recommend you install a recent release of Perl 5." >&6;}
	{ $as_echo "$as_me:$LINENO: http://www.perl.org/" >&5
$as_echo "$as_me: http://www.perl.org/" >&6;}
	{ $as_echo "$as_me:$LINENO: checking for perl Config module" >&5
$as_echo_n "checking for perl Config module... " >&6; }
if test "${cs_cv_perl_mod_config+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if { ($as_echo "$as_me:$LINENO: \$PERL -MConfig -e 0 1>&2") >&5
  ($PERL -MConfig -e 0 1>&2) 2>&5
  ac_status=$?
  $as_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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_perl_mod_config" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e ccopts") >&5
  ($PERL -MExtUtils::Embed -e ccopts) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_perl_lflags=`{ ($as_echo "$as_me:$LINENO: \$PERL -MExtUtils::Embed -e ldopts") >&5
  ($PERL -MExtUtils::Embed -e ldopts) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_perl_ext=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
else
  if test $cs_cv_perl_mod_config = yes; then
  cs_perl_core=`{ ($as_echo "$as_me:$LINENO: \$PERL -MConfig -e 'print \$Config{archlib}'") >&5
  ($PERL -MConfig -e 'print $Config{archlib}') 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_core="${cs_perl_core}/CORE"
		cs_cv_perl_cflags=`{ ($as_echo "$as_me:$LINENO: \$PERL -MConfig -e 'print \$Config{ccflags}'") >&5
  ($PERL -MConfig -e 'print $Config{ccflags}') 2>&5
  ac_status=$?
  $as_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=`{ ($as_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=$?
  $as_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=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
else
  cs_perl_core=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_core="${cs_perl_core}/CORE"
		cs_cv_perl_cflags=`{ ($as_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=$?
  $as_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=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
		cs_perl_lflags_tmp=`{ ($as_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=$?
  $as_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=`{ ($as_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=$?
  $as_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
  { $as_echo "$as_me:$LINENO: checking if Perl SDK is usable" >&5
$as_echo_n "checking if Perl SDK is usable... " >&6; }
if test "${cs_cv_perl+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_perl" >&5
$as_echo "$cs_cv_perl" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if Perl SDK is usable" >&5
$as_echo_n "checking if Perl SDK is usable... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_perl" >&5
$as_echo "$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.
#------------------------------------------------------------------------------


    if test "$cs_host_target" = macosx; then
  cs_ignore_long_double_tuples=`echo @-Wno-long-double@@ | sed 'y% %#%'`
else
  cs_ignore_long_double_tuples=''
fi

    { $as_echo "$as_me:$LINENO: checking how to suppress C++ \`long double' warnings" >&5
$as_echo_n "checking how to suppress C++ \`long double' warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_long_double_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$cs_ignore_long_double_tuples"; 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 $cs_ignore_long_double_tuples
    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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_ignore_long_double=''
            cs_cv_prog_cxx_ignore_long_double_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_long_double_ok" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  for ac_prog in python
  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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PYTHON+set}" = set; then
  $as_echo_n "(cached) " >&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_tool_prefix$ac_prog"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
$as_echo "$PYTHON" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$PYTHON" && break
  done
fi
if test -z "$PYTHON"; then
  ac_ct_PYTHON=$PYTHON
  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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PYTHON+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_PYTHON"; then
  ac_cv_prog_ac_ct_PYTHON="$ac_ct_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_ac_ct_PYTHON="$ac_prog"
    $as_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_PYTHON=$ac_cv_prog_ac_ct_PYTHON
if test -n "$ac_ct_PYTHON"; then
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PYTHON" >&5
$as_echo "$ac_ct_PYTHON" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_PYTHON" && break
done

  if test "x$ac_ct_PYTHON" = x; then
    PYTHON=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PYTHON=$ac_ct_PYTHON
  fi
fi


    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
  { $as_echo "$as_me:$LINENO: checking for python SDK" >&5
$as_echo_n "checking for python SDK... " >&6; }
if test "${cs_cv_python_sdk+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_pyver=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	    cs_cv_pybase="python${cs_pyver}"

	    cs_build_prop_val="$cs_pyver"
    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.VERSION ?= $cs_build_prop_val ;
"
fi


	    cs_cv_pybase_cflags=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	    cs_cv_pybase_sysprefix=`{ ($as_echo "$as_me:$LINENO: \$PYTHON -c \\
		'import sys; print sys.prefix'") >&5
  ($PYTHON -c \
		'import sys; print sys.prefix') 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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=`{ ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`

	    cs_cv_python_ext=`{ ($as_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=$?
  $as_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_base$cs_cv_pybase_sysprefix_lflags"; then
  cs_cv_python_sdk=yes
else
  cs_cv_python_sdk=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_python_sdk" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if python SDK is usable" >&5
$as_echo_n "checking if python SDK is usable... " >&6; }
if test "${cs_cv_python+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_python" >&5
$as_echo "$cs_cv_python" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if python SDK is usable" >&5
$as_echo_n "checking if python SDK is usable... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_python" >&5
$as_echo "$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 Java 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.
#------------------------------------------------------------------------------

    case $host_os in
	mingw*|cygwin*) cs_java_platform=win32 ;;
	*) cs_java_platform=`echo $host_os |
	    sed 's/^\([^-]*\).*$/\1/'` ;;
    esac

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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_JAVA+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $JAVA" >&5
$as_echo "$JAVA" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_JAVAC+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
  { $as_echo "$as_me:$LINENO: checking for Java SDK" >&5
$as_echo_n "checking for Java SDK... " >&6; }
if test "${cs_cv_java_sdk+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$JAVA" && test -n "$JAVAC"; then
  cat <<EOF > conftest.java
public class conftest {
    public static void main(String[] args) {
        System.out.println(System.getProperty(args[0]));
    }
}
EOF
    { ($as_echo "$as_me:$LINENO: \$JAVAC conftest.java") >&5
  ($JAVAC conftest.java) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }



    if test x$cs_host_macosx = xyes && # Not cross-building for Darwin.
	test -r /System/Library/Frameworks/JavaVM.framework/Headers; then
  cs_cv_java_sdk_cflags="-I/System/Library/Frameworks/JavaVM.framework/Headers"
	cs_cv_java_sdk_libs="-framework JavaVM"
else
  if test -n "$JAVA_HOME"; then

    cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$JAVA_HOME/include"
    if test -n "$cs_java_platform"; then
  cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$JAVA_HOME/include/$cs_java_platform"
fi

	    cs_save_ifs=$IFS; IFS=$PATH_SEPARATOR
    for cs_dir in $JAVA_HOME
    do
        IFS=$cs_save_ifs
        test -z "$cs_dir" && cs_dir=.
        cs_cv_java_sdk_lflags="$cs_cv_java_sdk_lflags -L$cs_dir"
    done
    IFS=$cs_save_ifs

fi

	cs_java_home=`{ ($as_echo "$as_me:$LINENO: CLASSPATH=. \$JAVA conftest java.home") >&5
  (CLASSPATH=. $JAVA conftest java.home) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	if test -n "$cs_java_home"; then

    cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$cs_java_home/include"
    if test -n "$cs_java_platform"; then
  cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$cs_java_home/include/$cs_java_platform"
fi


    cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$cs_java_home/../include"
    if test -n "$cs_java_platform"; then
  cs_cv_java_sdk_cflags="$cs_cv_java_sdk_cflags -I$cs_java_home/../include/$cs_java_platform"
fi

	    cs_save_ifs=$IFS; IFS=$PATH_SEPARATOR
    for cs_dir in $cs_java_home$PATH_SEPARATOR$cs_java_home/..
    do
        IFS=$cs_save_ifs
        test -z "$cs_dir" && cs_dir=.
        cs_cv_java_sdk_lflags="$cs_cv_java_sdk_lflags -L$cs_dir"
    done
    IFS=$cs_save_ifs

fi

	cs_java_lib_path=`{ ($as_echo "$as_me:$LINENO: CLASSPATH=. \$JAVA conftest java.library.path") >&5
  (CLASSPATH=. $JAVA conftest java.library.path) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }`
	if test -n "$cs_java_lib_path"; then
  cs_save_ifs=$IFS; IFS=$PATH_SEPARATOR
    for cs_dir in $cs_java_lib_path
    do
        IFS=$cs_save_ifs
        test -z "$cs_dir" && cs_dir=.
        cs_cv_java_sdk_lflags="$cs_cv_java_sdk_lflags -L$cs_dir"
    done
    IFS=$cs_save_ifs

fi

	cs_cv_java_sdk_cflags=`echo "x$cs_cv_java_sdk_cflags" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_java_sdk_lflags=`echo "x$cs_cv_java_sdk_lflags" | tr '\\\\' '/' | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_java_sdk_libs="-ljvm"
fi

	    rm -f conftest.java conftest.class

	    cs_java_cflags="$cs_cv_java_sdk_cflags"
	    cs_java_lflags="$cs_cv_java_sdk_lflags"
	    cs_java_libs="$cs_cv_java_sdk_libs"
	    cs_cv_java_sdk=yes
else
  cs_cv_java_sdk=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_java_sdk" >&5
$as_echo "$cs_cv_java_sdk" >&6; }
	if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if Java SDK is usable" >&5
$as_echo_n "checking if Java SDK is usable... " >&6; }
if test "${cs_cv_java+set}" = set; then
  $as_echo_n "(cached) " >&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 ()
{
JNI_GetCreatedJavaVMs(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_java" >&5
$as_echo "$cs_cv_java" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if Java SDK is usable" >&5
$as_echo_n "checking if Java SDK is usable... " >&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 ()
{
JNI_GetCreatedJavaVMs(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_java" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ANT+set}" = set; then
  $as_echo_n "(cached) " >&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$PATH_SEPARATOR${srcdir}/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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ANT" >&5
$as_echo "$ANT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
  { $as_echo "$as_me:$LINENO: checking for STL" >&5
$as_echo_n "checking for STL... " >&6; }
if test "${cs_cv_libstl+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libstl" >&5
$as_echo "$cs_cv_libstl" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for STL" >&5
$as_echo_n "checking for STL... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libstl" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to enable C++ compilation warnings" >&5
$as_echo_n "checking how to enable C++ compilation warnings... " >&6; }
if test "${cs_cv_prog_cxx_enable_warnings_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wmost@@ | sed 'y% %#%'` `echo @-Wall@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_enable_warnings=''
            cs_cv_prog_cxx_enable_warnings_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_warnings_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
$as_echo_n "checking how to treat C++ warnings as errors... " >&6; }
if test "${cs_cv_prog_cxx_enable_errors_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Werror@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_enable_errors=''
            cs_cv_prog_cxx_enable_errors_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_errors_ok" >&5
$as_echo "$cs_cv_prog_cxx_enable_errors_ok" >&6; }


{ $as_echo "$as_me:$LINENO: checking how to suppress C++ unused variable warnings" >&5
$as_echo_n "checking how to suppress C++ unused variable warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_unused_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wno-unused@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_ignore_unused=''
            cs_cv_prog_cxx_ignore_unused_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_unused_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to suppress C++ uninitialized variable warnings" >&5
$as_echo_n "checking how to suppress C++ uninitialized variable warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_uninitialized_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wno-uninitialized@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_ignore_uninitialized=''
            cs_cv_prog_cxx_ignore_uninitialized_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_uninitialized_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to suppress C++ unknown #pragma warnings" >&5
$as_echo_n "checking how to suppress C++ unknown #pragma warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_unknown_pragmas_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wno-unknown-pragmas@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_ignore_unknown_pragmas=''
            cs_cv_prog_cxx_ignore_unknown_pragmas_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_unknown_pragmas_ok" >&5
$as_echo "$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.

    if test "$cs_host_target" = macosx; then
  cs_ignore_long_double_tuples=`echo @-Wno-long-double@@ | sed 'y% %#%'`
else
  cs_ignore_long_double_tuples=''
fi

    { $as_echo "$as_me:$LINENO: checking how to suppress C++ \`long double' warnings" >&5
$as_echo_n "checking how to suppress C++ \`long double' warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_long_double_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "$cs_ignore_long_double_tuples"; 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 $cs_ignore_long_double_tuples
    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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_ignore_long_double=''
            cs_cv_prog_cxx_ignore_long_double_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_long_double_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to suppress C++ non-virtual destructor warnings" >&5
$as_echo_n "checking how to suppress C++ non-virtual destructor warnings... " >&6; }
if test "${cs_cv_prog_cxx_ignore_non_virtual_dtor_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wno-non-virtual-dtor@@ | sed 'y% %#%'`"; 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 @-Wno-non-virtual-dtor@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_non_virtual_dtor=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_cxx_ignore_non_virtual_dtor_ok="$cs_cv_prog_cxx_ignore_non_virtual_dtor"
else
  cs_cv_prog_cxx_ignore_non_virtual_dtor=''
		cs_cv_prog_cxx_ignore_non_virtual_dtor_ok=no
fi

else
  cs_cv_prog_cxx_ignore_non_virtual_dtor=''
            cs_cv_prog_cxx_ignore_non_virtual_dtor_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_ignore_non_virtual_dtor_ok" >&5
$as_echo "$cs_cv_prog_cxx_ignore_non_virtual_dtor_ok" >&6; }
    if test "$cs_cv_prog_cxx_ignore_non_virtual_dtor_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cxx_ignore_non_virtual_dtor"
    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_NON_VIRTUAL_DTOR ?= $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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking for flag to disable strict-aliasing" >&5
$as_echo_n "checking for flag to disable strict-aliasing... " >&6; }
if test "${cs_cv_prog_cxx_no_strict_aliasing_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fno-strict-aliasing@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_no_strict_aliasing=''
            cs_cv_prog_cxx_no_strict_aliasing_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_no_strict_aliasing_ok" >&5
$as_echo "$cs_cv_prog_cxx_no_strict_aliasing_ok" >&6; }
    if test "$cs_cv_prog_cxx_no_strict_aliasing_ok" != 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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to enable C++ exceptions" >&5
$as_echo_n "checking how to enable C++ exceptions... " >&6; }
if test "${cs_cv_prog_cxx_enable_exceptions_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fexceptions -fno-omit-frame-pointer@@ | sed 'y% %#%'` \
    `echo @-fexceptions@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_enable_exceptions=''
            cs_cv_prog_cxx_enable_exceptions_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_exceptions_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to disable C++ exceptions" >&5
$as_echo_n "checking how to disable C++ exceptions... " >&6; }
if test "${cs_cv_prog_cxx_disable_exceptions_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fno-exceptions@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_disable_exceptions=''
            cs_cv_prog_cxx_disable_exceptions_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_disable_exceptions_ok" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to enforce C++ standards conformance" >&5
$as_echo_n "checking how to enforce C++ standards conformance... " >&6; }
if test "${cs_cv_prog_cxx_enable_pedantic_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-ansi -pedantic@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_enable_pedantic=''
            cs_cv_prog_cxx_enable_pedantic_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_pedantic_ok" >&5
$as_echo "$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 "-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().
#------------------------------------------------------------------------------


{ $as_echo "$as_me:$LINENO: checking if -force_cpusubtype_ALL is needed" >&5
$as_echo_n "checking if -force_cpusubtype_ALL is needed... " >&6; }
if test "${cs_cv_prog_cxx_force_cpusubtype_all_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @@-force_cpusubtype_ALL@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_force_cpusubtype_all=''
            cs_cv_prog_cxx_force_cpusubtype_all_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_force_cpusubtype_all_ok" >&5
$as_echo "$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*)
	    { $as_echo "$as_me:$LINENO: checking if -fno-common is needed" >&5
$as_echo_n "checking if -fno-common is needed... " >&6; }
if test "${cs_cv_prog_cxx_no_common_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @@-fno-common@ | sed 'y% %#%'`"; 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 @@-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_no_common=''
            cs_cv_prog_cxx_no_common_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_no_common_ok" >&5
$as_echo "$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*)
	    { $as_echo "$as_me:$LINENO: checking if -fvtable-thunks is needed" >&5
$as_echo_n "checking if -fvtable-thunks is needed... " >&6; }
if test "${cs_cv_prog_cxx_vtable_thunks_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fvtable-thunks@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_vtable_thunks=''
            cs_cv_prog_cxx_vtable_thunks_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_vtable_thunks_ok" >&5
$as_echo "$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 promote warnings to errors.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to treat linker warnings as errors" >&5
$as_echo_n "checking how to treat linker warnings as errors... " >&6; }
if test "${cs_cv_prog_link_enable_errors_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wl,--fatal-warnings@@ | sed 'y% %#%'`"; 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 @-Wl,--fatal-warnings@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_enable_errors=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_link_enable_errors_ok="$cs_cv_prog_link_enable_errors"
else
  cs_cv_prog_link_enable_errors=''
		cs_cv_prog_link_enable_errors_ok=no
fi

else
  cs_cv_prog_link_enable_errors=''
            cs_cv_prog_link_enable_errors_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_enable_errors_ok" >&5
$as_echo "$cs_cv_prog_link_enable_errors_ok" >&6; }




#------------------------------------------------------------------------------
# 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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to export all dynamic symbols" >&5
$as_echo_n "checking how to export all dynamic symbols... " >&6; }
if test "${cs_cv_prog_link_export_dynamic_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Wl,-E@@ | sed 'y% %#%'`"; 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 @-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_cv_prog_link_enable_errors $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_export_dynamic=''
            cs_cv_prog_link_export_dynamic_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_export_dynamic_ok" >&5
$as_echo "$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 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
  { $as_echo "$as_me:$LINENO: checking if --kill-at is accepted" >&5
$as_echo_n "checking if --kill-at is accepted... " >&6; }
if test "${cs_cv_prog_link_kill_at+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_kill_at" >&5
$as_echo "$cs_cv_prog_link_kill_at" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if --kill-at is accepted" >&5
$as_echo_n "checking if --kill-at is accepted... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_kill_at" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking if reporting missing symbols is supported" >&5
$as_echo_n "checking if reporting missing symbols is supported... " >&6; }
if test "${cs_cv_prog_link_z_defs_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @@-Wl,-z,defs@ | sed 'y% %#%'`"; 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 @@-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_z_defs=''
            cs_cv_prog_link_z_defs_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_z_defs_ok" >&5
$as_echo "$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.PRIVATE += $cs_build_prop_val ;
"
fi


fi

{ $as_echo "$as_me:$LINENO: checking if missing symbols can be reported as warnings" >&5
$as_echo_n "checking if missing symbols can be reported as warnings... " >&6; }
if test "${cs_cv_prog_link_warn_unresolved_symbols_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @@-Wl,--warn-unresolved-symbols@ | sed 'y% %#%'`"; 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 @@-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_link_warn_unresolved_symbols=''
            cs_cv_prog_link_warn_unresolved_symbols_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_link_warn_unresolved_symbols_ok" >&5
$as_echo "$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.PRIVATE += $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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to disable function inlining" >&5
$as_echo_n "checking how to disable function inlining... " >&6; }
if test "${cs_cv_prog_cxx_disable_inlining_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fno-inline-functions@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_disable_inlining=''
            cs_cv_prog_cxx_disable_inlining_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_disable_inlining_ok" >&5
$as_echo "$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 how to declare symbol visibility.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to treat C warnings as errors" >&5
$as_echo_n "checking how to treat C warnings as errors... " >&6; }
if test "${cs_cv_prog_c_enable_errors_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Werror@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 @-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%#% %'`

	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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_c_enable_errors=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_c_enable_errors_ok="$cs_cv_prog_c_enable_errors"
else
  cs_cv_prog_c_enable_errors=''
		cs_cv_prog_c_enable_errors_ok=no
fi

else
  cs_cv_prog_c_enable_errors=''
            cs_cv_prog_c_enable_errors_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_c_enable_errors_ok" >&5
$as_echo "$cs_cv_prog_c_enable_errors_ok" >&6; }

{ $as_echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
$as_echo_n "checking how to treat C++ warnings as errors... " >&6; }
if test "${cs_cv_prog_cxx_enable_errors_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Werror@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_enable_errors=''
            cs_cv_prog_cxx_enable_errors_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_enable_errors_ok" >&5
$as_echo "$cs_cv_prog_cxx_enable_errors_ok" >&6; }




{ $as_echo "$as_me:$LINENO: checking how to treat C++ warnings as errors" >&5
$as_echo_n "checking how to treat C++ warnings as errors... " >&6; }
if test "${cs_cv_prog_cxx_pic_werror_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-Werror@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_pic_werror=''
            cs_cv_prog_cxx_pic_werror_ok=no
fi

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

    { $as_echo "$as_me:$LINENO: checking how to enable C++ PIC generation" >&5
$as_echo_n "checking how to enable C++ PIC generation... " >&6; }
if test "${cs_cv_prog_cxx_pic_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fPIC@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  cs_build_ok=no
else
  cs_build_ok=yes
fi

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


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_pic=''
            cs_cv_prog_cxx_pic_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_pic_ok" >&5
$as_echo "$cs_cv_prog_cxx_pic_ok" >&6; }


# Check if compiler recognizes an option to set inline visibility to hidden.
{ $as_echo "$as_me:$LINENO: checking for inline visibility flag" >&5
$as_echo_n "checking for inline visibility flag... " >&6; }
if test "${cs_cv_prog_cxx_visibility_inlines_hidden_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fvisibility-inlines-hidden@@ | sed 'y% %#%'`"; 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 @-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_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_visibility_inlines_hidden=''
            cs_cv_prog_cxx_visibility_inlines_hidden_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_ok" >&5
$as_echo "$cs_cv_prog_cxx_visibility_inlines_hidden_ok" >&6; }

cs_prog_cxx_visibility_inlines_hidden=$cs_cv_prog_cxx_visibility_inlines_hidden

# Check if compiler silently accepts option but later complains that
# "visibility attribute is not supported in this configuration".
if test -n "$cs_prog_cxx_visibility_inlines_hidden"; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if configuration supports $cs_prog_cxx_visibility_inlines_hidden" >&5
$as_echo_n "checking if configuration supports $cs_prog_cxx_visibility_inlines_hidden... " >&6; }
if test "${cs_cv_prog_cxx_visibility_inlines_hidden_supported+set}" = set; then
  $as_echo_n "(cached) " >&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_prog_cxx_visibility_inlines_hidden \
        $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.  */
template <typename T> struct X { inline void f() {} };
int
main ()
{
X<int>().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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_prog_cxx_visibility_inlines_hidden \
        $cs_cv_prog_cxx_enable_errors | 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_supported=yes
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_cflags=$cs_build_cflags
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_lflags=$cs_build_lflags
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_libs=$cs_build_libs
else
  cs_cv_prog_cxx_visibility_inlines_hidden_supported=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_supported" >&5
$as_echo "$cs_cv_prog_cxx_visibility_inlines_hidden_supported" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if configuration supports $cs_prog_cxx_visibility_inlines_hidden" >&5
$as_echo_n "checking if configuration supports $cs_prog_cxx_visibility_inlines_hidden... " >&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_prog_cxx_visibility_inlines_hidden \
        $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.  */
template <typename T> struct X { inline void f() {} };
int
main ()
{
X<int>().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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_prog_cxx_visibility_inlines_hidden \
        $cs_cv_prog_cxx_enable_errors | 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_supported=yes
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_cflags=$cs_build_cflags
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_lflags=$cs_build_lflags
		cs_cv_prog_cxx_visibility_inlines_hidden_supported_libs=$cs_build_libs
else
  cs_cv_prog_cxx_visibility_inlines_hidden_supported=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_supported" >&5
$as_echo "$cs_cv_prog_cxx_visibility_inlines_hidden_supported" >&6; }
fi

    if test $cs_cv_prog_cxx_visibility_inlines_hidden_supported = yes; then
  cs_cv_prog_cxx_visibility_inlines_hidden_supported=yes
else
  cs_cv_prog_cxx_visibility_inlines_hidden_supported_cflags=''
	cs_cv_prog_cxx_visibility_inlines_hidden_supported_lflags=''
	cs_cv_prog_cxx_visibility_inlines_hidden_supported_libs=''
	cs_cv_prog_cxx_visibility_inlines_hidden_supported=no
fi

    if test $cs_cv_prog_cxx_visibility_inlines_hidden_supported != yes; then
  cs_prog_cxx_visibility_inlines_hidden=''
fi

fi


# Check if hidden visibility handling is buggy.
if test -n "$cs_prog_cxx_visibility_inlines_hidden"; then
  { $as_echo "$as_me:$LINENO: checking if $cs_prog_cxx_visibility_inlines_hidden is buggy" >&5
$as_echo_n "checking if $cs_prog_cxx_visibility_inlines_hidden is buggy... " >&6; }
if test "${cs_cv_prog_cxx_visibility_inlines_hidden_buggy+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test $ac_compiler_gnu = yes && test $cs_cv_libstl = yes; then
  if test $cs_host_target = macosx; then
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=yes
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_prog_cxx_visibility_inlines_hidden \
			$cs_cv_prog_cxx_pic@$cs_cv_prog_link_shared@ | 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_libstl_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libstl_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libstl_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 <string>
int
main ()
{
std::string s; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libstl_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libstl_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libstl_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_cxx_visibility_inlines_hidden_buggy=no
else
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=yes
fi

fi

else
  cs_cv_prog_cxx_visibility_inlines_hidden_buggy=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_visibility_inlines_hidden_buggy" >&5
$as_echo "$cs_cv_prog_cxx_visibility_inlines_hidden_buggy" >&6; }
    if test $cs_cv_prog_cxx_visibility_inlines_hidden_buggy = yes; then
  cs_prog_cxx_visibility_inlines_hidden=''
fi

fi


if test -n "$cs_prog_cxx_visibility_inlines_hidden"; then
  cs_build_prop_val="$cs_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



{ $as_echo "$as_me:$LINENO: checking for hidden symbol visibility flag" >&5
$as_echo_n "checking for hidden symbol visibility flag... " >&6; }
if test "${cs_cv_prog_c_visibility_hidden_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fvisibility=hidden@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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_cv_prog_c_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_c_visibility_hidden=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_c_visibility_hidden_ok="$cs_cv_prog_c_visibility_hidden"
else
  cs_cv_prog_c_visibility_hidden=''
		cs_cv_prog_c_visibility_hidden_ok=no
fi

else
  cs_cv_prog_c_visibility_hidden=''
            cs_cv_prog_c_visibility_hidden_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_c_visibility_hidden_ok" >&5
$as_echo "$cs_cv_prog_c_visibility_hidden_ok" >&6; }
    if test "$cs_cv_prog_c_visibility_hidden_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_c_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



{ $as_echo "$as_me:$LINENO: checking for default symbol visibility flag" >&5
$as_echo_n "checking for default symbol visibility flag... " >&6; }
if test "${cs_cv_prog_c_visibility_default_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fvisibility=default@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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_cv_prog_c_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_c_visibility_default=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_c_visibility_default_ok="$cs_cv_prog_c_visibility_default"
else
  cs_cv_prog_c_visibility_default=''
		cs_cv_prog_c_visibility_default_ok=no
fi

else
  cs_cv_prog_c_visibility_default=''
            cs_cv_prog_c_visibility_default_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_c_visibility_default_ok" >&5
$as_echo "$cs_cv_prog_c_visibility_default_ok" >&6; }
    if test "$cs_cv_prog_c_visibility_default_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_c_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


{ $as_echo "$as_me:$LINENO: checking how to declare hidden visibility" >&5
$as_echo_n "checking how to declare hidden visibility... " >&6; }
if test "${cs_cv_prog_cxx_declare_visibility_hidden+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_cxx_declare_visibility_hidden='no'
	if test "$cs_cv_prog_cxx_declare_visibility_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.  */
void f() __attribute__((visibility("hidden")));
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_visibility_hidden='__attribute__((visibility("hidden")))'
else
  cs_cv_prog_cxx_declare_visibility_hidden='no'
fi

fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_visibility_hidden" >&5
$as_echo "$cs_cv_prog_cxx_declare_visibility_hidden" >&6; }
    if test $cs_cv_prog_cxx_declare_visibility_hidden != no; then
  cs_header_text="${cs_header_text}#define CS_VISIBILITY_HIDDEN $cs_cv_prog_cxx_declare_visibility_hidden
"
fi


{ $as_echo "$as_me:$LINENO: checking how to declare default visibility" >&5
$as_echo_n "checking how to declare default visibility... " >&6; }
if test "${cs_cv_prog_cxx_declare_visibility_default+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_cxx_declare_visibility_default='no'
	if test "$cs_cv_prog_cxx_declare_visibility_default" = 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.  */
void f() __attribute__((visibility("default")));
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_visibility_default='__attribute__((visibility("default")))'
else
  cs_cv_prog_cxx_declare_visibility_default='no'
fi

fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_visibility_default" >&5
$as_echo "$cs_cv_prog_cxx_declare_visibility_default" >&6; }
    if test $cs_cv_prog_cxx_declare_visibility_default != no; then
  cs_header_text="${cs_header_text}#define CS_VISIBILITY_DEFAULT $cs_cv_prog_cxx_declare_visibility_default
"
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.
#------------------------------------------------------------------------------


{ $as_echo "$as_me:$LINENO: checking whether to use CPU-specific optimizations" >&5
$as_echo_n "checking whether to use CPU-specific optimizations... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_cpu_specific_optimizations" >&5
$as_echo "$enable_cpu_specific_optimizations" >&6; }

case $enable_cpu_specific_optimizations in
    no|minimum|maximum|native) ;;
    *) 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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $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" &&
      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { $as_echo "$as_me:$LINENO: error: unrecognized option; use \`no', \`minimum', \`maximum' or \`native'" >&5
$as_echo "$as_me: error: unrecognized option; use \`no', \`minimum', \`maximum' or \`native'" >&2;}
   { (exit 1); exit 1; }; }
       ;;
esac

if test $enable_cpu_specific_optimizations != no; then
  { $as_echo "$as_me:$LINENO: checking for code generation flags" >&5
$as_echo_n "checking for code generation flags... " >&6; }
if test "${cs_cv_prog_cxx_code_gen+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_cxx_code_gen=no
	if test $enable_cpu_specific_optimizations = native; then

    if test "$cs_cv_prog_cxx_code_gen" = no; then
  case $host_cpu in
	    *) 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=native -mtune=native@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 $enable_cpu_specific_optimizations = maximum \
		|| test $enable_cpu_specific_optimizations = native; then

    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=pentium3 -mtune=generic@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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=pentium3 -mtune=pentium3@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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=pentium3@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 @-mtune=generic@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 -mtune=generic@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 -mtune=generic@@ | 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_code_gen" >&5
$as_echo "$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 SIMD flags. These checks are performed after CS_CHECK_HOST() and
# the CPU optimization flags detection since these may alter the build
# environment in a way which affects the SIMD flags tests. For instance,
# they might be impacted on Mac OS X by a universal binary build, or only the
# "-march" parameter chosen by the optimization flags detection may enable
# support for specific SIMD instructions.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking for -mmmx flag" >&5
$as_echo_n "checking for -mmmx flag... " >&6; }
if test "${cs_cv_prog_cc_mmmx_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-mmmx@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 @-mmmx@@ | 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_code_gen $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_mmmx=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_cc_mmmx_ok="$cs_cv_prog_cc_mmmx"
else
  cs_cv_prog_cc_mmmx=''
		cs_cv_prog_cc_mmmx_ok=no
fi

else
  cs_cv_prog_cc_mmmx=''
            cs_cv_prog_cc_mmmx_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cc_mmmx_ok" >&5
$as_echo "$cs_cv_prog_cc_mmmx_ok" >&6; }
    if test "$cs_cv_prog_cc_mmmx_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cc_mmmx"
    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.MMX += $cs_build_prop_val ;
"
fi

fi

{ $as_echo "$as_me:$LINENO: checking for -mfpmath=sse flag" >&5
$as_echo_n "checking for -mfpmath=sse flag... " >&6; }
if test "${cs_cv_prog_cc_mfpmath_sse_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-mfpmath=sse@@ | sed 'y% %#%'`"; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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 @-mfpmath=sse@@ | 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_code_gen $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_mfpmath_sse=`echo x$cs_build_cflags $cs_build_lflags $cs_build_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
		cs_cv_prog_cc_mfpmath_sse_ok="$cs_cv_prog_cc_mfpmath_sse"
else
  cs_cv_prog_cc_mfpmath_sse=''
		cs_cv_prog_cc_mfpmath_sse_ok=no
fi

else
  cs_cv_prog_cc_mfpmath_sse=''
            cs_cv_prog_cc_mfpmath_sse_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cc_mfpmath_sse_ok" >&5
$as_echo "$cs_cv_prog_cc_mfpmath_sse_ok" >&6; }
    if test "$cs_cv_prog_cc_mfpmath_sse_ok" != no; then
  cs_build_prop_val="$cs_cv_prog_cc_mfpmath_sse"
    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


if test -n "$cs_cv_prog_cc_mmmx"; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for mmintrin.h" >&5
$as_echo_n "checking for mmintrin.h... " >&6; }
if test "${cs_cv_header_mmintrin_h+set}" = set; then
  $as_echo_n "(cached) " >&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_prog_cc_mmmx@@ | 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 <mmintrin.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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_header_mmintrin_h=yes
		cs_cv_header_mmintrin_h_cflags=$cs_build_cflags
		cs_cv_header_mmintrin_h_lflags=$cs_build_lflags
		cs_cv_header_mmintrin_h_libs=$cs_build_libs
else
  cs_cv_header_mmintrin_h=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_header_mmintrin_h" >&5
$as_echo "$cs_cv_header_mmintrin_h" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for mmintrin.h" >&5
$as_echo_n "checking for mmintrin.h... " >&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_prog_cc_mmmx@@ | 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 <mmintrin.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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_header_mmintrin_h=yes
		cs_cv_header_mmintrin_h_cflags=$cs_build_cflags
		cs_cv_header_mmintrin_h_lflags=$cs_build_lflags
		cs_cv_header_mmintrin_h_libs=$cs_build_libs
else
  cs_cv_header_mmintrin_h=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_header_mmintrin_h" >&5
$as_echo "$cs_cv_header_mmintrin_h" >&6; }
fi

    if test $cs_cv_header_mmintrin_h = yes; then
  cs_header_text="${cs_header_text}#define CS_SUPPORTS_MMX
"
        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}CS_SUPPORTS_MMX ?= $cs_build_prop_val ;
"
fi

else
  cs_cv_header_mmintrin_h_cflags=''
	cs_cv_header_mmintrin_h_lflags=''
	cs_cv_header_mmintrin_h_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check for compiler optimization flags.
#------------------------------------------------------------------------------





    cs_optimize_flags=''

    { $as_echo "$as_me:$LINENO: checking how to enable optimizations" >&5
$as_echo_n "checking how to enable optimizations... " >&6; }
if test "${cs_cv_prog_cxx_optimize_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-O3@@ | sed 'y% %#%'` `echo @-O2@@ | sed 'y% %#%'` `echo @-O@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_optimize=''
            cs_cv_prog_cxx_optimize_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_optimize_ok" >&5
$as_echo "$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


    { $as_echo "$as_me:$LINENO: checking if -fomit-frame-pointer is accepted" >&5
$as_echo_n "checking if -fomit-frame-pointer is accepted... " >&6; }
if test "${cs_cv_prog_cxx_omit_frame_pointer_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-fomit-frame-pointer@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_omit_frame_pointer=''
            cs_cv_prog_cxx_omit_frame_pointer_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_omit_frame_pointer_ok" >&5
$as_echo "$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


    { $as_echo "$as_me:$LINENO: checking if -ffast-math is accepted" >&5
$as_echo_n "checking if -ffast-math is accepted... " >&6; }
if test "${cs_cv_prog_cxx_fast_math_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-ffast-math@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_fast_math=''
            cs_cv_prog_cxx_fast_math_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_fast_math_ok" >&5
$as_echo "$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




#------------------------------------------------------------------------------
# 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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $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" &&
      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache
    { { $as_echo "$as_me:$LINENO: error: []  unrecognized mode --enable-mode=$enableval; use
    \`optimize', \`debug', or \`profile'" >&5
$as_echo "$as_me: error: []  unrecognized mode --enable-mode=$enableval; use
    \`optimize', \`debug', or \`profile'" >&2;}
   { (exit 1); exit 1; }; } ;;
    esac
fi


{ $as_echo "$as_me:$LINENO: checking build mode" >&5
$as_echo_n "checking build mode... " >&6; }
if test "${cs_build_mode+set}" = set; then
  :
else
  cs_build_mode=optimize
fi

{ $as_echo "$as_me:$LINENO: result: $cs_build_mode" >&5
$as_echo "$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 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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $LD" >&5
$as_echo "$LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
$as_echo "$ac_ct_LD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    LD=$ac_ct_LD
  fi
fi

    if test -n "$LD"; then
  # Apple linker is not GNU-compatible. Further, on Leopard, -v emits
        # to stderr rather than stdout. Handle these anomalies.
        if echo `ld -v 2>&1` | grep GNU 2>&1 > /dev/null; then
  # binutils versions come in the flavors X.Y as well as X.Y.Z
	    { $as_echo "$as_me:$LINENO: checking if binutils version >= 2.17" >&5
$as_echo_n "checking if binutils version >= 2.17... " >&6; }
if test "${cs_cv_prog_binutils_version_2_17_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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]*\.[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]*\.[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]*\.[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=.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]*\.[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.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.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.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]*\.[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]*\.[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]*\.[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=.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]*/!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.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.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.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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_is_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_min_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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 ; }
test -z "$cs_cv_prog_binutils_version_2_17_ok" \
  && { expr "$cs_prog_binutils_is_ver_6" ">=" "$cs_prog_binutils_min_ver_6" >/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_6" ">=" "$cs_prog_binutils_is_ver_6" >/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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_17_ok_annotated" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if binutils version >= 2.16.91" >&5
$as_echo_n "checking if binutils version >= 2.16.91... " >&6; }
if test "${cs_cv_prog_binutils_version_2_16_91_ok_annotated+set}" = set; then
  $as_echo_n "(cached) " >&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]*\.[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]*\.[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]*\.[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=.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]*\.[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.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.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]*\.[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]*\.[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]*\.[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=.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]*/!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.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.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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_is_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([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]*\.[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]*\)\.\([0-9][0-9]*\).*/\5/'`
cs_prog_binutils_min_ver_6=`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]*\.[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]*\)\.\([0-9][0-9]*\).*/\6/'`

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 ; }
test -z "$cs_cv_prog_binutils_version_2_16_91_ok" \
  && { expr "$cs_prog_binutils_is_ver_6" ">=" "$cs_prog_binutils_min_ver_6" >/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_6" ">=" "$cs_prog_binutils_is_ver_6" >/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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_binutils_version_2_16_91_ok_annotated" >&5
$as_echo "$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

fi


{ $as_echo "$as_me:$LINENO: checking whether to split debug information" >&5
$as_echo_n "checking whether to split debug information... " >&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 "$cs_build_mode$" = "profile"; then
  enable_separate_debug_info=no
else
  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

fi

{ $as_echo "$as_me:$LINENO: result: $enable_separate_debug_info" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking how to enable debug mode debugging symbols" >&5
$as_echo_n "checking how to enable debug mode debugging symbols... " >&6; }
if test "${cs_cv_prog_cxx_debug_symbols_extra_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-g3@@ | sed 'y% %#%'` `echo @-g2@@ | sed 'y% %#%'` `echo @-g@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_debug_symbols_extra=''
            cs_cv_prog_cxx_debug_symbols_extra_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_debug_symbols_extra_ok" >&5
$as_echo "$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


{ $as_echo "$as_me:$LINENO: checking whether to enable debug information in optimize mode" >&5
$as_echo_n "checking whether to enable debug information in optimize mode... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_optimize_mode_debug_info" >&5
$as_echo "$enable_optimize_mode_debug_info" >&6; }
if test "$enable_optimize_mode_debug_info" != "no"; then
  { $as_echo "$as_me:$LINENO: checking how to enable optimize mode debugging symbols" >&5
$as_echo_n "checking how to enable optimize mode debugging symbols... " >&6; }
if test "${cs_cv_prog_cxx_debug_symbols_normal_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-g2@@ | sed 'y% %#%'` `echo @-g@@ | sed 'y% %#%'`"; 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 @-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cxx_debug_symbols_normal=''
            cs_cv_prog_cxx_debug_symbols_normal_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_debug_symbols_normal_ok" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if -I/usr/local/include is usable" >&5
$as_echo_n "checking if -I/usr/local/include is usable... " >&6; }
if test "${cs_cv_prog_cpp_local_include_ok+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if test -n "`echo @-I/usr/local/include@@ | sed 'y% %#%'`"; 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/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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

else
  cs_cv_prog_cpp_local_include=''
            cs_cv_prog_cpp_local_include_ok=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cpp_local_include_ok" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for va_copy" >&5
$as_echo_n "checking for va_copy... " >&6; }
if test "${cs_cv_func_va_copy+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_va_copy" >&5
$as_echo "$cs_cv_func_va_copy" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for va_copy" >&5
$as_echo_n "checking for va_copy... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_va_copy" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for __va_copy" >&5
$as_echo_n "checking for __va_copy... " >&6; }
if test "${cs_cv_func___va_copy+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func___va_copy" >&5
$as_echo "$cs_cv_func___va_copy" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for __va_copy" >&5
$as_echo_n "checking for __va_copy... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func___va_copy" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_x11 != yes; then
  PATH="$with_x11/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_x11$PATH_SEPARATOR$with_x11/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes x11" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes x11... " >&6; }
if test "${cs_cv_prog_pkg_config_x11+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_x11" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags x11") >&5
  ($PKG_CONFIG --cflags x11) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs x11") >&5
  ($PKG_CONFIG --libs x11) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}x11-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}x11-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_X11+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_X11 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_X11="$CONFIG_X11" # 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_CONFIG_X11="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_X11=$ac_cv_path_CONFIG_X11
if test -n "$CONFIG_X11"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_X11" >&5
$as_echo "$CONFIG_X11" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_X11"; then
  ac_pt_CONFIG_X11=$CONFIG_X11
  # Extract the first word of "x11-config", so it can be a program name with args.
set dummy x11-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_X11+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_X11 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_X11="$ac_pt_CONFIG_X11" # 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_ac_pt_CONFIG_X11="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_X11=$ac_cv_path_ac_pt_CONFIG_X11
if test -n "$ac_pt_CONFIG_X11"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_X11" >&5
$as_echo "$ac_pt_CONFIG_X11" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_X11" = x; then
    CONFIG_X11=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_X11=$ac_pt_CONFIG_X11
  fi
else
  CONFIG_X11="$ac_cv_path_CONFIG_X11"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_X11 --cflags ") >&5
  ($CONFIG_X11 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_X11 --libs ") >&5
  ($CONFIG_X11 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libx11" >&5
$as_echo_n "checking for libx11... " >&6; }
if test "${cs_cv_libx11+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libx11" >&5
$as_echo "$cs_cv_libx11" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libx11" >&5
$as_echo_n "checking for libx11... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libx11" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_x11 != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_xext != yes; then
  PATH="$with_xext/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_xext$PATH_SEPARATOR$with_xext/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xext" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes xext... " >&6; }
if test "${cs_cv_prog_pkg_config_xext+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xext" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xext") >&5
  ($PKG_CONFIG --cflags xext) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs xext") >&5
  ($PKG_CONFIG --libs xext) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}xext-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}xext-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_XEXT+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_XEXT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_XEXT="$CONFIG_XEXT" # 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_CONFIG_XEXT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_XEXT=$ac_cv_path_CONFIG_XEXT
if test -n "$CONFIG_XEXT"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_XEXT" >&5
$as_echo "$CONFIG_XEXT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_XEXT"; then
  ac_pt_CONFIG_XEXT=$CONFIG_XEXT
  # Extract the first word of "xext-config", so it can be a program name with args.
set dummy xext-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_XEXT+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_XEXT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_XEXT="$ac_pt_CONFIG_XEXT" # 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_ac_pt_CONFIG_XEXT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_XEXT=$ac_cv_path_ac_pt_CONFIG_XEXT
if test -n "$ac_pt_CONFIG_XEXT"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_XEXT" >&5
$as_echo "$ac_pt_CONFIG_XEXT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_XEXT" = x; then
    CONFIG_XEXT=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XEXT=$ac_pt_CONFIG_XEXT
  fi
else
  CONFIG_XEXT="$ac_cv_path_CONFIG_XEXT"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XEXT --cflags ") >&5
  ($CONFIG_XEXT --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XEXT --libs ") >&5
  ($CONFIG_XEXT --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libxext" >&5
$as_echo_n "checking for libxext... " >&6; }
if test "${cs_cv_libxext+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libxext" >&5
$as_echo "$cs_cv_libxext" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libxext" >&5
$as_echo_n "checking for libxext... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libxext" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_xext != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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.
    { $as_echo "$as_me:$LINENO: checking for X" >&5
$as_echo_n "checking for X... " >&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 #(
    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
$as_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
  $as_echo_n "(cached) " >&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 dylib la dll; 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 | /usr/lib64 | /lib | /lib64) ;;
	*) 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	LIBS=$ac_save_LIBS
for ac_dir in `$as_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 dylib la dll; do
    if test -r "$ac_dir/libX11.$ac_extension"; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi

rm -rf conftest.dSYM
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
  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
$as_echo "$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'"
  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
$as_echo "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 . . . .
    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
$as_echo_n "checking whether -R must be followed by a space... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
       X_LIBS="$X_LIBS -R$x_libraries"
else
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
	  X_LIBS="$X_LIBS -R $x_libraries"
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
$as_echo "neither works" >&6; }
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi

rm -rf conftest.dSYM
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  :
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_dnet_ntoa=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_stub_dnet_ntoa=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi

rm -rf conftest.dSYM
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.
    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
$as_echo_n "checking for gethostbyname... " >&6; }
if test "${ac_cv_func_gethostbyname+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_gethostbyname=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_gethostbyname=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
$as_echo "$ac_cv_func_gethostbyname" >&6; }

    if test $ac_cv_func_gethostbyname = no; then
      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nsl_gethostbyname=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_bsd_gethostbyname=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
if test "x$ac_cv_lib_bsd_gethostbyname" = x""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.
    { $as_echo "$as_me:$LINENO: checking for connect" >&5
$as_echo_n "checking for connect... " >&6; }
if test "${ac_cv_func_connect+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_connect=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_connect=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
$as_echo "$ac_cv_func_connect" >&6; }

    if test $ac_cv_func_connect = no; then
      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
$as_echo_n "checking for connect in -lsocket... " >&6; }
if test "${ac_cv_lib_socket_connect+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_socket_connect=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_socket_connect=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
$as_echo "$ac_cv_lib_socket_connect" >&6; }
if test "x$ac_cv_lib_socket_connect" = x""yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    { $as_echo "$as_me:$LINENO: checking for remove" >&5
$as_echo_n "checking for remove... " >&6; }
if test "${ac_cv_func_remove+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_remove=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_remove=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
$as_echo "$ac_cv_func_remove" >&6; }

    if test $ac_cv_func_remove = no; then
      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
$as_echo_n "checking for remove in -lposix... " >&6; }
if test "${ac_cv_lib_posix_remove+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_posix_remove=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_posix_remove=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
$as_echo "$ac_cv_lib_posix_remove" >&6; }
if test "x$ac_cv_lib_posix_remove" = x""yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
$as_echo_n "checking for shmat... " >&6; }
if test "${ac_cv_func_shmat+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_shmat=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_shmat=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
$as_echo "$ac_cv_func_shmat" >&6; }

    if test $ac_cv_func_shmat = no; then
      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
$as_echo_n "checking for shmat in -lipc... " >&6; }
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_ipc_shmat=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ipc_shmat=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
if test "x$ac_cv_lib_ipc_shmat" = x""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
  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ICE_IceConnectionNumber=no
fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_xxf86vm != yes; then
  PATH="$with_xxf86vm/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_xxf86vm$PATH_SEPARATOR$with_xxf86vm/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xxf86vm" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes xxf86vm... " >&6; }
if test "${cs_cv_prog_pkg_config_xxf86vm+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xxf86vm" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xxf86vm") >&5
  ($PKG_CONFIG --cflags xxf86vm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs xxf86vm") >&5
  ($PKG_CONFIG --libs xxf86vm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}xxf86vm-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}xxf86vm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_XXF86VM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_XXF86VM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_XXF86VM="$CONFIG_XXF86VM" # 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_CONFIG_XXF86VM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_XXF86VM=$ac_cv_path_CONFIG_XXF86VM
if test -n "$CONFIG_XXF86VM"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_XXF86VM" >&5
$as_echo "$CONFIG_XXF86VM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_XXF86VM"; then
  ac_pt_CONFIG_XXF86VM=$CONFIG_XXF86VM
  # Extract the first word of "xxf86vm-config", so it can be a program name with args.
set dummy xxf86vm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_XXF86VM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_XXF86VM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_XXF86VM="$ac_pt_CONFIG_XXF86VM" # 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_ac_pt_CONFIG_XXF86VM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_XXF86VM=$ac_cv_path_ac_pt_CONFIG_XXF86VM
if test -n "$ac_pt_CONFIG_XXF86VM"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_XXF86VM" >&5
$as_echo "$ac_pt_CONFIG_XXF86VM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_XXF86VM" = x; then
    CONFIG_XXF86VM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XXF86VM=$ac_pt_CONFIG_XXF86VM
  fi
else
  CONFIG_XXF86VM="$ac_cv_path_CONFIG_XXF86VM"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XXF86VM --cflags ") >&5
  ($CONFIG_XXF86VM --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XXF86VM --libs ") >&5
  ($CONFIG_XXF86VM --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Xxf86vm" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes Xxf86vm... " >&6; }
if test "${cs_cv_prog_pkg_config_Xxf86vm+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Xxf86vm" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Xxf86vm") >&5
  ($PKG_CONFIG --cflags Xxf86vm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs Xxf86vm") >&5
  ($PKG_CONFIG --libs Xxf86vm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}Xxf86vm-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}Xxf86vm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_XXF86VM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_XXF86VM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_XXF86VM="$CONFIG_XXF86VM" # 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_CONFIG_XXF86VM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_XXF86VM=$ac_cv_path_CONFIG_XXF86VM
if test -n "$CONFIG_XXF86VM"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_XXF86VM" >&5
$as_echo "$CONFIG_XXF86VM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_XXF86VM"; then
  ac_pt_CONFIG_XXF86VM=$CONFIG_XXF86VM
  # Extract the first word of "Xxf86vm-config", so it can be a program name with args.
set dummy Xxf86vm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_XXF86VM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_XXF86VM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_XXF86VM="$ac_pt_CONFIG_XXF86VM" # 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_ac_pt_CONFIG_XXF86VM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_XXF86VM=$ac_cv_path_ac_pt_CONFIG_XXF86VM
if test -n "$ac_pt_CONFIG_XXF86VM"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_XXF86VM" >&5
$as_echo "$ac_pt_CONFIG_XXF86VM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_XXF86VM" = x; then
    CONFIG_XXF86VM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XXF86VM=$ac_pt_CONFIG_XXF86VM
  fi
else
  CONFIG_XXF86VM="$ac_cv_path_CONFIG_XXF86VM"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XXF86VM --cflags ") >&5
  ($CONFIG_XXF86VM --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XXF86VM --libs ") >&5
  ($CONFIG_XXF86VM --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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 $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
  { $as_echo "$as_me:$LINENO: checking for libxxf86vm" >&5
$as_echo_n "checking for libxxf86vm... " >&6; }
if test "${cs_cv_libxxf86vm+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libxxf86vm" >&5
$as_echo "$cs_cv_libxxf86vm" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libxxf86vm" >&5
$as_echo_n "checking for libxxf86vm... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libxxf86vm" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_xxf86vm != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_xaw7 != yes; then
  PATH="$with_xaw7/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_xaw7$PATH_SEPARATOR$with_xaw7/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes xaw7" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes xaw7... " >&6; }
if test "${cs_cv_prog_pkg_config_xaw7+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_xaw7" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags xaw7") >&5
  ($PKG_CONFIG --cflags xaw7) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs xaw7") >&5
  ($PKG_CONFIG --libs xaw7) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}xaw7-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}xaw7-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_XAW7+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_XAW7 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_XAW7="$CONFIG_XAW7" # 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_CONFIG_XAW7="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_XAW7=$ac_cv_path_CONFIG_XAW7
if test -n "$CONFIG_XAW7"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_XAW7" >&5
$as_echo "$CONFIG_XAW7" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_XAW7"; then
  ac_pt_CONFIG_XAW7=$CONFIG_XAW7
  # Extract the first word of "xaw7-config", so it can be a program name with args.
set dummy xaw7-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_XAW7+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_XAW7 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_XAW7="$ac_pt_CONFIG_XAW7" # 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_ac_pt_CONFIG_XAW7="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_XAW7=$ac_cv_path_ac_pt_CONFIG_XAW7
if test -n "$ac_pt_CONFIG_XAW7"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_XAW7" >&5
$as_echo "$ac_pt_CONFIG_XAW7" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_XAW7" = x; then
    CONFIG_XAW7=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XAW7=$ac_pt_CONFIG_XAW7
  fi
else
  CONFIG_XAW7="$ac_cv_path_CONFIG_XAW7"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XAW7 --cflags ") >&5
  ($CONFIG_XAW7 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XAW7 --libs ") >&5
  ($CONFIG_XAW7 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Xaw" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes Xaw... " >&6; }
if test "${cs_cv_prog_pkg_config_Xaw+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Xaw" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Xaw") >&5
  ($PKG_CONFIG --cflags Xaw) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs Xaw") >&5
  ($PKG_CONFIG --libs Xaw) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}Xaw-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}Xaw-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_XAW+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_XAW in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_XAW="$CONFIG_XAW" # 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_CONFIG_XAW="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_XAW=$ac_cv_path_CONFIG_XAW
if test -n "$CONFIG_XAW"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_XAW" >&5
$as_echo "$CONFIG_XAW" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_XAW"; then
  ac_pt_CONFIG_XAW=$CONFIG_XAW
  # Extract the first word of "Xaw-config", so it can be a program name with args.
set dummy Xaw-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_XAW+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_XAW in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_XAW="$ac_pt_CONFIG_XAW" # 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_ac_pt_CONFIG_XAW="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_XAW=$ac_cv_path_ac_pt_CONFIG_XAW
if test -n "$ac_pt_CONFIG_XAW"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_XAW" >&5
$as_echo "$ac_pt_CONFIG_XAW" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_XAW" = x; then
    CONFIG_XAW=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_XAW=$ac_pt_CONFIG_XAW
  fi
else
  CONFIG_XAW="$ac_cv_path_CONFIG_XAW"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XAW --cflags ") >&5
  ($CONFIG_XAW --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_XAW --libs ") >&5
  ($CONFIG_XAW --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libxaw7" >&5
$as_echo_n "checking for libxaw7... " >&6; }
if test "${cs_cv_libxaw7+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libxaw7" >&5
$as_echo "$cs_cv_libxaw7" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libxaw7" >&5
$as_echo_n "checking for libxaw7... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libxaw7" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_xaw7 != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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).
#------------------------------------------------------------------------------





    { $as_echo "$as_me:$LINENO: checking for int32" >&5
$as_echo_n "checking for int32... " >&6; }
if test "${ac_cv_type_int32+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_int32=no
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 ()
{
if (sizeof (int32))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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 ()
{
if (sizeof ((int32)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_int32=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32" >&5
$as_echo "$ac_cv_type_int32" >&6; }
if test "x$ac_cv_type_int32" = x""yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_TYPE_INT32 /**/
_ACEOF

fi


for ac_header in windows.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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
  { $as_echo "$as_me:$LINENO: checking for OpenGL" >&5
$as_echo_n "checking for OpenGL... " >&6; }
if test "${cs_cv_libgl+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl" >&5
$as_echo "$cs_cv_libgl" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for OpenGL" >&5
$as_echo_n "checking for OpenGL... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for GLhandleARB" >&5
$as_echo_n "checking for GLhandleARB... " >&6; }
if test "${cs_cv_libgl_GLhandleARB+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLhandleARB" >&5
$as_echo "$cs_cv_libgl_GLhandleARB" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLhandleARB" >&5
$as_echo_n "checking for GLhandleARB... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLhandleARB" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for GLcharARB" >&5
$as_echo_n "checking for GLcharARB... " >&6; }
if test "${cs_cv_libgl_GLcharARB+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLcharARB" >&5
$as_echo "$cs_cv_libgl_GLcharARB" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLcharARB" >&5
$as_echo_n "checking for GLcharARB... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLcharARB" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for GLchar" >&5
$as_echo_n "checking for GLchar... " >&6; }
if test "${cs_cv_libgl_GLchar+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLchar" >&5
$as_echo "$cs_cv_libgl_GLchar" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLchar" >&5
$as_echo_n "checking for GLchar... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLchar" >&5
$as_echo "$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

    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for GLintptr" >&5
$as_echo_n "checking for GLintptr... " >&6; }
if test "${cs_cv_libgl_GLintptr+set}" = set; then
  $as_echo_n "(cached) " >&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 ()
{
GLintptr 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_GLintptr=yes
		cs_cv_libgl_GLintptr_cflags=$cs_build_cflags
		cs_cv_libgl_GLintptr_lflags=$cs_build_lflags
		cs_cv_libgl_GLintptr_libs=$cs_build_libs
else
  cs_cv_libgl_GLintptr=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLintptr" >&5
$as_echo "$cs_cv_libgl_GLintptr" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLintptr" >&5
$as_echo_n "checking for GLintptr... " >&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 ()
{
GLintptr 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_GLintptr=yes
		cs_cv_libgl_GLintptr_cflags=$cs_build_cflags
		cs_cv_libgl_GLintptr_lflags=$cs_build_lflags
		cs_cv_libgl_GLintptr_libs=$cs_build_libs
else
  cs_cv_libgl_GLintptr=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLintptr" >&5
$as_echo "$cs_cv_libgl_GLintptr" >&6; }
fi

    if test $cs_cv_libgl_GLintptr = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_GLINTPTR_T
"
else
  cs_cv_libgl_GLintptr_cflags=''
	cs_cv_libgl_GLintptr_lflags=''
	cs_cv_libgl_GLintptr_libs=''

fi

    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for GLsizeiptr" >&5
$as_echo_n "checking for GLsizeiptr... " >&6; }
if test "${cs_cv_libgl_GLsizeiptr+set}" = set; then
  $as_echo_n "(cached) " >&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 ()
{
GLsizeiptr 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_GLsizeiptr=yes
		cs_cv_libgl_GLsizeiptr_cflags=$cs_build_cflags
		cs_cv_libgl_GLsizeiptr_lflags=$cs_build_lflags
		cs_cv_libgl_GLsizeiptr_libs=$cs_build_libs
else
  cs_cv_libgl_GLsizeiptr=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLsizeiptr" >&5
$as_echo "$cs_cv_libgl_GLsizeiptr" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLsizeiptr" >&5
$as_echo_n "checking for GLsizeiptr... " >&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 ()
{
GLsizeiptr 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_GLsizeiptr=yes
		cs_cv_libgl_GLsizeiptr_cflags=$cs_build_cflags
		cs_cv_libgl_GLsizeiptr_lflags=$cs_build_lflags
		cs_cv_libgl_GLsizeiptr_libs=$cs_build_libs
else
  cs_cv_libgl_GLsizeiptr=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libgl_GLsizeiptr" >&5
$as_echo "$cs_cv_libgl_GLsizeiptr" >&6; }
fi

    if test $cs_cv_libgl_GLsizeiptr = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_GLSIZEIPTR_T
"
else
  cs_cv_libgl_GLsizeiptr_cflags=''
	cs_cv_libgl_GLsizeiptr_lflags=''
	cs_cv_libgl_GLsizeiptr_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
  { $as_echo "$as_me:$LINENO: checking for GLU" >&5
$as_echo_n "checking for GLU... " >&6; }
if test "${cs_cv_libglu+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libglu" >&5
$as_echo "$cs_cv_libglu" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLU" >&5
$as_echo_n "checking for GLU... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libglu" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for GLX" >&5
$as_echo_n "checking for GLX... " >&6; }
if test "${cs_cv_libglx+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libglx" >&5
$as_echo "$cs_cv_libglx" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLX" >&5
$as_echo_n "checking for GLX... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libglx" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for GLX extensions" >&5
$as_echo_n "checking for GLX extensions... " >&6; }
if test "${cs_cv_libglx_extensions+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libglx_extensions" >&5
$as_echo "$cs_cv_libglx_extensions" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GLX extensions" >&5
$as_echo_n "checking for GLX extensions... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libglx_extensions" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for int32" >&5
$as_echo_n "checking for int32... " >&6; }
if test "${ac_cv_type_int32+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_int32=no
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 ()
{
if (sizeof (int32))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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 ()
{
if (sizeof ((int32)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_int32=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32" >&5
$as_echo "$ac_cv_type_int32" >&6; }
if test "x$ac_cv_type_int32" = x""yes; then
  cat >>confdefs.h <<\_ACEOF
#define HAVE_TYPE_INT32 1
_ACEOF

fi

    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for DirectX" >&5
$as_echo_n "checking for DirectX... " >&6; }
if test "${cs_cv_libdirectx+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libdirectx" >&5
$as_echo "$cs_cv_libdirectx" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for DirectX" >&5
$as_echo_n "checking for DirectX... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libdirectx" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for DirectX8" >&5
$as_echo_n "checking for DirectX8... " >&6; }
if test "${cs_cv_libdirectx8+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libdirectx8" >&5
$as_echo "$cs_cv_libdirectx8" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for DirectX8" >&5
$as_echo_n "checking for DirectX8... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libdirectx8" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for waveout" >&5
$as_echo_n "checking for waveout... " >&6; }
if test "${cs_cv_libwaveout+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libwaveout" >&5
$as_echo "$cs_cv_libwaveout" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for waveout" >&5
$as_echo_n "checking for waveout... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libwaveout" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_z != yes; then
  PATH="$with_z/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_z$PATH_SEPARATOR$with_z/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes z" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes z... " >&6; }
if test "${cs_cv_prog_pkg_config_z+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_z" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags z") >&5
  ($PKG_CONFIG --cflags z) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs z") >&5
  ($PKG_CONFIG --libs z) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}z-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}z-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_Z+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_Z in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_Z="$CONFIG_Z" # 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_CONFIG_Z="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_Z=$ac_cv_path_CONFIG_Z
if test -n "$CONFIG_Z"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_Z" >&5
$as_echo "$CONFIG_Z" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_Z"; then
  ac_pt_CONFIG_Z=$CONFIG_Z
  # Extract the first word of "z-config", so it can be a program name with args.
set dummy z-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_Z+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_Z in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_Z="$ac_pt_CONFIG_Z" # 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_ac_pt_CONFIG_Z="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_Z=$ac_cv_path_ac_pt_CONFIG_Z
if test -n "$ac_pt_CONFIG_Z"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_Z" >&5
$as_echo "$ac_pt_CONFIG_Z" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_Z" = x; then
    CONFIG_Z=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_Z=$ac_pt_CONFIG_Z
  fi
else
  CONFIG_Z="$ac_cv_path_CONFIG_Z"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_Z --cflags ") >&5
  ($CONFIG_Z --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_Z --libs ") >&5
  ($CONFIG_Z --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes zlib" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes zlib... " >&6; }
if test "${cs_cv_prog_pkg_config_zlib+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_zlib" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags zlib") >&5
  ($PKG_CONFIG --cflags zlib) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs zlib") >&5
  ($PKG_CONFIG --libs zlib) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}zlib-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}zlib-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_ZLIB+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_ZLIB in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_ZLIB="$CONFIG_ZLIB" # 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_CONFIG_ZLIB="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_ZLIB=$ac_cv_path_CONFIG_ZLIB
if test -n "$CONFIG_ZLIB"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_ZLIB" >&5
$as_echo "$CONFIG_ZLIB" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_ZLIB"; then
  ac_pt_CONFIG_ZLIB=$CONFIG_ZLIB
  # Extract the first word of "zlib-config", so it can be a program name with args.
set dummy zlib-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_ZLIB+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_ZLIB in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_ZLIB="$ac_pt_CONFIG_ZLIB" # 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_ac_pt_CONFIG_ZLIB="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_ZLIB=$ac_cv_path_ac_pt_CONFIG_ZLIB
if test -n "$ac_pt_CONFIG_ZLIB"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_ZLIB" >&5
$as_echo "$ac_pt_CONFIG_ZLIB" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_ZLIB" = x; then
    CONFIG_ZLIB=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ZLIB=$ac_pt_CONFIG_ZLIB
  fi
else
  CONFIG_ZLIB="$ac_cv_path_CONFIG_ZLIB"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ZLIB --cflags ") >&5
  ($CONFIG_ZLIB --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ZLIB --libs ") >&5
  ($CONFIG_ZLIB --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libz" >&5
$as_echo_n "checking for libz... " >&6; }
if test "${cs_cv_libz+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libz" >&5
$as_echo "$cs_cv_libz" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libz" >&5
$as_echo_n "checking for libz... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libz" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_z != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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
  { $as_echo "$as_me:$LINENO: *** zlib not found; VFS will be unusable" >&5
$as_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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_png != yes; then
  PATH="$with_png/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_png$PATH_SEPARATOR$with_png/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes png" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes png... " >&6; }
if test "${cs_cv_prog_pkg_config_png+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_png" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags png") >&5
  ($PKG_CONFIG --cflags png) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs png") >&5
  ($PKG_CONFIG --libs png) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}png-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}png-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_PNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_PNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_PNG="$CONFIG_PNG" # 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_CONFIG_PNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_PNG=$ac_cv_path_CONFIG_PNG
if test -n "$CONFIG_PNG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_PNG" >&5
$as_echo "$CONFIG_PNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_PNG"; then
  ac_pt_CONFIG_PNG=$CONFIG_PNG
  # Extract the first word of "png-config", so it can be a program name with args.
set dummy png-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_PNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_PNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_PNG="$ac_pt_CONFIG_PNG" # 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_ac_pt_CONFIG_PNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_PNG=$ac_cv_path_ac_pt_CONFIG_PNG
if test -n "$ac_pt_CONFIG_PNG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_PNG" >&5
$as_echo "$ac_pt_CONFIG_PNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_PNG" = x; then
    CONFIG_PNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_PNG=$ac_pt_CONFIG_PNG
  fi
else
  CONFIG_PNG="$ac_cv_path_CONFIG_PNG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_PNG --cflags ") >&5
  ($CONFIG_PNG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_PNG --libs ") >&5
  ($CONFIG_PNG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libpng" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes libpng... " >&6; }
if test "${cs_cv_prog_pkg_config_libpng+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libpng" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libpng") >&5
  ($PKG_CONFIG --cflags libpng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs libpng") >&5
  ($PKG_CONFIG --libs libpng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}libpng-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}libpng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIBPNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIBPNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIBPNG="$CONFIG_LIBPNG" # 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_CONFIG_LIBPNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIBPNG=$ac_cv_path_CONFIG_LIBPNG
if test -n "$CONFIG_LIBPNG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIBPNG" >&5
$as_echo "$CONFIG_LIBPNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIBPNG"; then
  ac_pt_CONFIG_LIBPNG=$CONFIG_LIBPNG
  # Extract the first word of "libpng-config", so it can be a program name with args.
set dummy libpng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIBPNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIBPNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIBPNG="$ac_pt_CONFIG_LIBPNG" # 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_ac_pt_CONFIG_LIBPNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIBPNG=$ac_cv_path_ac_pt_CONFIG_LIBPNG
if test -n "$ac_pt_CONFIG_LIBPNG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIBPNG" >&5
$as_echo "$ac_pt_CONFIG_LIBPNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIBPNG" = x; then
    CONFIG_LIBPNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBPNG=$ac_pt_CONFIG_LIBPNG
  fi
else
  CONFIG_LIBPNG="$ac_cv_path_CONFIG_LIBPNG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBPNG --cflags ") >&5
  ($CONFIG_LIBPNG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBPNG --libs ") >&5
  ($CONFIG_LIBPNG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libpng" >&5
$as_echo_n "checking for libpng... " >&6; }
if test "${cs_cv_libpng+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libpng" >&5
$as_echo "$cs_cv_libpng" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libpng" >&5
$as_echo_n "checking for libpng... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libpng" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_png != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_jpeg != yes; then
  PATH="$with_jpeg/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_jpeg$PATH_SEPARATOR$with_jpeg/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes jpeg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes jpeg... " >&6; }
if test "${cs_cv_prog_pkg_config_jpeg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_jpeg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags jpeg") >&5
  ($PKG_CONFIG --cflags jpeg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs jpeg") >&5
  ($PKG_CONFIG --libs jpeg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}jpeg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}jpeg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_JPEG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_JPEG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_JPEG="$CONFIG_JPEG" # 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_CONFIG_JPEG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_JPEG=$ac_cv_path_CONFIG_JPEG
if test -n "$CONFIG_JPEG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_JPEG" >&5
$as_echo "$CONFIG_JPEG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_JPEG"; then
  ac_pt_CONFIG_JPEG=$CONFIG_JPEG
  # Extract the first word of "jpeg-config", so it can be a program name with args.
set dummy jpeg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_JPEG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_JPEG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_JPEG="$ac_pt_CONFIG_JPEG" # 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_ac_pt_CONFIG_JPEG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_JPEG=$ac_cv_path_ac_pt_CONFIG_JPEG
if test -n "$ac_pt_CONFIG_JPEG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_JPEG" >&5
$as_echo "$ac_pt_CONFIG_JPEG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_JPEG" = x; then
    CONFIG_JPEG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_JPEG=$ac_pt_CONFIG_JPEG
  fi
else
  CONFIG_JPEG="$ac_cv_path_CONFIG_JPEG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_JPEG --cflags ") >&5
  ($CONFIG_JPEG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_JPEG --libs ") >&5
  ($CONFIG_JPEG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libjpeg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes libjpeg... " >&6; }
if test "${cs_cv_prog_pkg_config_libjpeg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libjpeg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libjpeg") >&5
  ($PKG_CONFIG --cflags libjpeg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs libjpeg") >&5
  ($PKG_CONFIG --libs libjpeg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}libjpeg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}libjpeg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIBJPEG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIBJPEG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIBJPEG="$CONFIG_LIBJPEG" # 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_CONFIG_LIBJPEG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIBJPEG=$ac_cv_path_CONFIG_LIBJPEG
if test -n "$CONFIG_LIBJPEG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIBJPEG" >&5
$as_echo "$CONFIG_LIBJPEG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIBJPEG"; then
  ac_pt_CONFIG_LIBJPEG=$CONFIG_LIBJPEG
  # Extract the first word of "libjpeg-config", so it can be a program name with args.
set dummy libjpeg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIBJPEG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIBJPEG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIBJPEG="$ac_pt_CONFIG_LIBJPEG" # 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_ac_pt_CONFIG_LIBJPEG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIBJPEG=$ac_cv_path_ac_pt_CONFIG_LIBJPEG
if test -n "$ac_pt_CONFIG_LIBJPEG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIBJPEG" >&5
$as_echo "$ac_pt_CONFIG_LIBJPEG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIBJPEG" = x; then
    CONFIG_LIBJPEG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBJPEG=$ac_pt_CONFIG_LIBJPEG
  fi
else
  CONFIG_LIBJPEG="$ac_cv_path_CONFIG_LIBJPEG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBJPEG --cflags ") >&5
  ($CONFIG_LIBJPEG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBJPEG --libs ") >&5
  ($CONFIG_LIBJPEG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libjpeg" >&5
$as_echo_n "checking for libjpeg... " >&6; }
if test "${cs_cv_libjpeg+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libjpeg" >&5
$as_echo "$cs_cv_libjpeg" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libjpeg" >&5
$as_echo_n "checking for libjpeg... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libjpeg" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_jpeg != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_lcms != yes; then
  PATH="$with_lcms/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_lcms$PATH_SEPARATOR$with_lcms/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lcms" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes lcms... " >&6; }
if test "${cs_cv_prog_pkg_config_lcms+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lcms" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lcms") >&5
  ($PKG_CONFIG --cflags lcms) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs lcms") >&5
  ($PKG_CONFIG --libs lcms) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}lcms-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}lcms-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LCMS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LCMS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LCMS="$CONFIG_LCMS" # 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_CONFIG_LCMS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LCMS=$ac_cv_path_CONFIG_LCMS
if test -n "$CONFIG_LCMS"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LCMS" >&5
$as_echo "$CONFIG_LCMS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LCMS"; then
  ac_pt_CONFIG_LCMS=$CONFIG_LCMS
  # Extract the first word of "lcms-config", so it can be a program name with args.
set dummy lcms-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LCMS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LCMS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LCMS="$ac_pt_CONFIG_LCMS" # 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_ac_pt_CONFIG_LCMS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LCMS=$ac_cv_path_ac_pt_CONFIG_LCMS
if test -n "$ac_pt_CONFIG_LCMS"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LCMS" >&5
$as_echo "$ac_pt_CONFIG_LCMS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LCMS" = x; then
    CONFIG_LCMS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LCMS=$ac_pt_CONFIG_LCMS
  fi
else
  CONFIG_LCMS="$ac_cv_path_CONFIG_LCMS"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LCMS --cflags ") >&5
  ($CONFIG_LCMS --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LCMS --libs ") >&5
  ($CONFIG_LCMS --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for liblcms" >&5
$as_echo_n "checking for liblcms... " >&6; }
if test "${cs_cv_liblcms+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_liblcms" >&5
$as_echo "$cs_cv_liblcms" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for liblcms" >&5
$as_echo_n "checking for liblcms... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_liblcms" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_lcms != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_mng != yes; then
  PATH="$with_mng/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_mng$PATH_SEPARATOR$with_mng/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes mng" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes mng... " >&6; }
if test "${cs_cv_prog_pkg_config_mng+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_mng" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags mng") >&5
  ($PKG_CONFIG --cflags mng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs mng") >&5
  ($PKG_CONFIG --libs mng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}mng-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}mng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_MNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_MNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_MNG="$CONFIG_MNG" # 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_CONFIG_MNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_MNG=$ac_cv_path_CONFIG_MNG
if test -n "$CONFIG_MNG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_MNG" >&5
$as_echo "$CONFIG_MNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_MNG"; then
  ac_pt_CONFIG_MNG=$CONFIG_MNG
  # Extract the first word of "mng-config", so it can be a program name with args.
set dummy mng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_MNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_MNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_MNG="$ac_pt_CONFIG_MNG" # 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_ac_pt_CONFIG_MNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_MNG=$ac_cv_path_ac_pt_CONFIG_MNG
if test -n "$ac_pt_CONFIG_MNG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_MNG" >&5
$as_echo "$ac_pt_CONFIG_MNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_MNG" = x; then
    CONFIG_MNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_MNG=$ac_pt_CONFIG_MNG
  fi
else
  CONFIG_MNG="$ac_cv_path_CONFIG_MNG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_MNG --cflags ") >&5
  ($CONFIG_MNG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_MNG --libs ") >&5
  ($CONFIG_MNG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libmng" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes libmng... " >&6; }
if test "${cs_cv_prog_pkg_config_libmng+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libmng" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libmng") >&5
  ($PKG_CONFIG --cflags libmng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs libmng") >&5
  ($PKG_CONFIG --libs libmng) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}libmng-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}libmng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIBMNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIBMNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIBMNG="$CONFIG_LIBMNG" # 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_CONFIG_LIBMNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIBMNG=$ac_cv_path_CONFIG_LIBMNG
if test -n "$CONFIG_LIBMNG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIBMNG" >&5
$as_echo "$CONFIG_LIBMNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIBMNG"; then
  ac_pt_CONFIG_LIBMNG=$CONFIG_LIBMNG
  # Extract the first word of "libmng-config", so it can be a program name with args.
set dummy libmng-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIBMNG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIBMNG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIBMNG="$ac_pt_CONFIG_LIBMNG" # 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_ac_pt_CONFIG_LIBMNG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIBMNG=$ac_cv_path_ac_pt_CONFIG_LIBMNG
if test -n "$ac_pt_CONFIG_LIBMNG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIBMNG" >&5
$as_echo "$ac_pt_CONFIG_LIBMNG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIBMNG" = x; then
    CONFIG_LIBMNG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBMNG=$ac_pt_CONFIG_LIBMNG
  fi
else
  CONFIG_LIBMNG="$ac_cv_path_CONFIG_LIBMNG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBMNG --cflags ") >&5
  ($CONFIG_LIBMNG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBMNG --libs ") >&5
  ($CONFIG_LIBMNG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libmng" >&5
$as_echo_n "checking for libmng... " >&6; }
if test "${cs_cv_libmng+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libmng" >&5
$as_echo "$cs_cv_libmng" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libmng" >&5
$as_echo_n "checking for libmng... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libmng" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_mng != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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 vgvm. (And it's dependencies, cairo and cairomm.)
#------------------------------------------------------------------------------

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


    # Backward compatibility: Recognize --with-libcairo as alias for --with-cairo.
    if test -n "$with_libcairo" &&
           test -z "$with_cairo"; then
  with_cairo="$with_libcairo"
fi


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

    if test "$with_cairo" != no; then

	# If --with-cairo value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_cairo" != "$cs_cv_with_cairo"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_cairo != yes; then
  PATH="$with_cairo/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_cairo$PATH_SEPARATOR$with_cairo/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cairo" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cairo... " >&6; }
if test "${cs_cv_prog_pkg_config_cairo+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists cairo; then
  cs_cv_prog_pkg_config_cairo=yes
else
  cs_cv_prog_pkg_config_cairo=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cairo" >&5
$as_echo "$cs_cv_prog_pkg_config_cairo" >&6; }
	if test $cs_cv_prog_pkg_config_cairo = yes; then
  if test -z "$cs_cv_prog_pkg_config_cairo_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cairo") >&5
  ($PKG_CONFIG --cflags cairo) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cairo") >&5
  ($PKG_CONFIG --libs cairo) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cairo_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_cairo_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cairo-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cairo-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CAIRO+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CAIRO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CAIRO="$CONFIG_CAIRO" # 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_CONFIG_CAIRO="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CAIRO=$ac_cv_path_CONFIG_CAIRO
if test -n "$CONFIG_CAIRO"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CAIRO" >&5
$as_echo "$CONFIG_CAIRO" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CAIRO"; then
  ac_pt_CONFIG_CAIRO=$CONFIG_CAIRO
  # Extract the first word of "cairo-config", so it can be a program name with args.
set dummy cairo-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CAIRO+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CAIRO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CAIRO="$ac_pt_CONFIG_CAIRO" # 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_ac_pt_CONFIG_CAIRO="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CAIRO=$ac_cv_path_ac_pt_CONFIG_CAIRO
if test -n "$ac_pt_CONFIG_CAIRO"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CAIRO" >&5
$as_echo "$ac_pt_CONFIG_CAIRO" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CAIRO" = x; then
    CONFIG_CAIRO=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAIRO=$ac_pt_CONFIG_CAIRO
  fi
else
  CONFIG_CAIRO="$ac_cv_path_CONFIG_CAIRO"
fi

    if test -n "$CONFIG_CAIRO"; then
  if test -z "$cs_cv_prog_config_cairo_ok"; then
  if $CONFIG_CAIRO --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cairo_ok=yes
else
  cs_cv_prog_config_cairo_ok=no
fi

fi

	if test $cs_cv_prog_config_cairo_ok = yes; then
  if test -z "$cs_cv_prog_config_cairo_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIRO --cflags ") >&5
  ($CONFIG_CAIRO --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIRO --libs ") >&5
  ($CONFIG_CAIRO --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cairo_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_cairo_flags"
fi

fi



	if test $with_cairo != yes; then
  cs_check_lib_paths=$with_cairo
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 "cairo"; then
  cs_check_lib_libs="-lcairo"
	cs_check_lib_framework="-framework cairo"
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 "cairo"; then
  cs_check_lib_libs="-lcairo"
	cs_check_lib_framework="-framework cairo"
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 "cairo"; then
  cs_check_lib_libs="-lcairo"
	cs_check_lib_framework="-framework cairo"
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
  { $as_echo "$as_me:$LINENO: checking for libcairo" >&5
$as_echo_n "checking for libcairo... " >&6; }
if test "${cs_cv_libcairo+set}" = set; then
  $as_echo_n "(cached) " >&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 <cairo.h>
int
main ()
{
cairo_create (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairo=yes
		cs_cv_libcairo_cflags=$cs_build_cflags
		cs_cv_libcairo_lflags=$cs_build_lflags
		cs_cv_libcairo_libs=$cs_build_libs
else
  cs_cv_libcairo=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcairo" >&5
$as_echo "$cs_cv_libcairo" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcairo" >&5
$as_echo_n "checking for libcairo... " >&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 <cairo.h>
int
main ()
{
cairo_create (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairo=yes
		cs_cv_libcairo_cflags=$cs_build_cflags
		cs_cv_libcairo_lflags=$cs_build_lflags
		cs_cv_libcairo_libs=$cs_build_libs
else
  cs_cv_libcairo=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcairo" >&5
$as_echo "$cs_cv_libcairo" >&6; }
fi

    if test $cs_cv_libcairo = yes; then
  :
else
  cs_cv_libcairo_cflags=''
	cs_cv_libcairo_lflags=''
	cs_cv_libcairo_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_cairo != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libcairo=no
fi


    cs_cv_with_cairo="$with_cairo"
    if test "$cs_cv_libcairo" = yes; then
  if test "$cs_cv_libcairo" = 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}CAIRO.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcairo_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}CAIRO.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcairo_lflags $cs_cv_libcairo_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}CAIRO.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi



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


    # Backward compatibility: Recognize --with-libcairomm as alias for --with-cairomm.
    if test -n "$with_libcairomm" &&
           test -z "$with_cairomm"; then
  with_cairomm="$with_libcairomm"
fi


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

    if test "$with_cairomm" != no; then

	# If --with-cairomm value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_cairomm" != "$cs_cv_with_cairomm"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_cairomm != yes; then
  PATH="$with_cairomm/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_cairomm$PATH_SEPARATOR$with_cairomm/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cairomm" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cairomm... " >&6; }
if test "${cs_cv_prog_pkg_config_cairomm+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists cairomm; then
  cs_cv_prog_pkg_config_cairomm=yes
else
  cs_cv_prog_pkg_config_cairomm=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cairomm" >&5
$as_echo "$cs_cv_prog_pkg_config_cairomm" >&6; }
	if test $cs_cv_prog_pkg_config_cairomm = yes; then
  if test -z "$cs_cv_prog_pkg_config_cairomm_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cairomm") >&5
  ($PKG_CONFIG --cflags cairomm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cairomm") >&5
  ($PKG_CONFIG --libs cairomm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cairomm_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_cairomm_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cairomm-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cairomm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CAIROMM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CAIROMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CAIROMM="$CONFIG_CAIROMM" # 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_CONFIG_CAIROMM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CAIROMM=$ac_cv_path_CONFIG_CAIROMM
if test -n "$CONFIG_CAIROMM"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CAIROMM" >&5
$as_echo "$CONFIG_CAIROMM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CAIROMM"; then
  ac_pt_CONFIG_CAIROMM=$CONFIG_CAIROMM
  # Extract the first word of "cairomm-config", so it can be a program name with args.
set dummy cairomm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CAIROMM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CAIROMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CAIROMM="$ac_pt_CONFIG_CAIROMM" # 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_ac_pt_CONFIG_CAIROMM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CAIROMM=$ac_cv_path_ac_pt_CONFIG_CAIROMM
if test -n "$ac_pt_CONFIG_CAIROMM"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CAIROMM" >&5
$as_echo "$ac_pt_CONFIG_CAIROMM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CAIROMM" = x; then
    CONFIG_CAIROMM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAIROMM=$ac_pt_CONFIG_CAIROMM
  fi
else
  CONFIG_CAIROMM="$ac_cv_path_CONFIG_CAIROMM"
fi

    if test -n "$CONFIG_CAIROMM"; then
  if test -z "$cs_cv_prog_config_cairomm_ok"; then
  if $CONFIG_CAIROMM --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cairomm_ok=yes
else
  cs_cv_prog_config_cairomm_ok=no
fi

fi

	if test $cs_cv_prog_config_cairomm_ok = yes; then
  if test -z "$cs_cv_prog_config_cairomm_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM --cflags ") >&5
  ($CONFIG_CAIROMM --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM --libs ") >&5
  ($CONFIG_CAIROMM --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cairomm_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_cairomm_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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cairomm-1" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cairomm-1... " >&6; }
if test "${cs_cv_prog_pkg_config_cairomm_1+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists cairomm-1; then
  cs_cv_prog_pkg_config_cairomm_1=yes
else
  cs_cv_prog_pkg_config_cairomm_1=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cairomm_1" >&5
$as_echo "$cs_cv_prog_pkg_config_cairomm_1" >&6; }
	if test $cs_cv_prog_pkg_config_cairomm_1 = yes; then
  if test -z "$cs_cv_prog_pkg_config_cairomm_1_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cairomm-1") >&5
  ($PKG_CONFIG --cflags cairomm-1) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cairomm-1") >&5
  ($PKG_CONFIG --libs cairomm-1) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cairomm_1_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_cairomm_1_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cairomm-1-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cairomm-1-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CAIROMM_1+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CAIROMM_1 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CAIROMM_1="$CONFIG_CAIROMM_1" # 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_CONFIG_CAIROMM_1="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CAIROMM_1=$ac_cv_path_CONFIG_CAIROMM_1
if test -n "$CONFIG_CAIROMM_1"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CAIROMM_1" >&5
$as_echo "$CONFIG_CAIROMM_1" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CAIROMM_1"; then
  ac_pt_CONFIG_CAIROMM_1=$CONFIG_CAIROMM_1
  # Extract the first word of "cairomm-1-config", so it can be a program name with args.
set dummy cairomm-1-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CAIROMM_1+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CAIROMM_1 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CAIROMM_1="$ac_pt_CONFIG_CAIROMM_1" # 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_ac_pt_CONFIG_CAIROMM_1="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CAIROMM_1=$ac_cv_path_ac_pt_CONFIG_CAIROMM_1
if test -n "$ac_pt_CONFIG_CAIROMM_1"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CAIROMM_1" >&5
$as_echo "$ac_pt_CONFIG_CAIROMM_1" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CAIROMM_1" = x; then
    CONFIG_CAIROMM_1=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAIROMM_1=$ac_pt_CONFIG_CAIROMM_1
  fi
else
  CONFIG_CAIROMM_1="$ac_cv_path_CONFIG_CAIROMM_1"
fi

    if test -n "$CONFIG_CAIROMM_1"; then
  if test -z "$cs_cv_prog_config_cairomm_1_ok"; then
  if $CONFIG_CAIROMM_1 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cairomm_1_ok=yes
else
  cs_cv_prog_config_cairomm_1_ok=no
fi

fi

	if test $cs_cv_prog_config_cairomm_1_ok = yes; then
  if test -z "$cs_cv_prog_config_cairomm_1_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM_1 --cflags ") >&5
  ($CONFIG_CAIROMM_1 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM_1 --libs ") >&5
  ($CONFIG_CAIROMM_1 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cairomm_1_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_cairomm_1_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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cairomm-1.0" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cairomm-1.0... " >&6; }
if test "${cs_cv_prog_pkg_config_cairomm_1_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists cairomm-1.0; then
  cs_cv_prog_pkg_config_cairomm_1_0=yes
else
  cs_cv_prog_pkg_config_cairomm_1_0=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cairomm_1_0" >&5
$as_echo "$cs_cv_prog_pkg_config_cairomm_1_0" >&6; }
	if test $cs_cv_prog_pkg_config_cairomm_1_0 = yes; then
  if test -z "$cs_cv_prog_pkg_config_cairomm_1_0_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cairomm-1.0") >&5
  ($PKG_CONFIG --cflags cairomm-1.0) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cairomm-1.0") >&5
  ($PKG_CONFIG --libs cairomm-1.0) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cairomm_1_0_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_cairomm_1_0_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cairomm-1.0-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cairomm-1.0-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CAIROMM_1_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CAIROMM_1_0 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CAIROMM_1_0="$CONFIG_CAIROMM_1_0" # 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_CONFIG_CAIROMM_1_0="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CAIROMM_1_0=$ac_cv_path_CONFIG_CAIROMM_1_0
if test -n "$CONFIG_CAIROMM_1_0"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CAIROMM_1_0" >&5
$as_echo "$CONFIG_CAIROMM_1_0" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CAIROMM_1_0"; then
  ac_pt_CONFIG_CAIROMM_1_0=$CONFIG_CAIROMM_1_0
  # Extract the first word of "cairomm-1.0-config", so it can be a program name with args.
set dummy cairomm-1.0-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CAIROMM_1_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CAIROMM_1_0 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CAIROMM_1_0="$ac_pt_CONFIG_CAIROMM_1_0" # 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_ac_pt_CONFIG_CAIROMM_1_0="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CAIROMM_1_0=$ac_cv_path_ac_pt_CONFIG_CAIROMM_1_0
if test -n "$ac_pt_CONFIG_CAIROMM_1_0"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CAIROMM_1_0" >&5
$as_echo "$ac_pt_CONFIG_CAIROMM_1_0" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CAIROMM_1_0" = x; then
    CONFIG_CAIROMM_1_0=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAIROMM_1_0=$ac_pt_CONFIG_CAIROMM_1_0
  fi
else
  CONFIG_CAIROMM_1_0="$ac_cv_path_CONFIG_CAIROMM_1_0"
fi

    if test -n "$CONFIG_CAIROMM_1_0"; then
  if test -z "$cs_cv_prog_config_cairomm_1_0_ok"; then
  if $CONFIG_CAIROMM_1_0 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cairomm_1_0_ok=yes
else
  cs_cv_prog_config_cairomm_1_0_ok=no
fi

fi

	if test $cs_cv_prog_config_cairomm_1_0_ok = yes; then
  if test -z "$cs_cv_prog_config_cairomm_1_0_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM_1_0 --cflags ") >&5
  ($CONFIG_CAIROMM_1_0 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAIROMM_1_0 --libs ") >&5
  ($CONFIG_CAIROMM_1_0 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cairomm_1_0_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_cairomm_1_0_flags"
fi

fi



	if test $with_cairomm != yes; then
  cs_check_lib_paths=$with_cairomm
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 "cairomm"; then
  cs_check_lib_libs="-lcairomm"
	cs_check_lib_framework="-framework cairomm"
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 "cairomm"; then
  cs_check_lib_libs="-lcairomm"
	cs_check_lib_framework="-framework cairomm"
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 "cairomm"; then
  cs_check_lib_libs="-lcairomm"
	cs_check_lib_framework="-framework cairomm"
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 "cairomm-1"; then
  cs_check_lib_libs="-lcairomm-1"
	cs_check_lib_framework="-framework cairomm-1"
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 "cairomm-1"; then
  cs_check_lib_libs="-lcairomm-1"
	cs_check_lib_framework="-framework cairomm-1"
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 "cairomm-1"; then
  cs_check_lib_libs="-lcairomm-1"
	cs_check_lib_framework="-framework cairomm-1"
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 "cairomm-1.0"; then
  cs_check_lib_libs="-lcairomm-1.0"
	cs_check_lib_framework="-framework cairomm-1.0"
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 "cairomm-1.0"; then
  cs_check_lib_libs="-lcairomm-1.0"
	cs_check_lib_framework="-framework cairomm-1.0"
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 "cairomm-1.0"; then
  cs_check_lib_libs="-lcairomm-1.0"
	cs_check_lib_framework="-framework cairomm-1.0"
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
  { $as_echo "$as_me:$LINENO: checking for libcairomm" >&5
$as_echo_n "checking for libcairomm... " >&6; }
if test "${cs_cv_libcairomm+set}" = set; then
  $as_echo_n "(cached) " >&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_libcairo_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcairo_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcairo_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 <cairomm/cairomm.h>
int
main ()
{
Cairo::Context c ((cairo_t*)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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairo_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcairo_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcairo_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcairomm=yes
		cs_cv_libcairomm_cflags=$cs_build_cflags
		cs_cv_libcairomm_lflags=$cs_build_lflags
		cs_cv_libcairomm_libs=$cs_build_libs
else
  cs_cv_libcairomm=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcairomm" >&5
$as_echo "$cs_cv_libcairomm" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcairomm" >&5
$as_echo_n "checking for libcairomm... " >&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_libcairo_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcairo_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcairo_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 <cairomm/cairomm.h>
int
main ()
{
Cairo::Context c ((cairo_t*)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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairo_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcairo_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcairo_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libcairomm=yes
		cs_cv_libcairomm_cflags=$cs_build_cflags
		cs_cv_libcairomm_lflags=$cs_build_lflags
		cs_cv_libcairomm_libs=$cs_build_libs
else
  cs_cv_libcairomm=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcairomm" >&5
$as_echo "$cs_cv_libcairomm" >&6; }
fi

    if test $cs_cv_libcairomm = yes; then
  :
else
  cs_cv_libcairomm_cflags=''
	cs_cv_libcairomm_lflags=''
	cs_cv_libcairomm_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_cairomm != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libcairomm=no
fi


    cs_cv_with_cairomm="$with_cairomm"
    if test "$cs_cv_libcairomm" = yes; then
  if test "$cs_cv_libcairomm" = 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}CAIROMM.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcairomm_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}CAIROMM.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcairomm_lflags $cs_cv_libcairomm_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}CAIROMM.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi



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


    # Backward compatibility: Recognize --with-libvgvm as alias for --with-vgvm.
    if test -n "$with_libvgvm" &&
           test -z "$with_vgvm"; then
  with_vgvm="$with_libvgvm"
fi


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

    if test "$with_vgvm" != no; then

	# If --with-vgvm value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_vgvm" != "$cs_cv_with_vgvm"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_vgvm != yes; then
  PATH="$with_vgvm/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_vgvm$PATH_SEPARATOR$with_vgvm/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes vgvm" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes vgvm... " >&6; }
if test "${cs_cv_prog_pkg_config_vgvm+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists vgvm; then
  cs_cv_prog_pkg_config_vgvm=yes
else
  cs_cv_prog_pkg_config_vgvm=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_vgvm" >&5
$as_echo "$cs_cv_prog_pkg_config_vgvm" >&6; }
	if test $cs_cv_prog_pkg_config_vgvm = yes; then
  if test -z "$cs_cv_prog_pkg_config_vgvm_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags vgvm") >&5
  ($PKG_CONFIG --cflags vgvm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs vgvm") >&5
  ($PKG_CONFIG --libs vgvm) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_vgvm_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_vgvm_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}vgvm-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}vgvm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_VGVM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_VGVM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_VGVM="$CONFIG_VGVM" # 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_CONFIG_VGVM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_VGVM=$ac_cv_path_CONFIG_VGVM
if test -n "$CONFIG_VGVM"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_VGVM" >&5
$as_echo "$CONFIG_VGVM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_VGVM"; then
  ac_pt_CONFIG_VGVM=$CONFIG_VGVM
  # Extract the first word of "vgvm-config", so it can be a program name with args.
set dummy vgvm-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_VGVM+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_VGVM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_VGVM="$ac_pt_CONFIG_VGVM" # 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_ac_pt_CONFIG_VGVM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_VGVM=$ac_cv_path_ac_pt_CONFIG_VGVM
if test -n "$ac_pt_CONFIG_VGVM"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_VGVM" >&5
$as_echo "$ac_pt_CONFIG_VGVM" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_VGVM" = x; then
    CONFIG_VGVM=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_VGVM=$ac_pt_CONFIG_VGVM
  fi
else
  CONFIG_VGVM="$ac_cv_path_CONFIG_VGVM"
fi

    if test -n "$CONFIG_VGVM"; then
  if test -z "$cs_cv_prog_config_vgvm_ok"; then
  if $CONFIG_VGVM --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_vgvm_ok=yes
else
  cs_cv_prog_config_vgvm_ok=no
fi

fi

	if test $cs_cv_prog_config_vgvm_ok = yes; then
  if test -z "$cs_cv_prog_config_vgvm_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VGVM --cflags ") >&5
  ($CONFIG_VGVM --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VGVM --libs ") >&5
  ($CONFIG_VGVM --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_vgvm_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_vgvm_flags"
fi

fi



	if test $with_vgvm != yes; then
  cs_check_lib_paths=$with_vgvm
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 "vgvm"; then
  cs_check_lib_libs="-lvgvm"
	cs_check_lib_framework="-framework vgvm"
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 "vgvm"; then
  cs_check_lib_libs="-lvgvm"
	cs_check_lib_framework="-framework vgvm"
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 "vgvm"; then
  cs_check_lib_libs="-lvgvm"
	cs_check_lib_framework="-framework vgvm"
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
  { $as_echo "$as_me:$LINENO: checking for libvgvm" >&5
$as_echo_n "checking for libvgvm... " >&6; }
if test "${cs_cv_libvgvm+set}" = set; then
  $as_echo_n "(cached) " >&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_libcairomm_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcairomm_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcairomm_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 <vgvm/vgvm.h>
int
main ()
{
new vgvm::Program (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairomm_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcairomm_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcairomm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvgvm=yes
		cs_cv_libvgvm_cflags=$cs_build_cflags
		cs_cv_libvgvm_lflags=$cs_build_lflags
		cs_cv_libvgvm_libs=$cs_build_libs
else
  cs_cv_libvgvm=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libvgvm" >&5
$as_echo "$cs_cv_libvgvm" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libvgvm" >&5
$as_echo_n "checking for libvgvm... " >&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_libcairomm_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcairomm_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcairomm_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 <vgvm/vgvm.h>
int
main ()
{
new vgvm::Program (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcairomm_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcairomm_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcairomm_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_libvgvm=yes
		cs_cv_libvgvm_cflags=$cs_build_cflags
		cs_cv_libvgvm_lflags=$cs_build_lflags
		cs_cv_libvgvm_libs=$cs_build_libs
else
  cs_cv_libvgvm=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libvgvm" >&5
$as_echo "$cs_cv_libvgvm" >&6; }
fi

    if test $cs_cv_libvgvm = yes; then
  :
else
  cs_cv_libvgvm_cflags=''
	cs_cv_libvgvm_lflags=''
	cs_cv_libvgvm_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_vgvm != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libvgvm=no
fi


    cs_cv_with_vgvm="$with_vgvm"
    if test "$cs_cv_libvgvm" = yes; then
  if test "$cs_cv_libvgvm" = 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}VGVM.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libvgvm_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}VGVM.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libvgvm_lflags $cs_cv_libvgvm_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}VGVM.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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_ogg != yes; then
  PATH="$with_ogg/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_ogg$PATH_SEPARATOR$with_ogg/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes ogg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes ogg... " >&6; }
if test "${cs_cv_prog_pkg_config_ogg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_ogg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags ogg") >&5
  ($PKG_CONFIG --cflags ogg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs ogg") >&5
  ($PKG_CONFIG --libs ogg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ogg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}ogg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_OGG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_OGG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_OGG="$CONFIG_OGG" # 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_CONFIG_OGG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_OGG=$ac_cv_path_CONFIG_OGG
if test -n "$CONFIG_OGG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_OGG" >&5
$as_echo "$CONFIG_OGG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_OGG"; then
  ac_pt_CONFIG_OGG=$CONFIG_OGG
  # Extract the first word of "ogg-config", so it can be a program name with args.
set dummy ogg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_OGG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_OGG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_OGG="$ac_pt_CONFIG_OGG" # 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_ac_pt_CONFIG_OGG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_OGG=$ac_cv_path_ac_pt_CONFIG_OGG
if test -n "$ac_pt_CONFIG_OGG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_OGG" >&5
$as_echo "$ac_pt_CONFIG_OGG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_OGG" = x; then
    CONFIG_OGG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_OGG=$ac_pt_CONFIG_OGG
  fi
else
  CONFIG_OGG="$ac_cv_path_CONFIG_OGG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_OGG --cflags ") >&5
  ($CONFIG_OGG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_OGG --libs ") >&5
  ($CONFIG_OGG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libogg" >&5
$as_echo_n "checking for libogg... " >&6; }
if test "${cs_cv_libogg+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libogg" >&5
$as_echo "$cs_cv_libogg" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libogg" >&5
$as_echo_n "checking for libogg... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libogg" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_ogg != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_vorbis != yes; then
  PATH="$with_vorbis/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_vorbis$PATH_SEPARATOR$with_vorbis/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes vorbis" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes vorbis... " >&6; }
if test "${cs_cv_prog_pkg_config_vorbis+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_vorbis" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags vorbis") >&5
  ($PKG_CONFIG --cflags vorbis) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs vorbis") >&5
  ($PKG_CONFIG --libs vorbis) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}vorbis-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}vorbis-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_VORBIS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_VORBIS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_VORBIS="$CONFIG_VORBIS" # 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_CONFIG_VORBIS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_VORBIS=$ac_cv_path_CONFIG_VORBIS
if test -n "$CONFIG_VORBIS"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_VORBIS" >&5
$as_echo "$CONFIG_VORBIS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_VORBIS"; then
  ac_pt_CONFIG_VORBIS=$CONFIG_VORBIS
  # Extract the first word of "vorbis-config", so it can be a program name with args.
set dummy vorbis-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_VORBIS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_VORBIS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_VORBIS="$ac_pt_CONFIG_VORBIS" # 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_ac_pt_CONFIG_VORBIS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_VORBIS=$ac_cv_path_ac_pt_CONFIG_VORBIS
if test -n "$ac_pt_CONFIG_VORBIS"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_VORBIS" >&5
$as_echo "$ac_pt_CONFIG_VORBIS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_VORBIS" = x; then
    CONFIG_VORBIS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_VORBIS=$ac_pt_CONFIG_VORBIS
  fi
else
  CONFIG_VORBIS="$ac_cv_path_CONFIG_VORBIS"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VORBIS --cflags ") >&5
  ($CONFIG_VORBIS --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VORBIS --libs ") >&5
  ($CONFIG_VORBIS --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libvorbis" >&5
$as_echo_n "checking for libvorbis... " >&6; }
if test "${cs_cv_libvorbis+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libvorbis" >&5
$as_echo "$cs_cv_libvorbis" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libvorbis" >&5
$as_echo_n "checking for libvorbis... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libvorbis" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_vorbis != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_vorbisfile != yes; then
  PATH="$with_vorbisfile/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_vorbisfile$PATH_SEPARATOR$with_vorbisfile/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes vorbisfile" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes vorbisfile... " >&6; }
if test "${cs_cv_prog_pkg_config_vorbisfile+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_vorbisfile" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags vorbisfile") >&5
  ($PKG_CONFIG --cflags vorbisfile) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs vorbisfile") >&5
  ($PKG_CONFIG --libs vorbisfile) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}vorbisfile-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}vorbisfile-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_VORBISFILE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_VORBISFILE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_VORBISFILE="$CONFIG_VORBISFILE" # 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_CONFIG_VORBISFILE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_VORBISFILE=$ac_cv_path_CONFIG_VORBISFILE
if test -n "$CONFIG_VORBISFILE"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_VORBISFILE" >&5
$as_echo "$CONFIG_VORBISFILE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_VORBISFILE"; then
  ac_pt_CONFIG_VORBISFILE=$CONFIG_VORBISFILE
  # Extract the first word of "vorbisfile-config", so it can be a program name with args.
set dummy vorbisfile-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_VORBISFILE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_VORBISFILE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_VORBISFILE="$ac_pt_CONFIG_VORBISFILE" # 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_ac_pt_CONFIG_VORBISFILE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_VORBISFILE=$ac_cv_path_ac_pt_CONFIG_VORBISFILE
if test -n "$ac_pt_CONFIG_VORBISFILE"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_VORBISFILE" >&5
$as_echo "$ac_pt_CONFIG_VORBISFILE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_VORBISFILE" = x; then
    CONFIG_VORBISFILE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_VORBISFILE=$ac_pt_CONFIG_VORBISFILE
  fi
else
  CONFIG_VORBISFILE="$ac_cv_path_CONFIG_VORBISFILE"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VORBISFILE --cflags ") >&5
  ($CONFIG_VORBISFILE --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_VORBISFILE --libs ") >&5
  ($CONFIG_VORBISFILE --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libvorbisfile" >&5
$as_echo_n "checking for libvorbisfile... " >&6; }
if test "${cs_cv_libvorbisfile+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libvorbisfile" >&5
$as_echo "$cs_cv_libvorbisfile" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libvorbisfile" >&5
$as_echo_n "checking for libvorbisfile... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libvorbisfile" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_vorbisfile != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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 Speex.  In addition to the standard installed locations, we
# also search CS/libs/libspeex*
#------------------------------------------------------------------------------
if test "$cs_cv_libogg" = yes; then

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


    # Backward compatibility: Recognize --with-libspeex as alias for --with-speex.
    if test -n "$with_libspeex" &&
           test -z "$with_speex"; then
  with_speex="$with_libspeex"
fi


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

    if test "$with_speex" != no; then

	# If --with-speex value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_speex" != "$cs_cv_with_speex"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_speex != yes; then
  PATH="$with_speex/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_speex$PATH_SEPARATOR$with_speex/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes speex" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes speex... " >&6; }
if test "${cs_cv_prog_pkg_config_speex+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists speex; then
  cs_cv_prog_pkg_config_speex=yes
else
  cs_cv_prog_pkg_config_speex=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_speex" >&5
$as_echo "$cs_cv_prog_pkg_config_speex" >&6; }
	if test $cs_cv_prog_pkg_config_speex = yes; then
  if test -z "$cs_cv_prog_pkg_config_speex_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags speex") >&5
  ($PKG_CONFIG --cflags speex) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs speex") >&5
  ($PKG_CONFIG --libs speex) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_speex_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_speex_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}speex-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}speex-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_SPEEX+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_SPEEX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_SPEEX="$CONFIG_SPEEX" # 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_CONFIG_SPEEX="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_SPEEX=$ac_cv_path_CONFIG_SPEEX
if test -n "$CONFIG_SPEEX"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_SPEEX" >&5
$as_echo "$CONFIG_SPEEX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_SPEEX"; then
  ac_pt_CONFIG_SPEEX=$CONFIG_SPEEX
  # Extract the first word of "speex-config", so it can be a program name with args.
set dummy speex-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_SPEEX+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_SPEEX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_SPEEX="$ac_pt_CONFIG_SPEEX" # 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_ac_pt_CONFIG_SPEEX="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_SPEEX=$ac_cv_path_ac_pt_CONFIG_SPEEX
if test -n "$ac_pt_CONFIG_SPEEX"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_SPEEX" >&5
$as_echo "$ac_pt_CONFIG_SPEEX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_SPEEX" = x; then
    CONFIG_SPEEX=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_SPEEX=$ac_pt_CONFIG_SPEEX
  fi
else
  CONFIG_SPEEX="$ac_cv_path_CONFIG_SPEEX"
fi

    if test -n "$CONFIG_SPEEX"; then
  if test -z "$cs_cv_prog_config_speex_ok"; then
  if $CONFIG_SPEEX --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_speex_ok=yes
else
  cs_cv_prog_config_speex_ok=no
fi

fi

	if test $cs_cv_prog_config_speex_ok = yes; then
  if test -z "$cs_cv_prog_config_speex_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_SPEEX --cflags ") >&5
  ($CONFIG_SPEEX --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_SPEEX --libs ") >&5
  ($CONFIG_SPEEX --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_speex_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_speex_flags"
fi

fi



	if test $with_speex != yes; then
  cs_check_lib_paths=$with_speex
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/libspeex.*"
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 "speex"; then
  cs_check_lib_libs="-lspeex"
	cs_check_lib_framework="-framework speex"
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 "speex"; then
  cs_check_lib_libs="-lspeex"
	cs_check_lib_framework="-framework speex"
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 "speex"; then
  cs_check_lib_libs="-lspeex"
	cs_check_lib_framework="-framework speex"
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
  { $as_echo "$as_me:$LINENO: checking for libspeex" >&5
$as_echo_n "checking for libspeex... " >&6; }
if test "${cs_cv_libspeex+set}" = set; then
  $as_echo_n "(cached) " >&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 <speex/speex.h>
int
main ()
{
SpeexBits bits; speex_bits_init(&bits);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libspeex=yes
		cs_cv_libspeex_cflags=$cs_build_cflags
		cs_cv_libspeex_lflags=$cs_build_lflags
		cs_cv_libspeex_libs=$cs_build_libs
else
  cs_cv_libspeex=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libspeex" >&5
$as_echo "$cs_cv_libspeex" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libspeex" >&5
$as_echo_n "checking for libspeex... " >&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 <speex/speex.h>
int
main ()
{
SpeexBits bits; speex_bits_init(&bits);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libspeex=yes
		cs_cv_libspeex_cflags=$cs_build_cflags
		cs_cv_libspeex_lflags=$cs_build_lflags
		cs_cv_libspeex_libs=$cs_build_libs
else
  cs_cv_libspeex=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libspeex" >&5
$as_echo "$cs_cv_libspeex" >&6; }
fi

    if test $cs_cv_libspeex = yes; then
  :
else
  cs_cv_libspeex_cflags=''
	cs_cv_libspeex_lflags=''
	cs_cv_libspeex_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_speex != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libspeex=no
fi


    cs_cv_with_speex="$with_speex"
    if test "$cs_cv_libspeex" = yes; then
  if test "$cs_cv_libspeex" = 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}SPEEX.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libspeex_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}SPEEX.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libspeex_lflags $cs_cv_libspeex_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}SPEEX.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi

fi


if test "$cs_cv_libspeex" = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for speex_header_free()" >&5
$as_echo_n "checking for speex_header_free()... " >&6; }
if test "${cs_cv_speex_header_free+set}" = set; then
  $as_echo_n "(cached) " >&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_libspeex_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libspeex_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libspeex_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 <speex/speex_header.h>
int
main ()
{
SpeexHeader* header = 0; speex_header_free(header);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libspeex_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libspeex_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libspeex_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_speex_header_free=yes
		cs_cv_speex_header_free_cflags=$cs_build_cflags
		cs_cv_speex_header_free_lflags=$cs_build_lflags
		cs_cv_speex_header_free_libs=$cs_build_libs
else
  cs_cv_speex_header_free=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_speex_header_free" >&5
$as_echo "$cs_cv_speex_header_free" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for speex_header_free()" >&5
$as_echo_n "checking for speex_header_free()... " >&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_libspeex_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libspeex_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libspeex_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 <speex/speex_header.h>
int
main ()
{
SpeexHeader* header = 0; speex_header_free(header);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libspeex_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libspeex_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libspeex_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_speex_header_free=yes
		cs_cv_speex_header_free_cflags=$cs_build_cflags
		cs_cv_speex_header_free_lflags=$cs_build_lflags
		cs_cv_speex_header_free_libs=$cs_build_libs
else
  cs_cv_speex_header_free=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_speex_header_free" >&5
$as_echo "$cs_cv_speex_header_free" >&6; }
fi

    if test $cs_cv_speex_header_free = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SPEEX_HEADER_FREE
"
else
  cs_cv_speex_header_free_cflags=''
	cs_cv_speex_header_free_lflags=''
	cs_cv_speex_header_free_libs=''

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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_3ds != yes; then
  PATH="$with_3ds/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_3ds$PATH_SEPARATOR$with_3ds/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes 3ds" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes 3ds... " >&6; }
if test "${cs_cv_prog_pkg_config_3ds+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_3ds" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags 3ds") >&5
  ($PKG_CONFIG --cflags 3ds) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs 3ds") >&5
  ($PKG_CONFIG --libs 3ds) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}3ds-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}3ds-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_3DS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_3DS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_3DS="$CONFIG_3DS" # 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_CONFIG_3DS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_3DS=$ac_cv_path_CONFIG_3DS
if test -n "$CONFIG_3DS"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_3DS" >&5
$as_echo "$CONFIG_3DS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_3DS"; then
  ac_pt_CONFIG_3DS=$CONFIG_3DS
  # Extract the first word of "3ds-config", so it can be a program name with args.
set dummy 3ds-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_3DS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_3DS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_3DS="$ac_pt_CONFIG_3DS" # 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_ac_pt_CONFIG_3DS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_3DS=$ac_cv_path_ac_pt_CONFIG_3DS
if test -n "$ac_pt_CONFIG_3DS"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_3DS" >&5
$as_echo "$ac_pt_CONFIG_3DS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_3DS" = x; then
    CONFIG_3DS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_3DS=$ac_pt_CONFIG_3DS
  fi
else
  CONFIG_3DS="$ac_cv_path_CONFIG_3DS"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_3DS --cflags ") >&5
  ($CONFIG_3DS --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_3DS --libs ") >&5
  ($CONFIG_3DS --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lib3ds" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes lib3ds... " >&6; }
if test "${cs_cv_prog_pkg_config_lib3ds+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lib3ds" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lib3ds") >&5
  ($PKG_CONFIG --cflags lib3ds) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs lib3ds") >&5
  ($PKG_CONFIG --libs lib3ds) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}lib3ds-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}lib3ds-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIB3DS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIB3DS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIB3DS="$CONFIG_LIB3DS" # 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_CONFIG_LIB3DS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIB3DS=$ac_cv_path_CONFIG_LIB3DS
if test -n "$CONFIG_LIB3DS"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIB3DS" >&5
$as_echo "$CONFIG_LIB3DS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIB3DS"; then
  ac_pt_CONFIG_LIB3DS=$CONFIG_LIB3DS
  # Extract the first word of "lib3ds-config", so it can be a program name with args.
set dummy lib3ds-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIB3DS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIB3DS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIB3DS="$ac_pt_CONFIG_LIB3DS" # 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_ac_pt_CONFIG_LIB3DS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIB3DS=$ac_cv_path_ac_pt_CONFIG_LIB3DS
if test -n "$ac_pt_CONFIG_LIB3DS"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIB3DS" >&5
$as_echo "$ac_pt_CONFIG_LIB3DS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIB3DS" = x; then
    CONFIG_LIB3DS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIB3DS=$ac_pt_CONFIG_LIB3DS
  fi
else
  CONFIG_LIB3DS="$ac_cv_path_CONFIG_LIB3DS"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIB3DS --cflags ") >&5
  ($CONFIG_LIB3DS --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIB3DS --libs ") >&5
  ($CONFIG_LIB3DS --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes lib3ds-120" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes lib3ds-120... " >&6; }
if test "${cs_cv_prog_pkg_config_lib3ds_120+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_lib3ds_120" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags lib3ds-120") >&5
  ($PKG_CONFIG --cflags lib3ds-120) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs lib3ds-120") >&5
  ($PKG_CONFIG --libs lib3ds-120) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}lib3ds-120-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}lib3ds-120-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIB3DS_120+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIB3DS_120 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIB3DS_120="$CONFIG_LIB3DS_120" # 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_CONFIG_LIB3DS_120="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIB3DS_120=$ac_cv_path_CONFIG_LIB3DS_120
if test -n "$CONFIG_LIB3DS_120"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIB3DS_120" >&5
$as_echo "$CONFIG_LIB3DS_120" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIB3DS_120"; then
  ac_pt_CONFIG_LIB3DS_120=$CONFIG_LIB3DS_120
  # Extract the first word of "lib3ds-120-config", so it can be a program name with args.
set dummy lib3ds-120-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIB3DS_120+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIB3DS_120 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIB3DS_120="$ac_pt_CONFIG_LIB3DS_120" # 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_ac_pt_CONFIG_LIB3DS_120="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIB3DS_120=$ac_cv_path_ac_pt_CONFIG_LIB3DS_120
if test -n "$ac_pt_CONFIG_LIB3DS_120"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIB3DS_120" >&5
$as_echo "$ac_pt_CONFIG_LIB3DS_120" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIB3DS_120" = x; then
    CONFIG_LIB3DS_120=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIB3DS_120=$ac_pt_CONFIG_LIB3DS_120
  fi
else
  CONFIG_LIB3DS_120="$ac_cv_path_CONFIG_LIB3DS_120"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIB3DS_120 --cflags ") >&5
  ($CONFIG_LIB3DS_120 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIB3DS_120 --libs ") >&5
  ($CONFIG_LIB3DS_120 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for lib3ds" >&5
$as_echo_n "checking for lib3ds... " >&6; }
if test "${cs_cv_lib3ds+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds" >&5
$as_echo "$cs_cv_lib3ds" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for lib3ds" >&5
$as_echo_n "checking for lib3ds... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_3ds != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_lib3ds=no
fi


    cs_cv_with_3ds="$with_3ds"


if test $cs_cv_lib3ds = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if lib3ds is sufficiently recent" >&5
$as_echo_n "checking if lib3ds is sufficiently recent... " >&6; }
if test "${cs_cv_lib3ds_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds_recent" >&5
$as_echo "$cs_cv_lib3ds_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if lib3ds is sufficiently recent" >&5
$as_echo_n "checking if lib3ds is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds_recent" >&5
$as_echo "$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

	if test $cs_cv_lib3ds_recent = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for generic lib3ds data I/O callbacks" >&5
$as_echo_n "checking for generic lib3ds data I/O callbacks... " >&6; }
if test "${cs_cv_lib3ds_1_3+set}" = set; then
  $as_echo_n "(cached) " >&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_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>
	        size_t DataReadFunc (void *self, void *buffer, size_t n) {}
int
main ()
{
lib3ds_io_new (0, 0, 0, 0, DataReadFunc, 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_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_1_3=yes
		cs_cv_lib3ds_1_3_cflags=$cs_build_cflags
		cs_cv_lib3ds_1_3_lflags=$cs_build_lflags
		cs_cv_lib3ds_1_3_libs=$cs_build_libs
else
  cs_cv_lib3ds_1_3=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds_1_3" >&5
$as_echo "$cs_cv_lib3ds_1_3" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for generic lib3ds data I/O callbacks" >&5
$as_echo_n "checking for generic lib3ds data I/O callbacks... " >&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_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>
	        size_t DataReadFunc (void *self, void *buffer, size_t n) {}
int
main ()
{
lib3ds_io_new (0, 0, 0, 0, DataReadFunc, 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_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_1_3=yes
		cs_cv_lib3ds_1_3_cflags=$cs_build_cflags
		cs_cv_lib3ds_1_3_lflags=$cs_build_lflags
		cs_cv_lib3ds_1_3_libs=$cs_build_libs
else
  cs_cv_lib3ds_1_3=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_lib3ds_1_3" >&5
$as_echo "$cs_cv_lib3ds_1_3" >&6; }
fi

    if test $cs_cv_lib3ds_1_3 = 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}LIB3DS.GENERIC_DATA_IO_CALLBACKS ?= $cs_build_prop_val ;
"
fi

else
  cs_cv_lib3ds_1_3_cflags=''
	cs_cv_lib3ds_1_3_lflags=''
	cs_cv_lib3ds_1_3_libs=''

fi

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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_ode != yes; then
  PATH="$with_ode/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_ode$PATH_SEPARATOR$with_ode/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes ode" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes ode... " >&6; }
if test "${cs_cv_prog_pkg_config_ode+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_ode" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags ode") >&5
  ($PKG_CONFIG --cflags ode) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs ode") >&5
  ($PKG_CONFIG --libs ode) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ode-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}ode-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_ODE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_ODE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_ODE="$CONFIG_ODE" # 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_CONFIG_ODE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_ODE=$ac_cv_path_CONFIG_ODE
if test -n "$CONFIG_ODE"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_ODE" >&5
$as_echo "$CONFIG_ODE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_ODE"; then
  ac_pt_CONFIG_ODE=$CONFIG_ODE
  # Extract the first word of "ode-config", so it can be a program name with args.
set dummy ode-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_ODE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_ODE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_ODE="$ac_pt_CONFIG_ODE" # 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_ac_pt_CONFIG_ODE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_ODE=$ac_cv_path_ac_pt_CONFIG_ODE
if test -n "$ac_pt_CONFIG_ODE"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_ODE" >&5
$as_echo "$ac_pt_CONFIG_ODE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_ODE" = x; then
    CONFIG_ODE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ODE=$ac_pt_CONFIG_ODE
  fi
else
  CONFIG_ODE="$ac_cv_path_CONFIG_ODE"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ODE --cflags ") >&5
  ($CONFIG_ODE --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ODE --libs ") >&5
  ($CONFIG_ODE --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libode" >&5
$as_echo_n "checking for libode... " >&6; }
if test "${cs_cv_libode+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libode" >&5
$as_echo "$cs_cv_libode" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libode" >&5
$as_echo_n "checking for libode... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libode" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_ode != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libode=no
fi


    cs_cv_with_ode="$with_ode"


if test $cs_cv_libode = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if libode is built with OPCODE support" >&5
$as_echo_n "checking if libode is built with OPCODE support... " >&6; }
if test "${cs_cv_libode_opcode+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libode_opcode" >&5
$as_echo "$cs_cv_libode_opcode" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if libode is built with OPCODE support" >&5
$as_echo_n "checking if libode is built with OPCODE support... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libode_opcode" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking if libode is sufficiently recent" >&5
$as_echo_n "checking if libode is sufficiently recent... " >&6; }
if test "${cs_cv_libode_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libode_recent" >&5
$as_echo "$cs_cv_libode_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if libode is sufficiently recent" >&5
$as_echo_n "checking if libode is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libode_recent" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
# Note: The pkg-config package name for Bullet 2.x is 'bullet', but the actual
# libraries are bulletdynamics, bulletcollision and bulletmath. So note that
# there is actually no 'bullet' 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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_bullet != yes; then
  PATH="$with_bullet/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_bullet$PATH_SEPARATOR$with_bullet/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bullet" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes bullet... " >&6; }
if test "${cs_cv_prog_pkg_config_bullet+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bullet" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bullet") >&5
  ($PKG_CONFIG --cflags bullet) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs bullet") >&5
  ($PKG_CONFIG --libs bullet) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}bullet-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}bullet-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_BULLET+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_BULLET in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_BULLET="$CONFIG_BULLET" # 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_CONFIG_BULLET="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_BULLET=$ac_cv_path_CONFIG_BULLET
if test -n "$CONFIG_BULLET"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_BULLET" >&5
$as_echo "$CONFIG_BULLET" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_BULLET"; then
  ac_pt_CONFIG_BULLET=$CONFIG_BULLET
  # Extract the first word of "bullet-config", so it can be a program name with args.
set dummy bullet-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_BULLET+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_BULLET in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_BULLET="$ac_pt_CONFIG_BULLET" # 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_ac_pt_CONFIG_BULLET="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_BULLET=$ac_cv_path_ac_pt_CONFIG_BULLET
if test -n "$ac_pt_CONFIG_BULLET"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_BULLET" >&5
$as_echo "$ac_pt_CONFIG_BULLET" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_BULLET" = x; then
    CONFIG_BULLET=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BULLET=$ac_pt_CONFIG_BULLET
  fi
else
  CONFIG_BULLET="$ac_cv_path_CONFIG_BULLET"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BULLET --cflags ") >&5
  ($CONFIG_BULLET --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BULLET --libs ") >&5
  ($CONFIG_BULLET --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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

	    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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bulletdynamics" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes bulletdynamics... " >&6; }
if test "${cs_cv_prog_pkg_config_bulletdynamics+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists bulletdynamics; then
  cs_cv_prog_pkg_config_bulletdynamics=yes
else
  cs_cv_prog_pkg_config_bulletdynamics=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bulletdynamics" >&5
$as_echo "$cs_cv_prog_pkg_config_bulletdynamics" >&6; }
	if test $cs_cv_prog_pkg_config_bulletdynamics = yes; then
  if test -z "$cs_cv_prog_pkg_config_bulletdynamics_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bulletdynamics") >&5
  ($PKG_CONFIG --cflags bulletdynamics) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs bulletdynamics") >&5
  ($PKG_CONFIG --libs bulletdynamics) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_bulletdynamics_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_bulletdynamics_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}bulletdynamics-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}bulletdynamics-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_BULLETDYNAMICS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_BULLETDYNAMICS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_BULLETDYNAMICS="$CONFIG_BULLETDYNAMICS" # 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_CONFIG_BULLETDYNAMICS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_BULLETDYNAMICS=$ac_cv_path_CONFIG_BULLETDYNAMICS
if test -n "$CONFIG_BULLETDYNAMICS"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_BULLETDYNAMICS" >&5
$as_echo "$CONFIG_BULLETDYNAMICS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_BULLETDYNAMICS"; then
  ac_pt_CONFIG_BULLETDYNAMICS=$CONFIG_BULLETDYNAMICS
  # Extract the first word of "bulletdynamics-config", so it can be a program name with args.
set dummy bulletdynamics-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_BULLETDYNAMICS+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_BULLETDYNAMICS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_BULLETDYNAMICS="$ac_pt_CONFIG_BULLETDYNAMICS" # 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_ac_pt_CONFIG_BULLETDYNAMICS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_BULLETDYNAMICS=$ac_cv_path_ac_pt_CONFIG_BULLETDYNAMICS
if test -n "$ac_pt_CONFIG_BULLETDYNAMICS"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_BULLETDYNAMICS" >&5
$as_echo "$ac_pt_CONFIG_BULLETDYNAMICS" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_BULLETDYNAMICS" = x; then
    CONFIG_BULLETDYNAMICS=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BULLETDYNAMICS=$ac_pt_CONFIG_BULLETDYNAMICS
  fi
else
  CONFIG_BULLETDYNAMICS="$ac_cv_path_CONFIG_BULLETDYNAMICS"
fi

    if test -n "$CONFIG_BULLETDYNAMICS"; then
  if test -z "$cs_cv_prog_config_bulletdynamics_ok"; then
  if $CONFIG_BULLETDYNAMICS --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_bulletdynamics_ok=yes
else
  cs_cv_prog_config_bulletdynamics_ok=no
fi

fi

	if test $cs_cv_prog_config_bulletdynamics_ok = yes; then
  if test -z "$cs_cv_prog_config_bulletdynamics_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BULLETDYNAMICS --cflags ") >&5
  ($CONFIG_BULLETDYNAMICS --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BULLETDYNAMICS --libs ") >&5
  ($CONFIG_BULLETDYNAMICS --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_bulletdynamics_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_bulletdynamics_flags"
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
	    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 "bulletdynamics"; then
  cs_check_lib_libs="-lbulletdynamics"
	cs_check_lib_framework="-framework bulletdynamics"
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 "bulletdynamics"; then
  cs_check_lib_libs="-lbulletdynamics"
	cs_check_lib_framework="-framework bulletdynamics"
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 "bulletdynamics"; then
  cs_check_lib_libs="-lbulletdynamics"
	cs_check_lib_framework="-framework bulletdynamics"
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
  { $as_echo "$as_me:$LINENO: checking for libbullet" >&5
$as_echo_n "checking for libbullet... " >&6; }
if test "${cs_cv_libbullet+set}" = set; then
  $as_echo_n "(cached) " >&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 -lbulletdynamics -lbulletcollision -lbulletmath $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 "btBulletDynamicsCommon.h"
      #include "btBulletCollisionCommon.h"
int
main ()
{
btCollisionDispatcher* d;
      btBroadphaseInterface* b;
      btSequentialImpulseConstraintSolver* s;
      btDefaultCollisionConfiguration* c;
      btDynamicsWorld* world = new btDiscreteDynamicsWorld (d, b, s, c)
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 -lbulletdynamics -lbulletcollision -lbulletmath | 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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libbullet" >&5
$as_echo "$cs_cv_libbullet" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libbullet" >&5
$as_echo_n "checking for libbullet... " >&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 -lbulletdynamics -lbulletcollision -lbulletmath $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 "btBulletDynamicsCommon.h"
      #include "btBulletCollisionCommon.h"
int
main ()
{
btCollisionDispatcher* d;
      btBroadphaseInterface* b;
      btSequentialImpulseConstraintSolver* s;
      btDefaultCollisionConfiguration* c;
      btDynamicsWorld* world = new btDiscreteDynamicsWorld (d, b, s, c)
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 -lbulletdynamics -lbulletcollision -lbulletmath | 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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libbullet" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_bullet != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libbullet=no
fi


    cs_cv_with_bullet="$with_bullet"


if test $cs_cv_libbullet = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if bullet is sufficiently recent (>=2.68)" >&5
$as_echo_n "checking if bullet is sufficiently recent (>=2.68)... " >&6; }
if test "${cs_cv_bullet_recent+set}" = set; then
  $as_echo_n "(cached) " >&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_libbullet_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbullet_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbullet_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 "btBulletDynamicsCommon.h"
int
main ()
{
btManifoldPoint *p = new btManifoldPoint();
             p->m_appliedImpulse;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libbullet_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbullet_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbullet_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_bullet_recent=yes
		cs_cv_bullet_recent_cflags=$cs_build_cflags
		cs_cv_bullet_recent_lflags=$cs_build_lflags
		cs_cv_bullet_recent_libs=$cs_build_libs
else
  cs_cv_bullet_recent=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_bullet_recent" >&5
$as_echo "$cs_cv_bullet_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if bullet is sufficiently recent (>=2.68)" >&5
$as_echo_n "checking if bullet is sufficiently recent (>=2.68)... " >&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_libbullet_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libbullet_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libbullet_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 "btBulletDynamicsCommon.h"
int
main ()
{
btManifoldPoint *p = new btManifoldPoint();
             p->m_appliedImpulse;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libbullet_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libbullet_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libbullet_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_bullet_recent=yes
		cs_cv_bullet_recent_cflags=$cs_build_cflags
		cs_cv_bullet_recent_lflags=$cs_build_lflags
		cs_cv_bullet_recent_libs=$cs_build_libs
else
  cs_cv_bullet_recent=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_bullet_recent" >&5
$as_echo "$cs_cv_bullet_recent" >&6; }
fi

    if test $cs_cv_bullet_recent = yes; then
  if test "$cs_cv_bullet_recent" = 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_bullet_recent_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_bullet_recent_lflags $cs_cv_bullet_recent_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

else
  cs_cv_bullet_recent_cflags=''
	cs_cv_bullet_recent_lflags=''
	cs_cv_bullet_recent_libs=''

fi

fi



#------------------------------------------------------------------------------
# Check for OpenAL.
#------------------------------------------------------------------------------
# CS_AL_INCLUDE(CPP-MACRO,FALLBACK,HEADER)





    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for OpenAL" >&5
$as_echo_n "checking for OpenAL... " >&6; }
if test "${cs_cv_libopenal+set}" = set; then
  $as_echo_n "(cached) " >&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 @@@-lOpenAL32 | sed 'y% %#%'` \
	`echo @@@-lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-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,alc.h)
    #else
    #include <AL/alc.h>
    #endif
int
main ()
{
alcCreateContext (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libopenal" >&5
$as_echo "$cs_cv_libopenal" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for OpenAL" >&5
$as_echo_n "checking for OpenAL... " >&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 @@@-lOpenAL32 | sed 'y% %#%'` \
	`echo @@@-lopenal -ldsound | sed 'y% %#%'` \
	`echo @@@-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,alc.h)
    #else
    #include <AL/alc.h>
    #endif
int
main ()
{
alcCreateContext (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libopenal" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_freetype2 != yes; then
  PATH="$with_freetype2/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_freetype2$PATH_SEPARATOR$with_freetype2/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes freetype2" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes freetype2... " >&6; }
if test "${cs_cv_prog_pkg_config_freetype2+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_freetype2" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags freetype2") >&5
  ($PKG_CONFIG --cflags freetype2) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs freetype2") >&5
  ($PKG_CONFIG --libs freetype2) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}freetype2-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}freetype2-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_FREETYPE2+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_FREETYPE2 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_FREETYPE2="$CONFIG_FREETYPE2" # 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_CONFIG_FREETYPE2="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_FREETYPE2=$ac_cv_path_CONFIG_FREETYPE2
if test -n "$CONFIG_FREETYPE2"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_FREETYPE2" >&5
$as_echo "$CONFIG_FREETYPE2" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_FREETYPE2"; then
  ac_pt_CONFIG_FREETYPE2=$CONFIG_FREETYPE2
  # Extract the first word of "freetype2-config", so it can be a program name with args.
set dummy freetype2-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_FREETYPE2+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_FREETYPE2 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_FREETYPE2="$ac_pt_CONFIG_FREETYPE2" # 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_ac_pt_CONFIG_FREETYPE2="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_FREETYPE2=$ac_cv_path_ac_pt_CONFIG_FREETYPE2
if test -n "$ac_pt_CONFIG_FREETYPE2"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_FREETYPE2" >&5
$as_echo "$ac_pt_CONFIG_FREETYPE2" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_FREETYPE2" = x; then
    CONFIG_FREETYPE2=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_FREETYPE2=$ac_pt_CONFIG_FREETYPE2
  fi
else
  CONFIG_FREETYPE2="$ac_cv_path_CONFIG_FREETYPE2"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_FREETYPE2 --cflags ") >&5
  ($CONFIG_FREETYPE2 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_FREETYPE2 --libs ") >&5
  ($CONFIG_FREETYPE2 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes freetype" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes freetype... " >&6; }
if test "${cs_cv_prog_pkg_config_freetype+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_freetype" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags freetype") >&5
  ($PKG_CONFIG --cflags freetype) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs freetype") >&5
  ($PKG_CONFIG --libs freetype) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}freetype-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}freetype-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_FREETYPE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_FREETYPE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_FREETYPE="$CONFIG_FREETYPE" # 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_CONFIG_FREETYPE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_FREETYPE=$ac_cv_path_CONFIG_FREETYPE
if test -n "$CONFIG_FREETYPE"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_FREETYPE" >&5
$as_echo "$CONFIG_FREETYPE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_FREETYPE"; then
  ac_pt_CONFIG_FREETYPE=$CONFIG_FREETYPE
  # Extract the first word of "freetype-config", so it can be a program name with args.
set dummy freetype-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_FREETYPE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_FREETYPE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_FREETYPE="$ac_pt_CONFIG_FREETYPE" # 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_ac_pt_CONFIG_FREETYPE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_FREETYPE=$ac_cv_path_ac_pt_CONFIG_FREETYPE
if test -n "$ac_pt_CONFIG_FREETYPE"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_FREETYPE" >&5
$as_echo "$ac_pt_CONFIG_FREETYPE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_FREETYPE" = x; then
    CONFIG_FREETYPE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_FREETYPE=$ac_pt_CONFIG_FREETYPE
  fi
else
  CONFIG_FREETYPE="$ac_cv_path_CONFIG_FREETYPE"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_FREETYPE --cflags ") >&5
  ($CONFIG_FREETYPE --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_FREETYPE --libs ") >&5
  ($CONFIG_FREETYPE --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libfreetype2" >&5
$as_echo_n "checking for libfreetype2... " >&6; }
if test "${cs_cv_libfreetype2+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libfreetype2" >&5
$as_echo "$cs_cv_libfreetype2" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libfreetype2" >&5
$as_echo_n "checking for libfreetype2... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libfreetype2" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_freetype2 != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libfreetype2=no
fi


    cs_cv_with_freetype2="$with_freetype2"


if test $cs_cv_libfreetype2 = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if freetype2 is sufficiently recent" >&5
$as_echo_n "checking if freetype2 is sufficiently recent... " >&6; }
if test "${cs_cv_freetype2_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_freetype2_recent" >&5
$as_echo "$cs_cv_freetype2_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if freetype2 is sufficiently recent" >&5
$as_echo_n "checking if freetype2 is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_freetype2_recent" >&5
$as_echo "$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*)
	    { $as_echo "$as_me:$LINENO: checking for libmingwex" >&5
$as_echo_n "checking for libmingwex... " >&6; }
if test "${cs_cv_libmingwex+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libmingwex" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_cal3d != yes; then
  PATH="$with_cal3d/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_cal3d$PATH_SEPARATOR$with_cal3d/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cal3d" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cal3d... " >&6; }
if test "${cs_cv_prog_pkg_config_cal3d+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cal3d" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cal3d") >&5
  ($PKG_CONFIG --cflags cal3d) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cal3d") >&5
  ($PKG_CONFIG --libs cal3d) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cal3d-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cal3d-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CAL3D+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CAL3D in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CAL3D="$CONFIG_CAL3D" # 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_CONFIG_CAL3D="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CAL3D=$ac_cv_path_CONFIG_CAL3D
if test -n "$CONFIG_CAL3D"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CAL3D" >&5
$as_echo "$CONFIG_CAL3D" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CAL3D"; then
  ac_pt_CONFIG_CAL3D=$CONFIG_CAL3D
  # Extract the first word of "cal3d-config", so it can be a program name with args.
set dummy cal3d-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CAL3D+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CAL3D in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CAL3D="$ac_pt_CONFIG_CAL3D" # 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_ac_pt_CONFIG_CAL3D="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CAL3D=$ac_cv_path_ac_pt_CONFIG_CAL3D
if test -n "$ac_pt_CONFIG_CAL3D"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CAL3D" >&5
$as_echo "$ac_pt_CONFIG_CAL3D" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CAL3D" = x; then
    CONFIG_CAL3D=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CAL3D=$ac_pt_CONFIG_CAL3D
  fi
else
  CONFIG_CAL3D="$ac_cv_path_CONFIG_CAL3D"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAL3D --cflags ") >&5
  ($CONFIG_CAL3D --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CAL3D --libs ") >&5
  ($CONFIG_CAL3D --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libcal3d" >&5
$as_echo_n "checking for libcal3d... " >&6; }
if test "${cs_cv_libcal3d+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcal3d" >&5
$as_echo "$cs_cv_libcal3d" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcal3d" >&5
$as_echo_n "checking for libcal3d... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcal3d" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_cal3d != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libcal3d=no
fi


    cs_cv_with_cal3d="$with_cal3d"


if test $cs_cv_libcal3d = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if cal3d is sufficiently recent" >&5
$as_echo_n "checking if cal3d is sufficiently recent... " >&6; }
if test "${cs_cv_cal3d_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_cal3d_recent" >&5
$as_echo "$cs_cv_cal3d_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if cal3d is sufficiently recent" >&5
$as_echo_n "checking if cal3d is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_cal3d_recent" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_sdl != yes; then
  PATH="$with_sdl/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_sdl$PATH_SEPARATOR$with_sdl/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes sdl" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes sdl... " >&6; }
if test "${cs_cv_prog_pkg_config_sdl+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_sdl" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags sdl") >&5
  ($PKG_CONFIG --cflags sdl) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs sdl") >&5
  ($PKG_CONFIG --libs sdl) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}sdl-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}sdl-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_SDL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_SDL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_SDL="$CONFIG_SDL" # 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_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_SDL=$ac_cv_path_CONFIG_SDL
if test -n "$CONFIG_SDL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_SDL" >&5
$as_echo "$CONFIG_SDL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_SDL"; then
  ac_pt_CONFIG_SDL=$CONFIG_SDL
  # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_SDL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_SDL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_SDL="$ac_pt_CONFIG_SDL" # 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_ac_pt_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_SDL=$ac_cv_path_ac_pt_CONFIG_SDL
if test -n "$ac_pt_CONFIG_SDL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_SDL" >&5
$as_echo "$ac_pt_CONFIG_SDL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_SDL" = x; then
    CONFIG_SDL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_SDL=$ac_pt_CONFIG_SDL
  fi
else
  CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_SDL --cflags ") >&5
  ($CONFIG_SDL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_SDL --libs ") >&5
  ($CONFIG_SDL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libsdl" >&5
$as_echo_n "checking for libsdl... " >&6; }
if test "${cs_cv_libsdl+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libsdl" >&5
$as_echo "$cs_cv_libsdl" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libsdl" >&5
$as_echo_n "checking for libsdl... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libsdl" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_sdl != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libsdl=no
fi


    cs_cv_with_sdl="$with_sdl"


if test $cs_cv_libsdl = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if SDL is sufficiently recent" >&5
$as_echo_n "checking if SDL is sufficiently recent... " >&6; }
if test "${cs_cv_sdl_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sdl_recent" >&5
$as_echo "$cs_cv_sdl_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if SDL is sufficiently recent" >&5
$as_echo_n "checking if SDL is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sdl_recent" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_wx != yes; then
  PATH="$with_wx/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_wx$PATH_SEPARATOR$with_wx/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes wx" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes wx... " >&6; }
if test "${cs_cv_prog_pkg_config_wx+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_wx" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags wx") >&5
  ($PKG_CONFIG --cflags wx) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs wx") >&5
  ($PKG_CONFIG --libs wx) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}wx-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}wx-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_WX+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_WX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_WX="$CONFIG_WX" # 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_CONFIG_WX="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_WX=$ac_cv_path_CONFIG_WX
if test -n "$CONFIG_WX"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_WX" >&5
$as_echo "$CONFIG_WX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_WX"; then
  ac_pt_CONFIG_WX=$CONFIG_WX
  # Extract the first word of "wx-config", so it can be a program name with args.
set dummy wx-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_WX+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_WX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_WX="$ac_pt_CONFIG_WX" # 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_ac_pt_CONFIG_WX="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_WX=$ac_cv_path_ac_pt_CONFIG_WX
if test -n "$ac_pt_CONFIG_WX"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_WX" >&5
$as_echo "$ac_pt_CONFIG_WX" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_WX" = x; then
    CONFIG_WX=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_WX=$ac_pt_CONFIG_WX
  fi
else
  CONFIG_WX="$ac_cv_path_CONFIG_WX"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_WX --cflags ") >&5
  ($CONFIG_WX --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_WX --libs ") >&5
  ($CONFIG_WX --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libwx" >&5
$as_echo_n "checking for libwx... " >&6; }
if test "${cs_cv_libwx+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libwx" >&5
$as_echo "$cs_cv_libwx" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libwx" >&5
$as_echo_n "checking for libwx... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libwx" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_wx != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libwx=no
fi


    cs_cv_with_wx="$with_wx"


if test $cs_cv_libwx = yes; then
  if test $cs_host_family = windows; then
  { $as_echo "$as_me:$LINENO: checking if defining UNICODE is needed for WX" >&5
$as_echo_n "checking if defining UNICODE is needed for WX... " >&6; }
if test "${cs_cv_libwx_needs_UNICODE+set}" = set; then
  $as_echo_n "(cached) " >&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 <windows.h>
		    #include "wx/wxprec.h"
		    #ifdef __BORLANDC__
		    #pragma hdrstop
		    #endif
		    #ifndef WX_PRECOMP
		    #include "wx/wx.h"
		    #endif

int
main ()
{
wxString 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_needs_UNICODE=no
else
  cs_cv_libwx_cflags="$cs_cv_libwx_cflags -DUNICODE -D_UNICODE"
		cs_cv_libwx_needs_UNICODE=yes
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libwx_needs_UNICODE" >&5
$as_echo "$cs_cv_libwx_needs_UNICODE" >&6; }
fi

    if test -z "$cs_cv_libwx_opengl"; then
  if test -n "$CONFIG_WX"; then
  cs_cv_libwx_gllibs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_WX --gl-libs") >&5
  ($CONFIG_WX --gl-libs) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
else
  cs_cv_libwx_gllibs=''
fi

fi

    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if wxWidgets is built with OpenGL support" >&5
$as_echo_n "checking if wxWidgets is built with OpenGL support... " >&6; }
if test "${cs_cv_libwx_opengl+set}" = set; then
  $as_echo_n "(cached) " >&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, wxPoint());
	    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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libwx_opengl" >&5
$as_echo "$cs_cv_libwx_opengl" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if wxWidgets is built with OpenGL support" >&5
$as_echo_n "checking if wxWidgets is built with OpenGL support... " >&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, wxPoint());
	    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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libwx_opengl" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_CEGUI != yes; then
  PATH="$with_CEGUI/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_CEGUI$PATH_SEPARATOR$with_CEGUI/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CEGUI" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CEGUI... " >&6; }
if test "${cs_cv_prog_pkg_config_CEGUI+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CEGUI" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CEGUI") >&5
  ($PKG_CONFIG --cflags CEGUI) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CEGUI") >&5
  ($PKG_CONFIG --libs CEGUI) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CEGUI-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CEGUI-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CEGUI+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CEGUI in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CEGUI="$CONFIG_CEGUI" # 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_CONFIG_CEGUI="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CEGUI=$ac_cv_path_CONFIG_CEGUI
if test -n "$CONFIG_CEGUI"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CEGUI" >&5
$as_echo "$CONFIG_CEGUI" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CEGUI"; then
  ac_pt_CONFIG_CEGUI=$CONFIG_CEGUI
  # Extract the first word of "CEGUI-config", so it can be a program name with args.
set dummy CEGUI-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CEGUI+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CEGUI in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CEGUI="$ac_pt_CONFIG_CEGUI" # 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_ac_pt_CONFIG_CEGUI="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CEGUI=$ac_cv_path_ac_pt_CONFIG_CEGUI
if test -n "$ac_pt_CONFIG_CEGUI"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CEGUI" >&5
$as_echo "$ac_pt_CONFIG_CEGUI" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CEGUI" = x; then
    CONFIG_CEGUI=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CEGUI=$ac_pt_CONFIG_CEGUI
  fi
else
  CONFIG_CEGUI="$ac_cv_path_CONFIG_CEGUI"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CEGUI --cflags ") >&5
  ($CONFIG_CEGUI --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CEGUI --libs ") >&5
  ($CONFIG_CEGUI --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CEGUIBase" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CEGUIBase... " >&6; }
if test "${cs_cv_prog_pkg_config_CEGUIBase+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CEGUIBase" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CEGUIBase") >&5
  ($PKG_CONFIG --cflags CEGUIBase) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CEGUIBase") >&5
  ($PKG_CONFIG --libs CEGUIBase) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CEGUIBase-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CEGUIBase-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CEGUIBASE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CEGUIBASE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CEGUIBASE="$CONFIG_CEGUIBASE" # 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_CONFIG_CEGUIBASE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CEGUIBASE=$ac_cv_path_CONFIG_CEGUIBASE
if test -n "$CONFIG_CEGUIBASE"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CEGUIBASE" >&5
$as_echo "$CONFIG_CEGUIBASE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CEGUIBASE"; then
  ac_pt_CONFIG_CEGUIBASE=$CONFIG_CEGUIBASE
  # Extract the first word of "CEGUIBase-config", so it can be a program name with args.
set dummy CEGUIBase-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CEGUIBASE+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CEGUIBASE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CEGUIBASE="$ac_pt_CONFIG_CEGUIBASE" # 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_ac_pt_CONFIG_CEGUIBASE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CEGUIBASE=$ac_cv_path_ac_pt_CONFIG_CEGUIBASE
if test -n "$ac_pt_CONFIG_CEGUIBASE"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CEGUIBASE" >&5
$as_echo "$ac_pt_CONFIG_CEGUIBASE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CEGUIBASE" = x; then
    CONFIG_CEGUIBASE=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CEGUIBASE=$ac_pt_CONFIG_CEGUIBASE
  fi
else
  CONFIG_CEGUIBASE="$ac_cv_path_CONFIG_CEGUIBASE"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CEGUIBASE --cflags ") >&5
  ($CONFIG_CEGUIBASE --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CEGUIBASE --libs ") >&5
  ($CONFIG_CEGUIBASE --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libCEGUI" >&5
$as_echo_n "checking for libCEGUI... " >&6; }
if test "${cs_cv_libCEGUI+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libCEGUI" >&5
$as_echo "$cs_cv_libCEGUI" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libCEGUI" >&5
$as_echo_n "checking for libCEGUI... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libCEGUI" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_CEGUI != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libCEGUI=no
fi


    cs_cv_with_CEGUI="$with_CEGUI"


if test $cs_cv_libCEGUI = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if CEGUI is sufficiently recent" >&5
$as_echo_n "checking if CEGUI is sufficiently recent... " >&6; }
if test "${cs_cv_CEGUI_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_CEGUI_recent" >&5
$as_echo "$cs_cv_CEGUI_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if CEGUI is sufficiently recent" >&5
$as_echo_n "checking if CEGUI is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_CEGUI_recent" >&5
$as_echo "$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 for GTK.
#----------------------------------------------------------------------------

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


    # Backward compatibility: Recognize --with-libGTK as alias for --with-GTK.
    if test -n "$with_libGTK" &&
           test -z "$with_GTK"; then
  with_GTK="$with_libGTK"
fi


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

    if test "$with_GTK" != no; then

	# If --with-GTK value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_GTK" != "$cs_cv_with_GTK"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_GTK != yes; then
  PATH="$with_GTK/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_GTK$PATH_SEPARATOR$with_GTK/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes GTK" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes GTK... " >&6; }
if test "${cs_cv_prog_pkg_config_GTK+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists GTK; then
  cs_cv_prog_pkg_config_GTK=yes
else
  cs_cv_prog_pkg_config_GTK=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_GTK" >&5
$as_echo "$cs_cv_prog_pkg_config_GTK" >&6; }
	if test $cs_cv_prog_pkg_config_GTK = yes; then
  if test -z "$cs_cv_prog_pkg_config_GTK_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags GTK") >&5
  ($PKG_CONFIG --cflags GTK) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs GTK") >&5
  ($PKG_CONFIG --libs GTK) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_GTK_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_GTK_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}GTK-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}GTK-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_GTK+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_GTK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_GTK="$CONFIG_GTK" # 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_CONFIG_GTK="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_GTK=$ac_cv_path_CONFIG_GTK
if test -n "$CONFIG_GTK"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_GTK" >&5
$as_echo "$CONFIG_GTK" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_GTK"; then
  ac_pt_CONFIG_GTK=$CONFIG_GTK
  # Extract the first word of "GTK-config", so it can be a program name with args.
set dummy GTK-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_GTK+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_GTK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_GTK="$ac_pt_CONFIG_GTK" # 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_ac_pt_CONFIG_GTK="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_GTK=$ac_cv_path_ac_pt_CONFIG_GTK
if test -n "$ac_pt_CONFIG_GTK"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_GTK" >&5
$as_echo "$ac_pt_CONFIG_GTK" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_GTK" = x; then
    CONFIG_GTK=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_GTK=$ac_pt_CONFIG_GTK
  fi
else
  CONFIG_GTK="$ac_cv_path_CONFIG_GTK"
fi

    if test -n "$CONFIG_GTK"; then
  if test -z "$cs_cv_prog_config_GTK_ok"; then
  if $CONFIG_GTK --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_GTK_ok=yes
else
  cs_cv_prog_config_GTK_ok=no
fi

fi

	if test $cs_cv_prog_config_GTK_ok = yes; then
  if test -z "$cs_cv_prog_config_GTK_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_GTK --cflags ") >&5
  ($CONFIG_GTK --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_GTK --libs ") >&5
  ($CONFIG_GTK --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_GTK_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_GTK_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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes gtk+-2.0" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes gtk+-2.0... " >&6; }
if test "${cs_cv_prog_pkg_config_gtkp_2_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists gtk+-2.0; then
  cs_cv_prog_pkg_config_gtkp_2_0=yes
else
  cs_cv_prog_pkg_config_gtkp_2_0=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_gtkp_2_0" >&5
$as_echo "$cs_cv_prog_pkg_config_gtkp_2_0" >&6; }
	if test $cs_cv_prog_pkg_config_gtkp_2_0 = yes; then
  if test -z "$cs_cv_prog_pkg_config_gtkp_2_0_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags gtk+-2.0") >&5
  ($PKG_CONFIG --cflags gtk+-2.0) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs gtk+-2.0") >&5
  ($PKG_CONFIG --libs gtk+-2.0) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_gtkp_2_0_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_gtkp_2_0_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gtk+-2.0-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}gtk+-2.0-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_GTKP_2_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_GTKP_2_0 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_GTKP_2_0="$CONFIG_GTKP_2_0" # 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_CONFIG_GTKP_2_0="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_GTKP_2_0=$ac_cv_path_CONFIG_GTKP_2_0
if test -n "$CONFIG_GTKP_2_0"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_GTKP_2_0" >&5
$as_echo "$CONFIG_GTKP_2_0" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_GTKP_2_0"; then
  ac_pt_CONFIG_GTKP_2_0=$CONFIG_GTKP_2_0
  # Extract the first word of "gtk+-2.0-config", so it can be a program name with args.
set dummy gtk+-2.0-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_GTKP_2_0+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_GTKP_2_0 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_GTKP_2_0="$ac_pt_CONFIG_GTKP_2_0" # 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_ac_pt_CONFIG_GTKP_2_0="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_GTKP_2_0=$ac_cv_path_ac_pt_CONFIG_GTKP_2_0
if test -n "$ac_pt_CONFIG_GTKP_2_0"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_GTKP_2_0" >&5
$as_echo "$ac_pt_CONFIG_GTKP_2_0" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_GTKP_2_0" = x; then
    CONFIG_GTKP_2_0=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_GTKP_2_0=$ac_pt_CONFIG_GTKP_2_0
  fi
else
  CONFIG_GTKP_2_0="$ac_cv_path_CONFIG_GTKP_2_0"
fi

    if test -n "$CONFIG_GTKP_2_0"; then
  if test -z "$cs_cv_prog_config_gtkp_2_0_ok"; then
  if $CONFIG_GTKP_2_0 --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_gtkp_2_0_ok=yes
else
  cs_cv_prog_config_gtkp_2_0_ok=no
fi

fi

	if test $cs_cv_prog_config_gtkp_2_0_ok = yes; then
  if test -z "$cs_cv_prog_config_gtkp_2_0_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_GTKP_2_0 --cflags ") >&5
  ($CONFIG_GTKP_2_0 --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_GTKP_2_0 --libs ") >&5
  ($CONFIG_GTKP_2_0 --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_gtkp_2_0_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_gtkp_2_0_flags"
fi

fi



	if test $with_GTK != yes; then
  cs_check_lib_paths=$with_GTK
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 "GTK"; then
  cs_check_lib_libs="-lGTK"
	cs_check_lib_framework="-framework GTK"
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 "GTK"; then
  cs_check_lib_libs="-lGTK"
	cs_check_lib_framework="-framework GTK"
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 "GTK"; then
  cs_check_lib_libs="-lGTK"
	cs_check_lib_framework="-framework GTK"
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 "gtk+-2.0"; then
  cs_check_lib_libs="-lgtk+-2.0"
	cs_check_lib_framework="-framework gtk+-2.0"
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 "gtk+-2.0"; then
  cs_check_lib_libs="-lgtk+-2.0"
	cs_check_lib_framework="-framework gtk+-2.0"
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 "gtk+-2.0"; then
  cs_check_lib_libs="-lgtk+-2.0"
	cs_check_lib_framework="-framework gtk+-2.0"
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
  { $as_echo "$as_me:$LINENO: checking for libGTK" >&5
$as_echo_n "checking for libGTK... " >&6; }
if test "${cs_cv_libGTK+set}" = set; then
  $as_echo_n "(cached) " >&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 <gtk/gtk.h>
int
main ()
{
gtk_message_dialog_new (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libGTK=yes
		cs_cv_libGTK_cflags=$cs_build_cflags
		cs_cv_libGTK_lflags=$cs_build_lflags
		cs_cv_libGTK_libs=$cs_build_libs
else
  cs_cv_libGTK=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libGTK" >&5
$as_echo "$cs_cv_libGTK" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libGTK" >&5
$as_echo_n "checking for libGTK... " >&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 <gtk/gtk.h>
int
main ()
{
gtk_message_dialog_new (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libGTK=yes
		cs_cv_libGTK_cflags=$cs_build_cflags
		cs_cv_libGTK_lflags=$cs_build_lflags
		cs_cv_libGTK_libs=$cs_build_libs
else
  cs_cv_libGTK=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libGTK" >&5
$as_echo "$cs_cv_libGTK" >&6; }
fi

    if test $cs_cv_libGTK = yes; then
  :
else
  cs_cv_libGTK_cflags=''
	cs_cv_libGTK_lflags=''
	cs_cv_libGTK_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_GTK != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libGTK=no
fi


    cs_cv_with_GTK="$with_GTK"
    if test "$cs_cv_libGTK" = yes; then
  if test "$cs_cv_libGTK" = 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}GTK.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libGTK_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}GTK.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libGTK_lflags $cs_cv_libGTK_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}GTK.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi


if test $cs_cv_libGTK = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if gtk_message_dialog_format_secondary_text is available" >&5
$as_echo_n "checking if gtk_message_dialog_format_secondary_text is available... " >&6; }
if test "${cs_cv_GTK_gtk_message_dialog_format_secondary_text+set}" = set; then
  $as_echo_n "(cached) " >&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_libGTK_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libGTK_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libGTK_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 <gtk/gtk.h>
int
main ()
{
gtk_message_dialog_format_secondary_text (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libGTK_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libGTK_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libGTK_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_GTK_gtk_message_dialog_format_secondary_text=yes
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_cflags=$cs_build_cflags
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_lflags=$cs_build_lflags
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_libs=$cs_build_libs
else
  cs_cv_GTK_gtk_message_dialog_format_secondary_text=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_GTK_gtk_message_dialog_format_secondary_text" >&5
$as_echo "$cs_cv_GTK_gtk_message_dialog_format_secondary_text" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if gtk_message_dialog_format_secondary_text is available" >&5
$as_echo_n "checking if gtk_message_dialog_format_secondary_text is available... " >&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_libGTK_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libGTK_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libGTK_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 <gtk/gtk.h>
int
main ()
{
gtk_message_dialog_format_secondary_text (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libGTK_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libGTK_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libGTK_libs | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_cv_GTK_gtk_message_dialog_format_secondary_text=yes
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_cflags=$cs_build_cflags
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_lflags=$cs_build_lflags
		cs_cv_GTK_gtk_message_dialog_format_secondary_text_libs=$cs_build_libs
else
  cs_cv_GTK_gtk_message_dialog_format_secondary_text=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_GTK_gtk_message_dialog_format_secondary_text" >&5
$as_echo "$cs_cv_GTK_gtk_message_dialog_format_secondary_text" >&6; }
fi

    if test $cs_cv_GTK_gtk_message_dialog_format_secondary_text = 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}GTK.MESSAGE_HAS_SECONDARY ?= $cs_build_prop_val ;
"
fi

else
  cs_cv_GTK_gtk_message_dialog_format_secondary_text_cflags=''
	cs_cv_GTK_gtk_message_dialog_format_secondary_text_lflags=''
	cs_cv_GTK_gtk_message_dialog_format_secondary_text_libs=''

fi

fi




#------------------------------------------------------------------------------
# Check if GNU/Linux joystick API is present.
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for GNU/Linux joystick API" >&5
$as_echo_n "checking for GNU/Linux joystick API... " >&6; }
if test "${cs_cv_sys_linux_joystick+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_linux_joystick" >&5
$as_echo "$cs_cv_sys_linux_joystick" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for GNU/Linux joystick API" >&5
$as_echo_n "checking for GNU/Linux joystick API... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sys_linux_joystick" >&5
$as_echo "$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.
#
# A note on the 'log()' call: on Linux, libCg.so itself doesn't depend on
# the libm's shared object. However, if the --as-needed flag is used in
# LDFLAGS, and the app itself doesn't use a function from libm, it's symbols
# won't be available, causing problems. Normally any app calls some libm
# function. However, the default test program doesn't, so the link test fails.
# And the same applies to pthread, too.
# The workaround is to explicitly strip -Wl,--as-needed from LDFLAGS.
#------------------------------------------------------------------------------





    LDFLAGS_BACKUP="$LDFLAGS"
    LDFLAGS=`echo "$LDFLAGS" | sed s/-Wl,--as-needed//`

# 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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_Cg != yes; then
  PATH="$with_Cg/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_Cg$PATH_SEPARATOR$with_Cg/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Cg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes Cg... " >&6; }
if test "${cs_cv_prog_pkg_config_Cg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Cg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Cg") >&5
  ($PKG_CONFIG --cflags Cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs Cg") >&5
  ($PKG_CONFIG --libs Cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}Cg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}Cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "Cg-config", so it can be a program name with args.
set dummy Cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cg... " >&6; }
if test "${cs_cv_prog_pkg_config_cg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cg") >&5
  ($PKG_CONFIG --cflags cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cg") >&5
  ($PKG_CONFIG --libs cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "cg-config", so it can be a program name with args.
set dummy cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CG" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CG... " >&6; }
if test "${cs_cv_prog_pkg_config_CG+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CG" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CG") >&5
  ($PKG_CONFIG --cflags CG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CG") >&5
  ($PKG_CONFIG --libs CG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CG-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CG-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "CG-config", so it can be a program name with args.
set dummy CG-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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 $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
  { $as_echo "$as_me:$LINENO: checking for libCg" >&5
$as_echo_n "checking for libCg... " >&6; }
if test "${cs_cv_libCg+set}" = set; then
  $as_echo_n "(cached) " >&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_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libCg" >&5
$as_echo "$cs_cv_libCg" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libCg" >&5
$as_echo_n "checking for libCg... " >&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_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libCg" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_Cg != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libCg=no
fi


    cs_cv_with_Cg="$with_Cg"


    if test $cs_cv_libCg = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if Cg is sufficiently recent" >&5
$as_echo_n "checking if Cg is sufficiently recent... " >&6; }
if test "${cs_cv_libCg_recent+set}" = set; then
  $as_echo_n "(cached) " >&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_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 | 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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libCg_recent" >&5
$as_echo "$cs_cv_libCg_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if Cg is sufficiently recent" >&5
$as_echo_n "checking if Cg is sufficiently recent... " >&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_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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 | 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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libCg_recent" >&5
$as_echo "$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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_CgGL != yes; then
  PATH="$with_CgGL/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_CgGL$PATH_SEPARATOR$with_CgGL/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CgGL" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CgGL... " >&6; }
if test "${cs_cv_prog_pkg_config_CgGL+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CgGL" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CgGL") >&5
  ($PKG_CONFIG --cflags CgGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CgGL") >&5
  ($PKG_CONFIG --libs CgGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CgGL-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CgGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CGGL="$CONFIG_CGGL" # 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_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CGGL=$ac_cv_path_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
$as_echo "$CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CGGL"; then
  ac_pt_CONFIG_CGGL=$CONFIG_CGGL
  # Extract the first word of "CgGL-config", so it can be a program name with args.
set dummy CgGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CGGL="$ac_pt_CONFIG_CGGL" # 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_ac_pt_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CGGL=$ac_cv_path_ac_pt_CONFIG_CGGL
if test -n "$ac_pt_CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CGGL" >&5
$as_echo "$ac_pt_CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_pt_CONFIG_CGGL
  fi
else
  CONFIG_CGGL="$ac_cv_path_CONFIG_CGGL"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cggl" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cggl... " >&6; }
if test "${cs_cv_prog_pkg_config_cggl+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cggl" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cggl") >&5
  ($PKG_CONFIG --cflags cggl) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cggl") >&5
  ($PKG_CONFIG --libs cggl) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cggl-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cggl-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CGGL="$CONFIG_CGGL" # 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_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CGGL=$ac_cv_path_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
$as_echo "$CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CGGL"; then
  ac_pt_CONFIG_CGGL=$CONFIG_CGGL
  # Extract the first word of "cggl-config", so it can be a program name with args.
set dummy cggl-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CGGL="$ac_pt_CONFIG_CGGL" # 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_ac_pt_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CGGL=$ac_cv_path_ac_pt_CONFIG_CGGL
if test -n "$ac_pt_CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CGGL" >&5
$as_echo "$ac_pt_CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_pt_CONFIG_CGGL
  fi
else
  CONFIG_CGGL="$ac_cv_path_CONFIG_CGGL"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cgGL" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cgGL... " >&6; }
if test "${cs_cv_prog_pkg_config_cgGL+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cgGL" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cgGL") >&5
  ($PKG_CONFIG --cflags cgGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cgGL") >&5
  ($PKG_CONFIG --libs cgGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cgGL-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cgGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CGGL="$CONFIG_CGGL" # 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_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CGGL=$ac_cv_path_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
$as_echo "$CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CGGL"; then
  ac_pt_CONFIG_CGGL=$CONFIG_CGGL
  # Extract the first word of "cgGL-config", so it can be a program name with args.
set dummy cgGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CGGL="$ac_pt_CONFIG_CGGL" # 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_ac_pt_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CGGL=$ac_cv_path_ac_pt_CONFIG_CGGL
if test -n "$ac_pt_CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CGGL" >&5
$as_echo "$ac_pt_CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_pt_CONFIG_CGGL
  fi
else
  CONFIG_CGGL="$ac_cv_path_CONFIG_CGGL"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CGGL" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CGGL... " >&6; }
if test "${cs_cv_prog_pkg_config_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CGGL" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CGGL") >&5
  ($PKG_CONFIG --cflags CGGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CGGL") >&5
  ($PKG_CONFIG --libs CGGL) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CGGL-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CGGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CGGL="$CONFIG_CGGL" # 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_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CGGL=$ac_cv_path_CONFIG_CGGL
if test -n "$CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CGGL" >&5
$as_echo "$CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CGGL"; then
  ac_pt_CONFIG_CGGL=$CONFIG_CGGL
  # Extract the first word of "CGGL-config", so it can be a program name with args.
set dummy CGGL-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CGGL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CGGL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CGGL="$ac_pt_CONFIG_CGGL" # 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_ac_pt_CONFIG_CGGL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CGGL=$ac_cv_path_ac_pt_CONFIG_CGGL
if test -n "$ac_pt_CONFIG_CGGL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CGGL" >&5
$as_echo "$ac_pt_CONFIG_CGGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CGGL" = x; then
    CONFIG_CGGL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CGGL=$ac_pt_CONFIG_CGGL
  fi
else
  CONFIG_CGGL="$ac_cv_path_CONFIG_CGGL"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --cflags ") >&5
  ($CONFIG_CGGL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CGGL --libs ") >&5
  ($CONFIG_CGGL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes Cg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes Cg... " >&6; }
if test "${cs_cv_prog_pkg_config_Cg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_Cg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags Cg") >&5
  ($PKG_CONFIG --cflags Cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs Cg") >&5
  ($PKG_CONFIG --libs Cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}Cg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}Cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "Cg-config", so it can be a program name with args.
set dummy Cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cg" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cg... " >&6; }
if test "${cs_cv_prog_pkg_config_cg+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cg" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cg") >&5
  ($PKG_CONFIG --cflags cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cg") >&5
  ($PKG_CONFIG --libs cg) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "cg-config", so it can be a program name with args.
set dummy cg-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes CG" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes CG... " >&6; }
if test "${cs_cv_prog_pkg_config_CG+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_CG" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags CG") >&5
  ($PKG_CONFIG --cflags CG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs CG") >&5
  ($PKG_CONFIG --libs CG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}CG-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}CG-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CG="$CONFIG_CG" # 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_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CG=$ac_cv_path_CONFIG_CG
if test -n "$CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CG" >&5
$as_echo "$CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CG"; then
  ac_pt_CONFIG_CG=$CONFIG_CG
  # Extract the first word of "CG-config", so it can be a program name with args.
set dummy CG-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CG+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CG="$ac_pt_CONFIG_CG" # 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_ac_pt_CONFIG_CG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CG=$ac_cv_path_ac_pt_CONFIG_CG
if test -n "$ac_pt_CONFIG_CG"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CG" >&5
$as_echo "$ac_pt_CONFIG_CG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CG" = x; then
    CONFIG_CG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CG=$ac_pt_CONFIG_CG
  fi
else
  CONFIG_CG="$ac_cv_path_CONFIG_CG"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --cflags ") >&5
  ($CONFIG_CG --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CG --libs ") >&5
  ($CONFIG_CG --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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 $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
  { $as_echo "$as_me:$LINENO: checking for libCgGL" >&5
$as_echo_n "checking for libCgGL... " >&6; }
if test "${cs_cv_libCgGL+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libCgGL" >&5
$as_echo "$cs_cv_libCgGL" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libCgGL" >&5
$as_echo_n "checking for libCgGL... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libCgGL" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_CgGL != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


    LDFLAGS="$LDFLAGS_BACKUP"



#------------------------------------------------------------------------------
# Check for OpenSoundSystem (OSS).
#------------------------------------------------------------------------------
if test $cs_host_family != windows; then
  if test "${ac_cv_header_soundcard_h+set}" = set; then
  { $as_echo "$as_me:$LINENO: checking for soundcard.h" >&5
$as_echo_n "checking for soundcard.h... " >&6; }
if test "${ac_cv_header_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5
$as_echo "$ac_cv_header_soundcard_h" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking soundcard.h usability" >&5
$as_echo_n "checking soundcard.h usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking soundcard.h presence" >&5
$as_echo_n "checking soundcard.h presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: soundcard.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for soundcard.h" >&5
$as_echo_n "checking for soundcard.h... " >&6; }
if test "${ac_cv_header_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_header_soundcard_h=$ac_header_preproc
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5
$as_echo "$ac_cv_header_soundcard_h" >&6; }

fi
if test "x$ac_cv_header_soundcard_h" = x""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
  { $as_echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
$as_echo_n "checking for sys/soundcard.h... " >&6; }
if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
$as_echo "$ac_cv_header_sys_soundcard_h" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5
$as_echo_n "checking sys/soundcard.h usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5
$as_echo_n "checking sys/soundcard.h presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
$as_echo_n "checking for sys/soundcard.h... " >&6; }
if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_header_sys_soundcard_h=$ac_header_preproc
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5
$as_echo "$ac_cv_header_sys_soundcard_h" >&6; }

fi
if test "x$ac_cv_header_sys_soundcard_h" = x""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
  { $as_echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
$as_echo_n "checking for machine/soundcard.h... " >&6; }
if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
$as_echo "$ac_cv_header_machine_soundcard_h" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking machine/soundcard.h usability" >&5
$as_echo_n "checking machine/soundcard.h usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking machine/soundcard.h presence" >&5
$as_echo_n "checking machine/soundcard.h presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: machine/soundcard.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: machine/soundcard.h: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for machine/soundcard.h" >&5
$as_echo_n "checking for machine/soundcard.h... " >&6; }
if test "${ac_cv_header_machine_soundcard_h+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_header_machine_soundcard_h=$ac_header_preproc
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_machine_soundcard_h" >&5
$as_echo "$ac_cv_header_machine_soundcard_h" >&6; }

fi
if test "x$ac_cv_header_machine_soundcard_h" = x""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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_jackasyn != yes; then
  PATH="$with_jackasyn/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_jackasyn$PATH_SEPARATOR$with_jackasyn/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes jackasyn" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes jackasyn... " >&6; }
if test "${cs_cv_prog_pkg_config_jackasyn+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_jackasyn" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags jackasyn") >&5
  ($PKG_CONFIG --cflags jackasyn) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs jackasyn") >&5
  ($PKG_CONFIG --libs jackasyn) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}jackasyn-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}jackasyn-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_JACKASYN+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_JACKASYN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_JACKASYN="$CONFIG_JACKASYN" # 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_CONFIG_JACKASYN="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_JACKASYN=$ac_cv_path_CONFIG_JACKASYN
if test -n "$CONFIG_JACKASYN"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_JACKASYN" >&5
$as_echo "$CONFIG_JACKASYN" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_JACKASYN"; then
  ac_pt_CONFIG_JACKASYN=$CONFIG_JACKASYN
  # Extract the first word of "jackasyn-config", so it can be a program name with args.
set dummy jackasyn-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_JACKASYN+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_JACKASYN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_JACKASYN="$ac_pt_CONFIG_JACKASYN" # 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_ac_pt_CONFIG_JACKASYN="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_JACKASYN=$ac_cv_path_ac_pt_CONFIG_JACKASYN
if test -n "$ac_pt_CONFIG_JACKASYN"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_JACKASYN" >&5
$as_echo "$ac_pt_CONFIG_JACKASYN" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_JACKASYN" = x; then
    CONFIG_JACKASYN=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_JACKASYN=$ac_pt_CONFIG_JACKASYN
  fi
else
  CONFIG_JACKASYN="$ac_cv_path_CONFIG_JACKASYN"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_JACKASYN --cflags ") >&5
  ($CONFIG_JACKASYN --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_JACKASYN --libs ") >&5
  ($CONFIG_JACKASYN --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libjackasyn" >&5
$as_echo_n "checking for libjackasyn... " >&6; }
if test "${cs_cv_libjackasyn+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libjackasyn" >&5
$as_echo "$cs_cv_libjackasyn" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libjackasyn" >&5
$as_echo_n "checking for libjackasyn... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libjackasyn" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_jackasyn != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_asound != yes; then
  PATH="$with_asound/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_asound$PATH_SEPARATOR$with_asound/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes asound" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes asound... " >&6; }
if test "${cs_cv_prog_pkg_config_asound+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_asound" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags asound") >&5
  ($PKG_CONFIG --cflags asound) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs asound") >&5
  ($PKG_CONFIG --libs asound) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}asound-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}asound-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_ASOUND+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_ASOUND in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_ASOUND="$CONFIG_ASOUND" # 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_CONFIG_ASOUND="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_ASOUND=$ac_cv_path_CONFIG_ASOUND
if test -n "$CONFIG_ASOUND"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_ASOUND" >&5
$as_echo "$CONFIG_ASOUND" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_ASOUND"; then
  ac_pt_CONFIG_ASOUND=$CONFIG_ASOUND
  # Extract the first word of "asound-config", so it can be a program name with args.
set dummy asound-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_ASOUND+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_ASOUND in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_ASOUND="$ac_pt_CONFIG_ASOUND" # 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_ac_pt_CONFIG_ASOUND="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_ASOUND=$ac_cv_path_ac_pt_CONFIG_ASOUND
if test -n "$ac_pt_CONFIG_ASOUND"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_ASOUND" >&5
$as_echo "$ac_pt_CONFIG_ASOUND" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_ASOUND" = x; then
    CONFIG_ASOUND=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_ASOUND=$ac_pt_CONFIG_ASOUND
  fi
else
  CONFIG_ASOUND="$ac_cv_path_CONFIG_ASOUND"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ASOUND --cflags ") >&5
  ($CONFIG_ASOUND --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_ASOUND --libs ") >&5
  ($CONFIG_ASOUND --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libasound" >&5
$as_echo_n "checking for libasound... " >&6; }
if test "${cs_cv_libasound+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libasound" >&5
$as_echo "$cs_cv_libasound" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libasound" >&5
$as_echo_n "checking for libasound... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libasound" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_asound != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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).
#------------------------------------------------------------------------------
# NOTE: Would solely pkg-config be used for caca detection the separate cucul
#  test could be dropped since it would be contained in caca.

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


    # Backward compatibility: Recognize --with-libcucul as alias for --with-cucul.
    if test -n "$with_libcucul" &&
           test -z "$with_cucul"; then
  with_cucul="$with_libcucul"
fi


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

    if test "$with_cucul" != no; then

	# If --with-cucul value is same as cached value, then assume other
	 # cached values are also valid; otherwise, ignore all cached values.
	if test "$with_cucul" != "$cs_cv_with_cucul"; then
  cs_ignore_cache=yes
else
  cs_ignore_cache=no
fi


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_cucul != yes; then
  PATH="$with_cucul/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_cucul$PATH_SEPARATOR$with_cucul/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cucul" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cucul... " >&6; }
if test "${cs_cv_prog_pkg_config_cucul+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists cucul; then
  cs_cv_prog_pkg_config_cucul=yes
else
  cs_cv_prog_pkg_config_cucul=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cucul" >&5
$as_echo "$cs_cv_prog_pkg_config_cucul" >&6; }
	if test $cs_cv_prog_pkg_config_cucul = yes; then
  if test -z "$cs_cv_prog_pkg_config_cucul_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cucul") >&5
  ($PKG_CONFIG --cflags cucul) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cucul") >&5
  ($PKG_CONFIG --libs cucul) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_cucul_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_cucul_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cucul-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cucul-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CUCUL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CUCUL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CUCUL="$CONFIG_CUCUL" # 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_CONFIG_CUCUL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CUCUL=$ac_cv_path_CONFIG_CUCUL
if test -n "$CONFIG_CUCUL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CUCUL" >&5
$as_echo "$CONFIG_CUCUL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CUCUL"; then
  ac_pt_CONFIG_CUCUL=$CONFIG_CUCUL
  # Extract the first word of "cucul-config", so it can be a program name with args.
set dummy cucul-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CUCUL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CUCUL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CUCUL="$ac_pt_CONFIG_CUCUL" # 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_ac_pt_CONFIG_CUCUL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CUCUL=$ac_cv_path_ac_pt_CONFIG_CUCUL
if test -n "$ac_pt_CONFIG_CUCUL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CUCUL" >&5
$as_echo "$ac_pt_CONFIG_CUCUL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CUCUL" = x; then
    CONFIG_CUCUL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CUCUL=$ac_pt_CONFIG_CUCUL
  fi
else
  CONFIG_CUCUL="$ac_cv_path_CONFIG_CUCUL"
fi

    if test -n "$CONFIG_CUCUL"; then
  if test -z "$cs_cv_prog_config_cucul_ok"; then
  if $CONFIG_CUCUL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_cucul_ok=yes
else
  cs_cv_prog_config_cucul_ok=no
fi

fi

	if test $cs_cv_prog_config_cucul_ok = yes; then
  if test -z "$cs_cv_prog_config_cucul_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CUCUL --cflags ") >&5
  ($CONFIG_CUCUL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CUCUL --libs ") >&5
  ($CONFIG_CUCUL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_cucul_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_cucul_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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libcucul" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes libcucul... " >&6; }
if test "${cs_cv_prog_pkg_config_libcucul+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if $PKG_CONFIG --exists libcucul; then
  cs_cv_prog_pkg_config_libcucul=yes
else
  cs_cv_prog_pkg_config_libcucul=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libcucul" >&5
$as_echo "$cs_cv_prog_pkg_config_libcucul" >&6; }
	if test $cs_cv_prog_pkg_config_libcucul = yes; then
  if test -z "$cs_cv_prog_pkg_config_libcucul_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libcucul") >&5
  ($PKG_CONFIG --cflags libcucul) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs libcucul") >&5
  ($PKG_CONFIG --libs libcucul) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_pkg_config_libcucul_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_libcucul_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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}libcucul-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}libcucul-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIBCUCUL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIBCUCUL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIBCUCUL="$CONFIG_LIBCUCUL" # 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_CONFIG_LIBCUCUL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIBCUCUL=$ac_cv_path_CONFIG_LIBCUCUL
if test -n "$CONFIG_LIBCUCUL"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIBCUCUL" >&5
$as_echo "$CONFIG_LIBCUCUL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIBCUCUL"; then
  ac_pt_CONFIG_LIBCUCUL=$CONFIG_LIBCUCUL
  # Extract the first word of "libcucul-config", so it can be a program name with args.
set dummy libcucul-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIBCUCUL+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIBCUCUL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIBCUCUL="$ac_pt_CONFIG_LIBCUCUL" # 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_ac_pt_CONFIG_LIBCUCUL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIBCUCUL=$ac_cv_path_ac_pt_CONFIG_LIBCUCUL
if test -n "$ac_pt_CONFIG_LIBCUCUL"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIBCUCUL" >&5
$as_echo "$ac_pt_CONFIG_LIBCUCUL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIBCUCUL" = x; then
    CONFIG_LIBCUCUL=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBCUCUL=$ac_pt_CONFIG_LIBCUCUL
  fi
else
  CONFIG_LIBCUCUL="$ac_cv_path_CONFIG_LIBCUCUL"
fi

    if test -n "$CONFIG_LIBCUCUL"; then
  if test -z "$cs_cv_prog_config_libcucul_ok"; then
  if $CONFIG_LIBCUCUL --cflags --libs >/dev/null 2>&1; then
  cs_cv_prog_config_libcucul_ok=yes
else
  cs_cv_prog_config_libcucul_ok=no
fi

fi

	if test $cs_cv_prog_config_libcucul_ok = yes; then
  if test -z "$cs_cv_prog_config_libcucul_flags"; then
  cs_check_lib_cflag=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBCUCUL --cflags ") >&5
  ($CONFIG_LIBCUCUL --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBCUCUL --libs ") >&5
  ($CONFIG_LIBCUCUL --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_cv_prog_config_libcucul_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_libcucul_flags"
fi

fi



	if test $with_cucul != yes; then
  cs_check_lib_paths=$with_cucul
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 "cucul"; then
  cs_check_lib_libs="-lcucul"
	cs_check_lib_framework="-framework cucul"
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 "cucul"; then
  cs_check_lib_libs="-lcucul"
	cs_check_lib_framework="-framework cucul"
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 "cucul"; then
  cs_check_lib_libs="-lcucul"
	cs_check_lib_framework="-framework cucul"
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 "libcucul"; then
  cs_check_lib_libs="-llibcucul"
	cs_check_lib_framework="-framework libcucul"
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 "libcucul"; then
  cs_check_lib_libs="-llibcucul"
	cs_check_lib_framework="-framework libcucul"
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 "libcucul"; then
  cs_check_lib_libs="-llibcucul"
	cs_check_lib_framework="-framework libcucul"
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
  { $as_echo "$as_me:$LINENO: checking for libcucul" >&5
$as_echo_n "checking for libcucul... " >&6; }
if test "${cs_cv_libcucul+set}" = set; then
  $as_echo_n "(cached) " >&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 <cucul.h>
int
main ()
{
cucul_create_canvas(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcucul=yes
		cs_cv_libcucul_cflags=$cs_build_cflags
		cs_cv_libcucul_lflags=$cs_build_lflags
		cs_cv_libcucul_libs=$cs_build_libs
else
  cs_cv_libcucul=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcucul" >&5
$as_echo "$cs_cv_libcucul" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcucul" >&5
$as_echo_n "checking for libcucul... " >&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 <cucul.h>
int
main ()
{
cucul_create_canvas(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcucul=yes
		cs_cv_libcucul_cflags=$cs_build_cflags
		cs_cv_libcucul_lflags=$cs_build_lflags
		cs_cv_libcucul_libs=$cs_build_libs
else
  cs_cv_libcucul=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcucul" >&5
$as_echo "$cs_cv_libcucul" >&6; }
fi

    if test $cs_cv_libcucul = yes; then
  :
else
  cs_cv_libcucul_cflags=''
	cs_cv_libcucul_lflags=''
	cs_cv_libcucul_libs=''

fi


	PATH="$PATH_SAVE"
	if test $with_cucul != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libcucul=no
fi


    cs_cv_with_cucul="$with_cucul"
    if test "$cs_cv_libcucul" = yes; then
  if test "$cs_cv_libcucul" = 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}CUCUL.AVAILABLE ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcucul_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}CUCUL.CFLAGS ?= $cs_build_prop_val ;
"
fi

	cs_build_prop_val="$cs_cv_libcucul_lflags $cs_cv_libcucul_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}CUCUL.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi



# 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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_caca != yes; then
  PATH="$with_caca/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_caca$PATH_SEPARATOR$with_caca/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes caca" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes caca... " >&6; }
if test "${cs_cv_prog_pkg_config_caca+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_caca" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags caca") >&5
  ($PKG_CONFIG --cflags caca) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs caca") >&5
  ($PKG_CONFIG --libs caca) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}caca-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}caca-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CACA+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CACA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CACA="$CONFIG_CACA" # 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_CONFIG_CACA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CACA=$ac_cv_path_CONFIG_CACA
if test -n "$CONFIG_CACA"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CACA" >&5
$as_echo "$CONFIG_CACA" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CACA"; then
  ac_pt_CONFIG_CACA=$CONFIG_CACA
  # Extract the first word of "caca-config", so it can be a program name with args.
set dummy caca-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CACA+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CACA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CACA="$ac_pt_CONFIG_CACA" # 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_ac_pt_CONFIG_CACA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CACA=$ac_cv_path_ac_pt_CONFIG_CACA
if test -n "$ac_pt_CONFIG_CACA"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CACA" >&5
$as_echo "$ac_pt_CONFIG_CACA" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CACA" = x; then
    CONFIG_CACA=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CACA=$ac_pt_CONFIG_CACA
  fi
else
  CONFIG_CACA="$ac_cv_path_CONFIG_CACA"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CACA --cflags ") >&5
  ($CONFIG_CACA --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CACA --libs ") >&5
  ($CONFIG_CACA --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes libcaca" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes libcaca... " >&6; }
if test "${cs_cv_prog_pkg_config_libcaca+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_libcaca" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags libcaca") >&5
  ($PKG_CONFIG --cflags libcaca) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs libcaca") >&5
  ($PKG_CONFIG --libs libcaca) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}libcaca-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}libcaca-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_LIBCACA+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_LIBCACA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_LIBCACA="$CONFIG_LIBCACA" # 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_CONFIG_LIBCACA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_LIBCACA=$ac_cv_path_CONFIG_LIBCACA
if test -n "$CONFIG_LIBCACA"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_LIBCACA" >&5
$as_echo "$CONFIG_LIBCACA" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_LIBCACA"; then
  ac_pt_CONFIG_LIBCACA=$CONFIG_LIBCACA
  # Extract the first word of "libcaca-config", so it can be a program name with args.
set dummy libcaca-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_LIBCACA+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_LIBCACA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_LIBCACA="$ac_pt_CONFIG_LIBCACA" # 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_ac_pt_CONFIG_LIBCACA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_LIBCACA=$ac_cv_path_ac_pt_CONFIG_LIBCACA
if test -n "$ac_pt_CONFIG_LIBCACA"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_LIBCACA" >&5
$as_echo "$ac_pt_CONFIG_LIBCACA" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_LIBCACA" = x; then
    CONFIG_LIBCACA=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_LIBCACA=$ac_pt_CONFIG_LIBCACA
  fi
else
  CONFIG_LIBCACA="$ac_cv_path_CONFIG_LIBCACA"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBCACA --cflags ") >&5
  ($CONFIG_LIBCACA --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_LIBCACA --libs ") >&5
  ($CONFIG_LIBCACA --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libcaca" >&5
$as_echo_n "checking for libcaca... " >&6; }
if test "${cs_cv_libcaca+set}" = set; then
  $as_echo_n "(cached) " >&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_libcucul_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcucul_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcucul_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 <caca.h>
int
main ()
{
caca_create_display(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcucul_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcucul_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcucul_libs | 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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcaca" >&5
$as_echo "$cs_cv_libcaca" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcaca" >&5
$as_echo_n "checking for libcaca... " >&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_libcucul_cflags $cs_cflags_save"
	LDFLAGS="$cs_lflags_test $cs_cv_libcucul_lflags $cs_lflags_save"
	LIBS="$cs_libs_test $cs_cv_libcucul_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 <caca.h>
int
main ()
{
caca_create_display(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_libcucul_cflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libcucul_lflags | sed 's/^x//;s/   */ /g;s/^ //;s/ $//'`
	cs_build_libs=`echo x$cs_libs_test $cs_cv_libcucul_libs | 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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcaca" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_caca != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
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}CACA.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}CACA.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}CACA.LFLAGS ?= $cs_build_prop_val ;
"
fi

fi

fi





#------------------------------------------------------------------------------
# Check if regular expressions are available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for regexp support" >&5
$as_echo_n "checking for regexp support... " >&6; }
if test "${cs_cv_regexp+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_regexp" >&5
$as_echo "$cs_cv_regexp" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for regexp support" >&5
$as_echo_n "checking for regexp support... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_regexp" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for backtrace" >&5
$as_echo_n "checking for backtrace... " >&6; }
if test "${cs_cv_backtrace+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_backtrace" >&5
$as_echo "$cs_cv_backtrace" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for backtrace" >&5
$as_echo_n "checking for backtrace... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_backtrace" >&5
$as_echo "$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() or putenv() is available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for setenv" >&5
$as_echo_n "checking for setenv... " >&6; }
if test "${cs_cv_setenv+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_setenv" >&5
$as_echo "$cs_cv_setenv" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for setenv" >&5
$as_echo_n "checking for setenv... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_setenv" >&5
$as_echo "$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


if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for putenv" >&5
$as_echo_n "checking for putenv... " >&6; }
if test "${cs_cv_putenv+set}" = set; then
  $as_echo_n "(cached) " >&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 ()
{
putenv(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_putenv=yes
		cs_cv_putenv_cflags=$cs_build_cflags
		cs_cv_putenv_lflags=$cs_build_lflags
		cs_cv_putenv_libs=$cs_build_libs
else
  cs_cv_putenv=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_putenv" >&5
$as_echo "$cs_cv_putenv" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for putenv" >&5
$as_echo_n "checking for putenv... " >&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 ()
{
putenv(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_putenv=yes
		cs_cv_putenv_cflags=$cs_build_cflags
		cs_cv_putenv_lflags=$cs_build_lflags
		cs_cv_putenv_libs=$cs_build_libs
else
  cs_cv_putenv=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_putenv" >&5
$as_echo "$cs_cv_putenv" >&6; }
fi

    if test $cs_cv_putenv = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_PUTENV
"
else
  cs_cv_putenv_cflags=''
	cs_cv_putenv_lflags=''
	cs_cv_putenv_libs=''

fi




#------------------------------------------------------------------------------
# Check for a couple of memory-related functions.
#------------------------------------------------------------------------------
if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for _aligned_malloc" >&5
$as_echo_n "checking for _aligned_malloc... " >&6; }
if test "${cs_cv__aligned_malloc+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv__aligned_malloc" >&5
$as_echo "$cs_cv__aligned_malloc" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for _aligned_malloc" >&5
$as_echo_n "checking for _aligned_malloc... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv__aligned_malloc" >&5
$as_echo "$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



for ac_header in sys/sysinfo.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_SYS_SYSINFO_H
"
    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for sysinfo()" >&5
$as_echo_n "checking for sysinfo()... " >&6; }
if test "${cs_cv_sysinfo+set}" = set; then
  $as_echo_n "(cached) " >&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 <sys/sysinfo.h>
int
main ()
{
struct sysinfo x; sysinfo(&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_sysinfo=yes
		cs_cv_sysinfo_cflags=$cs_build_cflags
		cs_cv_sysinfo_lflags=$cs_build_lflags
		cs_cv_sysinfo_libs=$cs_build_libs
else
  cs_cv_sysinfo=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sysinfo" >&5
$as_echo "$cs_cv_sysinfo" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for sysinfo()" >&5
$as_echo_n "checking for sysinfo()... " >&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 <sys/sysinfo.h>
int
main ()
{
struct sysinfo x; sysinfo(&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_sysinfo=yes
		cs_cv_sysinfo_cflags=$cs_build_cflags
		cs_cv_sysinfo_lflags=$cs_build_lflags
		cs_cv_sysinfo_libs=$cs_build_libs
else
  cs_cv_sysinfo=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sysinfo" >&5
$as_echo "$cs_cv_sysinfo" >&6; }
fi

    if test $cs_cv_sysinfo = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SYSINFO
"
else
  cs_cv_sysinfo_cflags=''
	cs_cv_sysinfo_lflags=''
	cs_cv_sysinfo_libs=''

fi

    { $as_echo "$as_me:$LINENO: checking for struct sysinfo.totalram" >&5
$as_echo_n "checking for struct sysinfo.totalram... " >&6; }
if test "${ac_cv_member_struct_sysinfo_totalram+set}" = set; then
  $as_echo_n "(cached) " >&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 <sys/sysinfo.h>

int
main ()
{
static struct sysinfo ac_aggr;
if (ac_aggr.totalram)
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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_member_struct_sysinfo_totalram=yes
else
  $as_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.  */
#include <sys/sysinfo.h>

int
main ()
{
static struct sysinfo ac_aggr;
if (sizeof ac_aggr.totalram)
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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_member_struct_sysinfo_totalram=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_member_struct_sysinfo_totalram=no
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sysinfo_totalram" >&5
$as_echo "$ac_cv_member_struct_sysinfo_totalram" >&6; }
if test "x$ac_cv_member_struct_sysinfo_totalram" = x""yes; then

cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SYSINFO_TOTALRAM 1
_ACEOF

cs_header_text="${cs_header_text}#define CS_HAVE_STRUCT_SYSINFO_TOTALRAM
"
fi

fi

done




#------------------------------------------------------------------------------
# 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
  { $as_echo "$as_me:$LINENO: checking if <malloc.h> can be included" >&5
$as_echo_n "checking if <malloc.h> can be included... " >&6; }
if test "${cs_cv_malloc_h_includeable+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_malloc_h_includeable" >&5
$as_echo "$cs_cv_malloc_h_includeable" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if <malloc.h> can be included" >&5
$as_echo_n "checking if <malloc.h> can be included... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_malloc_h_includeable" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for abi::__cxa_demangle" >&5
$as_echo_n "checking for abi::__cxa_demangle... " >&6; }
if test "${cs_cv_abi_cxa_demangle+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_abi_cxa_demangle" >&5
$as_echo "$cs_cv_abi_cxa_demangle" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for abi::__cxa_demangle" >&5
$as_echo_n "checking for abi::__cxa_demangle... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_abi_cxa_demangle" >&5
$as_echo "$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 for processor count related things
#------------------------------------------------------------------------------
if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
if test "${cs_cv_sysconf_processors+set}" = set; then
  $as_echo_n "(cached) " >&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 <unistd.h>
int
main ()
{
sysconf(_SC_NPROCESSORS_ONLN);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_sysconf_processors=yes
		cs_cv_sysconf_processors_cflags=$cs_build_cflags
		cs_cv_sysconf_processors_lflags=$cs_build_lflags
		cs_cv_sysconf_processors_libs=$cs_build_libs
else
  cs_cv_sysconf_processors=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sysconf_processors" >&5
$as_echo "$cs_cv_sysconf_processors" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&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 <unistd.h>
int
main ()
{
sysconf(_SC_NPROCESSORS_ONLN);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_sysconf_processors=yes
		cs_cv_sysconf_processors_cflags=$cs_build_cflags
		cs_cv_sysconf_processors_lflags=$cs_build_lflags
		cs_cv_sysconf_processors_libs=$cs_build_libs
else
  cs_cv_sysconf_processors=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sysconf_processors" >&5
$as_echo "$cs_cv_sysconf_processors" >&6; }
fi

    if test $cs_cv_sysconf_processors = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_SYSCONF_PROCESSORS
"
else
  cs_cv_sysconf_processors_cflags=''
	cs_cv_sysconf_processors_lflags=''
	cs_cv_sysconf_processors_libs=''

fi




#------------------------------------------------------------------------------
# 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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PERL+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PERL" && break
done

    if test -n "$PERL"; then
  { $as_echo "$as_me:$LINENO: checking for TemplateToolkit" >&5
$as_echo_n "checking for TemplateToolkit... " >&6; }
if test "${cs_cv_perl_tt2+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  if { ($as_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=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  cs_cv_perl_tt2=yes
else
  cs_cv_perl_tt2=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_perl_tt2" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_TTREE+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $TTREE" >&5
$as_echo "$TTREE" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_cppunit != yes; then
  PATH="$with_cppunit/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_cppunit$PATH_SEPARATOR$with_cppunit/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes cppunit" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes cppunit... " >&6; }
if test "${cs_cv_prog_pkg_config_cppunit+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_cppunit" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags cppunit") >&5
  ($PKG_CONFIG --cflags cppunit) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs cppunit") >&5
  ($PKG_CONFIG --libs cppunit) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cppunit-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}cppunit-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_CPPUNIT+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_CPPUNIT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_CPPUNIT="$CONFIG_CPPUNIT" # 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_CONFIG_CPPUNIT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_CPPUNIT=$ac_cv_path_CONFIG_CPPUNIT
if test -n "$CONFIG_CPPUNIT"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_CPPUNIT" >&5
$as_echo "$CONFIG_CPPUNIT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_CPPUNIT"; then
  ac_pt_CONFIG_CPPUNIT=$CONFIG_CPPUNIT
  # Extract the first word of "cppunit-config", so it can be a program name with args.
set dummy cppunit-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_CPPUNIT+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_CPPUNIT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_CPPUNIT="$ac_pt_CONFIG_CPPUNIT" # 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_ac_pt_CONFIG_CPPUNIT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_CPPUNIT=$ac_cv_path_ac_pt_CONFIG_CPPUNIT
if test -n "$ac_pt_CONFIG_CPPUNIT"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_CPPUNIT" >&5
$as_echo "$ac_pt_CONFIG_CPPUNIT" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_CPPUNIT" = x; then
    CONFIG_CPPUNIT=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_CPPUNIT=$ac_pt_CONFIG_CPPUNIT
  fi
else
  CONFIG_CPPUNIT="$ac_cv_path_CONFIG_CPPUNIT"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CPPUNIT --cflags ") >&5
  ($CONFIG_CPPUNIT --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_CPPUNIT --libs ") >&5
  ($CONFIG_CPPUNIT --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libcppunit" >&5
$as_echo_n "checking for libcppunit... " >&6; }
if test "${cs_cv_libcppunit+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcppunit" >&5
$as_echo "$cs_cv_libcppunit" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libcppunit" >&5
$as_echo_n "checking for libcppunit... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcppunit" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_cppunit != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libcppunit=no
fi


    cs_cv_with_cppunit="$with_cppunit"


    if test $cs_cv_libcppunit = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if cppunit is sufficiently recent" >&5
$as_echo_n "checking if cppunit is sufficiently recent... " >&6; }
if test "${cs_cv_libcppunit_recent+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libcppunit_recent" >&5
$as_echo "$cs_cv_libcppunit_recent" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if cppunit is sufficiently recent" >&5
$as_echo_n "checking if cppunit is sufficiently recent... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libcppunit_recent" >&5
$as_echo "$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.
#------------------------------------------------------------------------------



    { $as_echo "$as_me:$LINENO: checking if plugins require main()" >&5
$as_echo_n "checking if plugins require main()... " >&6; }
if test "${cs_cv_sys_plugin_main+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_plugin_main" >&5
$as_echo "$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.
#------------------------------------------------------------------------------


# 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.
{ $as_echo "$as_me:$LINENO: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
if test "${ac_cv_sizeof_long+set}" = set; then
  $as_echo_n "(cached) " >&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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
$as_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
static long int longval () { return (long int) (sizeof (long)); }
static unsigned long int ulongval () { return (long int) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (((long int) (sizeof (long))) < 0)
    {
      long int i = longval ();
      if (i != ((long int) (sizeof (long))))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ((long int) (sizeof (long))))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
if test "$ac_cv_type_long" = yes; then
     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
$as_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 -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
$as_echo "$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.
#------------------------------------------------------------------------------

    case $host_cpu in
        [Ii][3-9]86*|[Xx]86*) cs_host_cpu=x86 ;;
        powerpc*) cs_host_cpu=powerpc ;;
        sparc*) cs_host_cpu=sparc ;;
        mips*) cs_host_cpu=mips ;;
        alpha*) cs_host_cpu=alpha ;;
        *) cs_host_cpu=$host_cpu ;;
    esac
    cs_host_cpu_normalized="`$as_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.
#------------------------------------------------------------------------------

 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_bigendian=unknown
    # See if we're dealing with a universal compiler.
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifndef __APPLE_CC__
	       not a universal capable compiler
	     #endif
	     typedef int dummy;

_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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

	# Check for potential -arch flags.  It is not universal unless
	# there are some -arch flags.  Note that *ppc* also matches
	# ppc64.  This check is also rather less than ideal.
	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
	esac
else
  $as_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
    if test $ac_cv_c_bigendian = unknown; then
      # 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
    if test $ac_cv_c_bigendian = unknown; then
      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 <limits.h>

int
main ()
{
#ifndef _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
    if test $ac_cv_c_bigendian = unknown; then
      # Compile a test program.
      if test "$cross_compiling" = yes; then
  # Try to guess by grepping values from an object file.
	 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 };
		int use_ascii (int i) {
		  return ascii_mm[i] + ascii_ii[i];
		}
		short int ebcdic_ii[] =
		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
		short int ebcdic_mm[] =
		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
		int use_ebcdic (int i) {
		  return ebcdic_mm[i] + ebcdic_ii[i];
		}
		extern int foo;

int
main ()
{
return use_ascii (foo) == use_ebcdic (foo);
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=no
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_c_bigendian=yes
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


    fi
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
$as_echo "$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
" ;; #(
   universal)

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

     ;; #(
   *)
     { { $as_echo "$as_me:$LINENO: error: unknown endianness
 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
$as_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_text="${cs_header_text}#define CS_HAVE_STDINT_H
"
    if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for INT64_C" >&5
$as_echo_n "checking for INT64_C... " >&6; }
if test "${cs_cv_c_int64+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_c_int64" >&5
$as_echo "$cs_cv_c_int64" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for INT64_C" >&5
$as_echo_n "checking for INT64_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_c_int64" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

fi

done


for ac_header in inttypes.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

done

{ $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
$as_echo_n "checking for intptr_t... " >&6; }
if test "${ac_cv_type_intptr_t+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_intptr_t=no
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

int
main ()
{
if (sizeof (intptr_t))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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

int
main ()
{
if (sizeof ((intptr_t)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_intptr_t=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
$as_echo "$ac_cv_type_intptr_t" >&6; }
if test "x$ac_cv_type_intptr_t" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_INTPTR_T
"
fi

{ $as_echo "$as_me:$LINENO: checking for intmax_t" >&5
$as_echo_n "checking for intmax_t... " >&6; }
if test "${ac_cv_type_intmax_t+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_intmax_t=no
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

int
main ()
{
if (sizeof (intmax_t))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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

int
main ()
{
if (sizeof ((intmax_t)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_intmax_t=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
$as_echo "$ac_cv_type_intmax_t" >&6; }
if test "x$ac_cv_type_intmax_t" = x""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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

fi

done

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for PRIx99 macros" >&5
$as_echo_n "checking for PRIx99 macros... " >&6; }
if test "${cs_cv_c_format_macros+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_c_format_macros" >&5
$as_echo "$cs_cv_c_format_macros" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for PRIx99 macros" >&5
$as_echo_n "checking for PRIx99 macros... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_c_format_macros" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

done


{ $as_echo "$as_me:$LINENO: checking for wint_t" >&5
$as_echo_n "checking for wint_t... " >&6; }
if test "${ac_cv_type_wint_t+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_wint_t=no
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


int
main ()
{
if (sizeof (wint_t))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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


int
main ()
{
if (sizeof ((wint_t)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_wint_t=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_wint_t" >&5
$as_echo "$ac_cv_type_wint_t" >&6; }
if test "x$ac_cv_type_wint_t" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WINT_T
"
fi


{ $as_echo "$as_me:$LINENO: checking for wchar_t" >&5
$as_echo_n "checking for wchar_t... " >&6; }
if test "${ac_cv_type_wchar_t+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_wchar_t=no
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


int
main ()
{
if (sizeof (wchar_t))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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


int
main ()
{
if (sizeof ((wchar_t)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_wchar_t=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
$as_echo "$ac_cv_type_wchar_t" >&6; }
if test "x$ac_cv_type_wchar_t" = x""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
"
    { $as_echo "$as_me:$LINENO: checking for wcslen" >&5
$as_echo_n "checking for wcslen... " >&6; }
if test "${ac_cv_func_wcslen+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_wcslen=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_wcslen=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcslen" >&5
$as_echo "$ac_cv_func_wcslen" >&6; }
if test "x$ac_cv_func_wcslen" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WCSLEN
"
fi

    { $as_echo "$as_me:$LINENO: checking for fputws" >&5
$as_echo_n "checking for fputws... " >&6; }
if test "${ac_cv_func_fputws+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_fputws=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_fputws=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fputws" >&5
$as_echo "$ac_cv_func_fputws" >&6; }
if test "x$ac_cv_func_fputws" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FPUTWS
"
fi

    { $as_echo "$as_me:$LINENO: checking for fwide" >&5
$as_echo_n "checking for fwide... " >&6; }
if test "${ac_cv_func_fwide+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_fwide=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_fwide=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fwide" >&5
$as_echo "$ac_cv_func_fwide" >&6; }
if test "x$ac_cv_func_fwide" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_FWIDE
"
fi

    { $as_echo "$as_me:$LINENO: checking for wcsnrtombs" >&5
$as_echo_n "checking for wcsnrtombs... " >&6; }
if test "${ac_cv_func_wcsnrtombs+set}" = set; then
  $as_echo_n "(cached) " >&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 wcsnrtombs to an innocuous variant, in case <limits.h> declares wcsnrtombs.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define wcsnrtombs innocuous_wcsnrtombs

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char wcsnrtombs (); 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 wcsnrtombs

/* 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 wcsnrtombs ();
/* 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_wcsnrtombs || defined __stub___wcsnrtombs
choke me
#endif

int
main ()
{
return wcsnrtombs ();
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  ac_cv_func_wcsnrtombs=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_wcsnrtombs=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcsnrtombs" >&5
$as_echo "$ac_cv_func_wcsnrtombs" >&6; }
if test "x$ac_cv_func_wcsnrtombs" = x""yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_WCSNRTOMBS
"
fi

    # 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.
{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
$as_echo_n "checking size of wchar_t... " >&6; }
if test "${ac_cv_sizeof_wchar_t+set}" = set; then
  $as_echo_n "(cached) " >&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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
  $as_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
int
main ()
{
static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&5
$as_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
static long int longval () { return (long int) (sizeof (wchar_t)); }
static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (((long int) (sizeof (wchar_t))) < 0)
    {
      long int i = longval ();
      if (i != ((long int) (sizeof (wchar_t))))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ((long int) (sizeof (wchar_t))))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_wchar_t=`cat conftest.val`
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_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
     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
See \`config.log' for more details." >&5
$as_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 -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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
  { $as_echo "$as_me:$LINENO: checking for MAXPATHLEN" >&5
$as_echo_n "checking for MAXPATHLEN... " >&6; }
if test "${cs_cv_c_macro_maxpathlen+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_c_macro_maxpathlen" >&5
$as_echo "$cs_cv_c_macro_maxpathlen" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for MAXPATHLEN" >&5
$as_echo_n "checking for MAXPATHLEN... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_c_macro_maxpathlen" >&5
$as_echo "$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




#------------------------------------------------------------------------------
# On MinGW, with some versions of the MinGW runtime (3.15 and above), using
# the STL together with -ansi is broken: the C runtime function swprintf()
# and vswprintf() are not declared, but an STL header (<cwchar>)
# unconditionally references it.
# Detect if this is the case.
#------------------------------------------------------------------------------

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if swprintf is available when enforcing C++ standards" >&5
$as_echo_n "checking if swprintf is available when enforcing C++ standards... " >&6; }
if test "${cs_cv_have_swprintf_with_ansi+set}" = set; then
  $as_echo_n "(cached) " >&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.  */
#include <stdio.h>
	    #if HAVE_WCHAR_H
	    #include <wchar.h>
	    #endif
int
main ()
{
using ::swprintf;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_have_swprintf_with_ansi=yes
		cs_cv_have_swprintf_with_ansi_cflags=$cs_build_cflags
		cs_cv_have_swprintf_with_ansi_lflags=$cs_build_lflags
		cs_cv_have_swprintf_with_ansi_libs=$cs_build_libs
else
  cs_cv_have_swprintf_with_ansi=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_have_swprintf_with_ansi" >&5
$as_echo "$cs_cv_have_swprintf_with_ansi" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if swprintf is available when enforcing C++ standards" >&5
$as_echo_n "checking if swprintf is available when enforcing C++ standards... " >&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.  */
#include <stdio.h>
	    #if HAVE_WCHAR_H
	    #include <wchar.h>
	    #endif
int
main ()
{
using ::swprintf;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_have_swprintf_with_ansi=yes
		cs_cv_have_swprintf_with_ansi_cflags=$cs_build_cflags
		cs_cv_have_swprintf_with_ansi_lflags=$cs_build_lflags
		cs_cv_have_swprintf_with_ansi_libs=$cs_build_libs
else
  cs_cv_have_swprintf_with_ansi=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_have_swprintf_with_ansi" >&5
$as_echo "$cs_cv_have_swprintf_with_ansi" >&6; }
fi

    if test $cs_cv_have_swprintf_with_ansi = yes; then
  :
else
  cs_cv_have_swprintf_with_ansi_cflags=''
	cs_cv_have_swprintf_with_ansi_lflags=''
	cs_cv_have_swprintf_with_ansi_libs=''
	cs_header_text="${cs_header_text}#define CS_ANSI_BREAKS_SWPRINTF
"
fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if vswprintf is available when enforcing C++ standards" >&5
$as_echo_n "checking if vswprintf is available when enforcing C++ standards... " >&6; }
if test "${cs_cv_have_vswprintf_with_ansi+set}" = set; then
  $as_echo_n "(cached) " >&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.  */
#include <stdio.h>
	    #if HAVE_WCHAR_H
	    #include <wchar.h>
	    #endif
int
main ()
{
using ::vswprintf;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_have_vswprintf_with_ansi=yes
		cs_cv_have_vswprintf_with_ansi_cflags=$cs_build_cflags
		cs_cv_have_vswprintf_with_ansi_lflags=$cs_build_lflags
		cs_cv_have_vswprintf_with_ansi_libs=$cs_build_libs
else
  cs_cv_have_vswprintf_with_ansi=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_have_vswprintf_with_ansi" >&5
$as_echo "$cs_cv_have_vswprintf_with_ansi" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if vswprintf is available when enforcing C++ standards" >&5
$as_echo_n "checking if vswprintf is available when enforcing C++ standards... " >&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.  */
#include <stdio.h>
	    #if HAVE_WCHAR_H
	    #include <wchar.h>
	    #endif
int
main ()
{
using ::vswprintf;
  ;
  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_have_vswprintf_with_ansi=yes
		cs_cv_have_vswprintf_with_ansi_cflags=$cs_build_cflags
		cs_cv_have_vswprintf_with_ansi_lflags=$cs_build_lflags
		cs_cv_have_vswprintf_with_ansi_libs=$cs_build_libs
else
  cs_cv_have_vswprintf_with_ansi=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_have_vswprintf_with_ansi" >&5
$as_echo "$cs_cv_have_vswprintf_with_ansi" >&6; }
fi

    if test $cs_cv_have_vswprintf_with_ansi = yes; then
  :
else
  cs_cv_have_vswprintf_with_ansi_cflags=''
	cs_cv_have_vswprintf_with_ansi_lflags=''
	cs_cv_have_vswprintf_with_ansi_libs=''
	cs_header_text="${cs_header_text}#define CS_ANSI_BREAKS_VSWPRINTF
"
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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

fi

done


if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for socket support" >&5
$as_echo_n "checking for socket support... " >&6; }
if test "${cs_cv_sys_socket+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_sys_socket" >&5
$as_echo "$cs_cv_sys_socket" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for socket support" >&5
$as_echo_n "checking for socket support... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_sys_socket" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
$as_echo_n "checking for socklen_t... " >&6; }
if test "${ac_cv_type_socklen_t+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_cv_type_socklen_t=no
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


int
main ()
{
if (sizeof (socklen_t))
       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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  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


int
main ()
{
if (sizeof ((socklen_t)))
	  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_socklen_t=yes
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
$as_echo "$ac_cv_type_socklen_t" >&6; }
if test "x$ac_cv_type_socklen_t" = x""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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to declare deprecation" >&5
$as_echo_n "checking how to declare deprecation... " >&6; }
if test "${cs_cv_prog_cxx_declare_deprecated+set}" = set; then
  $as_echo_n "(cached) " >&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.  */
void f() __attribute__((deprecated));
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_declare_deprecated" >&5
$as_echo "$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_ATTRIBUTE_DEPRECATED $cs_cv_prog_cxx_declare_deprecated
"
fi




#------------------------------------------------------------------------------
# Check if the "malloc" attribute is available.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to declare allocation function" >&5
$as_echo_n "checking how to declare allocation function... " >&6; }
if test "${cs_cv_prog_c_attr_malloc+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_c_attr_malloc='no'
	if test "$cs_cv_prog_c_attr_malloc" = no; then
  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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.  */
void f() __attribute__((malloc));
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_c_attr_malloc='__attribute__((malloc))'
else
  cs_cv_prog_c_attr_malloc='no'
fi

fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_c_attr_malloc" >&5
$as_echo "$cs_cv_prog_c_attr_malloc" >&6; }
    if test $cs_cv_prog_c_attr_malloc != no; then
  cs_header_text="${cs_header_text}#define CS_ATTRIBUTE_MALLOC $cs_cv_prog_c_attr_malloc
"
fi




#------------------------------------------------------------------------------
# Check if the "init_priority" attribute is available.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking how to declare object initialization priority" >&5
$as_echo_n "checking how to declare object initialization priority... " >&6; }
if test "${cs_cv_prog_cxx_attr_init_priority+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  cs_cv_prog_cxx_attr_init_priority='no'
	if test "$cs_cv_prog_cxx_attr_init_priority" = 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.  */
#define PRI 1010
    class X{}; X x __attribute__((init_priority(PRI)));
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_attr_init_priority='__attribute__((init_priority(PRI)))'
else
  cs_cv_prog_cxx_attr_init_priority='no'
fi

fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_cxx_attr_init_priority" >&5
$as_echo "$cs_cv_prog_cxx_attr_init_priority" >&6; }
    if test $cs_cv_prog_cxx_attr_init_priority != no; then
  cs_header_text="${cs_header_text}#define CS_ATTRIBUTE_INIT_PRIORITY(PRI) $cs_cv_prog_cxx_attr_init_priority
"
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".
#------------------------------------------------------------------------------





    { $as_echo "$as_me:$LINENO: checking if assembly-coded csQsqrt() compiles" >&5
$as_echo_n "checking if assembly-coded csQsqrt() compiles... " >&6; }
if test "${cs_cv_cxx_qsqrt_ok+set}" = set; then
  $as_echo_n "(cached) " >&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__
		    #define CS_FORCEINLINE
		    #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_cxx_qsqrt_ok" >&5
$as_echo "$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 or nan.
#------------------------------------------------------------------------------
# CS_CHECK_SPECIAL_FLOAT(FUNCTION)
# CS_CHECK_STD_SPECIAL_FLOAT(FUNCTION)





if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for isfinite" >&5
$as_echo_n "checking for isfinite... " >&6; }
if test "${cs_cv_func_isfinite+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_isfinite" >&5
$as_echo "$cs_cv_func_isfinite" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for isfinite" >&5
$as_echo_n "checking for isfinite... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_isfinite" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for finitef" >&5
$as_echo_n "checking for finitef... " >&6; }
if test "${cs_cv_func_finitef+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_finitef" >&5
$as_echo "$cs_cv_func_finitef" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for finitef" >&5
$as_echo_n "checking for finitef... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_finitef" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for finite" >&5
$as_echo_n "checking for finite... " >&6; }
if test "${cs_cv_func_finite+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_finite" >&5
$as_echo "$cs_cv_func_finite" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for finite" >&5
$as_echo_n "checking for finite... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_finite" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for _finite" >&5
$as_echo_n "checking for _finite... " >&6; }
if test "${cs_cv_func__finite+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func__finite" >&5
$as_echo "$cs_cv_func__finite" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for _finite" >&5
$as_echo_n "checking for _finite... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func__finite" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for std::isfinite" >&5
$as_echo_n "checking for std::isfinite... " >&6; }
if test "${cs_cv_func_std__isfinite+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isfinite" >&5
$as_echo "$cs_cv_func_std__isfinite" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for std::isfinite" >&5
$as_echo_n "checking for std::isfinite... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isfinite" >&5
$as_echo "$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
  { $as_echo "$as_me:$LINENO: checking for isnan" >&5
$as_echo_n "checking for isnan... " >&6; }
if test "${cs_cv_func_isnan+set}" = set; then
  $as_echo_n "(cached) " >&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; isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnan=yes
		cs_cv_func_isnan_cflags=$cs_build_cflags
		cs_cv_func_isnan_lflags=$cs_build_lflags
		cs_cv_func_isnan_libs=$cs_build_libs
else
  cs_cv_func_isnan=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnan" >&5
$as_echo "$cs_cv_func_isnan" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for isnan" >&5
$as_echo_n "checking for isnan... " >&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; isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnan=yes
		cs_cv_func_isnan_cflags=$cs_build_cflags
		cs_cv_func_isnan_lflags=$cs_build_lflags
		cs_cv_func_isnan_libs=$cs_build_libs
else
  cs_cv_func_isnan=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnan" >&5
$as_echo "$cs_cv_func_isnan" >&6; }
fi

    if test $cs_cv_func_isnan = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_ISNAN
"
else
  cs_cv_func_isnan_cflags=''
	cs_cv_func_isnan_lflags=''
	cs_cv_func_isnan_libs=''

fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for isnanf" >&5
$as_echo_n "checking for isnanf... " >&6; }
if test "${cs_cv_func_isnanf+set}" = set; then
  $as_echo_n "(cached) " >&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; isnanf(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnanf=yes
		cs_cv_func_isnanf_cflags=$cs_build_cflags
		cs_cv_func_isnanf_lflags=$cs_build_lflags
		cs_cv_func_isnanf_libs=$cs_build_libs
else
  cs_cv_func_isnanf=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnanf" >&5
$as_echo "$cs_cv_func_isnanf" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for isnanf" >&5
$as_echo_n "checking for isnanf... " >&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; isnanf(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnanf=yes
		cs_cv_func_isnanf_cflags=$cs_build_cflags
		cs_cv_func_isnanf_lflags=$cs_build_lflags
		cs_cv_func_isnanf_libs=$cs_build_libs
else
  cs_cv_func_isnanf=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnanf" >&5
$as_echo "$cs_cv_func_isnanf" >&6; }
fi

    if test $cs_cv_func_isnanf = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_ISNANF
"
else
  cs_cv_func_isnanf_cflags=''
	cs_cv_func_isnanf_lflags=''
	cs_cv_func_isnanf_libs=''

fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for _isnan" >&5
$as_echo_n "checking for _isnan... " >&6; }
if test "${cs_cv_func__isnan+set}" = set; then
  $as_echo_n "(cached) " >&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; _isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnan=yes
		cs_cv_func__isnan_cflags=$cs_build_cflags
		cs_cv_func__isnan_lflags=$cs_build_lflags
		cs_cv_func__isnan_libs=$cs_build_libs
else
  cs_cv_func__isnan=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func__isnan" >&5
$as_echo "$cs_cv_func__isnan" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for _isnan" >&5
$as_echo_n "checking for _isnan... " >&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; _isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnan=yes
		cs_cv_func__isnan_cflags=$cs_build_cflags
		cs_cv_func__isnan_lflags=$cs_build_lflags
		cs_cv_func__isnan_libs=$cs_build_libs
else
  cs_cv_func__isnan=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func__isnan" >&5
$as_echo "$cs_cv_func__isnan" >&6; }
fi

    if test $cs_cv_func__isnan = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE__ISNAN
"
else
  cs_cv_func__isnan_cflags=''
	cs_cv_func__isnan_lflags=''
	cs_cv_func__isnan_libs=''

fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for std::isnan" >&5
$as_echo_n "checking for std::isnan... " >&6; }
if test "${cs_cv_func_std__isnan+set}" = set; then
  $as_echo_n "(cached) " >&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::isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnan=yes
		cs_cv_func_std__isnan_cflags=$cs_build_cflags
		cs_cv_func_std__isnan_lflags=$cs_build_lflags
		cs_cv_func_std__isnan_libs=$cs_build_libs
else
  cs_cv_func_std__isnan=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isnan" >&5
$as_echo "$cs_cv_func_std__isnan" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for std::isnan" >&5
$as_echo_n "checking for std::isnan... " >&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::isnan(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnan=yes
		cs_cv_func_std__isnan_cflags=$cs_build_cflags
		cs_cv_func_std__isnan_lflags=$cs_build_lflags
		cs_cv_func_std__isnan_libs=$cs_build_libs
else
  cs_cv_func_std__isnan=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isnan" >&5
$as_echo "$cs_cv_func_std__isnan" >&6; }
fi

    if test $cs_cv_func_std__isnan = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_STD__ISNAN
"
else
  cs_cv_func_std__isnan_cflags=''
	cs_cv_func_std__isnan_lflags=''
	cs_cv_func_std__isnan_libs=''

fi


if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for isnormal" >&5
$as_echo_n "checking for isnormal... " >&6; }
if test "${cs_cv_func_isnormal+set}" = set; then
  $as_echo_n "(cached) " >&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; isnormal(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnormal=yes
		cs_cv_func_isnormal_cflags=$cs_build_cflags
		cs_cv_func_isnormal_lflags=$cs_build_lflags
		cs_cv_func_isnormal_libs=$cs_build_libs
else
  cs_cv_func_isnormal=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnormal" >&5
$as_echo "$cs_cv_func_isnormal" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for isnormal" >&5
$as_echo_n "checking for isnormal... " >&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; isnormal(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_isnormal=yes
		cs_cv_func_isnormal_cflags=$cs_build_cflags
		cs_cv_func_isnormal_lflags=$cs_build_lflags
		cs_cv_func_isnormal_libs=$cs_build_libs
else
  cs_cv_func_isnormal=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_isnormal" >&5
$as_echo "$cs_cv_func_isnormal" >&6; }
fi

    if test $cs_cv_func_isnormal = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_ISNORMAL
"
else
  cs_cv_func_isnormal_cflags=''
	cs_cv_func_isnormal_lflags=''
	cs_cv_func_isnormal_libs=''

fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for normalf" >&5
$as_echo_n "checking for normalf... " >&6; }
if test "${cs_cv_func_normalf+set}" = set; then
  $as_echo_n "(cached) " >&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; normalf(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_normalf=yes
		cs_cv_func_normalf_cflags=$cs_build_cflags
		cs_cv_func_normalf_lflags=$cs_build_lflags
		cs_cv_func_normalf_libs=$cs_build_libs
else
  cs_cv_func_normalf=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_normalf" >&5
$as_echo "$cs_cv_func_normalf" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for normalf" >&5
$as_echo_n "checking for normalf... " >&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; normalf(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_normalf=yes
		cs_cv_func_normalf_cflags=$cs_build_cflags
		cs_cv_func_normalf_lflags=$cs_build_lflags
		cs_cv_func_normalf_libs=$cs_build_libs
else
  cs_cv_func_normalf=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_normalf" >&5
$as_echo "$cs_cv_func_normalf" >&6; }
fi

    if test $cs_cv_func_normalf = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_NORMALF
"
else
  cs_cv_func_normalf_cflags=''
	cs_cv_func_normalf_lflags=''
	cs_cv_func_normalf_libs=''

fi

if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for std::isnormal" >&5
$as_echo_n "checking for std::isnormal... " >&6; }
if test "${cs_cv_func_std__isnormal+set}" = set; then
  $as_echo_n "(cached) " >&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::isnormal(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnormal=yes
		cs_cv_func_std__isnormal_cflags=$cs_build_cflags
		cs_cv_func_std__isnormal_lflags=$cs_build_lflags
		cs_cv_func_std__isnormal_libs=$cs_build_libs
else
  cs_cv_func_std__isnormal=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isnormal" >&5
$as_echo "$cs_cv_func_std__isnormal" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for std::isnormal" >&5
$as_echo_n "checking for std::isnormal... " >&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::isnormal(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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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__isnormal=yes
		cs_cv_func_std__isnormal_cflags=$cs_build_cflags
		cs_cv_func_std__isnormal_lflags=$cs_build_lflags
		cs_cv_func_std__isnormal_libs=$cs_build_libs
else
  cs_cv_func_std__isnormal=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_func_std__isnormal" >&5
$as_echo "$cs_cv_func_std__isnormal" >&6; }
fi

    if test $cs_cv_func_std__isnormal = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_STD__ISNORMAL
"
else
  cs_cv_func_std__isnormal_cflags=''
	cs_cv_func_std__isnormal_lflags=''
	cs_cv_func_std__isnormal_libs=''

fi




#------------------------------------------------------------------------------
# Check if strtof() is available.
#------------------------------------------------------------------------------
if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking for strtof" >&5
$as_echo_n "checking for strtof... " >&6; }
if test "${cs_cv_strtof+set}" = set; then
  $as_echo_n "(cached) " >&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 ()
{
strtof (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_strtof=yes
		cs_cv_strtof_cflags=$cs_build_cflags
		cs_cv_strtof_lflags=$cs_build_lflags
		cs_cv_strtof_libs=$cs_build_libs
else
  cs_cv_strtof=no
fi

fi
{ $as_echo "$as_me:$LINENO: result: $cs_cv_strtof" >&5
$as_echo "$cs_cv_strtof" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for strtof" >&5
$as_echo_n "checking for strtof... " >&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 ()
{
strtof (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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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_strtof=yes
		cs_cv_strtof_cflags=$cs_build_cflags
		cs_cv_strtof_lflags=$cs_build_lflags
		cs_cv_strtof_libs=$cs_build_libs
else
  cs_cv_strtof=no
fi

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_strtof" >&5
$as_echo "$cs_cv_strtof" >&6; }
fi

    if test $cs_cv_strtof = yes; then
  cs_header_text="${cs_header_text}#define CS_HAVE_STRTOF
"
else
  cs_cv_strtof_cflags=''
	cs_cv_strtof_lflags=''
	cs_cv_strtof_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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

fi
as_val=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 cs_header_elf_h=yes
else
  cs_header_elf_h=no
fi

done

    { $as_echo "$as_me:$LINENO: checking whether to embed plugin meta-information" >&5
$as_echo_n "checking whether to embed plugin meta-information... " >&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

    { $as_echo "$as_me:$LINENO: result: $enable_meta_info_embedding" >&5
$as_echo "$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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_WINDRES+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
$as_echo "$WINDRES" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
$as_echo "$ac_ct_WINDRES" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OBJCOPY+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
$as_echo "$OBJCOPY" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
$as_echo "$ac_ct_OBJCOPY" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_bfd != yes; then
  PATH="$with_bfd/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_bfd$PATH_SEPARATOR$with_bfd/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bfd" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes bfd... " >&6; }
if test "${cs_cv_prog_pkg_config_bfd+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bfd" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bfd") >&5
  ($PKG_CONFIG --cflags bfd) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs bfd") >&5
  ($PKG_CONFIG --libs bfd) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}bfd-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}bfd-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_BFD+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_BFD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_BFD="$CONFIG_BFD" # 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_CONFIG_BFD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_BFD=$ac_cv_path_CONFIG_BFD
if test -n "$CONFIG_BFD"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_BFD" >&5
$as_echo "$CONFIG_BFD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_BFD"; then
  ac_pt_CONFIG_BFD=$CONFIG_BFD
  # Extract the first word of "bfd-config", so it can be a program name with args.
set dummy bfd-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_BFD+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_BFD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_BFD="$ac_pt_CONFIG_BFD" # 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_ac_pt_CONFIG_BFD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_BFD=$ac_cv_path_ac_pt_CONFIG_BFD
if test -n "$ac_pt_CONFIG_BFD"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_BFD" >&5
$as_echo "$ac_pt_CONFIG_BFD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_BFD" = x; then
    CONFIG_BFD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BFD=$ac_pt_CONFIG_BFD
  fi
else
  CONFIG_BFD="$ac_cv_path_CONFIG_BFD"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BFD --cflags ") >&5
  ($CONFIG_BFD --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BFD --libs ") >&5
  ($CONFIG_BFD --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libbfd" >&5
$as_echo_n "checking for libbfd... " >&6; }
if test "${cs_cv_libbfd+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
$as_echo "$cs_cv_libbfd" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libbfd" >&5
$as_echo_n "checking for libbfd... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_bfd != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libbfd=no
fi


    cs_cv_with_bfd="$with_bfd"


    if test $cs_cv_libbfd = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if libbfd is usable" >&5
$as_echo_n "checking if libbfd is usable... " >&6; }
if test "${cs_cv_libbfd_ok+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
$as_echo "$cs_cv_libbfd_ok" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if libbfd is usable" >&5
$as_echo_n "checking if libbfd is usable... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
$as_echo "$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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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
  $as_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
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_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
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  $as_echo_n "(cached) " >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }

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

done

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*)
	    do_check_libbfd=yes ;;
	*) do_check_libbfd=$ac_cv_lib_dl_dladdr ;;
    esac
else
  do_check_libbfd=no
fi


if test $do_check_libbfd = yes; then

# 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


	# Put relevant subdirs of the library directory into PATH and PKGCONFIG
	PATH_SAVE="$PATH"
	if test $with_bfd != yes; then
  PATH="$with_bfd/bin$PATH_SEPARATOR$PATH"
	    PKG_CONFIG_PATH_SAVE_1="$PKG_CONFIG_PATH"
    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"
    PKG_CONFIG_PATH="$with_bfd$PATH_SEPARATOR$with_bfd/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH
fi


	cs_check_lib_flags=''
	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$PATH_SEPARATOR${srcdir}/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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_PKG_CONFIG+set}" = set; then
  $as_echo_n "(cached) " >&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"
    $as_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
  { $as_echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "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:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_ct_PKG_CONFIG
  fi
fi

	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
  { $as_echo "$as_me:$LINENO: checking if $PKG_CONFIG recognizes bfd" >&5
$as_echo_n "checking if $PKG_CONFIG recognizes bfd... " >&6; }
if test "${cs_cv_prog_pkg_config_bfd+set}" = set; then
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_prog_pkg_config_bfd" >&5
$as_echo "$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=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --cflags bfd") >&5
  ($PKG_CONFIG --cflags bfd) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --libs bfd") >&5
  ($PKG_CONFIG --libs bfd) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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$PATH_SEPARATOR${srcdir}/bin"
	export PATH
fi

    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}bfd-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}bfd-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CONFIG_BFD+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $CONFIG_BFD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CONFIG_BFD="$CONFIG_BFD" # 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_CONFIG_BFD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CONFIG_BFD=$ac_cv_path_CONFIG_BFD
if test -n "$CONFIG_BFD"; then
  { $as_echo "$as_me:$LINENO: result: $CONFIG_BFD" >&5
$as_echo "$CONFIG_BFD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_path_CONFIG_BFD"; then
  ac_pt_CONFIG_BFD=$CONFIG_BFD
  # Extract the first word of "bfd-config", so it can be a program name with args.
set dummy bfd-config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_CONFIG_BFD+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_CONFIG_BFD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_CONFIG_BFD="$ac_pt_CONFIG_BFD" # 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_ac_pt_CONFIG_BFD="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_CONFIG_BFD=$ac_cv_path_ac_pt_CONFIG_BFD
if test -n "$ac_pt_CONFIG_BFD"; then
  { $as_echo "$as_me:$LINENO: result: $ac_pt_CONFIG_BFD" >&5
$as_echo "$ac_pt_CONFIG_BFD" >&6; }
else
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_CONFIG_BFD" = x; then
    CONFIG_BFD=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CONFIG_BFD=$ac_pt_CONFIG_BFD
  fi
else
  CONFIG_BFD="$ac_cv_path_CONFIG_BFD"
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=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BFD --cflags ") >&5
  ($CONFIG_BFD --cflags ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed 's/   */ /g;s/^ //;s/ $//'`
	cs_check_lib_lflag=''
	cs_check_lib_libs=`{ ($as_echo "$as_me:$LINENO: \$CONFIG_BFD --libs ") >&5
  ($CONFIG_BFD --libs ) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } | tr '\\\\' '/' | sed '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



	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
  { $as_echo "$as_me:$LINENO: checking for libbfd" >&5
$as_echo_n "checking for libbfd... " >&6; }
if test "${cs_cv_libbfd+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
$as_echo "$cs_cv_libbfd" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking for libbfd" >&5
$as_echo_n "checking for libbfd... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd" >&5
$as_echo "$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


	PATH="$PATH_SAVE"
	if test $with_bfd != yes; then
  PKG_CONFIG_PATH="$PKG_CONFIG_PATH_SAVE_1"
    export PKG_CONFIG_PATH
fi


else
  cs_cv_libbfd=no
fi


    cs_cv_with_bfd="$with_bfd"


    if test $cs_cv_libbfd = yes; then
  if test "" != yes; then
  { $as_echo "$as_me:$LINENO: checking if libbfd is usable" >&5
$as_echo_n "checking if libbfd is usable... " >&6; }
if test "${cs_cv_libbfd_ok+set}" = set; then
  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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
{ $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
$as_echo "$cs_cv_libbfd_ok" >&6; }
else
  { $as_echo "$as_me:$LINENO: checking if libbfd is usable" >&5
$as_echo_n "checking if libbfd is usable... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$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
  $as_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 && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
  cs_build_ok=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -rf conftest.dSYM
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

	    { $as_echo "$as_me:$LINENO: result: $cs_cv_libbfd_ok" >&5
$as_echo "$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_BFD_DEBUG_SYMBOLS
"
	cs_debug_libbfd=yes
else
  cs_debug_libbfd=no
fi

else
  cs_debug_libbfd=no
fi




#------------------------------------------------------------------------------
# Determine whether ptmalloc should be disabled.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to enable ptmalloc" >&5
$as_echo_n "checking whether to enable ptmalloc... " >&6; }
# Check whether --enable-ptmalloc was given.
if test "${enable_ptmalloc+set}" = set; then
  enableval=$enable_ptmalloc;
else
  enable_ptmalloc=yes
fi

{ $as_echo "$as_me:$LINENO: result: $enable_ptmalloc" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to use extensive memory debugger" >&5
$as_echo_n "checking whether to use extensive memory debugger... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_extensive_memory_debugger" >&5
$as_echo "$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 checking allocations should be enabled.
#------------------------------------------------------------------------------
if test $enable_extensive_memory_debugger = yes; then
  { $as_echo "$as_me:$LINENO: checking whether to use checking allocations" >&5
$as_echo_n "checking whether to use checking allocations... " >&6; }
    # Check whether --enable-checking-allocations was given.
if test "${enable_checking_allocations+set}" = set; then
  enableval=$enable_checking_allocations;
else
  enable_checking_allocations=no
fi

    { $as_echo "$as_me:$LINENO: result: $enable_checking_allocations" >&5
$as_echo "$enable_checking_allocations" >&6; }
    cs_build_prop_val="$enable_checking_allocations"
    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}CHECKING_ALLOCATIONS ?= $cs_build_prop_val ;
"
fi

    if test $enable_checking_allocations = yes; then
  cs_header_text="${cs_header_text}#define CS_CHECKING_ALLOCATIONS
"
fi

fi




#------------------------------------------------------------------------------
# Determine if memory tracker should be enabled.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to use memory tracker" >&5
$as_echo_n "checking whether to use memory tracker... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_memory_tracker" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to use reference tracker" >&5
$as_echo_n "checking whether to use reference tracker... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_ref_tracker" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to use leak guard" >&5
$as_echo_n "checking whether to use leak guard... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_leak_guard" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
case $host_os in
    cygwin*|linux*) enable_shared_default=yes ;;
    *) enable_shared_default=no ;;
esac
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval=$enable_shared;
else
  enable_shared=$enable_shared_default
fi

{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
$as_echo "$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.
#------------------------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking whether to emulate makefiles" >&5
$as_echo_n "checking whether to emulate makefiles... " >&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

{ $as_echo "$as_me:$LINENO: result: $enable_make_emulation" >&5
$as_echo "$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\" ;
"
    cs_jamconfig_text="${cs_jamconfig_text}PACKAGE_VERSION_LIST ?= 1 4 0 ;
"


# 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}datarootdir ?= `echo "$datarootdir" | 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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $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" &&
      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
$as_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='
:mline
/\\$/{
 N
 s,\\\n,,
 b mline
}
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=`$as_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_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#! $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 || ac_write_fail=1
## --------------------- ##
## 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=:
  # Pre-4.2 versions of Zsh do 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

as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
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.)
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
  $as_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.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# 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 ||
$as_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" ||
    { $as_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 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  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
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.4.0, which was
generated by GNU Autoconf 2.63.  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

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac



cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

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

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
  -q, --quiet, --silent
                   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_write_fail=1
ac_cs_version="\\
crystalspace config.status 1.4.0
configured by $0, generated by GNU Autoconf 2.63,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2008 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'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
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 )
    $as_echo "$ac_cs_version"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h |  --help | --hel | -h )
    $as_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.
  -*) { $as_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 || ac_write_fail=1
if \$ac_cs_recheck; then
  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  $as_echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# 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 ||
$as_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 ||
\$as_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 || { { \$as_echo "\$as_me:\$LINENO: error: cannot create directory \$cs_dir" >&5
\$as_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 ||
$as_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 ||
\$as_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 || { { \$as_echo "\$as_me:\$LINENO: error: cannot create directory \$cs_dir" >&5
\$as_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 || ac_write_fail=1

# 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" ;;

  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
$as_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")
} ||
{
   $as_echo "$as_me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
$as_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
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\).*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\).*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
$as_echo "$as_me: error: could not setup config files machinery" >&2;}
   { (exit 1); exit 1; }; }
_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 || ac_write_fail=1
fi # test -n "$CONFIG_FILES"


eval set X "  :F $CONFIG_FILES      :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
$as_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 ||
	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
   { (exit 1); exit 1; }; };;
      esac
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; 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 '`
	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`$as_echo "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin" \
      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
$as_echo "$as_me: error: could not create $ac_file" >&2;}
   { (exit 1); exit 1; }; } ;;
    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 ||
$as_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 ||
$as_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 || { { $as_echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
$as_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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_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 || ac_write_fail=1
# 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=

ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p
'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  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 || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;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
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
$as_echo "$as_me: error: could not create $ac_file" >&2;}
   { (exit 1); exit 1; }; }

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"; } &&
  { $as_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
$as_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 \
  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
$as_echo "$as_me: error: could not create $ac_file" >&2;}
   { (exit 1); exit 1; }; }
 ;;


  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
$as_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
  { $as_echo "$as_me:$LINENO: include/csconfig.h is unchanged" >&5
$as_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
  { $as_echo "$as_me:$LINENO: Jamconfig is unchanged" >&5
$as_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 ||
$as_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 || { { $as_echo "$as_me:$LINENO: error: cannot create directory jambuild" >&5
$as_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 { ($as_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=$?
  $as_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
  { { $as_echo "$as_me:$LINENO: error: failed to build jam; please install manually" >&5
$as_echo "$as_me: error: failed to build jam; please install manually" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  { { $as_echo "$as_me:$LINENO: error: failed to build jam; please install manually" >&5
$as_echo "$as_me: error: failed to build jam; please install manually" >&2;}
   { (exit 1); exit 1; }; }
fi

    rm -rf jambuild ;;
    "Makefile":C) if { ($as_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=$?
  $as_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
  { $as_echo "$as_me:$LINENO: WARNING: failed to create makefile emulation layer" >&5
$as_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

test $ac_write_fail = 0 ||
  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }


# 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
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
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
  { $as_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
$as_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

