--- poker-engine-1.3.6.orig/INSTALL +++ poker-engine-1.3.6/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended --- poker-engine-1.3.6.orig/Makefile +++ poker-engine-1.3.6/Makefile @@ -0,0 +1,1191 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgincludedir = $(includedir)/poker-engine +pkglibexecdir = $(libexecdir)/poker-engine +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = README $(am__configure_deps) $(dist_confpoker_DATA) \ + $(dist_upgradepoker_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/poker-engine.pc.in \ + $(srcdir)/pokerconfigupgrade.8.in \ + $(srcdir)/pokerconfigupgrade.in $(top_srcdir)/configure \ + AUTHORS COPYING ChangeLog INSTALL NEWS config/install-sh \ + config/missing config/py-compile +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = pokerconfigupgrade poker-engine.pc \ + pokerconfigupgrade.8 +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \ + "$(DESTDIR)$(confpokerdir)" "$(DESTDIR)$(upgradepokerdir)" \ + "$(DESTDIR)$(pkgconfigdir)" +SCRIPTS = $(sbin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +DATA = $(dist_confpoker_DATA) $(dist_upgradepoker_DATA) \ + $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +pkgdatadir = ${datarootdir}/poker-engine +pkglibdir = ${prefix}/lib/poker-engine/poker-engine +ACLOCAL = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11 +AMTAR = $${TAR-tar} +AUTOCONF = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf +AUTOHEADER = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader +AUTOMAKE = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11 +AWK = mawk +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"poker-engine\" -DPACKAGE_TARNAME=\"poker-engine\" -DPACKAGE_VERSION=\"1.3.6\" -DPACKAGE_STRING=\"poker-engine\ 1.3.6\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"poker-engine\" -DVERSION=\"1.3.6\" +ECHO_C = +ECHO_N = -n +ECHO_T = +GETTEXT_MACRO_VERSION = 0.18 +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = +MAKEINFO = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +PACKAGE = poker-engine +PACKAGE_BUGREPORT = +PACKAGE_NAME = poker-engine +PACKAGE_STRING = poker-engine 1.3.6 +PACKAGE_TARNAME = poker-engine +PACKAGE_URL = +PACKAGE_VERSION = 1.3.6 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +POKER_ENGINE_PKGDATADIR = /usr/share/poker-engine +POKER_ENGINE_PKGLIBDIR = /usr/lib/poker-engine/poker-engine +POKER_ENGINE_PKGSYSCONFDIR = /etc/poker-engine +PYPOKER_EVAL_CFLAGS = +PYPOKER_EVAL_LIBS = +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.7 +RSYNC = /usr/bin/rsync +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = +USE_NLS = yes +VERSION = 1.3.6 +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +abs_builddir = /tmp/buildd/poker-engine-1.3.6 +abs_srcdir = /tmp/buildd/poker-engine-1.3.6 +abs_top_builddir = /tmp/buildd/poker-engine-1.3.6 +abs_top_srcdir = /tmp/buildd/poker-engine-1.3.6 +am__leading_dot = . +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = x86_64-linux-gnu +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${prefix}/share/info +install_sh = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${prefix}/lib/poker-engine +localedir = ${datarootdir}/locale +localstatedir = /var +mandir = ${prefix}/share/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/poker-engine +pkgpythondir = ${pythondir}/poker-engine +pkgsysconfdir = ${sysconfdir}/poker-engine +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages +pythondir = ${prefix}/lib/python2.7/dist-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = /etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . + +# +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# +# +ACLOCAL_AMFLAGS = -I config +SUBDIRS = pokerengine tests po +MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 configure \ + $(wildcard config/*) + +confpokerdir = ${pkgdatadir}/conf +dist_confpoker_DATA = \ + $(wildcard ${top_srcdir}/conf/*.xml) + +upgradepokerdir = ${pkgdatadir}/upgrades +dist_upgradepoker_DATA = \ + $(wildcard ${top_srcdir}/upgrades/*.xsl) + +EXTRA_DIST = \ + examples/simple.py \ + po/raw.string \ + $(wildcard conf/*.template) \ + $(wildcard gentoo/dev-games/poker-eval/*.ebuild) \ + Makefile.cygwin + +pkgconfigdir = ${datadir}/pkgconfig +pkgconfig_DATA = poker-engine.pc +man_MANS = \ + pokerconfigupgrade.8 + +sbin_SCRIPTS = \ + pokerconfigupgrade + +TESTS_ENVIRONMENT = PYTHONPATH=. /usr/bin/python +TESTS = examples/simple.py +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +pokerconfigupgrade: $(top_builddir)/config.status $(srcdir)/pokerconfigupgrade.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +poker-engine.pc: $(top_builddir)/config.status $(srcdir)/poker-engine.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +pokerconfigupgrade.8: $(top_builddir)/config.status $(srcdir)/pokerconfigupgrade.8.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-sbinSCRIPTS: $(sbin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +install-dist_confpokerDATA: $(dist_confpoker_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_confpoker_DATA)'; test -n "$(confpokerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(confpokerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(confpokerdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(confpokerdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(confpokerdir)" || exit $$?; \ + done + +uninstall-dist_confpokerDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_confpoker_DATA)'; test -n "$(confpokerdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(confpokerdir)'; $(am__uninstall_files_from_dir) +install-dist_upgradepokerDATA: $(dist_upgradepoker_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_upgradepoker_DATA)'; test -n "$(upgradepokerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(upgradepokerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(upgradepokerdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(upgradepokerdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(upgradepokerdir)" || exit $$?; \ + done + +uninstall-dist_upgradepokerDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_upgradepoker_DATA)'; test -n "$(upgradepokerdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(upgradepokerdir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) all-local +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(confpokerdir)" "$(DESTDIR)$(upgradepokerdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-data-local install-dist_confpokerDATA \ + install-dist_upgradepokerDATA install-man \ + install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-sbinSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-dist_confpokerDATA \ + uninstall-dist_upgradepokerDATA uninstall-local uninstall-man \ + uninstall-pkgconfigDATA uninstall-sbinSCRIPTS + +uninstall-man: uninstall-man8 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am all-local am--refresh check check-TESTS check-am \ + clean clean-generic clean-local ctags ctags-recursive dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-local install-dist_confpokerDATA \ + install-dist_upgradepokerDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man8 \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-sbinSCRIPTS install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-dist_confpokerDATA uninstall-dist_upgradepokerDATA \ + uninstall-local uninstall-man uninstall-man8 \ + uninstall-pkgconfigDATA uninstall-sbinSCRIPTS + + +clean-local: + rm -f */*.py[co] + rm -fr tests/conftest + rm -f tests/.coverage + +all-local: + if [ -w ${srcdir}/conf ] ; then \ + ${PYTHON} ${top_builddir}/pokerconfigupgrade --verbose=1 --upgrades=${srcdir}/upgrades ${srcdir}/conf ; \ + fi + +install-data-local: + mkdir -p "${DESTDIR}${pkgsysconfdir}" + ${PYTHON} ${top_builddir}/pokerconfigupgrade --verbose=1 --upgrades=${srcdir}/upgrades --reference=${srcdir}/conf "${DESTDIR}${pkgsysconfdir}" + chmod u+w "${DESTDIR}${pkgsysconfdir}" + +uninstall-local: + rm -f ${DESTDIR}${pkgsysconfdir}/*.{xml,template} + rmdir ${DESTDIR}${pkgsysconfdir} + +buildconf: + ( \ + echo '.01-.02 .01/.02 1 2 1' ; \ + echo '.02-.04 .02/.04 2 4 2' ; \ + echo '.05-.10 .05/.10 5 10 5' ; \ + echo '.10-.25 .10/.25 12 25 1' ; \ + echo '.25-.50 .25/.50 25 50 5' ; \ + echo '.50-1 .50/1 50 100 50' ; \ + echo '1-2 1/2 100 200 100' ; \ + echo '2-4 2/4 200 400 100' ; \ + echo '3-6 3/6 300 600 100' ; \ + echo '5-10 5/10 500 1000 500' ; \ + echo '10-20 10/20 1000 2000 1000' ; \ + echo '30-60 30/60 3000 6000 1000' ; \ + echo '50-100 50/100 5000 10000 5000' ; \ + echo '100-200 100/200 10000 20000 10000' ; \ + ) | while read name desc small big unit ; do \ + buy_in=`expr $$big \* 10` ; \ + best_buy_in=`expr $$big \* 50` ; \ + max_buy_in=`expr $$big \* 100` ; \ + sed -e "s;_NAME_;$$name;g" -e "s;_DESC_;$$desc;g" -e "s/_UNIT_/$$unit/g" -e "s/_BEST_BUY_IN_/$$best_buy_in/g" -e "s/_MAX_BUY_IN_/$$max_buy_in/g" -e "s/_BUY_IN_/$$buy_in/g" -e "s/_SMALL_/$$small/g" -e "s/_BIG_/$$big/g" < conf/no-limit.template > conf/poker.$${name}-no-limit.xml ; \ + done + + ( \ + echo '.01-.02 .01/.02 1 2 1' ; \ + echo '.02-.04 .02/.04 2 4 2' ; \ + echo '.05-.10 .05/.10 5 10 5' ; \ + echo '.10-.25 .10/.25 12 25 1' ; \ + echo '.25-.50 .25/.50 25 50 5' ; \ + echo '.50-1 .50/1 50 100 50' ; \ + echo '1-2 1/2 100 200 100' ; \ + echo '2-4 2/4 200 400 100' ; \ + echo '3-6 3/6 300 600 100' ; \ + echo '5-10 5/10 500 1000 500' ; \ + echo '10-20 10/20 1000 2000 1000' ; \ + echo '30-60 30/60 3000 6000 1000' ; \ + echo '50-100 50/100 5000 10000 5000' ; \ + echo '100-200 100/200 10000 20000 10000' ; \ + ) | while read name desc small big unit ; do \ + buy_in=`expr $$big \* 10` ; \ + best_buy_in=`expr $$big \* 50` ; \ + max_buy_in=`expr $$big \* 100` ; \ + sed -e "s;_NAME_;$$name;g" -e "s;_DESC_;$$desc;g" -e "s/_UNIT_/$$unit/g" -e "s/_BEST_BUY_IN_/$$best_buy_in/g" -e "s/_MAX_BUY_IN_/$$max_buy_in/g" -e "s/_BUY_IN_/$$buy_in/g" -e "s/_SMALL_/$$small/g" -e "s/_BIG_/$$big/g" < conf/pot-limit.template > conf/poker.$${name}-pot-limit.xml ; \ + done + + ( \ + echo '.02-.04 .02/.04 1 2 1' ; \ + echo '.05-.10 .05/.10 2 5 1' ; \ + echo '.10-.25 .10/.25 5 10 5' ; \ + echo '.25-.50 .25/.50 12 25 1' ; \ + echo '.50-1 .50/1 25 50 5' ; \ + echo '1-2 1/2 50 100 50' ; \ + echo '2-4 2/4 100 200 100' ; \ + echo '3-6 3/6 150 300 50' ; \ + echo '5-10 5/10 250 500 50' ; \ + echo '10-20 10/20 500 1000 500' ; \ + echo '30-60 30/60 1500 3000 500' ; \ + echo '50-100 50/100 2500 5000 500' ; \ + echo '100-200 100/200 5000 10000 5000' ; \ + ) | while read name desc small big unit ; do \ + buy_in=`expr $$big \* 5` ; \ + best_buy_in=`expr $$big \* 30` ; \ + max_buy_in=`expr $$big \* 100000` ; \ + big_bet=`expr $$big \* 2` ; \ + sed -e "s;_NAME_;$$name;g" -e "s;_DESC_;$$desc;g" -e "s/_UNIT_/$$unit/g" -e "s/_BEST_BUY_IN_/$$best_buy_in/g" -e "s/_MAX_BUY_IN_/$$max_buy_in/g" -e "s/_BUY_IN_/$$buy_in/g" -e "s/_SMALL_/$$small/g" -e "s/_BIG_/$$big/g" -e "s/_BIGBET_/$$big_bet/g" < conf/limit.template > conf/poker.$${name}-limit.xml ; \ + done + + ( \ + echo '.04-.08 .04/.08 4 8 1 2 1' ; \ + echo '.10-.20 .10/.20 10 20 2 5 2' ; \ + echo '.25-.50 .25/.50 25 50 5 10 5' ; \ + echo '.50-1 .50/1 50 100 5 25 5' ; \ + echo '1-2 1/2 100 200 10 50 10' ; \ + echo '2-4 2/4 200 400 25 100 25' ; \ + echo '3-6 3/6 300 600 25 150 25' ; \ + echo '5-10 5/10 500 1000 50 200 50' ; \ + echo '10-20 10/20 1000 2000 100 500 100' ; \ + echo '30-60 30/60 3000 6000 500 1500 500' ; \ + ) | while read name desc small big ante bringin unit ; do \ + buy_in=`expr $$big \* 5` ; \ + best_buy_in=`expr $$big \* 30` ; \ + max_buy_in=`expr $$big \* 100000` ; \ + sed -e "s;_NAME_;$$name;g" -e "s;_DESC_;$$desc;g" -e "s/_UNIT_/$$unit/g" -e "s/_BEST_BUY_IN_/$$best_buy_in/g" -e "s/_MAX_BUY_IN_/$$max_buy_in/g" -e "s/_BUY_IN_/$$buy_in/g" -e "s/_SMALL_/$$small/g" -e "s/_BIG_/$$big/g" -e "s/_ANTE_/$$ante/g" -e "s/_BRINGIN_/$$bringin/g" < conf/ante-limit.template > conf/poker.ante-$${name}-limit.xml ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: --- poker-engine-1.3.6.orig/Makefile.in +++ poker-engine-1.3.6/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgincludedir = $(includedir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -70,6 +87,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \ "$(DESTDIR)$(confpokerdir)" "$(DESTDIR)$(upgradepokerdir)" \ "$(DESTDIR)$(pkgconfigdir)" @@ -83,6 +106,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) @@ -102,9 +130,11 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -133,6 +163,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print pkgdatadir = @pkgdatadir@ pkglibdir = @pkglibdir@ @@ -186,6 +218,7 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RSYNC = @RSYNC@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -299,7 +332,7 @@ all: all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -341,8 +374,11 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -370,16 +406,21 @@ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) install-man8: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -408,13 +449,14 @@ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-dist_confpokerDATA: $(dist_confpoker_DATA) @$(NORMAL_INSTALL) - test -z "$(confpokerdir)" || $(MKDIR_P) "$(DESTDIR)$(confpokerdir)" @list='$(dist_confpoker_DATA)'; test -n "$(confpokerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(confpokerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(confpokerdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -428,13 +470,14 @@ @$(NORMAL_UNINSTALL) @list='$(dist_confpoker_DATA)'; test -n "$(confpokerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(confpokerdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(confpokerdir)" && rm -f $$files + dir='$(DESTDIR)$(confpokerdir)'; $(am__uninstall_files_from_dir) install-dist_upgradepokerDATA: $(dist_upgradepoker_DATA) @$(NORMAL_INSTALL) - test -z "$(upgradepokerdir)" || $(MKDIR_P) "$(DESTDIR)$(upgradepokerdir)" @list='$(dist_upgradepoker_DATA)'; test -n "$(upgradepokerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(upgradepokerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(upgradepokerdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -448,13 +491,14 @@ @$(NORMAL_UNINSTALL) @list='$(dist_upgradepoker_DATA)'; test -n "$(upgradepokerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(upgradepokerdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(upgradepokerdir)" && rm -f $$files + dir='$(DESTDIR)$(upgradepokerdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -468,9 +512,7 @@ @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -688,14 +730,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -746,13 +789,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -784,7 +824,11 @@ $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -792,7 +836,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -823,6 +867,8 @@ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -832,7 +878,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -842,6 +888,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -870,8 +917,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -906,10 +961,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1003,18 +1063,18 @@ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local am--refresh check check-TESTS check-am \ clean clean-generic clean-local ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local \ - install-dist_confpokerDATA install-dist_upgradepokerDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man8 install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am \ - install-sbinSCRIPTS install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-local install-dist_confpokerDATA \ + install-dist_upgradepokerDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man8 \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-sbinSCRIPTS install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_confpokerDATA uninstall-dist_upgradepokerDATA \ --- poker-engine-1.3.6.orig/aclocal.m4 +++ poker-engine-1.3.6/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,14 +14,14 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -80,7 +81,8 @@ # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -126,7 +128,8 @@ pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -174,9 +177,9 @@ AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -210,8 +213,8 @@ fi[]dnl ])# PKG_CHECK_MODULES -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. +# po.m4 serial 21 (gettext-0.18.3) +dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -229,14 +232,15 @@ dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ([2.50]) +AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that @@ -314,7 +318,7 @@ case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -330,7 +334,8 @@ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -341,12 +346,12 @@ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -438,7 +443,7 @@ changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -466,6 +471,7 @@ fi # A sed script that extracts the value of VARIABLE from a Makefile. + tab=`printf '\t'` sed_x_variable=' # Test if the hold space is empty. x @@ -473,9 +479,9 @@ x ta # Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ +/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// + s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// ba } bd @@ -527,7 +533,7 @@ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -617,14 +623,15 @@ fi sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" + tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 # Find out how to test for executable files. Don't use a zero-byte file, @@ -753,12 +759,15 @@ AC_SUBST([$1])dnl ]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -768,7 +777,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -784,19 +793,21 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -1017,12 +1028,15 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -1062,8 +1076,8 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1083,7 +1097,7 @@ [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful @@ -1142,12 +1156,15 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -1170,13 +1187,14 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -1184,13 +1202,13 @@ [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1201,13 +1219,15 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To @@ -1235,8 +1255,10 @@ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], - [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl -python2.1 python2.0]) +[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. @@ -1308,9 +1330,7 @@ dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE @@ -1319,8 +1339,7 @@ else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -1346,9 +1365,7 @@ dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE @@ -1357,8 +1374,7 @@ else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -1406,12 +1422,14 @@ sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. @@ -1488,12 +1506,14 @@ fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -1516,13 +1536,13 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -1531,13 +1551,13 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1559,10 +1579,11 @@ # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) --- poker-engine-1.3.6.orig/autom4te.cache/output.0 +++ poker-engine-1.3.6/autom4te.cache/output.0 @@ -0,0 +1,4795 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.69 for poker-engine 1.3.6. +@%:@ +@%:@ +@%:@ Copyright (C) 1992-1996, 1998-2012 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 + + +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 +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (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 + + +# 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. +as_myself= +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 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="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_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in @%:@( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $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'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +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'` + +# 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_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # 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; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # 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 +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +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 "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/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=. +LIB@&t@OBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='poker-engine' +PACKAGE_TARNAME='poker-engine' +PACKAGE_VERSION='1.3.6' +PACKAGE_STRING='poker-engine 1.3.6' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="pokerengine/pokergame.py" +ac_subst_vars='LTLIBOBJS +LIB@&t@OBJS +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +SED +PYPOKER_EVAL_LIBS +PYPOKER_EVAL_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +POKER_ENGINE_PKGSYSCONFDIR +POKER_ENGINE_PKGLIBDIR +POKER_ENGINE_PKGDATADIR +pkgdatadir +pkglibdir +pkgsysconfdir +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +RSYNC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +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_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_nls +' + ac_precious_vars='build_alias +host_alias +target_alias +PYTHON +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +PYPOKER_EVAL_CFLAGS +PYPOKER_EVAL_LIBS' + + +# 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= ;; + *) 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_fn_error $? "invalid feature name: $ac_useropt" + 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_fn_error $? "invalid feature name: $ac_useropt" + 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_fn_error $? "invalid package name: $ac_useropt" + 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_fn_error $? "invalid package name: $ac_useropt" + 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_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + 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_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $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_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +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 + 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_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# 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_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + 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 poker-engine 1.3.6 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 + @<:@@S|@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/poker-engine@:>@ + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of poker-engine 1.3.6:";; + 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-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-nls do not use Native Language Support + +Some influential environment variables: + PYTHON the Python interpreter + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + PYPOKER_EVAL_CFLAGS + C compiler flags for PYPOKER_EVAL, overriding pkg-config + PYPOKER_EVAL_LIBS + linker flags for PYPOKER_EVAL, overriding pkg-config + +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 the package provider. +_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 +poker-engine configure 1.3.6 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 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 + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +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 poker-engine $as_me 1.3.6, which was +generated by GNU Autoconf 2.69. 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append 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 + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset 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 + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + 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:${as_lineno-$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= ;; #( + *) { eval $ac_var=; 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 + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + 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 + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + 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 + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + 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'; as_fn_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 + +$as_echo "/* confdefs.h */" > 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 + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_URL "$PACKAGE_URL" +_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 + # We do not want a PATH search for config.site. + case $CONFIG_SITE in @%:@(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +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 /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$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" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + 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. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$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. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$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_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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_aux_dir= +for ac_dir in config "$srcdir"/config; 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_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +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. + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in @%:@(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='poker-engine' + VERSION='1.3.6' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + + +# Checks for programs. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +# Extract the first word of "rsync", so it can be a program name with args. +set dummy rsync; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_RSYNC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RSYNC in + [\\/]* | ?:[\\/]*) + ac_cv_path_RSYNC="$RSYNC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RSYNC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +RSYNC=$ac_cv_path_RSYNC +if test -n "$RSYNC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSYNC" >&5 +$as_echo "$RSYNC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$RSYNC" ; then + as_fn_error $? "rsync is needed to install poker-engine" "$LINENO" 5 +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + @%:@ Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.3" >&5 +$as_echo_n "checking whether $PYTHON version >= 2.3... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + as_fn_error $? "too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.3" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.3... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + +pkgsysconfdir=$sysconfdir/$PACKAGE +pkgsysconfdir=$pkgsysconfdir + +pkglibdir=$libexecdir/$PACKAGE +pkglibdir=$pkglibdir + +pkgdatadir=$datadir/$PACKAGE +pkgdatadir=$pkgdatadir + + +POKER_ENGINE_PKGDATADIR=`eval eval eval echo $pkgdatadir` + +POKER_ENGINE_PKGLIBDIR=`eval eval eval echo $pkglibdir` + +POKER_ENGINE_PKGSYSCONFDIR=`eval eval eval echo $pkgsysconfdir` + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$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_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYPOKER_EVAL" >&5 +$as_echo_n "checking for PYPOKER_EVAL... " >&6; } + +if test -n "$PYPOKER_EVAL_CFLAGS"; then + pkg_cv_PYPOKER_EVAL_CFLAGS="$PYPOKER_EVAL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pypoker-eval >= 132.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYPOKER_EVAL_CFLAGS=`$PKG_CONFIG --cflags "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PYPOKER_EVAL_LIBS"; then + pkg_cv_PYPOKER_EVAL_LIBS="$PYPOKER_EVAL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pypoker-eval >= 132.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYPOKER_EVAL_LIBS=`$PKG_CONFIG --libs "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` + else + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PYPOKER_EVAL_PKG_ERRORS" >&5 + + as_fn_error $? "pypoker-eval is a mandatory library" "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "pypoker-eval is a mandatory library" "$LINENO" 5 +else + PYPOKER_EVAL_CFLAGS=$pkg_cv_PYPOKER_EVAL_CFLAGS + PYPOKER_EVAL_LIBS=$pkg_cv_PYPOKER_EVAL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +python_script=" +import imp +import sys + +path = list() +modules = sys.argv.pop(1) +for module in modules.split('.'): + (file, pathname, info) = imp.find_module(module, sys.path + path) + sys.stdout.write(pathname + ' ') + path = list(( pathname, )) +" +for module in libxml2 libxslt pokereval ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking wether python module $module is available" >&5 +$as_echo_n "checking wether python module $module is available... " >&6; } + if $PYTHON -c "$python_script" $module ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ... yes" >&5 +$as_echo "... yes" >&6; } + else + as_fn_error $? "failed" "$LINENO" 5 + fi +done + +# i18n +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + @%:@ Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.18 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + +# Generate files +ac_config_files="$ac_config_files tests/run pokerconfigupgrade" + +ac_config_files="$ac_config_files po/Makefile" + +ac_config_files="$ac_config_files Makefile poker-engine.pc pokerconfigupgrade.8 pokerengine/Makefile tests/allin.py tests/blinds.py tests/buyin.py tests/bugs.py tests/chips.py tests/deal.py tests/eval.py tests/history.py tests/muck.py tests/positions.py tests/sit.py tests/tournament.py tests/upgrades.py tests/libxml2leak.py tests/test-gamehistory.py tests/test-pokercards.py tests/test-pokerengineconfig.py tests/test-pokertournament.py tests/test-pokerprizes.py tests/test-game.py tests/test-pokerchips.py tests/test-pokerrake.py tests/test-pokerplayer.py tests/test-version.py tests/test-i18n.py tests/Makefile" + +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:${as_lineno-$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= ;; #( + *) { eval $ac_var=; 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 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$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= +U= +for ac_i in : $LIB@&t@OBJS; 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. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIB@&t@OBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_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} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_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 + + +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 +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (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 + + +# 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. +as_myself= +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 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +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'` + +# 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 + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $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'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 poker-engine $as_me 1.3.6, which was +generated by GNU Autoconf 2.69. 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 and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, 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 the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +poker-engine config.status 1.3.6 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 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' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + 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 ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; 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"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append 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_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append 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 +# +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_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 + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;; + "pokerconfigupgrade") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade" ;; + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "poker-engine.pc") CONFIG_FILES="$CONFIG_FILES poker-engine.pc" ;; + "pokerconfigupgrade.8") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade.8" ;; + "pokerengine/Makefile") CONFIG_FILES="$CONFIG_FILES pokerengine/Makefile" ;; + "tests/allin.py") CONFIG_FILES="$CONFIG_FILES tests/allin.py" ;; + "tests/blinds.py") CONFIG_FILES="$CONFIG_FILES tests/blinds.py" ;; + "tests/buyin.py") CONFIG_FILES="$CONFIG_FILES tests/buyin.py" ;; + "tests/bugs.py") CONFIG_FILES="$CONFIG_FILES tests/bugs.py" ;; + "tests/chips.py") CONFIG_FILES="$CONFIG_FILES tests/chips.py" ;; + "tests/deal.py") CONFIG_FILES="$CONFIG_FILES tests/deal.py" ;; + "tests/eval.py") CONFIG_FILES="$CONFIG_FILES tests/eval.py" ;; + "tests/history.py") CONFIG_FILES="$CONFIG_FILES tests/history.py" ;; + "tests/muck.py") CONFIG_FILES="$CONFIG_FILES tests/muck.py" ;; + "tests/positions.py") CONFIG_FILES="$CONFIG_FILES tests/positions.py" ;; + "tests/sit.py") CONFIG_FILES="$CONFIG_FILES tests/sit.py" ;; + "tests/tournament.py") CONFIG_FILES="$CONFIG_FILES tests/tournament.py" ;; + "tests/upgrades.py") CONFIG_FILES="$CONFIG_FILES tests/upgrades.py" ;; + "tests/libxml2leak.py") CONFIG_FILES="$CONFIG_FILES tests/libxml2leak.py" ;; + "tests/test-gamehistory.py") CONFIG_FILES="$CONFIG_FILES tests/test-gamehistory.py" ;; + "tests/test-pokercards.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokercards.py" ;; + "tests/test-pokerengineconfig.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerengineconfig.py" ;; + "tests/test-pokertournament.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokertournament.py" ;; + "tests/test-pokerprizes.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerprizes.py" ;; + "tests/test-game.py") CONFIG_FILES="$CONFIG_FILES tests/test-game.py" ;; + "tests/test-pokerchips.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerchips.py" ;; + "tests/test-pokerrake.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerrake.py" ;; + "tests/test-pokerplayer.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerplayer.py" ;; + "tests/test-version.py") CONFIG_FILES="$CONFIG_FILES tests/test-version.py" ;; + "tests/test-i18n.py") CONFIG_FILES="$CONFIG_FILES tests/test-i18n.py" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + 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= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# 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'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /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 {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + 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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + 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 >>"\$ac_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 +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +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_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[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="$ac_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_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append 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:${as_lineno-$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 >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + 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'` + as_dir="$ac_dir"; as_fn_mkdir_p + 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 + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_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:${as_lineno-$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 +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$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 "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + "tests/run":F) chmod 555 $ac_file ;; + "pokerconfigupgrade":F) chmod 555 $ac_file ;; + "po/Makefile":F) + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" </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 || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + --- poker-engine-1.3.6.orig/autom4te.cache/output.1 +++ poker-engine-1.3.6/autom4te.cache/output.1 @@ -0,0 +1,4795 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.69 for poker-engine 1.3.6. +@%:@ +@%:@ +@%:@ Copyright (C) 1992-1996, 1998-2012 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 + + +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 +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (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 + + +# 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. +as_myself= +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 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="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_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in @%:@( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $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'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +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'` + +# 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_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # 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; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # 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 +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +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 "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/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=. +LIB@&t@OBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='poker-engine' +PACKAGE_TARNAME='poker-engine' +PACKAGE_VERSION='1.3.6' +PACKAGE_STRING='poker-engine 1.3.6' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="pokerengine/pokergame.py" +ac_subst_vars='LTLIBOBJS +LIB@&t@OBJS +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +SED +PYPOKER_EVAL_LIBS +PYPOKER_EVAL_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +POKER_ENGINE_PKGSYSCONFDIR +POKER_ENGINE_PKGLIBDIR +POKER_ENGINE_PKGDATADIR +pkgdatadir +pkglibdir +pkgsysconfdir +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +RSYNC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +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_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_nls +' + ac_precious_vars='build_alias +host_alias +target_alias +PYTHON +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +PYPOKER_EVAL_CFLAGS +PYPOKER_EVAL_LIBS' + + +# 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= ;; + *) 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_fn_error $? "invalid feature name: $ac_useropt" + 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_fn_error $? "invalid feature name: $ac_useropt" + 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_fn_error $? "invalid package name: $ac_useropt" + 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_fn_error $? "invalid package name: $ac_useropt" + 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_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + 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_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $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_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +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 + 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_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# 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_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + 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 poker-engine 1.3.6 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 + @<:@@S|@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/poker-engine@:>@ + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of poker-engine 1.3.6:";; + 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-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-nls do not use Native Language Support + +Some influential environment variables: + PYTHON the Python interpreter + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + PYPOKER_EVAL_CFLAGS + C compiler flags for PYPOKER_EVAL, overriding pkg-config + PYPOKER_EVAL_LIBS + linker flags for PYPOKER_EVAL, overriding pkg-config + +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 the package provider. +_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 +poker-engine configure 1.3.6 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 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 + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +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 poker-engine $as_me 1.3.6, which was +generated by GNU Autoconf 2.69. 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append 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 + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset 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 + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + 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:${as_lineno-$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= ;; #( + *) { eval $ac_var=; 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 + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + 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 + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + 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 + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + 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'; as_fn_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 + +$as_echo "/* confdefs.h */" > 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 + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_URL "$PACKAGE_URL" +_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 + # We do not want a PATH search for config.site. + case $CONFIG_SITE in @%:@(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +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 /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$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" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + 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. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$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. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$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_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&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_aux_dir= +for ac_dir in config "$srcdir"/config; 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_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +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. + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in @%:@(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='poker-engine' + VERSION='1.3.6' + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + + +# Checks for programs. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +# Extract the first word of "rsync", so it can be a program name with args. +set dummy rsync; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_RSYNC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RSYNC in + [\\/]* | ?:[\\/]*) + ac_cv_path_RSYNC="$RSYNC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_RSYNC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +RSYNC=$ac_cv_path_RSYNC +if test -n "$RSYNC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSYNC" >&5 +$as_echo "$RSYNC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$RSYNC" ; then + as_fn_error $? "rsync is needed to install poker-engine" "$LINENO" 5 +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + @%:@ Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.3" >&5 +$as_echo_n "checking whether $PYTHON version >= 2.3... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + as_fn_error $? "too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.3" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.3... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + +pkgsysconfdir=$sysconfdir/$PACKAGE +pkgsysconfdir=$pkgsysconfdir + +pkglibdir=$libexecdir/$PACKAGE +pkglibdir=$pkglibdir + +pkgdatadir=$datadir/$PACKAGE +pkgdatadir=$pkgdatadir + + +POKER_ENGINE_PKGDATADIR=`eval eval eval echo $pkgdatadir` + +POKER_ENGINE_PKGLIBDIR=`eval eval eval echo $pkglibdir` + +POKER_ENGINE_PKGSYSCONFDIR=`eval eval eval echo $pkgsysconfdir` + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$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_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYPOKER_EVAL" >&5 +$as_echo_n "checking for PYPOKER_EVAL... " >&6; } + +if test -n "$PYPOKER_EVAL_CFLAGS"; then + pkg_cv_PYPOKER_EVAL_CFLAGS="$PYPOKER_EVAL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pypoker-eval >= 132.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYPOKER_EVAL_CFLAGS=`$PKG_CONFIG --cflags "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PYPOKER_EVAL_LIBS"; then + pkg_cv_PYPOKER_EVAL_LIBS="$PYPOKER_EVAL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pypoker-eval >= 132.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYPOKER_EVAL_LIBS=`$PKG_CONFIG --libs "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` + else + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PYPOKER_EVAL_PKG_ERRORS" >&5 + + as_fn_error $? "pypoker-eval is a mandatory library" "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "pypoker-eval is a mandatory library" "$LINENO" 5 +else + PYPOKER_EVAL_CFLAGS=$pkg_cv_PYPOKER_EVAL_CFLAGS + PYPOKER_EVAL_LIBS=$pkg_cv_PYPOKER_EVAL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +python_script=" +import imp +import sys + +path = list() +modules = sys.argv.pop(1) +for module in modules.split('.'): + (file, pathname, info) = imp.find_module(module, sys.path + path) + sys.stdout.write(pathname + ' ') + path = list(( pathname, )) +" +for module in libxml2 libxslt pokereval ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking wether python module $module is available" >&5 +$as_echo_n "checking wether python module $module is available... " >&6; } + if $PYTHON -c "$python_script" $module ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ... yes" >&5 +$as_echo "... yes" >&6; } + else + as_fn_error $? "failed" "$LINENO" 5 + fi +done + +# i18n +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + @%:@ Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.18 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + +# Generate files +ac_config_files="$ac_config_files tests/run pokerconfigupgrade" + +ac_config_files="$ac_config_files po/Makefile" + +ac_config_files="$ac_config_files Makefile poker-engine.pc pokerconfigupgrade.8 pokerengine/Makefile tests/allin.py tests/blinds.py tests/buyin.py tests/bugs.py tests/chips.py tests/deal.py tests/eval.py tests/history.py tests/muck.py tests/positions.py tests/sit.py tests/tournament.py tests/upgrades.py tests/libxml2leak.py tests/test-gamehistory.py tests/test-pokercards.py tests/test-pokerengineconfig.py tests/test-pokertournament.py tests/test-pokerprizes.py tests/test-game.py tests/test-pokerchips.py tests/test-pokerrake.py tests/test-pokerplayer.py tests/test-version.py tests/test-i18n.py tests/Makefile" + +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:${as_lineno-$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= ;; #( + *) { eval $ac_var=; 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 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$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= +U= +for ac_i in : $LIB@&t@OBJS; 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. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIB@&t@OBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_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} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_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 + + +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 +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (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 + + +# 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. +as_myself= +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 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- +@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are +@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the +@%:@ script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} @%:@ as_fn_error + + +@%:@ as_fn_set_status STATUS +@%:@ ----------------------- +@%:@ Set @S|@? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} @%:@ as_fn_set_status + +@%:@ as_fn_exit STATUS +@%:@ ----------------- +@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} @%:@ as_fn_exit + +@%:@ as_fn_unset VAR +@%:@ --------------- +@%:@ Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +@%:@ as_fn_append VAR VALUE +@%:@ ---------------------- +@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take +@%:@ advantage of any shell optimizations that allow amortized linear growth over +@%:@ repeated appends, instead of the typical quadratic growth present in naive +@%:@ implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +@%:@ as_fn_arith ARG... +@%:@ ------------------ +@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the +@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments +@%:@ must be portable across @S|@(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +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'` + +# 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 + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in @%:@((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +@%:@ as_fn_mkdir_p +@%:@ ------------- +@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $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'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} @%:@ as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +@%:@ as_fn_executable_p FILE +@%:@ ----------------------- +@%:@ Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} @%:@ as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 poker-engine $as_me 1.3.6, which was +generated by GNU Autoconf 2.69. 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 and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, 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 the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +poker-engine config.status 1.3.6 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 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' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + 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 ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; 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"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append 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_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append 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 +# +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_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 + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;; + "pokerconfigupgrade") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade" ;; + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "poker-engine.pc") CONFIG_FILES="$CONFIG_FILES poker-engine.pc" ;; + "pokerconfigupgrade.8") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade.8" ;; + "pokerengine/Makefile") CONFIG_FILES="$CONFIG_FILES pokerengine/Makefile" ;; + "tests/allin.py") CONFIG_FILES="$CONFIG_FILES tests/allin.py" ;; + "tests/blinds.py") CONFIG_FILES="$CONFIG_FILES tests/blinds.py" ;; + "tests/buyin.py") CONFIG_FILES="$CONFIG_FILES tests/buyin.py" ;; + "tests/bugs.py") CONFIG_FILES="$CONFIG_FILES tests/bugs.py" ;; + "tests/chips.py") CONFIG_FILES="$CONFIG_FILES tests/chips.py" ;; + "tests/deal.py") CONFIG_FILES="$CONFIG_FILES tests/deal.py" ;; + "tests/eval.py") CONFIG_FILES="$CONFIG_FILES tests/eval.py" ;; + "tests/history.py") CONFIG_FILES="$CONFIG_FILES tests/history.py" ;; + "tests/muck.py") CONFIG_FILES="$CONFIG_FILES tests/muck.py" ;; + "tests/positions.py") CONFIG_FILES="$CONFIG_FILES tests/positions.py" ;; + "tests/sit.py") CONFIG_FILES="$CONFIG_FILES tests/sit.py" ;; + "tests/tournament.py") CONFIG_FILES="$CONFIG_FILES tests/tournament.py" ;; + "tests/upgrades.py") CONFIG_FILES="$CONFIG_FILES tests/upgrades.py" ;; + "tests/libxml2leak.py") CONFIG_FILES="$CONFIG_FILES tests/libxml2leak.py" ;; + "tests/test-gamehistory.py") CONFIG_FILES="$CONFIG_FILES tests/test-gamehistory.py" ;; + "tests/test-pokercards.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokercards.py" ;; + "tests/test-pokerengineconfig.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerengineconfig.py" ;; + "tests/test-pokertournament.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokertournament.py" ;; + "tests/test-pokerprizes.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerprizes.py" ;; + "tests/test-game.py") CONFIG_FILES="$CONFIG_FILES tests/test-game.py" ;; + "tests/test-pokerchips.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerchips.py" ;; + "tests/test-pokerrake.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerrake.py" ;; + "tests/test-pokerplayer.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerplayer.py" ;; + "tests/test-version.py") CONFIG_FILES="$CONFIG_FILES tests/test-version.py" ;; + "tests/test-i18n.py") CONFIG_FILES="$CONFIG_FILES tests/test-i18n.py" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + 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= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# 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'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /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 {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + 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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + 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 >>"\$ac_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 +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +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_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[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="$ac_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_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append 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:${as_lineno-$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 >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + 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'` + as_dir="$ac_dir"; as_fn_mkdir_p + 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 + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_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:${as_lineno-$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 +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$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 "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + "tests/run":F) chmod 555 $ac_file ;; + "pokerconfigupgrade":F) chmod 555 $ac_file ;; + "po/Makefile":F) + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" </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 || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + --- poker-engine-1.3.6.orig/autom4te.cache/requests +++ poker-engine-1.3.6/autom4te.cache/requests @@ -0,0 +1,166 @@ +# This file was generated by Autom4te Sun Feb 23 17:19:32 UTC 2014. +# It contains the lists of macros which have been traced. +# It can be safely removed. + +@request = ( + bless( [ + '0', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + '/usr/share/aclocal/nls.m4', + '/usr/share/aclocal/pkg.m4', + '/usr/share/aclocal/po.m4', + '/usr/share/aclocal/progtest.m4', + '/usr/share/aclocal-1.11/amversion.m4', + '/usr/share/aclocal-1.11/auxdir.m4', + '/usr/share/aclocal-1.11/cond.m4', + '/usr/share/aclocal-1.11/depend.m4', + '/usr/share/aclocal-1.11/depout.m4', + '/usr/share/aclocal-1.11/init.m4', + '/usr/share/aclocal-1.11/install-sh.m4', + '/usr/share/aclocal-1.11/lead-dot.m4', + '/usr/share/aclocal-1.11/maintainer.m4', + '/usr/share/aclocal-1.11/make.m4', + '/usr/share/aclocal-1.11/missing.m4', + '/usr/share/aclocal-1.11/mkdirp.m4', + '/usr/share/aclocal-1.11/options.m4', + '/usr/share/aclocal-1.11/python.m4', + '/usr/share/aclocal-1.11/runlog.m4', + '/usr/share/aclocal-1.11/sanity.m4', + '/usr/share/aclocal-1.11/silent.m4', + '/usr/share/aclocal-1.11/strip.m4', + '/usr/share/aclocal-1.11/substnot.m4', + '/usr/share/aclocal-1.11/tar.m4', + 'configure.ac' + ], + { + '_AM_MANGLE_OPTION' => 1, + 'AM_SET_DEPDIR' => 1, + 'PKG_PROG_PKG_CONFIG' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_DEFUN_ONCE' => 1, + 'include' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AM_SILENT_RULES' => 1, + 'AM_PATH_PROG_WITH_TEST' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'PKG_CHECK_EXISTS' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AU_DEFUN' => 1, + 'PKG_CHECK_MODULES' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_RUN_LOG' => 1, + 'AM_CONDITIONAL' => 1, + 'm4_pattern_forbid' => 1, + 'jm_MAINTAINER_MODE' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AM_MISSING_HAS_RUN' => 1, + '_AM_SET_OPTION' => 1, + '_PKG_SHORT_ERRORS_SUPPORTED' => 1, + 'AM_PYTHON_CHECK_VERSION' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + '_m4_warn' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'AM_DEP_TRACK' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'm4_pattern_allow' => 1, + '_AM_IF_OPTION' => 1, + 'AM_SANITY_CHECK' => 1, + '_AM_PROG_TAR' => 1, + 'AM_MISSING_PROG' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_NLS' => 1, + '_AM_SUBST_NOTMAKE' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AM_XGETTEXT_OPTION_INIT' => 1, + 'AC_DEFUN' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + '_AM_DEPENDENCIES' => 1, + '_AM_SET_OPTIONS' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AM_PO_SUBDIRS' => 1, + 'm4_include' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AM_PATH_PYTHON' => 1, + 'AM_POSTPROCESS_PO_MAKEFILE' => 1 + } + ], 'Autom4te::Request' ), + bless( [ + '1', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + 'aclocal.m4', + 'configure.ac' + ], + { + 'AC_LIBSOURCE' => 1, + 'sinclude' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'LT_INIT' => 1, + '_AM_COND_ELSE' => 1, + 'm4_pattern_forbid' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AM_CONDITIONAL' => 1, + '_AM_COND_ENDIF' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_PROG_MOC' => 1, + 'AM_POT_TOOLS' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_FC_SRCEXT' => 1, + 'm4_sinclude' => 1, + 'AC_SUBST_TRACE' => 1, + 'AM_PATH_GUILE' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AC_INIT' => 1, + 'AM_SILENT_RULES' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_CANONICAL_HOST' => 1, + 'include' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AM_PROG_AR' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'AC_CONFIG_FILES' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'm4_include' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AM_PROG_CC_C_O' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AC_SUBST' => 1, + 'AC_PROG_LIBTOOL' => 1, + '_m4_warn' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_FC_FREEFORM' => 1, + '_AM_COND_IF' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, + 'AM_PROG_F77_C_O' => 1, + 'AM_NLS' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AH_OUTPUT' => 1, + 'm4_pattern_allow' => 1, + 'AC_CONFIG_LINKS' => 1 + } + ], 'Autom4te::Request' ) + ); + --- poker-engine-1.3.6.orig/autom4te.cache/traces.0 +++ poker-engine-1.3.6/autom4te.cache/traces.0 @@ -0,0 +1,1566 @@ +m4trace:/usr/share/aclocal/nls.m4:23: -1- AC_DEFUN([AM_NLS], [ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) +m4trace:/usr/share/aclocal/pkg.m4:27: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +]) +m4trace:/usr/share/aclocal/pkg.m4:60: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) +m4trace:/usr/share/aclocal/pkg.m4:86: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +]) +m4trace:/usr/share/aclocal/pkg.m4:106: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +]) +m4trace:/usr/share/aclocal/po.m4:23: -1- AC_DEFUN([AM_PO_SUBDIRS], [ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) +m4trace:/usr/share/aclocal/po.m4:220: -1- AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" </dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) +m4trace:/usr/share/aclocal-1.11/amversion.m4:17: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) +m4trace:/usr/share/aclocal-1.11/amversion.m4:36: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +m4trace:/usr/share/aclocal-1.11/auxdir.m4:49: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) +m4trace:/usr/share/aclocal-1.11/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) +m4trace:/usr/share/aclocal-1.11/depend.m4:28: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) +m4trace:/usr/share/aclocal-1.11/depend.m4:164: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) +m4trace:/usr/share/aclocal-1.11/depend.m4:172: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) +m4trace:/usr/share/aclocal-1.11/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +]) +m4trace:/usr/share/aclocal-1.11/depout.m4:75: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) +m4trace:/usr/share/aclocal-1.11/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) +m4trace:/usr/share/aclocal-1.11/init.m4:126: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) +m4trace:/usr/share/aclocal-1.11/install-sh.m4:14: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) +m4trace:/usr/share/aclocal-1.11/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) +m4trace:/usr/share/aclocal-1.11/maintainer.m4:19: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl + +]) +m4trace:/usr/share/aclocal-1.11/maintainer.m4:39: -1- AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) +m4trace:/usr/share/aclocal-1.11/maintainer.m4:39: -1- AC_DEFUN([jm_MAINTAINER_MODE], [AC_DIAGNOSE([obsolete], [The macro `jm_MAINTAINER_MODE' is obsolete. +You should run autoupdate.])dnl +AM_MAINTAINER_MODE]) +m4trace:/usr/share/aclocal-1.11/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) +m4trace:/usr/share/aclocal-1.11/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) +m4trace:/usr/share/aclocal-1.11/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) +m4trace:/usr/share/aclocal-1.11/mkdirp.m4:14: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) +m4trace:/usr/share/aclocal-1.11/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.11/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +m4trace:/usr/share/aclocal-1.11/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.11/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.11/python.m4:37: -1- AC_DEFUN([AM_PATH_PYTHON], [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT(yes)], + [AC_MSG_ERROR(too old)]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) +m4trace:/usr/share/aclocal-1.11/python.m4:197: -1- AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) +m4trace:/usr/share/aclocal-1.11/runlog.m4:14: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) +m4trace:/usr/share/aclocal-1.11/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) +m4trace:/usr/share/aclocal-1.11/silent.m4:14: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], +[ --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0')]) +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) +m4trace:/usr/share/aclocal-1.11/strip.m4:19: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) +m4trace:/usr/share/aclocal-1.11/substnot.m4:14: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.11/substnot.m4:19: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4trace:/usr/share/aclocal-1.11/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:30: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:30: -1- _m4_warn([syntax], [AC_INIT: not a literal: esyscmd(perl -n -e "print if(s/^version_number = \"(.*)\".*/\1/s)" pokerengine/__init__.py)], []) +m4trace:configure.ac:30: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:32: -1- AM_INIT_AUTOMAKE([]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:32: -1- AM_SET_CURRENT_AUTOMAKE_VERSION +m4trace:configure.ac:32: -1- AM_AUTOMAKE_VERSION([1.11.6]) +m4trace:configure.ac:32: -1- _AM_AUTOCONF_VERSION([2.69]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:32: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:32: -1- _AM_SET_OPTIONS([]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:32: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) +m4trace:configure.ac:32: -2- _AM_MANGLE_OPTION([no-define]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:32: -1- AM_SANITY_CHECK +m4trace:configure.ac:32: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +m4trace:configure.ac:32: -1- AM_MISSING_HAS_RUN +m4trace:configure.ac:32: -1- AM_AUX_DIR_EXPAND +m4trace:configure.ac:32: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:32: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:32: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:32: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:32: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:32: -1- AM_PROG_INSTALL_SH +m4trace:configure.ac:32: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:32: -1- AM_PROG_INSTALL_STRIP +m4trace:configure.ac:32: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:32: -1- AM_PROG_MKDIR_P +m4trace:configure.ac:32: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:32: -1- AM_SET_LEADING_DOT +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:32: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +m4trace:configure.ac:32: -2- _AM_MANGLE_OPTION([tar-ustar]) +m4trace:configure.ac:32: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) +m4trace:configure.ac:32: -2- _AM_MANGLE_OPTION([tar-pax]) +m4trace:configure.ac:32: -1- _AM_PROG_TAR([v7]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:32: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +m4trace:configure.ac:32: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:32: -1- _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])]) +m4trace:configure.ac:32: -2- _AM_MANGLE_OPTION([silent-rules]) +m4trace:configure.ac:36: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:38: -1- m4_pattern_allow([^RSYNC$]) +m4trace:configure.ac:43: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:43: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:45: -1- AM_PATH_PYTHON([2.3]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON$]) +m4trace:configure.ac:45: -1- AM_PYTHON_CHECK_VERSION([$PYTHON], [2.3], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) +m4trace:configure.ac:45: -1- AM_RUN_LOG([$PYTHON -c "$prog"]) +m4trace:configure.ac:45: -1- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [2.3], [break]) +m4trace:configure.ac:45: -1- AM_RUN_LOG([$am_cv_pathless_PYTHON -c "$prog"]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_VERSION$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_PREFIX$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_EXEC_PREFIX$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_PLATFORM$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pythondir$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pkgpythondir$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pyexecdir$]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pkgpyexecdir$]) +m4trace:configure.ac:48: -1- m4_pattern_allow([^pkgsysconfdir$]) +m4trace:configure.ac:50: -1- m4_pattern_allow([^pkglibdir$]) +m4trace:configure.ac:52: -1- m4_pattern_allow([^pkgdatadir$]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^POKER_ENGINE_PKGDATADIR$]) +m4trace:configure.ac:55: -1- m4_pattern_allow([^POKER_ENGINE_PKGLIBDIR$]) +m4trace:configure.ac:56: -1- m4_pattern_allow([^POKER_ENGINE_PKGSYSCONFDIR$]) +m4trace:configure.ac:58: -1- PKG_CHECK_MODULES([PYPOKER_EVAL], [pypoker-eval >= 132.0], [], [AC_MSG_ERROR(pypoker-eval is a mandatory library)]) +m4trace:configure.ac:58: -1- PKG_PROG_PKG_CONFIG +m4trace:configure.ac:58: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_PATH$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PYPOKER_EVAL_CFLAGS$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PYPOKER_EVAL_LIBS$]) +m4trace:configure.ac:58: -1- PKG_CHECK_EXISTS([pypoker-eval >= 132.0], [pkg_cv_[]PYPOKER_EVAL_CFLAGS=`$PKG_CONFIG --[]cflags "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) +m4trace:configure.ac:58: -1- PKG_CHECK_EXISTS([pypoker-eval >= 132.0], [pkg_cv_[]PYPOKER_EVAL_LIBS=`$PKG_CONFIG --[]libs "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) +m4trace:configure.ac:58: -1- _PKG_SHORT_ERRORS_SUPPORTED +m4trace:configure.ac:81: -1- AM_PO_SUBDIRS +m4trace:configure.ac:81: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:81: -1- AM_NLS +m4trace:configure.ac:81: -1- m4_pattern_allow([^USE_NLS$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GETTEXT_MACRO_VERSION$]) +m4trace:configure.ac:81: -1- AM_PATH_PROG_WITH_TEST([MSGFMT], [msgfmt], [$ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], [:]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGFMT$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GMSGFMT$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGFMT_015$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GMSGFMT_015$]) +m4trace:configure.ac:81: -1- AM_PATH_PROG_WITH_TEST([XGETTEXT], [xgettext], [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], [:]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT_015$]) +m4trace:configure.ac:81: -1- AM_PATH_PROG_WITH_TEST([MSGMERGE], [msgmerge], [$ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1], [:]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGMERGE$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT_EXTRA_OPTIONS$]) +m4trace:configure.ac:116: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:116: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:116: -1- AM_POSTPROCESS_PO_MAKEFILE --- poker-engine-1.3.6.orig/autom4te.cache/traces.1 +++ poker-engine-1.3.6/autom4te.cache/traces.1 @@ -0,0 +1,408 @@ +m4trace:configure.ac:30: -1- AC_INIT([poker-engine], [esyscmd(perl -n -e "print if(s/^version_number = \"(.*)\".*/\1/s)" pokerengine/__init__.py)]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:30: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:30: -1- _m4_warn([syntax], [AC_INIT: not a literal: esyscmd(perl -n -e "print if(s/^version_number = \"(.*)\".*/\1/s)" pokerengine/__init__.py)], []) +m4trace:configure.ac:30: -1- AC_SUBST([SHELL]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([SHELL]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:30: -1- AC_SUBST([PATH_SEPARATOR]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_NAME]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_STRING]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_URL]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:30: -1- AC_SUBST([exec_prefix], [NONE]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([exec_prefix]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:30: -1- AC_SUBST([prefix], [NONE]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([prefix]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:30: -1- AC_SUBST([program_transform_name], [s,x,x,]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([program_transform_name]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:30: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([bindir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:30: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sbindir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:30: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([libexecdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([datarootdir], ['${prefix}/share']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([datarootdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([datadir], ['${datarootdir}']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([datadir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:30: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sysconfdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sharedstatedir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:30: -1- AC_SUBST([localstatedir], ['${prefix}/var']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([localstatedir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:30: -1- AC_SUBST([includedir], ['${prefix}/include']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([includedir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:30: -1- AC_SUBST([oldincludedir], ['/usr/include']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([oldincludedir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:30: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([docdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([infodir], ['${datarootdir}/info']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([infodir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:30: -1- AC_SUBST([htmldir], ['${docdir}']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([htmldir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:30: -1- AC_SUBST([dvidir], ['${docdir}']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([dvidir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:30: -1- AC_SUBST([pdfdir], ['${docdir}']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([pdfdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([psdir], ['${docdir}']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([psdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([libdir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:30: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([localedir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:30: -1- AC_SUBST([mandir], ['${datarootdir}/man']) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([mandir]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ +@%:@undef PACKAGE_NAME]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ +@%:@undef PACKAGE_TARNAME]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ +@%:@undef PACKAGE_VERSION]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ +@%:@undef PACKAGE_STRING]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ +@%:@undef PACKAGE_BUGREPORT]) +m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ +@%:@undef PACKAGE_URL]) +m4trace:configure.ac:30: -1- AC_SUBST([DEFS]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([DEFS]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:30: -1- AC_SUBST([ECHO_C]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_C]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:30: -1- AC_SUBST([ECHO_N]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_N]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:30: -1- AC_SUBST([ECHO_T]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_T]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:30: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:30: -1- AC_SUBST([build_alias]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([build_alias]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:30: -1- AC_SUBST([host_alias]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([host_alias]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:30: -1- AC_SUBST([target_alias]) +m4trace:configure.ac:30: -1- AC_SUBST_TRACE([target_alias]) +m4trace:configure.ac:30: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:31: -1- AC_CONFIG_AUX_DIR([config]) +m4trace:configure.ac:32: -1- AM_INIT_AUTOMAKE([]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:32: -1- AM_AUTOMAKE_VERSION([1.11.6]) +m4trace:configure.ac:32: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:32: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:32: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:32: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([INSTALL_DATA]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:32: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([am__isrc]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:32: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:32: -1- AC_SUBST([CYGPATH_W]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([CYGPATH_W]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:32: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([PACKAGE]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:32: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([VERSION]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:32: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:32: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ +@%:@undef PACKAGE]) +m4trace:configure.ac:32: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:32: -1- AH_OUTPUT([VERSION], [/* Version number of package */ +@%:@undef VERSION]) +m4trace:configure.ac:32: -1- AC_REQUIRE_AUX_FILE([missing]) +m4trace:configure.ac:32: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([ACLOCAL]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:32: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([AUTOCONF]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:32: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([AUTOMAKE]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:32: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([AUTOHEADER]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:32: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([MAKEINFO]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:32: -1- AC_SUBST([install_sh]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([install_sh]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:32: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:32: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:32: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:32: -1- AC_SUBST([MKDIR_P]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:32: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([mkdir_p]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:32: -1- AC_SUBST([AWK]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([AWK]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:32: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([SET_MAKE]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:32: -1- AC_SUBST([am__leading_dot]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([am__leading_dot]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:32: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([AMTAR]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:32: -1- AC_SUBST([am__tar]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([am__tar]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:32: -1- AC_SUBST([am__untar]) +m4trace:configure.ac:32: -1- AC_SUBST_TRACE([am__untar]) +m4trace:configure.ac:32: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:36: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.ac:36: -1- AC_SUBST_TRACE([SET_MAKE]) +m4trace:configure.ac:36: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:38: -1- AC_SUBST([RSYNC]) +m4trace:configure.ac:38: -1- AC_SUBST_TRACE([RSYNC]) +m4trace:configure.ac:38: -1- m4_pattern_allow([^RSYNC$]) +m4trace:configure.ac:43: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:43: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:43: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:43: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:43: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:43: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:43: -1- AC_SUBST([MAINT]) +m4trace:configure.ac:43: -1- AC_SUBST_TRACE([MAINT]) +m4trace:configure.ac:43: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON_VERSION]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_VERSION$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON_PREFIX], ['${prefix}']) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON_PREFIX]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_PREFIX$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON_EXEC_PREFIX]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_EXEC_PREFIX$]) +m4trace:configure.ac:45: -1- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([PYTHON_PLATFORM]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^PYTHON_PLATFORM$]) +m4trace:configure.ac:45: -1- AC_SUBST([pythondir], [$am_cv_python_pythondir]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([pythondir]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pythondir$]) +m4trace:configure.ac:45: -1- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([pkgpythondir]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pkgpythondir$]) +m4trace:configure.ac:45: -1- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([pyexecdir]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pyexecdir$]) +m4trace:configure.ac:45: -1- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) +m4trace:configure.ac:45: -1- AC_SUBST_TRACE([pkgpyexecdir]) +m4trace:configure.ac:45: -1- m4_pattern_allow([^pkgpyexecdir$]) +m4trace:configure.ac:48: -1- AC_SUBST([pkgsysconfdir], [$pkgsysconfdir]) +m4trace:configure.ac:48: -1- AC_SUBST_TRACE([pkgsysconfdir]) +m4trace:configure.ac:48: -1- m4_pattern_allow([^pkgsysconfdir$]) +m4trace:configure.ac:50: -1- AC_SUBST([pkglibdir], [$pkglibdir]) +m4trace:configure.ac:50: -1- AC_SUBST_TRACE([pkglibdir]) +m4trace:configure.ac:50: -1- m4_pattern_allow([^pkglibdir$]) +m4trace:configure.ac:52: -1- AC_SUBST([pkgdatadir], [$pkgdatadir]) +m4trace:configure.ac:52: -1- AC_SUBST_TRACE([pkgdatadir]) +m4trace:configure.ac:52: -1- m4_pattern_allow([^pkgdatadir$]) +m4trace:configure.ac:54: -1- AC_SUBST([POKER_ENGINE_PKGDATADIR], [`eval eval eval echo $pkgdatadir`]) +m4trace:configure.ac:54: -1- AC_SUBST_TRACE([POKER_ENGINE_PKGDATADIR]) +m4trace:configure.ac:54: -1- m4_pattern_allow([^POKER_ENGINE_PKGDATADIR$]) +m4trace:configure.ac:55: -1- AC_SUBST([POKER_ENGINE_PKGLIBDIR], [`eval eval eval echo $pkglibdir`]) +m4trace:configure.ac:55: -1- AC_SUBST_TRACE([POKER_ENGINE_PKGLIBDIR]) +m4trace:configure.ac:55: -1- m4_pattern_allow([^POKER_ENGINE_PKGLIBDIR$]) +m4trace:configure.ac:56: -1- AC_SUBST([POKER_ENGINE_PKGSYSCONFDIR], [`eval eval eval echo $pkgsysconfdir`]) +m4trace:configure.ac:56: -1- AC_SUBST_TRACE([POKER_ENGINE_PKGSYSCONFDIR]) +m4trace:configure.ac:56: -1- m4_pattern_allow([^POKER_ENGINE_PKGSYSCONFDIR$]) +m4trace:configure.ac:58: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +m4trace:configure.ac:58: -1- AC_SUBST([PKG_CONFIG]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PKG_CONFIG]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:58: -1- AC_SUBST([PKG_CONFIG_PATH]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PKG_CONFIG_PATH]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_PATH$]) +m4trace:configure.ac:58: -1- AC_SUBST([PKG_CONFIG_LIBDIR]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PKG_CONFIG_LIBDIR]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) +m4trace:configure.ac:58: -1- AC_SUBST([PKG_CONFIG]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PKG_CONFIG]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PKG_CONFIG$]) +m4trace:configure.ac:58: -1- AC_SUBST([PYPOKER_EVAL_CFLAGS]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PYPOKER_EVAL_CFLAGS]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PYPOKER_EVAL_CFLAGS$]) +m4trace:configure.ac:58: -1- AC_SUBST([PYPOKER_EVAL_LIBS]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([PYPOKER_EVAL_LIBS]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PYPOKER_EVAL_LIBS$]) +m4trace:configure.ac:81: -1- AC_SUBST([SED]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([SED]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:81: -1- AM_NLS +m4trace:configure.ac:81: -1- AC_SUBST([USE_NLS]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([USE_NLS]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^USE_NLS$]) +m4trace:configure.ac:81: -1- AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([GETTEXT_MACRO_VERSION]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GETTEXT_MACRO_VERSION$]) +m4trace:configure.ac:81: -1- AC_SUBST([MSGFMT]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([MSGFMT]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGFMT$]) +m4trace:configure.ac:81: -1- AC_SUBST([GMSGFMT]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([GMSGFMT]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GMSGFMT$]) +m4trace:configure.ac:81: -1- AC_SUBST([MSGFMT_015]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([MSGFMT_015]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGFMT_015$]) +m4trace:configure.ac:81: -1- AC_SUBST([GMSGFMT_015]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([GMSGFMT_015]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^GMSGFMT_015$]) +m4trace:configure.ac:81: -1- AC_SUBST([XGETTEXT]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([XGETTEXT]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT$]) +m4trace:configure.ac:81: -1- AC_SUBST([XGETTEXT_015]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([XGETTEXT_015]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT_015$]) +m4trace:configure.ac:81: -1- AC_SUBST([MSGMERGE]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([MSGMERGE]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^MSGMERGE$]) +m4trace:configure.ac:81: -1- AC_SUBST([localedir]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([localedir]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:81: -1- AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) +m4trace:configure.ac:81: -1- AC_SUBST_TRACE([XGETTEXT_EXTRA_OPTIONS]) +m4trace:configure.ac:81: -1- m4_pattern_allow([^XGETTEXT_EXTRA_OPTIONS$]) +m4trace:configure.ac:84: -1- AC_CONFIG_FILES([tests/run pokerconfigupgrade], [chmod 555 $ac_file]) +m4trace:configure.ac:85: -1- AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE]) +m4trace:configure.ac:86: -1- AC_CONFIG_FILES([Makefile + poker-engine.pc + pokerconfigupgrade.8 + pokerengine/Makefile + tests/allin.py + tests/blinds.py + tests/buyin.py + tests/bugs.py + tests/chips.py + tests/deal.py + tests/eval.py + tests/history.py + tests/muck.py + tests/positions.py + tests/sit.py + tests/tournament.py + tests/upgrades.py + tests/libxml2leak.py + tests/test-gamehistory.py + tests/test-pokercards.py + tests/test-pokerengineconfig.py + tests/test-pokertournament.py + tests/test-pokerprizes.py + tests/test-game.py + tests/test-pokerchips.py + tests/test-pokerrake.py + tests/test-pokerplayer.py + tests/test-version.py + tests/test-i18n.py + tests/Makefile], [chmod -w $ac_file]) +m4trace:configure.ac:116: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:116: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:116: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:116: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:116: -1- AC_SUBST_TRACE([MKDIR_P]) --- poker-engine-1.3.6.orig/config.log +++ poker-engine-1.3.6/config.log @@ -0,0 +1,321 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by poker-engine configure 1.3.6, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ /tmp/buildd/poker-engine-1.3.6/./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/poker-engine --srcdir=. --disable-maintainer-mode --disable-dependency-tracking --disable-silent-rules --enable-maintainer-mode + +## --------- ## +## Platform. ## +## --------- ## + +hostname = gambit +uname -m = x86_64 +uname -r = 3.11-2-amd64 +uname -s = Linux +uname -v = #1 SMP Debian 3.11.10-1 (2013-12-04) + +/usr/bin/uname -p = unknown +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/sbin +PATH: /usr/bin +PATH: /sbin +PATH: /bin + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:1805: checking for a BSD-compatible install +configure:1873: result: /usr/bin/install -c +configure:1884: checking whether build environment is sane +configure:1934: result: yes +configure:2075: checking for a thread-safe mkdir -p +configure:2114: result: /bin/mkdir -p +configure:2127: checking for gawk +configure:2157: result: no +configure:2127: checking for mawk +configure:2143: found /usr/bin/mawk +configure:2154: result: mawk +configure:2165: checking whether make sets $(MAKE) +configure:2187: result: yes +configure:2270: checking whether make sets $(MAKE) +configure:2292: result: yes +configure:2304: checking for rsync +configure:2322: found /usr/bin/rsync +configure:2334: result: /usr/bin/rsync +configure:2347: checking whether to enable maintainer-specific portions of Makefiles +configure:2356: result: yes +configure:2403: checking for a Python interpreter with version >= 2.3 +configure:2420: python -c import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex) +configure:2423: $? = 0 +configure:2429: result: python +configure:2437: checking for python +configure:2455: found /usr/bin/python +configure:2467: result: /usr/bin/python +configure:2485: checking for python version +configure:2492: result: 2.7 +configure:2504: checking for python platform +configure:2511: result: linux2 +configure:2518: checking for python script directory +configure:2546: result: ${prefix}/lib/python2.7/dist-packages +configure:2555: checking for python extension module directory +configure:2583: result: ${exec_prefix}/lib/python2.7/dist-packages +configure:2668: checking for pkg-config +configure:2686: found /usr/bin/pkg-config +configure:2698: result: /usr/bin/pkg-config +configure:2723: checking pkg-config is at least version 0.9.0 +configure:2726: result: yes +configure:2736: checking for PYPOKER_EVAL +configure:2743: $PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0" +configure:2746: $? = 0 +configure:2760: $PKG_CONFIG --exists --print-errors "pypoker-eval >= 132.0" +configure:2763: $? = 0 +configure:2801: result: yes +configure:2818: checking wether python module libxml2 is available +configure:2821: result: ... yes +configure:2818: checking wether python module libxslt is available +configure:2821: result: ... yes +configure:2818: checking wether python module pokereval is available +configure:2821: result: ... yes +configure:2829: checking for a sed that does not truncate output +configure:2893: result: /bin/sed +configure:2899: checking whether NLS is requested +configure:2908: result: yes +configure:2948: checking for msgfmt +configure: trying /usr/bin/msgfmt... +0 translated messages. +configure:2980: result: /usr/bin/msgfmt +configure:2989: checking for gmsgfmt +configure:3020: result: /usr/bin/msgfmt +configure:3070: checking for xgettext +configure: trying /usr/bin/xgettext... +/usr/bin/xgettext: warning: file '/dev/null' extension '' is unknown; will try C +configure:3102: result: /usr/bin/xgettext +configure:3147: checking for msgmerge +configure: trying /usr/bin/msgmerge... +configure:3178: result: /usr/bin/msgmerge +configure:3358: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by poker-engine config.status 1.3.6, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on gambit + +config.status:822: creating tests/run +config.status:822: creating pokerconfigupgrade +config.status:822: creating po/Makefile +config.status:822: creating Makefile +config.status:822: creating poker-engine.pc +config.status:822: creating pokerconfigupgrade.8 +config.status:822: creating pokerengine/Makefile +config.status:822: creating tests/allin.py +config.status:822: creating tests/blinds.py +config.status:822: creating tests/buyin.py +config.status:822: creating tests/bugs.py +config.status:822: creating tests/chips.py +config.status:822: creating tests/deal.py +config.status:822: creating tests/eval.py +config.status:822: creating tests/history.py +config.status:822: creating tests/muck.py +config.status:822: creating tests/positions.py +config.status:822: creating tests/sit.py +config.status:822: creating tests/tournament.py +config.status:822: creating tests/upgrades.py +config.status:822: creating tests/libxml2leak.py +config.status:822: creating tests/test-gamehistory.py +config.status:822: creating tests/test-pokercards.py +config.status:822: creating tests/test-pokerengineconfig.py +config.status:822: creating tests/test-pokertournament.py +config.status:822: creating tests/test-pokerprizes.py +config.status:822: creating tests/test-game.py +config.status:822: creating tests/test-pokerchips.py +config.status:822: creating tests/test-pokerrake.py +config.status:822: creating tests/test-pokerplayer.py +config.status:822: creating tests/test-version.py +config.status:822: creating tests/test-i18n.py +config.status:822: creating tests/Makefile +config.status:994: executing po-directories commands +configure:4792: WARNING: unrecognized options: --disable-dependency-tracking, --disable-silent-rules + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_env_PKG_CONFIG_LIBDIR_set= +ac_cv_env_PKG_CONFIG_LIBDIR_value= +ac_cv_env_PKG_CONFIG_PATH_set= +ac_cv_env_PKG_CONFIG_PATH_value= +ac_cv_env_PKG_CONFIG_set= +ac_cv_env_PKG_CONFIG_value= +ac_cv_env_PYPOKER_EVAL_CFLAGS_set= +ac_cv_env_PYPOKER_EVAL_CFLAGS_value= +ac_cv_env_PYPOKER_EVAL_LIBS_set= +ac_cv_env_PYPOKER_EVAL_LIBS_value= +ac_cv_env_PYTHON_set= +ac_cv_env_PYTHON_value= +ac_cv_env_build_alias_set=set +ac_cv_env_build_alias_value=x86_64-linux-gnu +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_path_GMSGFMT=/usr/bin/msgfmt +ac_cv_path_MSGFMT=/usr/bin/msgfmt +ac_cv_path_MSGMERGE=/usr/bin/msgmerge +ac_cv_path_PYTHON=/usr/bin/python +ac_cv_path_RSYNC=/usr/bin/rsync +ac_cv_path_SED=/bin/sed +ac_cv_path_XGETTEXT=/usr/bin/xgettext +ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_mkdir=/bin/mkdir +ac_cv_prog_AWK=mawk +ac_cv_prog_make_make_set=yes +am_cv_pathless_PYTHON=python +am_cv_python_platform=linux2 +am_cv_python_pyexecdir='${exec_prefix}/lib/python2.7/dist-packages' +am_cv_python_pythondir='${prefix}/lib/python2.7/dist-packages' +am_cv_python_version=2.7 +pkg_cv_PYPOKER_EVAL_CFLAGS=' ' +pkg_cv_PYPOKER_EVAL_LIBS=' ' + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11' +AMTAR='$${TAR-tar}' +AUTOCONF='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf' +AUTOHEADER='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader' +AUTOMAKE='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11' +AWK='mawk' +CYGPATH_W='echo' +DEFS='-DPACKAGE_NAME=\"poker-engine\" -DPACKAGE_TARNAME=\"poker-engine\" -DPACKAGE_VERSION=\"1.3.6\" -DPACKAGE_STRING=\"poker-engine\ 1.3.6\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"poker-engine\" -DVERSION=\"1.3.6\"' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +GETTEXT_MACRO_VERSION='0.18' +GMSGFMT='/usr/bin/msgfmt' +GMSGFMT_015='/usr/bin/msgfmt' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +LIBOBJS='' +LIBS='' +LTLIBOBJS='' +MAINT='' +MAINTAINER_MODE_FALSE='#' +MAINTAINER_MODE_TRUE='' +MAKEINFO='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo' +MKDIR_P='/bin/mkdir -p' +MSGFMT='/usr/bin/msgfmt' +MSGFMT_015='/usr/bin/msgfmt' +MSGMERGE='/usr/bin/msgmerge' +PACKAGE='poker-engine' +PACKAGE_BUGREPORT='' +PACKAGE_NAME='poker-engine' +PACKAGE_STRING='poker-engine 1.3.6' +PACKAGE_TARNAME='poker-engine' +PACKAGE_URL='' +PACKAGE_VERSION='1.3.6' +PATH_SEPARATOR=':' +PKG_CONFIG='/usr/bin/pkg-config' +PKG_CONFIG_LIBDIR='' +PKG_CONFIG_PATH='' +POKER_ENGINE_PKGDATADIR='/usr/share/poker-engine' +POKER_ENGINE_PKGLIBDIR='/usr/lib/poker-engine/poker-engine' +POKER_ENGINE_PKGSYSCONFDIR='/etc/poker-engine' +PYPOKER_EVAL_CFLAGS=' ' +PYPOKER_EVAL_LIBS=' ' +PYTHON='/usr/bin/python' +PYTHON_EXEC_PREFIX='${exec_prefix}' +PYTHON_PLATFORM='linux2' +PYTHON_PREFIX='${prefix}' +PYTHON_VERSION='2.7' +RSYNC='/usr/bin/rsync' +SED='/bin/sed' +SET_MAKE='' +SHELL='/bin/bash' +STRIP='' +USE_NLS='yes' +VERSION='1.3.6' +XGETTEXT='/usr/bin/xgettext' +XGETTEXT_015='/usr/bin/xgettext' +XGETTEXT_EXTRA_OPTIONS='' +am__isrc='' +am__leading_dot='.' +am__tar='$${TAR-tar} chof - "$$tardir"' +am__untar='$${TAR-tar} xf -' +bindir='${exec_prefix}/bin' +build_alias='x86_64-linux-gnu' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host_alias='' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${prefix}/share/info' +install_sh='${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${prefix}/lib/poker-engine' +localedir='${datarootdir}/locale' +localstatedir='/var' +mandir='${prefix}/share/man' +mkdir_p='/bin/mkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +pkgdatadir='${datarootdir}/poker-engine' +pkglibdir='${prefix}/lib/poker-engine/poker-engine' +pkgpyexecdir='${pyexecdir}/poker-engine' +pkgpythondir='${pythondir}/poker-engine' +pkgsysconfdir='/etc/poker-engine' +prefix='/usr' +program_transform_name='s,x,x,' +psdir='${docdir}' +pyexecdir='${exec_prefix}/lib/python2.7/dist-packages' +pythondir='${prefix}/lib/python2.7/dist-packages' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "poker-engine" +#define PACKAGE_TARNAME "poker-engine" +#define PACKAGE_VERSION "1.3.6" +#define PACKAGE_STRING "poker-engine 1.3.6" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_URL "" +#define PACKAGE "poker-engine" +#define VERSION "1.3.6" + +configure: exit 0 --- poker-engine-1.3.6.orig/config.status +++ poker-engine-1.3.6/config.status @@ -0,0 +1,1370 @@ +#! /bin/bash +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/bash} +export SHELL +## -------------------- ## +## 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 + + +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 +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (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 + + +# 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. +as_myself= +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 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +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 + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +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'` + +# 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 + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +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 -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $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'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# 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 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# 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 poker-engine $as_me 1.3.6, which was +generated by GNU Autoconf 2.69. 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` +" + +# Files that config.status was made for. +config_files=" tests/run pokerconfigupgrade po/Makefile Makefile poker-engine.pc pokerconfigupgrade.8 pokerengine/Makefile tests/allin.py tests/blinds.py tests/buyin.py tests/bugs.py tests/chips.py tests/deal.py tests/eval.py tests/history.py tests/muck.py tests/positions.py tests/sit.py tests/tournament.py tests/upgrades.py tests/libxml2leak.py tests/test-gamehistory.py tests/test-pokercards.py tests/test-pokerengineconfig.py tests/test-pokertournament.py tests/test-pokerprizes.py tests/test-game.py tests/test-pokerchips.py tests/test-pokerrake.py tests/test-pokerplayer.py tests/test-version.py tests/test-i18n.py tests/Makefile" +config_commands=" po-directories" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, 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 the package provider." + +ac_cs_config="'--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=\${prefix}/include' '--mandir=\${prefix}/share/man' '--infodir=\${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=\${prefix}/lib/poker-engine' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--enable-maintainer-mode' 'build_alias=x86_64-linux-gnu'" +ac_cs_version="\ +poker-engine config.status 1.3.6 +configured by /tmp/buildd/poker-engine-1.3.6/./configure, generated by GNU Autoconf 2.69, + with options \"$ac_cs_config\" + +Copyright (C) 2012 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='/tmp/buildd/poker-engine-1.3.6' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/bin/mkdir -p' +AWK='mawk' +test -n "$AWK" || AWK=awk +# 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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + 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 ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; 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"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append 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_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append 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 + +if $ac_cs_recheck; then + set X /bin/bash '/tmp/buildd/poker-engine-1.3.6/./configure' '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/poker-engine' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--enable-maintainer-mode' 'build_alias=x86_64-linux-gnu' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 + CONFIG_SHELL='/bin/bash' + export CONFIG_SHELL + exec "$@" +fi + +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 + +# +# INIT-COMMANDS +# +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''=""' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="%UNSET%" + + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;; + "pokerconfigupgrade") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade" ;; + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "poker-engine.pc") CONFIG_FILES="$CONFIG_FILES poker-engine.pc" ;; + "pokerconfigupgrade.8") CONFIG_FILES="$CONFIG_FILES pokerconfigupgrade.8" ;; + "pokerengine/Makefile") CONFIG_FILES="$CONFIG_FILES pokerengine/Makefile" ;; + "tests/allin.py") CONFIG_FILES="$CONFIG_FILES tests/allin.py" ;; + "tests/blinds.py") CONFIG_FILES="$CONFIG_FILES tests/blinds.py" ;; + "tests/buyin.py") CONFIG_FILES="$CONFIG_FILES tests/buyin.py" ;; + "tests/bugs.py") CONFIG_FILES="$CONFIG_FILES tests/bugs.py" ;; + "tests/chips.py") CONFIG_FILES="$CONFIG_FILES tests/chips.py" ;; + "tests/deal.py") CONFIG_FILES="$CONFIG_FILES tests/deal.py" ;; + "tests/eval.py") CONFIG_FILES="$CONFIG_FILES tests/eval.py" ;; + "tests/history.py") CONFIG_FILES="$CONFIG_FILES tests/history.py" ;; + "tests/muck.py") CONFIG_FILES="$CONFIG_FILES tests/muck.py" ;; + "tests/positions.py") CONFIG_FILES="$CONFIG_FILES tests/positions.py" ;; + "tests/sit.py") CONFIG_FILES="$CONFIG_FILES tests/sit.py" ;; + "tests/tournament.py") CONFIG_FILES="$CONFIG_FILES tests/tournament.py" ;; + "tests/upgrades.py") CONFIG_FILES="$CONFIG_FILES tests/upgrades.py" ;; + "tests/libxml2leak.py") CONFIG_FILES="$CONFIG_FILES tests/libxml2leak.py" ;; + "tests/test-gamehistory.py") CONFIG_FILES="$CONFIG_FILES tests/test-gamehistory.py" ;; + "tests/test-pokercards.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokercards.py" ;; + "tests/test-pokerengineconfig.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerengineconfig.py" ;; + "tests/test-pokertournament.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokertournament.py" ;; + "tests/test-pokerprizes.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerprizes.py" ;; + "tests/test-game.py") CONFIG_FILES="$CONFIG_FILES tests/test-game.py" ;; + "tests/test-pokerchips.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerchips.py" ;; + "tests/test-pokerrake.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerrake.py" ;; + "tests/test-pokerplayer.py") CONFIG_FILES="$CONFIG_FILES tests/test-pokerplayer.py" ;; + "tests/test-version.py") CONFIG_FILES="$CONFIG_FILES tests/test-version.py" ;; + "tests/test-i18n.py") CONFIG_FILES="$CONFIG_FILES tests/test-i18n.py" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + 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= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# 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'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /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 {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["LTLIBOBJS"]="" +S["LIBOBJS"]="" +S["XGETTEXT_EXTRA_OPTIONS"]="" +S["MSGMERGE"]="/usr/bin/msgmerge" +S["XGETTEXT_015"]="/usr/bin/xgettext" +S["XGETTEXT"]="/usr/bin/xgettext" +S["GMSGFMT_015"]="/usr/bin/msgfmt" +S["MSGFMT_015"]="/usr/bin/msgfmt" +S["GMSGFMT"]="/usr/bin/msgfmt" +S["MSGFMT"]="/usr/bin/msgfmt" +S["GETTEXT_MACRO_VERSION"]="0.18" +S["USE_NLS"]="yes" +S["SED"]="/bin/sed" +S["PYPOKER_EVAL_LIBS"]=" " +S["PYPOKER_EVAL_CFLAGS"]=" " +S["PKG_CONFIG_LIBDIR"]="" +S["PKG_CONFIG_PATH"]="" +S["PKG_CONFIG"]="/usr/bin/pkg-config" +S["POKER_ENGINE_PKGSYSCONFDIR"]="/etc/poker-engine" +S["POKER_ENGINE_PKGLIBDIR"]="/usr/lib/poker-engine/poker-engine" +S["POKER_ENGINE_PKGDATADIR"]="/usr/share/poker-engine" +S["pkgdatadir"]="${datarootdir}/poker-engine" +S["pkglibdir"]="${prefix}/lib/poker-engine/poker-engine" +S["pkgsysconfdir"]="/etc/poker-engine" +S["pkgpyexecdir"]="${pyexecdir}/poker-engine" +S["pyexecdir"]="${exec_prefix}/lib/python2.7/dist-packages" +S["pkgpythondir"]="${pythondir}/poker-engine" +S["pythondir"]="${prefix}/lib/python2.7/dist-packages" +S["PYTHON_PLATFORM"]="linux2" +S["PYTHON_EXEC_PREFIX"]="${exec_prefix}" +S["PYTHON_PREFIX"]="${prefix}" +S["PYTHON_VERSION"]="2.7" +S["PYTHON"]="/usr/bin/python" +S["MAINT"]="" +S["MAINTAINER_MODE_FALSE"]="#" +S["MAINTAINER_MODE_TRUE"]="" +S["RSYNC"]="/usr/bin/rsync" +S["am__untar"]="$${TAR-tar} xf -" +S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" +S["AMTAR"]="$${TAR-tar}" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="mawk" +S["mkdir_p"]="/bin/mkdir -p" +S["MKDIR_P"]="/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="" +S["install_sh"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh" +S["MAKEINFO"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo" +S["AUTOHEADER"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader" +S["AUTOMAKE"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11" +S["AUTOCONF"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf" +S["ACLOCAL"]="${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11" +S["VERSION"]="1.3.6" +S["PACKAGE"]="poker-engine" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="x86_64-linux-gnu" +S["LIBS"]="" +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DPACKAGE_NAME=\\\"poker-engine\\\" -DPACKAGE_TARNAME=\\\"poker-engine\\\" -DPACKAGE_VERSION=\\\"1.3.6\\\" -DPACKAGE_STRING=\\\"poker-engine\\ 1.3.6\\\" -DPACKAGE_BU"\ +"GREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DPACKAGE=\\\"poker-engine\\\" -DVERSION=\\\"1.3.6\\\"" +S["mandir"]="${prefix}/share/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${prefix}/share/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${prefix}/lib/poker-engine" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="" +S["PACKAGE_BUGREPORT"]="" +S["PACKAGE_STRING"]="poker-engine 1.3.6" +S["PACKAGE_VERSION"]="1.3.6" +S["PACKAGE_TARNAME"]="poker-engine" +S["PACKAGE_NAME"]="poker-engine" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/bash" +_ACAWK +cat >>"$ac_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 +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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +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_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[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="$ac_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_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append 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:${as_lineno-$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 >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + 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'` + as_dir="$ac_dir"; as_fn_mkdir_p + 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 + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# 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:${as_lineno-$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;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${prefix}/share/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${prefix}/share/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +: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 +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$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 "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + "tests/run":F) chmod 555 $ac_file ;; + "pokerconfigupgrade":F) chmod 555 $ac_file ;; + "po/Makefile":F) + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" <&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then --- poker-engine-1.3.6.orig/config/missing +++ poker-engine-1.3.6/config/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. --- poker-engine-1.3.6.orig/config/py-compile +++ poker-engine-1.3.6/config/py-compile @@ -1,10 +1,10 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-06-08.12; # UTC -# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009, 2011 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,28 +32,36 @@ PYTHON=python fi +me=py-compile + +usage_error () +{ + echo "$me: $*" >&2 + echo "Try \`$me --help' for more information." >&2 + exit 1 +} + basedir= destdir= -files= while test $# -ne 0; do case "$1" in --basedir) - basedir=$2 - if test -z "$basedir"; then - echo "$0: Missing argument to --basedir." 1>&2 - exit 1 + if test $# -lt 2; then + usage_error "option '--basedir' requires an argument" + else + basedir=$2 fi shift ;; --destdir) - destdir=$2 - if test -z "$destdir"; then - echo "$0: Missing argument to --destdir." 1>&2 - exit 1 + if test $# -lt 2; then + usage_error "option '--destdir' requires an argument" + else + destdir=$2 fi shift ;; - -h|--h*) + -h|--help) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." @@ -69,20 +77,27 @@ EOF exit $? ;; - -v|--v*) - echo "py-compile $scriptversion" + -v|--version) + echo "$me $scriptversion" exit $? ;; + --) + shift + break + ;; + -*) + usage_error "unrecognized option '$1'" + ;; *) - files="$files $1" + break ;; esac shift done +files=$* if test -z "$files"; then - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 + usage_error "no files given" fi # if basedir was given, then it should be prepended to filenames before --- poker-engine-1.3.6.orig/configure +++ poker-engine-1.3.6/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for poker-engine 1.3.6. +# Generated by GNU Autoconf 2.69 for poker-engine 1.3.6. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,11 +190,13 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -210,14 +236,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -319,6 +356,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -440,6 +485,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # 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). @@ -474,16 +523,16 @@ # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -495,28 +544,8 @@ as_mkdir_p=false fi -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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -566,6 +595,7 @@ MSGFMT GETTEXT_MACRO_VERSION USE_NLS +SED PYPOKER_EVAL_LIBS PYPOKER_EVAL_CFLAGS PKG_CONFIG_LIBDIR @@ -660,6 +690,7 @@ ac_precious_vars='build_alias host_alias target_alias +PYTHON PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1069,7 +1100,7 @@ $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} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1120,8 +1151,6 @@ 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 @@ -1286,6 +1315,7 @@ --disable-nls do not use Native Language Support Some influential environment variables: + PYTHON the Python interpreter PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1363,9 +1393,9 @@ if $ac_init_version; then cat <<\_ACEOF poker-engine configure 1.3.6 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1380,7 +1410,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by poker-engine $as_me 1.3.6, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1638,7 +1668,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -1775,7 +1805,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -1795,7 +1825,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1862,11 +1892,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -1952,7 +1982,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -1964,7 +1994,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1992,7 +2022,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2004,7 +2034,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2045,7 +2075,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2055,7 +2085,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2096,7 +2126,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2108,7 +2138,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2136,7 +2166,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2224,11 +2254,11 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2241,7 +2271,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2273,7 +2303,7 @@ set dummy rsync; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RSYNC+set}" = set; then : +if ${ac_cv_path_RSYNC+:} false; then : $as_echo_n "(cached) " >&6 else case $RSYNC in @@ -2287,7 +2317,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RSYNC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2341,6 +2371,8 @@ + + if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.3" >&5 @@ -2370,11 +2402,11 @@ # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.3" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.3... " >&6; } -if test "${am_cv_pathless_PYTHON+set}" = set; then : +if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -2404,7 +2436,7 @@ set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : +if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -2418,7 +2450,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2452,7 +2484,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if test "${am_cv_python_version+set}" = set; then : +if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` @@ -2471,7 +2503,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if test "${am_cv_python_platform+set}" = set; then : +if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` @@ -2483,9 +2515,9 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if test "${am_cv_python_pythondir+set}" = set; then : +if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE @@ -2494,8 +2526,7 @@ else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -2521,9 +2552,9 @@ pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if test "${am_cv_python_pyexecdir+set}" = set; then : +if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE @@ -2532,8 +2563,7 @@ else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -2587,13 +2617,14 @@ + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -2607,7 +2638,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2636,7 +2667,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -2650,7 +2681,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2715,6 +2746,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYPOKER_EVAL_CFLAGS=`$PKG_CONFIG --cflags "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -2731,6 +2763,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYPOKER_EVAL_LIBS=`$PKG_CONFIG --libs "pypoker-eval >= 132.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -2750,9 +2783,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pypoker-eval >= 132.0" 2>&1` + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` else - PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "pypoker-eval >= 132.0" 2>&1` + PYPOKER_EVAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pypoker-eval >= 132.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PYPOKER_EVAL_PKG_ERRORS" >&5 @@ -2793,6 +2826,75 @@ done # i18n +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } @@ -2817,15 +2919,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 # Find out how to test for executable files. Don't use a zero-byte file, @@ -2846,7 +2947,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -2887,7 +2988,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -2901,7 +3002,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2940,15 +3041,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 # Find out how to test for executable files. Don't use a zero-byte file, @@ -2969,7 +3069,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -3018,15 +3118,14 @@ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + 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 # Find out how to test for executable files. Don't use a zero-byte file, @@ -3047,7 +3146,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -3165,10 +3264,21 @@ :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" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -3241,7 +3351,7 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -3342,6 +3452,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3537,16 +3648,16 @@ # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -3606,28 +3717,16 @@ as_mkdir_p=false fi -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 + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -3649,7 +3748,7 @@ # values after options handling. ac_log=" This file was extended by poker-engine $as_me 1.3.6, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -3706,10 +3805,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ poker-engine config.status 1.3.6 -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -3789,7 +3888,7 @@ _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 + 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' @@ -3864,7 +3963,7 @@ "tests/test-i18n.py") CONFIG_FILES="$CONFIG_FILES tests/test-i18n.py" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -3886,9 +3985,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -3896,12 +3996,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -3923,7 +4024,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -3951,7 +4052,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -3999,7 +4100,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -4031,7 +4132,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -4071,7 +4172,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -4090,7 +4191,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_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 `:'. @@ -4099,7 +4200,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -4125,8 +4226,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -4262,21 +4363,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$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" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -4299,7 +4401,7 @@ case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -4315,7 +4417,8 @@ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -4326,12 +4429,12 @@ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -4413,7 +4516,7 @@ # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -4441,6 +4544,7 @@ fi # A sed script that extracts the value of VARIABLE from a Makefile. + tab=`printf '\t'` sed_x_variable=' # Test if the hold space is empty. x @@ -4448,9 +4552,9 @@ x ta # Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ +/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// + s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// ba } bd @@ -4501,7 +4605,7 @@ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -4591,14 +4695,15 @@ fi sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" + tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < Sat, 08 Mar 2014 19:00:27 -0500 + +poker-engine (1.3.6-1.1) unstable; urgency=low + + * Non-maintainer upload (just a rebuild to add Python 2.7 and + dropPython 2.5 support) + + -- Piotr Ożarowski Sat, 16 Apr 2011 13:00:25 +0200 + +poker-engine (1.3.6-1) unstable; urgency=low + + * use dh_python2 according to + http://wiki.debian.org/Python/PyCentral2DhPython2 (Closes: #616944). + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 29 Mar 2010 21:33:40 +0200 + +poker-engine (1.3.5-1) unstable; urgency=low + + * upstream sync + * poker-eval 137 fixes 64bit bug that triggered the + corruption (Closes: #564371) + + -- Loic Dachary (OuoU) Fri, 05 Mar 2010 02:50:16 +0100 + +poker-engine (1.3.4-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 04 May 2009 17:53:34 +0200 + +poker-engine (1.3.3-2) unstable; urgency=low + + * add procps to build depends (Closes: #526578) + + -- Loic Dachary (OuoU) Wed, 29 Apr 2009 03:20:32 +0200 + +poker-engine (1.3.3-1) unstable; urgency=low + + * upstream sync + * removed the --delete (Closes: #517557). + + -- Loic Dachary (OuoU) Fri, 10 Apr 2009 21:49:43 +0200 + +poker-engine (1.3.2-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 22 Dec 2008 14:45:40 +0100 + +poker-engine (1.3.1-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Fri, 28 Nov 2008 14:36:50 +0100 + +poker-engine (1.3.0-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 19 May 2008 12:42:50 +0200 + +poker-engine (1.2.0-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Sun, 20 Apr 2008 15:26:53 +0200 + +poker-engine (1.1.0-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Wed, 16 May 2007 14:04:46 +0200 + +poker-engine (1.0.25-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Tue, 13 Mar 2007 17:10:37 +0100 + +poker-engine (1.0.24-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 12 Feb 2007 14:05:10 +0100 + +poker-engine (1.0.23-1) unstable; urgency=low + + * upstream sync + + * on edgy depends on python-all + + -- Loic Dachary (OuoU) Tue, 23 Jan 2007 10:51:39 +0100 + +poker-engine (1.0.22-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Wed, 10 Jan 2007 17:00:46 +0100 + +poker-engine (1.0.21-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Sat, 2 Dec 2006 20:38:25 +0100 + +poker-engine (1.0.20-1) unstable; urgency=low + + * upstream sync + + * Moved python-pypoker-eval, python-libxml2 + and python-libxslt1 to Build-Depends (closes: #391865) + + -- Loic Dachary (OuoU) Mon, 18 Sep 2006 15:23:34 +0200 + +poker-engine (1.0.19-1) unstable; urgency=low + + * edgy & etch control files + + * upstream sync + + -- Loic Dachary (OuoU) Thu, 7 Sep 2006 12:41:09 +0200 + +poker-engine (1.0.18-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Thu, 31 Aug 2006 08:49:25 +0200 + +poker-engine (1.0.17-1) unstable; urgency=low + + * upstream sync + + * pycentral rocks (closes: #380892) + + -- Loic Dachary (OuoU) Wed, 30 Aug 2006 22:31:31 +0200 + +poker-engine (1.0.16-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Tue, 23 May 2006 11:59:07 +0200 + +poker-engine (1.0.15-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 24 Apr 2006 15:58:12 +0200 + +poker-engine (1.0.14-1) unstable; urgency=low + + * upstream sync + + * use autoreconf + + -- Loic Dachary (OuoU) Fri, 24 Mar 2006 18:50:26 +0100 + +poker-engine (1.0.13-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 13 Mar 2006 10:30:23 +0100 + +poker-engine (1.0.12-1) unstable; urgency=low + + * upstream sync + + * postrm kills generated configuration files (closes: #334149) + + -- Loic Dachary (OuoU) Tue, 3 Jan 2006 13:43:20 +0100 + +poker-engine (1.0.11-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Wed, 26 Oct 2005 20:53:19 +0200 + +poker-engine (1.0.10-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Mon, 17 Oct 2005 10:23:12 +0200 + +poker-engine (1.0.9-1) unstable; urgency=low + + * upstream sync + + -- Loic Dachary (OuoU) Thu, 29 Sep 2005 13:19:34 +0200 + +poker-engine (1.0.8-1) unstable; urgency=low + + * upstream sync, switch to cdbs + + -- Loic Dachary (OuoU) Thu, 1 Sep 2005 12:26:18 +0200 + +poker-engine (1.0.7-2) unstable; urgency=low + + * missing rsync dependency + + -- Loic Dachary (OuoU) Sat, 27 Aug 2005 15:39:09 +0200 + +poker-engine (1.0.7-1) unstable; urgency=low + + * upstream version + + -- Loic Dachary (OuoU) Fri, 26 Aug 2005 14:00:44 +0200 + +poker-engine (1.0.6-1) unstable; urgency=low + + * upstream version + + * depends on libxml2 and libxslt + + -- Loic Dachary (OuoU) Fri, 5 Aug 2005 19:29:24 +0200 + +poker-engine (1.0.5-1) unstable; urgency=low + + * upstream version + + -- Loic Dachary (OuoU) Sat, 16 Jul 2005 10:51:51 +0200 + +poker-engine (1.0.4-1) unstable; urgency=low + + * upstream version + + -- Loic Dachary (OuoU) Wed, 13 Jul 2005 14:22:28 +0200 + +poker-engine (1.0.3-1) unstable; urgency=low + + * upstream version + + -- Loic Dachary (OuoU) Fri, 24 Jun 2005 22:41:31 +0200 + +poker-engine (1.0.2-1) unstable; urgency=low + + * Fill ITP (closes: #306788) + + * upstream update + + -- Loic Dachary (OuoU) Fri, 24 Jun 2005 11:08:55 +0200 + +poker-engine (1.0.1-1) unstable; urgency=low + + * upstream update + + -- Loic Dachary (OuoU) Wed, 15 Jun 2005 21:34:51 +0200 + +poker-engine (1.0.0-1) unstable; urgency=low + + * initial revision + + -- Loic Dachary (OuoU) Thu, 28 Apr 2005 12:28:47 +0200 --- poker-engine-1.3.6.orig/debian/compat +++ poker-engine-1.3.6/debian/compat @@ -0,0 +1 @@ +5 --- poker-engine-1.3.6.orig/debian/control +++ poker-engine-1.3.6/debian/control @@ -0,0 +1,19 @@ +Source: poker-engine +Section: python +Priority: optional +Maintainer: Loic Dachary (OuoU) +Build-Depends-Indep: pkg-config, perl, automake1.11, rsync +Build-Depends: debhelper (>= 5.0.37.2), cdbs (>= 0.4.90), python-all (>= 2.6.6), python-libxml2, python-libxslt1, python-pypoker-eval (>= 132.0), procps +X-Python-Version: >=2.3 +Standards-Version: 3.9.1 + +Package: python-poker-engine +Section: python +Architecture: all +Conflicts: python2.3-poker-eval (<< 1.0.16), python2.4-poker-engine (<< 1.0.16), poker-engine-common +Depends: ${python:Depends}, ${misc:Depends}, python-pypoker-eval (>= 132.0), python-libxml2, python-libxslt1, rsync +Description: multiplayer poker engine with abstract variants specifications + poker-engine is a Python library that implements poker rules according + to variants and betting structures specified in configuration files. + It designed to be used by a multiplayer poker server, a poker AI or a + poker client. --- poker-engine-1.3.6.orig/debian/copyright +++ poker-engine-1.3.6/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Loic Dachary (OuoU) on +Sat, 21 Feb 2005 13:35:33 +0100. + +It was downloaded from http://gna.org/projects/pokersource + +Upstream Author: Loic Dachary + +Copyright 2006 - 2010 Loic Dachary : + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- poker-engine-1.3.6.orig/debian/pycompat +++ poker-engine-1.3.6/debian/pycompat @@ -0,0 +1 @@ +2 --- poker-engine-1.3.6.orig/debian/python-poker-engine.dirs +++ poker-engine-1.3.6/debian/python-poker-engine.dirs @@ -0,0 +1,2 @@ +etc/poker-engine + --- poker-engine-1.3.6.orig/debian/python-poker-engine.docs +++ poker-engine-1.3.6/debian/python-poker-engine.docs @@ -0,0 +1 @@ +examples/simple.py --- poker-engine-1.3.6.orig/debian/python-poker-engine.postinst +++ poker-engine-1.3.6/debian/python-poker-engine.postinst @@ -0,0 +1,43 @@ +#! /bin/sh +# postinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +DH_VERBOSE=0 + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +case "$1" in + configure) + /usr/sbin/pokerconfigupgrade --verbose=1 --upgrade=/usr/share/poker-engine/upgrades --reference=/usr/share/poker-engine/conf /etc/poker-engine + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 + + --- poker-engine-1.3.6.orig/debian/python-poker-engine.postrm +++ poker-engine-1.3.6/debian/python-poker-engine.postrm @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +if [ "${DH_VERBOSE:-0}" -gt 0 ] ; then set -x ; fi + +if [ "$1" = "purge" ]; then + rm -f /etc/poker-engine/poker.*.xml +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- poker-engine-1.3.6.orig/debian/python-poker-engine.preinst +++ poker-engine-1.3.6/debian/python-poker-engine.preinst @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +if [ "${DH_VERBOSE:-0}" -gt 0 ] ; then set -x ; fi + +if [ "$1" = "upgrade" -a -n "$2" ] && dpkg --compare-versions "$2" lt-nl "1.0.21"; then + # + # Major changes in 1.0.21, forget about upgrading + # + rm -f /etc/poker-engine/poker.*.xml +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- poker-engine-1.3.6.orig/debian/rules +++ poker-engine-1.3.6/debian/rules @@ -0,0 +1,35 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +export DH_VERBOSE=1 + +include /usr/share/cdbs/1/rules/debhelper.mk + +clean:: debian/stamp-autotools-configure + rm -f $(DEB_SRCDIR)/*cdbs-* + +include /usr/share/cdbs/1/class/autotools.mk + +DEB_MAKE_CLEAN_TARGET = maintainer-clean + +DEB_CONFIGURE_EXTRA_FLAGS = --enable-maintainer-mode + +DEB_MAKE_CHECK_TARGET = check + +is_debug_package=$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),yes,) + +$(DEB_SRCDIR)/configure:: $(DEB_SRCDIR)/configure.ac + mkdir -p config + autoreconf --install + chmod a+x $@ + +# override in order to add dependency to configure (should be a :: rule instead of a : rule) +debian/stamp-autotools-configure: $(DEB_SRCDIR)/configure + chmod a+x $(DEB_CONFIGURE_SCRIPT) + $(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS) + +binary-install/python-poker-engine:: + dh_python2 -ppython-poker-engine + +# make check verbosity : very quiet +export VERBOSE_T=-1 --- poker-engine-1.3.6.orig/po/Makefile +++ poker-engine-1.3.6/po/Makefile @@ -0,0 +1,673 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# po/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Copyright (C) 2003-2006 Free Software Foundation, Inc. +# This file is in the public domain. +# +# Makefile configuration - processed by automake. + +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgincludedir = $(includedir)/poker-engine +pkglibexecdir = $(libexecdir)/poker-engine +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = po +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgdatadir = ${datarootdir}/poker-engine +pkglibdir = ${prefix}/lib/poker-engine/poker-engine +ACLOCAL = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11 +AMTAR = $${TAR-tar} +AUTOCONF = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf +AUTOHEADER = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader +AUTOMAKE = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11 +AWK = mawk +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"poker-engine\" -DPACKAGE_TARNAME=\"poker-engine\" -DPACKAGE_VERSION=\"1.3.6\" -DPACKAGE_STRING=\"poker-engine\ 1.3.6\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"poker-engine\" -DVERSION=\"1.3.6\" +ECHO_C = +ECHO_N = -n +ECHO_T = +GETTEXT_MACRO_VERSION = 0.18 +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = +MAKEINFO = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = msgmerge +PACKAGE = poker-engine +PACKAGE_BUGREPORT = +PACKAGE_NAME = poker-engine +PACKAGE_STRING = poker-engine 1.3.6 +PACKAGE_TARNAME = poker-engine +PACKAGE_URL = +PACKAGE_VERSION = 1.3.6 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +POKER_ENGINE_PKGDATADIR = /usr/share/poker-engine +POKER_ENGINE_PKGLIBDIR = /usr/lib/poker-engine/poker-engine +POKER_ENGINE_PKGSYSCONFDIR = /etc/poker-engine +PYPOKER_EVAL_CFLAGS = +PYPOKER_EVAL_LIBS = +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.7 +RSYNC = /usr/bin/rsync +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = +USE_NLS = yes +VERSION = 1.3.6 +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +abs_builddir = /tmp/buildd/poker-engine-1.3.6/po +abs_srcdir = /tmp/buildd/poker-engine-1.3.6/po +abs_top_builddir = /tmp/buildd/poker-engine-1.3.6 +abs_top_srcdir = /tmp/buildd/poker-engine-1.3.6 +am__leading_dot = . +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = x86_64-linux-gnu +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${prefix}/share/info +install_sh = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${prefix}/lib/poker-engine +localedir = ${datarootdir}/locale +localstatedir = /var +mandir = ${prefix}/share/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/poker-engine +pkgpythondir = ${pythondir}/poker-engine +pkgsysconfdir = /etc/poker-engine +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages +pythondir = ${prefix}/lib/python2.7/dist-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = /etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. + +# List of files which contain translatable strings. +POTFILES = \ + pokerengine/pokergame.py \ + po/raw.string + + +# Usually the message domain is the same as the package name. +DOMAIN = poker-engine + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = http://www.pokersource.info + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = http://www.pokersource.info + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = +MSGMERGE_UPDATE = /usr/bin/msgmerge --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) +POTFILES_DEPS = $(top_srcdir)/pokerengine/pokergame.py $(top_srcdir)/po/raw.string + +# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po) +POFILES = da.po de.po en.po en_CA.po en_US.po es.po fi.po fr.po fr_BE.po fr_CA.po fr_FX.po it.po nb.po nl.po pt.po sv.po +# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo) +GMOFILES = da.gmo de.gmo en.gmo en_CA.gmo en_US.gmo es.gmo fi.gmo fr.gmo fr_BE.gmo fr_CA.gmo fr_FX.gmo it.gmo nb.gmo nl.gmo pt.gmo sv.gmo +# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update) +UPDATEPOFILES = da.po-update de.po-update en.po-update en_CA.po-update en_US.po-update es.po-update fi.po-update fr.po-update fr_BE.po-update fr_CA.po-update fr_FX.po-update it.po-update nb.po-update nl.po-update pt.po-update sv.po-update +# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop) +DUMMYPOFILES = da.nop de.nop en.nop en_CA.nop en_US.nop es.nop fi.nop fr.nop fr_BE.nop fr_CA.nop fr_FX.nop it.nop nb.nop nl.nop pt.nop sv.nop + +# This is computed as +# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo) +CATALOGS = da.gmo de.gmo en.gmo en_CA.gmo en_US.gmo es.gmo fi.gmo fr.gmo fr_BE.gmo fr_CA.gmo fr_FX.gmo it.gmo nb.gmo nl.gmo pt.gmo sv.gmo +SUFFIXES = .po .gmo .mo .sed .sin .nop .po-create .po-update +MOSTLYCLEANFILES = remove-potcdate.sed stamp-poT core core.* \ + *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po \ + *.o +DISTCLEANFILES = *.mo stamp-po +MAINTAINERCLEANFILES = stamp-po $(GMOFILES) +EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu po/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: installdirs-local +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + distclean distclean-generic distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-local maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-local + + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + +all-local: all-local-yes + +all-local-yes: stamp-po +all-local-no: + +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, stamp-po is a nop (i.e. a phony target). + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch stamp-po" && \ + echo timestamp > stamp-poT && \ + mv stamp-poT stamp-po; \ + } + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed + if test -n '$(MSGID_BUGS_ADDRESS)'; then \ + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ + else \ + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ + fi; \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + $(POTFILES) + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + +install-data-local: install-data-local-yes +install-data-local-no: all-local +install-data-local-yes: all-local + $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +installdirs-local: installdirs-local-yes +installdirs-local-no: +installdirs-local-yes: + $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +uninstall-local: uninstall-local-yes +uninstall-local-no: +uninstall-local-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +html ID: + +# Hidden from automake, but really activated. Works around an automake-1.5 bug. +distdir: distdir1 +distdir1: + $(MAKE) update-po + if test -f $(srcdir)/$(DOMAIN).pot; then \ + for file in $(DOMAIN).pot stamp-po; do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + cp -p $$d/$$file $(distdir)/$$file || exit 1; \ + done; \ + fi + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: +Makefile: LINGUAS --- poker-engine-1.3.6.orig/po/Makefile.in +++ poker-engine-1.3.6/po/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -20,6 +20,23 @@ # # Makefile configuration - processed by automake. VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgincludedir = $(includedir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -45,6 +62,11 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = @pkgdatadir@ pkglibdir = @pkglibdir@ @@ -98,6 +120,7 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RSYNC = @RSYNC@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -304,10 +327,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) --- poker-engine-1.3.6.orig/poker-engine.pc +++ poker-engine-1.3.6/poker-engine.pc @@ -0,0 +1,13 @@ +# pkg-config source file + +prefix=/usr +exec_prefix=${prefix} +pkgsysconfdir=/etc/poker-engine +pkgdatadir=/usr/share/poker-engine +pkglibdir=/usr/lib/poker-engine/poker-engine + +Name: poker-engine +Description: python library implementing poker rules +Version: 1.3.6 +Requires: pypoker-eval +Conflicts: --- poker-engine-1.3.6.orig/pokerconfigupgrade +++ poker-engine-1.3.6/pokerconfigupgrade @@ -0,0 +1,122 @@ +#!/usr/bin/python +# -*- encoding: iso-8859-1; mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# +import sys, os, getopt, stat, string +sys.path.insert(0, ".") + +def usage(): + print """ +pokerconfigupgrade [--module=] [--help] [--verbose=] [--dry-run] + [--upgrades=] [--reference=] + [directory or file.xml] ... +""" + +def my_import(name): + mod = __import__(name) + components = name.split('.') + for comp in components[1:]: + mod = getattr(mod, comp) + return mod + +def main(): + try: + opts, args = getopt.getopt(sys.argv[1:], "hvdumr", ["help", "verbose=", "dry-run", "upgrades=", "module=", "reference=" ]) + except getopt.GetoptError: + usage() + sys.exit(2) + upgrades = None + configuration_file = None + module = "pokerengine.pokerengineconfig" + reference = None + verbose = 0 + dry_run = False + for o, a in opts: + if o in ("-h", "--help"): + usage() + sys.exit(0) + if o in ("-d", "--dry-run"): + dry_run = True + if o in ("-u", "--upgrades"): + upgrades = a + if o in ("-m", "--module"): + module = a + if o in ("-r", "--reference"): + reference = a + if o in ("-v", "--verbose"): + verbose = int(a) + + if not upgrades and not reference: + print "must specify either --upgrades or --reference" + sys.exit(3) + + if upgrades: + config_module = my_import(module) + config_class = config_module.__dict__['Config'] + + files = [] + for path in args: + if os.path.exists(path): + if os.path.isfile(path): + files.append(path) + elif os.path.isdir(path): + files_tmp = map(lambda file: path + "/" + file, os.listdir(path)) + files.extend(filter(lambda file: os.path.isfile(file), files_tmp)) + else: + raise Exception, "The type of the file " + path + " is unknown" + else: + raise Exception, "File not found " + path + + files = filter(lambda file: string.find(file, ".xml") >= 0, files) + for file in files: + mode = os.stat(file)[stat.ST_MODE] + if not mode & stat.S_IWUSR: + os.chmod(file, mode | 0200) + + config_class.upgrades_repository = upgrades + config_class.verbose = verbose + config_class.upgrade_dry_run = dry_run + config = config_class(['']) + for file in files: + config.load(file) + + if reference: + if ( len(args) != 1 or not os.path.isdir(args[0]) ): + print "--reference requires a single directory argument, target of the upgrade" + sys.exit(4) + target = args[0] + rsync_verbose = verbose and "-v" or "" + rsync_command = "/usr/bin/rsync --exclude CVS -a " + rsync_verbose + " --ignore-existing " + reference + "/ " + target + "/" + if verbose: + print rsync_command + if not dry_run: + if os.system(rsync_command): + sys.exit(5) + + return 0 + +if __name__ == "__main__": + sys.exit(main()) --- poker-engine-1.3.6.orig/pokerconfigupgrade.8 +++ poker-engine-1.3.6/pokerconfigupgrade.8 @@ -0,0 +1,79 @@ +.\" +.\" Copyright (C) 2006 - 2010 Loic Dachary +.\" Copyright (C) 2005, 2006 Mekensleep +.\" +.\" Mekensleep +.\" 26 rue des rosiers +.\" 75004 Paris +.\" licensing@mekensleep.com +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +.\" +.\" Authors: +.\" Loic Dachary +.\" +.TH pokerconfigupgrade 8 local +.SH NAME +pokerconfigupgrade \- upgrade poker XML configuration files to match the software version + +.SH SYNOPSIS +pokerconfigupgrade [--module=] [--help] [--verbose=] [--dry-run] + [--upgrades=] [--reference=] + [directory or file.xml] ... + +.SH DESCRIPTION + +Apply the XSL files found in the upgrades directory to upgrade the configuration files +given in argument to reach the same version as the config software module. + +.SH OPTIONS + +.TP +.B --upgrades= +Get the XSL files from +.B . + +.TP +.B --reference= +Requires that a single directory is provided in argument. +The files that exist in +.B +but not in the target directory provided in argument are copied. +The files that exist in the target directory but not in the reference +are removed. The files that exists in both directories are upgraded +if necessary. + +.TP +.B --verbose= +Set the verbosity level. 0 (the default) means silent. 1 means print +comments about actions taken. + +.TP +.B --module= +Use the +.B .config +module instead of the default pokerengine.pokerengineconfig module. + +.TP +.B --dry-run +Do not actually do the upgrade but run the code anyways. + +.TP +.B --help +Print help message and exit. +. +.SH AUTHORS + +Loic Dachary --- poker-engine-1.3.6.orig/pokerengine/Makefile +++ poker-engine-1.3.6/pokerengine/Makefile @@ -0,0 +1,472 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# pokerengine/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgincludedir = $(includedir)/poker-engine +pkglibexecdir = $(libexecdir)/poker-engine +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = pokerengine +DIST_COMMON = $(pokerengine_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +am__installdirs = "$(DESTDIR)$(pokerenginedir)" +py_compile = $(top_srcdir)/config/py-compile +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgdatadir = ${datarootdir}/poker-engine +pkglibdir = ${prefix}/lib/poker-engine/poker-engine +ACLOCAL = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11 +AMTAR = $${TAR-tar} +AUTOCONF = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf +AUTOHEADER = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader +AUTOMAKE = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11 +AWK = mawk +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"poker-engine\" -DPACKAGE_TARNAME=\"poker-engine\" -DPACKAGE_VERSION=\"1.3.6\" -DPACKAGE_STRING=\"poker-engine\ 1.3.6\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"poker-engine\" -DVERSION=\"1.3.6\" +ECHO_C = +ECHO_N = -n +ECHO_T = +GETTEXT_MACRO_VERSION = 0.18 +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = +MAKEINFO = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +PACKAGE = poker-engine +PACKAGE_BUGREPORT = +PACKAGE_NAME = poker-engine +PACKAGE_STRING = poker-engine 1.3.6 +PACKAGE_TARNAME = poker-engine +PACKAGE_URL = +PACKAGE_VERSION = 1.3.6 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +POKER_ENGINE_PKGDATADIR = /usr/share/poker-engine +POKER_ENGINE_PKGLIBDIR = /usr/lib/poker-engine/poker-engine +POKER_ENGINE_PKGSYSCONFDIR = /etc/poker-engine +PYPOKER_EVAL_CFLAGS = +PYPOKER_EVAL_LIBS = +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.7 +RSYNC = /usr/bin/rsync +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = +USE_NLS = yes +VERSION = 1.3.6 +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +abs_builddir = /tmp/buildd/poker-engine-1.3.6/pokerengine +abs_srcdir = /tmp/buildd/poker-engine-1.3.6/pokerengine +abs_top_builddir = /tmp/buildd/poker-engine-1.3.6 +abs_top_srcdir = /tmp/buildd/poker-engine-1.3.6 +am__leading_dot = . +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = x86_64-linux-gnu +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${prefix}/share/info +install_sh = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${prefix}/lib/poker-engine +localedir = ${datarootdir}/locale +localstatedir = /var +mandir = ${prefix}/share/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/poker-engine +pkgpythondir = ${pythondir}/poker-engine +pkgsysconfdir = /etc/poker-engine +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages +pythondir = ${prefix}/lib/python2.7/dist-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = /etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. + +# +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# +# +MAINTAINERCLEANFILES = Makefile.in +pokerenginedir = ${pythondir}/pokerengine +pokerengine_PYTHON = \ + __init__.py \ + pokercards.py \ + pokerchips.py \ + pokerengineconfig.py \ + pokergame.py \ + pokerrake.py \ + pokerprizes.py \ + pokertournament.py \ + version.py + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pokerengine/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu pokerengine/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pokerenginePYTHON: $(pokerengine_PYTHON) + @$(NORMAL_INSTALL) + @list='$(pokerengine_PYTHON)'; dlist=; list2=; test -n "$(pokerenginedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pokerenginedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pokerenginedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pokerenginedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pokerenginedir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(pokerenginedir)" $$dlist; \ + else :; fi + +uninstall-pokerenginePYTHON: + @$(NORMAL_UNINSTALL) + @list='$(pokerengine_PYTHON)'; test -n "$(pokerenginedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + dir='$(DESTDIR)$(pokerenginedir)'; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + st=0; \ + for files in "$$files" "$$filesc" "$$fileso"; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: + for dir in "$(DESTDIR)$(pokerenginedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pokerenginePYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pokerenginePYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pokerenginePYTHON \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am \ + uninstall-pokerenginePYTHON + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: --- poker-engine-1.3.6.orig/pokerengine/Makefile.in +++ poker-engine-1.3.6/pokerengine/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgincludedir = $(includedir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -41,6 +58,11 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -62,6 +84,13 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) am__installdirs = "$(DESTDIR)$(pokerenginedir)" py_compile = $(top_srcdir)/config/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -117,6 +146,7 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RSYNC = @RSYNC@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -245,8 +275,11 @@ $(am__aclocal_m4_deps): install-pokerenginePYTHON: $(pokerengine_PYTHON) @$(NORMAL_INSTALL) - test -z "$(pokerenginedir)" || $(MKDIR_P) "$(DESTDIR)$(pokerenginedir)" @list='$(pokerengine_PYTHON)'; dlist=; list2=; test -n "$(pokerenginedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pokerenginedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pokerenginedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ @@ -261,11 +294,8 @@ $(INSTALL_DATA) $$files "$(DESTDIR)$(pokerenginedir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pokerenginedir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pokerenginedir)" $$dlist; \ - fi; \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(pokerenginedir)" $$dlist; \ else :; fi uninstall-pokerenginePYTHON: @@ -273,14 +303,14 @@ @list='$(pokerengine_PYTHON)'; test -n "$(pokerenginedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ + dir='$(DESTDIR)$(pokerenginedir)'; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(pokerenginedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pokerenginedir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pokerenginedir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(pokerenginedir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pokerenginedir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(pokerenginedir)" && rm -f $$fileso + st=0; \ + for files in "$$files" "$$filesc" "$$fileso"; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st tags: TAGS TAGS: @@ -335,10 +365,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: --- poker-engine-1.3.6.orig/tests/Makefile +++ poker-engine-1.3.6/tests/Makefile @@ -0,0 +1,578 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# tests/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgincludedir = $(includedir)/poker-engine +pkglibexecdir = $(libexecdir)/poker-engine +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/allin.py.in $(srcdir)/blinds.py.in \ + $(srcdir)/bugs.py.in $(srcdir)/buyin.py.in \ + $(srcdir)/chips.py.in $(srcdir)/deal.py.in \ + $(srcdir)/eval.py.in $(srcdir)/history.py.in \ + $(srcdir)/libxml2leak.py.in $(srcdir)/muck.py.in \ + $(srcdir)/positions.py.in $(srcdir)/run.in $(srcdir)/sit.py.in \ + $(srcdir)/test-game.py.in $(srcdir)/test-gamehistory.py.in \ + $(srcdir)/test-i18n.py.in $(srcdir)/test-pokercards.py.in \ + $(srcdir)/test-pokerchips.py.in \ + $(srcdir)/test-pokerengineconfig.py.in \ + $(srcdir)/test-pokerplayer.py.in \ + $(srcdir)/test-pokerprizes.py.in \ + $(srcdir)/test-pokerrake.py.in \ + $(srcdir)/test-pokertournament.py.in \ + $(srcdir)/test-version.py.in $(srcdir)/tournament.py.in \ + $(srcdir)/upgrades.py.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = run allin.py blinds.py buyin.py bugs.py chips.py \ + deal.py eval.py history.py muck.py positions.py sit.py \ + tournament.py upgrades.py libxml2leak.py test-gamehistory.py \ + test-pokercards.py test-pokerengineconfig.py \ + test-pokertournament.py test-pokerprizes.py test-game.py \ + test-pokerchips.py test-pokerrake.py test-pokerplayer.py \ + test-version.py test-i18n.py +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgdatadir = ${datarootdir}/poker-engine +pkglibdir = ${prefix}/lib/poker-engine/poker-engine +ACLOCAL = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run aclocal-1.11 +AMTAR = $${TAR-tar} +AUTOCONF = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoconf +AUTOHEADER = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run autoheader +AUTOMAKE = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run automake-1.11 +AWK = mawk +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"poker-engine\" -DPACKAGE_TARNAME=\"poker-engine\" -DPACKAGE_VERSION=\"1.3.6\" -DPACKAGE_STRING=\"poker-engine\ 1.3.6\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"poker-engine\" -DVERSION=\"1.3.6\" +ECHO_C = +ECHO_N = -n +ECHO_T = +GETTEXT_MACRO_VERSION = 0.18 +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = +MAKEINFO = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +PACKAGE = poker-engine +PACKAGE_BUGREPORT = +PACKAGE_NAME = poker-engine +PACKAGE_STRING = poker-engine 1.3.6 +PACKAGE_TARNAME = poker-engine +PACKAGE_URL = +PACKAGE_VERSION = 1.3.6 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +POKER_ENGINE_PKGDATADIR = /usr/share/poker-engine +POKER_ENGINE_PKGLIBDIR = /usr/lib/poker-engine/poker-engine +POKER_ENGINE_PKGSYSCONFDIR = /etc/poker-engine +PYPOKER_EVAL_CFLAGS = +PYPOKER_EVAL_LIBS = +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.7 +RSYNC = /usr/bin/rsync +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = +USE_NLS = yes +VERSION = 1.3.6 +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +abs_builddir = /tmp/buildd/poker-engine-1.3.6/tests +abs_srcdir = /tmp/buildd/poker-engine-1.3.6/tests +abs_top_builddir = /tmp/buildd/poker-engine-1.3.6 +abs_top_srcdir = /tmp/buildd/poker-engine-1.3.6 +am__leading_dot = . +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = x86_64-linux-gnu +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${prefix}/share/info +install_sh = ${SHELL} /tmp/buildd/poker-engine-1.3.6/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${prefix}/lib/poker-engine +localedir = ${datarootdir}/locale +localstatedir = /var +mandir = ${prefix}/share/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/poker-engine +pkgpythondir = ${pythondir}/poker-engine +pkgsysconfdir = /etc/poker-engine +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages +pythondir = ${prefix}/lib/python2.7/dist-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = /etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. + +# +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# +# +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ + coverage.py \ + __init__.py \ + testmessages.py \ + test-data/pokerrake.py \ + bugs.py \ + $(wildcard conf/*.xml) \ + $(wildcard test-data/conf/*.xml) \ + $(wildcard test-data/upgrade/*.xsl) + +TESTS_ENVIRONMENT = ./run +TESTS = coverage-reset test-*.py history.py deal.py positions.py tournament.py allin.py chips.py blinds.py sit.py upgrades.py muck.py libxml2leak.py coverage-report +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +run: $(top_builddir)/config.status $(srcdir)/run.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +allin.py: $(top_builddir)/config.status $(srcdir)/allin.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +blinds.py: $(top_builddir)/config.status $(srcdir)/blinds.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +buyin.py: $(top_builddir)/config.status $(srcdir)/buyin.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +bugs.py: $(top_builddir)/config.status $(srcdir)/bugs.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +chips.py: $(top_builddir)/config.status $(srcdir)/chips.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +deal.py: $(top_builddir)/config.status $(srcdir)/deal.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +eval.py: $(top_builddir)/config.status $(srcdir)/eval.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +history.py: $(top_builddir)/config.status $(srcdir)/history.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +muck.py: $(top_builddir)/config.status $(srcdir)/muck.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +positions.py: $(top_builddir)/config.status $(srcdir)/positions.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +sit.py: $(top_builddir)/config.status $(srcdir)/sit.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +tournament.py: $(top_builddir)/config.status $(srcdir)/tournament.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +upgrades.py: $(top_builddir)/config.status $(srcdir)/upgrades.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +libxml2leak.py: $(top_builddir)/config.status $(srcdir)/libxml2leak.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-gamehistory.py: $(top_builddir)/config.status $(srcdir)/test-gamehistory.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokercards.py: $(top_builddir)/config.status $(srcdir)/test-pokercards.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokerengineconfig.py: $(top_builddir)/config.status $(srcdir)/test-pokerengineconfig.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokertournament.py: $(top_builddir)/config.status $(srcdir)/test-pokertournament.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokerprizes.py: $(top_builddir)/config.status $(srcdir)/test-pokerprizes.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-game.py: $(top_builddir)/config.status $(srcdir)/test-game.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokerchips.py: $(top_builddir)/config.status $(srcdir)/test-pokerchips.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokerrake.py: $(top_builddir)/config.status $(srcdir)/test-pokerrake.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-pokerplayer.py: $(top_builddir)/config.status $(srcdir)/test-pokerplayer.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-version.py: $(top_builddir)/config.status $(srcdir)/test-version.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-i18n.py: $(top_builddir)/config.status $(srcdir)/test-i18n.py.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: all all-am check check-TESTS check-am clean clean-generic \ + clean-local distclean distclean-generic distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am + + +export PYTHON + +clean-local: + rm -fr .coverage annotated */*.py[oc] + +export top_srcdir + +.PHONY: coverage-reset coverage-report + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: --- poker-engine-1.3.6.orig/tests/Makefile.in +++ poker-engine-1.3.6/tests/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgincludedir = $(includedir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -62,6 +79,11 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -117,6 +139,7 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RSYNC = @RSYNC@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -383,14 +406,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -439,10 +463,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: --- poker-engine-1.3.6.orig/tests/allin.py +++ poker-engine-1.3.6/tests/allin.py @@ -0,0 +1,594 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# Henry Precheur (2004) +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +import unittest +from pokereval import PokerEval +from pokerengine import pokergame +from pokerengine.pokergame import PokerGameServer, PokerGame +from pokerengine.pokercards import PokerCards + +poker_eval = PokerEval() +_initial_money = 1000 + +class TestAllIn(unittest.TestCase): + + def setUp(self, variant, betting): + output = os.getenv("test_output") + if output != None: + self.output_file = open(output, 'a') + else: + self.output_file = sys.stderr + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant(variant) + self.game.setBettingStructure(betting) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + + def bestWithStrings(self, side, serial): + (value, cards) = self.game.bestHand(side, serial) + return (cards[0], self.game.eval.card2string(cards[1:])) + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_cards(self, visible, *args): + cards = PokerCards(poker_eval.string2card(args)) + if visible: + cards.allVisible() + else: + cards.allHidden() + return cards + + def make_new_player(self, i, initial_money = _initial_money): + self.assert_(self.game.addPlayer(i)) + player = self.game.serial2player[i] + player.money = initial_money + player.buy_in_payed = True + self.assert_(self.game.sit(i)) + player.auto_blind_ante = True + self.game.autoMuck(i, pokergame.AUTO_MUCK_ALWAYS) + + def prepareGame(self, nplayers): + pot = 9100 + self.money = 1 + self.player = {} + money = self.money + game = self.game + player = self.player + for serial in xrange(1,nplayers+1): + self.make_new_player(serial, money) + player[serial] = game.serial2player[serial] + game.beginTurn(1) + game.pot = pot + + +class TestCommonAllIn(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "2-4-no-limit") + + def test1_AllIn(self): + # + # 5 players (counting 1-5 included). + # In pre-flop, player 3 goes all-in immediately. + # All other players also go all in, therefore all cards + # are dealt and the game ends. + # + # player[1] money = 50 + # player[2] money = 10 + # player[3] money = 10 + # player[4] money = 200 + # player[5] money = 10 + # + # player[1] side_pot = 130 (p[1]=50 + p[2]=10 + p[3]=10 + p[4]=50 + p[5]=10) + # player[2] side_pot = 50 (p[1]=10 + p[2]=10 + p[3]=10 + p[4]=10 + p[5]=10) + # player[3] side_pot = 50 (p[1]=10 + p[2]=10 + p[3]=10 + p[4]=10 + p[5]=10) + # player[4] side_pot = 280 (p[1]=50 + p[2]=10 + p[3]=10 + p[4]=200 + p[5]=10) + # player[5] side_pot = 50 (p[1]=10 + p[2]=10 + p[3]=10 + p[4]=10 + p[5]=10) + # + # + game = self.game + player = {} + for serial in xrange(1,6): + player[serial] = serial - 1 + self.make_new_player(serial, 1000) + game.serial2player[1].money = 5000 + game.serial2player[4].money = 20000 + game.beginTurn(1) + self.assertEqual(game.state, "pre-flop") + + for serial in (4, 5, 1): + self.assertEqual(game.position, player[serial]) + game.call(serial) + # + # player 2 goes all in + # + game.callNraise(2, 1000) + self.assertEqual(game.inGameCount(), 4) + self.assertEqual(game.notFoldCount(), 5) + player2 = game.serial2player[2] + self.assertEqual(player2.bet, 1000) + self.assertEqual(player2.money, 0) + self.assertEqual(game.highestBetNotFold(), 1000) + self.assertEqual(game.highestBetInGame(), 400) + self.assertEqual(game.position, player[3]) + self.assertEqual(game.serialsInGame(), [1, 3, 4, 5]) + self.assertEqual(game.serialsNotFold(), [1, 2, 3, 4, 5]) + # + # player 3 tries to check but is not allowed to, should + # return False and have no side effect + # + self.assertEqual(game.check(3), False) + + # + # Inhibit the distributeMoney and showdown so that we + # can check the values of the side pots. + # + game.is_directing = False + # + # All other players call, i.e. they all go all in since they + # all started with the same amount of chips + # + for serial in (3, 4, 5, 1): + self.assertEqual(game.position, player[serial]) + game.callNraise(serial, 100000) + self.assertEqual(game.side_pots, + {'building': 0, 'pots': [ + [5000, 5000], + [8000, 13000], + [15000, 28000] + ], + 'last_round': 0, + 'contributions': { + 0: {0: + {1: 1000, + 2: 1000, + 3: 1000, + 4: 1000, + 5: 1000}, + 1: + {1: 4000, + 4: 4000}, + 2: + {4: 15000} + }, + 'total': {1: 5000, 2: 1000, 3: 1000, 4: 20000, 5: 1000} + } + }) + self.assertEqual(game.serial2player[1].side_pot_index, 1) + self.assertEqual(game.serial2player[2].side_pot_index, 0) + self.assertEqual(game.serial2player[3].side_pot_index, 0) + self.assertEqual(game.serial2player[4].side_pot_index, 2) + self.assertEqual(game.serial2player[5].side_pot_index, 0) + + self.assertEqual(game.inGameCount(), 0) + self.assertEqual(game.notFoldCount(), 5) + self.assertEqual(game.state, "muck") + +class TestAllInCase2(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "2-4-no-limit") + + def test1_AllIn(self): + # + # 5 players (counting 1-5 included). + # flop: player 2 4 fold + # turn: player 3 bets, player raises 5 all-in, player 1 calls + # player 3 raises all in, player 5 calls all in + # + # + game = self.game + player = {} + for serial in xrange(1,6): + player[serial] = serial - 1 + self.make_new_player(serial, 5200) + game.serial2player[3].money = 20200 + game.serial2player[5].money = 7200 + game.serial2player[1].money = 10200 + game.beginTurn(2) + + self.assertEqual(game.state, "pre-flop") + game.fold(4) + game.call(5) + game.call(1) + game.fold(2) + game.check(3) + self.assertEqual(game.inGameCount(), 3) + + # + # Inhibit the distributeMoney and showdown so that we + # can check the values of the side pots. + # + game.is_directing = False + + self.assertEqual(game.state, "flop") + game.callNraise(3, 5000) # bet 50 (200 - 50 = 150 remaining) + game.callNraise(5, 7000) # raises 70 (50 to call, raise 20) => all in + game.call(1) # calls 70 (70 to call, 100 - 70 = 30 remaining) + game.callNraise(3, 15000) # raises 150 (20 to call, raise 130) => all in + game.call(1) # calls 30 => all in + + self.assertEqual(game.side_pots, + {'building': 0, 'pots': [[21800, 21800], [6000, 27800], [10000, 37800]], 'last_round': 1, 'contributions': {0: {0: {1: 400, 2: 200, 3: 400, 5: 400}}, 1: {0: {1: 6800, 3: 6800, 5: 6800}, 1: {1: 3000, 3: 3000}, 2: {3: 10000}}, 'total': {1: 10200, 2: 200, 3: 20200, 5: 7200}}} +) + self.assertEqual(game.serial2player[1].side_pot_index, 1) # 277 + self.assertEqual(game.serial2player[3].side_pot_index, 2) # 377 + self.assertEqual(game.serial2player[5].side_pot_index, 0) # 217 + + self.assertEqual(game.inGameCount(), 0) + self.assertEqual(game.notFoldCount(), 3) + self.assertEqual(game.state, "muck") + +class TestRaise(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "10-20-no-limit") + + def test1_Raise(self): + # + # 2 players (counting 1-2 included). + # + # player[1] money = 2000 + # player[2] money = 2000 + # + game = self.game + player = {} + for serial in xrange(1,3): + player[serial] = serial - 1 + self.make_new_player(serial, 200000) + game.beginTurn(1) + self.assertEqual(game.state, "pre-flop") + + self.assertEqual(game.position, player[2]) + game.call(2) + + game.callNraise(1, 50000) + self.assertEqual(game.betLimits(2), (100000, 198000, 50000)) + +class TestHoldemAllIn(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "0-0-limit") + + def test1_ChipLeft(self): + """ + Two players are even, 3 to split, 1 odd chip + """ + game = self.game + self.prepareGame(2) + game.pot = 3 + game.side_pots = { + 'pots': { 0: (3, 3) }, + 'contributions': { + 'total': { 1: 2, + 2: 1 } + } + } + game.serial2player[1].hand = self.make_cards(False, '7h', '3h') + game.serial2player[2].hand = self.make_cards(False, '7d', '3s') + game.board = self.make_cards(True, '6h', '4d', '7s', 'Kc', '7c') + game.distributeMoney() + self.assertEqual(len(game.winners), 2) + self.assertEqual(game.pot, 0) + winner = game.serial2player[1] + self.assertEqual(winner.money, 2) + # + # Dealer is player[1], player next to dealer is player[2], + # the odd chips go to the player next to the dealer + # + winner = game.serial2player[2] + self.assertEqual(winner.money, 3) + game.endTurn() + +class TestOmaha8AllIn(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "omaha8", "0-0-limit") + + def dealCardsOne(self): + """ + + 1) A player is all in and wins nothing. However, he + was all-in for an amount greater than the highest bet + and gets back the difference. + 2) A player is all in and wins one side of the pot. + 3) Two players tie for one side of the pot. + 4) Odd chips are distributed. + 5) A player is all in for an amount larger than all other + bets and get it back. + + player[1] is all-in with a side pot of 90 and loses but + get the extra chips back (200 - 90) = 110 + player[2] is all-in with a side pot of 50 + player[2] wins hi (Straight) => 50/2 = 25 + player[5] win lo (NoPair) => 50/2 = 25 + player[3,4,5] are still playing for a pot of (90 - 50) = 40 + player[3,4] tie for hi (Pair)=> (40 / 2) / 2 = 10 each + player[5] win lo (Nopair) => (40 / 2) = 20 + + """ + + game = self.game + game.side_pots = {'pots': { + 0: (5000, 5000), + 1: (4000, 9000), + 2: (11000, 20000) + }, + 'contributions': { + 'total': { 1: 13000, + 2: 1000, + 3: 2000, + 4: 2000, + 5: 2000 + } + } + } + player = self.player + game.board = self.make_cards(True, 'As', '4d', '5h', '7d', '9c') + + player[1].hand = self.make_cards(False, 'Th', 'Js', 'Qs', '2c') + player[1].side_pot_index = 2 + player[1].all_in = True + self.assertEqual(self.bestWithStrings("hi", 1), + ('NoPair', ['As', 'Qs', 'Js', '9c', '7d'])) + + player[2].hand = self.make_cards(False, '6c', '8c', 'Qd', 'Kd') + player[2].side_pot_index= 0 + player[2].all_in = True + self.assertEqual(self.bestWithStrings("hi", 2), + ('Straight', ['9c', '8c', '7d', '6c', '5h'])) + self.assertEqual(self.bestWithStrings("low", 2), + ('NoPair', ['8c', '6c', '5h', '4d', 'As'])) + + player[3].hand = self.make_cards(False, 'Ac', '8s', 'Qh', 'Kh') + player[3].side_pot_index= 1 + self.assertEqual(self.bestWithStrings("hi", 3), + ('OnePair', ['As', 'Ac', 'Kh', '9c', '7d'])) + self.assertEqual(self.bestWithStrings("low", 3), + ('NoPair', ['8s', '7d', '5h', '4d', 'Ac'])) + + player[4].hand = self.make_cards(False, 'Ad', '8d', 'Qc', 'Kc') + player[4].side_pot_index= 1 + self.assertEqual(self.bestWithStrings("hi", 4), + ('OnePair', ['As', 'Ad', 'Kc', '9c', '7d'])) + + player[5].hand = self.make_cards(False, '2s', '6s', 'Jd', 'Ks') + player[5].side_pot_index= 1 + self.assertEqual(self.bestWithStrings("low", 5), + ('NoPair', ['6s', '5h', '4d', '2s', 'As'])) + + + def dealCardsTwo(self): + """ + Simple situation, no all-in, player[3] with straight + """ + game = self.game + game.side_pots = {'pots': { + 0: (10000, 10000) + }, + 'contributions': { + 'total': { 1: 2000, + 2: 2000, + 3: 2000, + 4: 2000, + 5: 2000 + } + } + } + player = self.player + game.board = self.make_cards(True, 'As', '4d', '5h', '7d', '9c') + + player[1].hand = self.make_cards(False, 'Th', 'Js', 'Qs', '2c') + self.assertEqual(self.bestWithStrings("hi", 1), + ('NoPair', ['As', 'Qs', 'Js', '9c', '7d'])) + self.assertEqual(self.bestWithStrings("low", 1), + ('Nothing', [])) + + player[2].hand = self.make_cards(False, 'Ac', '8s', 'Qh', 'Kh') + self.assertEqual(self.bestWithStrings("hi", 2), + ('OnePair', ['As', 'Ac', 'Kh', '9c', '7d'])) + self.assertEqual(self.bestWithStrings("low", 2), + ('NoPair', ['8s', '7d', '5h', '4d', 'Ac'])) + + player[3].hand = self.make_cards(False, '6c', '8c', 'Qd', 'Kd') + self.assertEqual(self.bestWithStrings("hi", 3), + ('Straight', ['9c', '8c', '7d', '6c', '5h'])) + self.assertEqual(self.bestWithStrings("low", 3), + ('NoPair', ['8c', '6c', '5h', '4d', 'As'])) + + player[4].hand = self.make_cards(False, '2s', 'Ts', 'Jd', '3s') + self.assertEqual(self.bestWithStrings("hi", 4), + ('Straight', ['5h', '4d', '3s', '2s', 'As'])) + self.assertEqual(self.bestWithStrings("low", 4), + ('NoPair', ['5h', '4d', '3s', '2s', 'As'])) + + player[5].hand = self.make_cards(False, 'Ad', '8d', 'Qc', 'Kc') + self.assertEqual(self.bestWithStrings("hi", 5), + ('OnePair', ['As', 'Ad', 'Kc', '9c', '7d'])) + self.assertEqual(self.bestWithStrings("low", 5), + ('NoPair', ['8d', '7d', '5h', '4d', 'Ad'])) + + def test1_distributeMoney(self): + self.prepareGame(5) + self.dealCardsOne() + game = self.game + game.uncalled_serial = 1 + game.uncalled = 11000 + money = self.money + player = self.player + game.distributeMoney() + self.assertEqual(len(game.winners), 4) + self.assertEqual(game.pot, 0) + game_state = game.showdown_stack[0] + self.assertEqual(game_state['serial2delta'], {1: -2000, 2: 1500, 3: -1000, 4: -1000, 5: 2500}) + self.assertEqual(game_state['serial2share'], {1: 11000, 2: 2500, 3: 1000, 4: 1000, 5: 4500}) + + def test2_showdown(self): + self.prepareGame(5) + self.dealCardsOne() + game = self.game + game.uncalled_serial = 1 + game.uncalled = 11000 + money = self.money + player = self.player + game.muckState(pokergame.WON_ALLIN) + self.assertEqual(game.side2winners["hi"], [2, 3, 4]) + self.assertEqual(game.side2winners["low"], [5]) + self.assertEqual(player[1].hand.areVisible(), False) + self.assertEqual(player[2].hand.areVisible(), True) + self.assertEqual(player[3].hand.areVisible(), True) + self.assertEqual(player[4].hand.areVisible(), True) + self.assertEqual(player[5].hand.areVisible(), True) + + def test3_showdown(self): + self.prepareGame(5) + self.dealCardsTwo() + game = self.game + money = self.money + player = self.player + game.muckState(pokergame.WON_REGULAR) + self.assertEqual(game.side2winners["hi"], [3]) + self.assertEqual(game.side2winners["low"], [4]) + self.assertEqual(player[1].hand.areVisible(), False) + self.assertEqual(player[2].hand.areVisible(), True) + self.assertEqual(player[3].hand.areVisible(), True) + self.assertEqual(player[4].hand.areVisible(), True) + self.assertEqual(player[5].hand.areVisible(), False) + +class TestHoldemPlayBoard(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "0-0-limit") + + def dealCardsOne(self): + """ + Two players play the board + """ + game = self.game + game.side_pots = {'pots': { + 0: (1000, 1000), + }, + 'contributions': { + 'total': { 1: 500, + 2: 500, + } + } + } + player = self.player + game.board = self.make_cards(True, 'As', 'Ac', 'Ad', '7d', '7c') + + player[1].hand = self.make_cards(False, 'Th', 'Js') + self.assertEqual(self.bestWithStrings("hi", 1), + ('FlHouse', ['As', 'Ac', 'Ad', '7c', '7d'])) + + player[2].hand = self.make_cards(False, '9c', '8s') + self.assertEqual(self.bestWithStrings("hi", 2), + ('FlHouse', ['As', 'Ac', 'Ad', '7c', '7d'])) + + def test1_showdown(self): + self.prepareGame(2) + self.dealCardsOne() + game = self.game + money = self.money + player = self.player + game.distributeMoney() + self.assertEqual(game.side2winners["hi"], [1, 2]) + +class TestHoldemSplit(TestAllIn): + + def setUp(self): + TestAllIn.setUp(self, "holdem", "0-0-limit") + + def dealCardsOne(self): + """ + Two players, one + """ + game = self.game + game.side_pots = {'pots': { + 0: (1000, 1000), + }, + 'contributions': { + 'total': { 1: 200, + 2: 800, + } + } + } + player = self.player + game.board = self.make_cards(True, 'As', 'Ac', 'Ad', '7d', '7c') + + player[1].hand = self.make_cards(False, 'Th', 'Js') + self.assertEqual(self.bestWithStrings("hi", 1), + ('FlHouse', ['As', 'Ac', 'Ad', '7c', '7d'])) + + player[2].hand = self.make_cards(False, '9c', '8s') + self.assertEqual(self.bestWithStrings("hi", 2), + ('FlHouse', ['As', 'Ac', 'Ad', '7c', '7d'])) + + def test1_showdown(self): + self.prepareGame(2) + self.dealCardsOne() + game = self.game + money = self.money + player = self.player + game.distributeMoney() + self.assertEqual(game.side2winners["hi"], [1, 2]) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestRaise)) + suite.addTest(unittest.makeSuite(TestHoldemAllIn)) + suite.addTest(unittest.makeSuite(TestCommonAllIn)) + suite.addTest(unittest.makeSuite(TestAllInCase2)) + suite.addTest(unittest.makeSuite(TestOmaha8AllIn)) + suite.addTest(unittest.makeSuite(TestHoldemPlayBoard)) + suite.addTest(unittest.makeSuite(TestHoldemSplit)) + # Comment out any of the above and use line below this when you wish + # to run just one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestHoldemSplit, prefix = +# "test12")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/allin.py ) ; ( cd ../tests ; make TESTS='allin.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/blinds.py +++ poker-engine-1.3.6/tests/blinds.py @@ -0,0 +1,1155 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2008 Bradley M. Kuhn +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# Bradley M. Kuhn +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from pprint import pprint +import unittest +from pokerengine.pokergame import PokerGameServer +from string import split + +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + + +class TestBlinds(unittest.TestCase): + + def setUp(self): + self.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = self.verbose + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + self.amounts = {} + self.amounts['big'] = 200 + self.amounts['small'] = 100 + predefined_decks = [ + "8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6h Ah 6d As 3h 8s", # distributed from the end + ] + self.game.shuffler = PokerPredefinedDecks(map(lambda deck: self.game.eval.string2card(split(deck)), predefined_decks)) + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_new_bot(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + game.botPlayer(serial) + game.noAutoBlindAnte(serial) + + def make_new_player(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + + def pay_blinds(self, skipSerials = {}): + game = self.game + for serial in game.serialsAll(): + if skipSerials.has_key(serial): continue + game.autoBlindAnte(serial) + for serial in game.serialsAll(): + if skipSerials.has_key(serial): continue + game.noAutoBlindAnte(serial) + + def check_button(self, serial): + self.assertEquals(self.game.player_list[self.game.dealer], serial) + + def check_blinds(self, descriptions): + players = self.game.playersAll() + players.sort(lambda a,b: int(a.seat - b.seat)) + failStr = None + ii = 0 + for player in players: + ii += 1 + (blind, missed, wait, missedCount) = descriptions.pop(0) + if(blind != player.blind or missed != player.missed_blind or wait != player.wait_for or player.missed_big_blind_count != missedCount): + failStr = "%d check_blinds FAILED actual %s != from expected %s" % ( ii, (player.blind, player.missed_blind, player.wait_for, player.missed_big_blind_count), (blind, missed, wait, missedCount) ) + if self.verbose >= 0: print failStr + else: + goodStr = "%d check_blinds %s == %s" % (ii, (player.blind, player.missed_blind, player.wait_for, player.missed_big_blind_count), (blind, missed, wait, missedCount) ) + if self.verbose > 0: print goodStr + if failStr: + self.fail(failStr) + + def confirm_blind(self, hist, acceptedEntries): + for ee in acceptedEntries: + (val1, val2, val3) = ee + ee = ('blind', val1, val2, val3) + self.assertEquals(ee in hist, True) + hist.remove(ee) + for hh in hist: + self.assertNotEquals(hh[0], 'blind') + self.assertNotEquals(hh[0], 'ante') + + def confirm_hist(self, hist, acceptedEntries): + for ee in acceptedEntries: + self.assertEquals(ee in hist, True) + hist.remove(ee) + + def test1(self): + big = self.amounts['big'] + small = self.amounts['small'] + + seat2serial = {} + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_bot(serial, seat) + seat2serial[seat] = serial + self.game.beginTurn(1) + # (blind, missed, wait, missedCount) + + self.check_button(1) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(3, big, 0), (2, small, 0)]) + + self.game.beginTurn(2) + self.check_button(2) + # (blind, missed, wait, missedCount) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + ('big', None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(4, big, 0), (3, small, 0)]) + + self.game.beginTurn(3) + self.check_button(3) + # (blind, missed, wait, missedCount) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, None, False, 0), # 3 + ('small', None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(1, big, 0), (4, small, 0)]) + + self.game.beginTurn(4) + # (blind, missed, wait) + self.check_button(4) + self.check_blinds([('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + (None, None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(2, big, 0), (1, small, 0)]) + # -------------------------------------------------------------------------- + def test2(self): + """ + Two new players enter the game and both pay the big blind + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 8)): + self.make_new_bot(serial, seat) + self.game.beginTurn(1) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(3, big, 0), (2, small, 0)]) + + for (serial, seat) in ((10, 4), (11, 5)): + self.make_new_bot(serial, seat) + + self.game.beginTurn(2) + self.check_button(2) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + ('big', 'n/a', False, 0), # 10 + ('late', 'n/a', False, 0), # 11 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, + [(11, big, 0), (10, big, 0), (3, small, 0)]) + # -------------------------------------------------------------------------- + def test3(self): + """ + Two new players enter the game between the small + and big blind. They are allowed to play during the + second turn because they cannot be awarded the button + as they arrive. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 7), (4, 8)): + self.make_new_bot(serial, seat) + self.game.beginTurn(1) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + + for (serial, seat) in ((10, 4), (11, 5)): + self.make_new_bot(serial, seat) + + self.game.beginTurn(2) + # (blind, missed, wait) + self.check_button(2) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, 'n/a', 'late', 0), # 10 + (None, 'n/a', 'late', 0), # 11 + ('small', None, False, 0), # 3 + ('big', None, False, 0), # 4 + ] + ) + self.pay_blinds() + history = self.game.turn_history + self.confirm_blind(history, [(4, big, 0), (3, small, 0)]) + # players who did not pay the big blind are removed from + # the history by historyReduce + game_index = 0 + player_list_index = 7 + serial2chips_index = 9 + self.assertEqual(history[game_index][player_list_index], [1, 2, 10, 11, 3, 4]) + self.assertEqual(history[game_index][serial2chips_index].keys(), [1, 2, 3, 4, 10, 11]) + self.game.historyReduce() + self.assertEqual(history[game_index][player_list_index], [1, 2, 3, 4]) + self.assertEqual(history[game_index][serial2chips_index].keys(), [1, 2, 3, 4]) + + self.game.beginTurn(3) + self.check_button(3) + # (blind, missed, wait) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + ('late', 'n/a', False, 0), # 10 + ('late', 'n/a', False, 0), # 11 + (None, None, False, 0), # 3 + ('small', None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(1, big, 0), (10, big, 0), + (11, big, 0), (4, small, 0)]) + self.game.beginTurn(4) + # (blind, missed, wait) + self.check_button(4) + self.check_blinds([('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + (None, None, False, 0), # 10 + (None, None, False, 0), # 11 + (None, None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(1, small, 0), (2, big, 0)]) + # -------------------------------------------------------------------------- + def test4_fourPlayers_player4missedBothBlinds_onlyBigRequired(self): + """ + Less than 6 players, player 4 missed the big and small blinds and + must pay the big blind when back in the game. The missed blind + count only ever goes to one, because the player is not passed again. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_bot(serial, seat) + self.game.beginTurn(1) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + + self.game.sitOut(4) + + self.game.beginTurn(2) + self.check_button(2) + # (blind, missed, wait) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(3, small, 0), (1, big, 0)]) + + self.game.beginTurn(3) + self.check_button(3) + # (blind, missed, wait) + self.check_blinds([('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + (None, None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(1, small, 0), (2, big, 0)]) + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 1) + self.assertEquals(self.game.serial2player[1].getMissedRoundCount(), 0) + self.game.sit(4) + + self.game.beginTurn(4) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + ('late', 'big', False, 1), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0), + (4, big, 0)]) + + self.game.beginTurn(5) + self.check_button(2) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + ('big', None, False, 0), # 4 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(3, small, 0), (4, big, 0)]) + + # -------------------------------------------------------------------------- + def test5_sixPlayers_missedBothBlinds_bothRequired(self): + """ + At six players, player 4 missed the big and small blinds and + must pay BOTH when back in the game. The missed blind + count only ever goes to one, because the player is not passed again. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3), (5, 4), (6, 5)): + self.make_new_bot(serial, seat) + self.game.beginTurn(1) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + (None, None, False, 0), # 5 + (None, None, False, 0), # 6 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + + self.game.sitOut(4) + + self.game.beginTurn(2) + self.check_button(2) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ('big', None, False, 0), # 5 + (None, None, False, 0), # 6 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(3, small, 0), (5, big, 0)]) + + self.game.beginTurn(3) + self.check_button(3) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ('small', None, False, 0), # 5 + ('big', None, False, 0), # 6 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(5, small, 0), (6, big, 0)]) + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 1) + + self.game.sit(4) + + self.game.beginTurn(4) + self.check_button(5) + # (blind, missed, wait) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, None, False, 0), # 3 + ('big_and_dead', 'big', False, 1), # 4 + (None, None, False, 0), # 5 + ('small', None, False, 0), # 6 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(6, small, 0), (1, big, 0), + (4, big, small)]) + self.game.beginTurn(5) + # (blind, missed, wait) + self.check_blinds([('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + (None, None, False, 0), # 3 + (None, None, False, 0), # 4 + (None, None, False, 0), # 5 + (None, None, False, 0), # 6 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(1, small, 0), (2, big, 0)]) + # -------------------------------------------------------------------------- + def test6_fivePlayers_multiDecline_noHandStarts(self): + """Five players, goes 2 handed before first hand dealt. Others sit in after. + At five players, 1, 2 and 4 sit out before first hand begins. 3 + accepts the small blind, as 1, 2, and 4 sit back in. 5 rejects + the big blind, and the turn ends. We restart with the five + sitting out and blinds in the right place. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3), (5, 4)): + self.make_new_bot(serial, seat) + self.game.sitOut(1) + self.game.sitOut(2) + self.game.sitOut(4) + self.game.beginTurn(1) + self.check_button(5) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, 'small', False, 0), # 2 + ('small', None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ('big', None, False, 0), # 5 + ]) + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 1) + self.game.sit(1) + self.game.sit(2) + self.game.autoBlindAnte(3) + self.game.noAutoBlindAnte(3) + self.game.sit(4) + self.confirm_hist(self.game.turn_history, [('blind_request', 5, big, 0, 'big'), + ('blind', 3, small, 0)]) + self.check_button(5) + # (blind, missed, wait) + self.check_blinds([(None, None, 'first_round', 0), # 1 + (None, 'small', 'first_round', 0), # 2 + (True, None, False, 0), # 3 + (None, 'big', 'first_round', 1), # 4 + ('big', None, False, 0), # 5 + ]) + + self.game.sitOut(5) + self.confirm_hist(self.game.turn_history, [('canceled', 3, small)]) + + self.failUnless(self.game.state, "end") + self.failUnless(self.game.serial2player[3].money, self.game.bestBuyIn()) + + self.game.sitOut(5) + self.game.beginTurn(2) + self.check_button(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + (None, None, False, 0), # 5 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + # -------------------------------------------------------------------------- + def test7_specialTwoWaitForPost(self): + """Special case where two players came in waiting to post. + """ + game = self.game +# for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + for (serial, seat) in ((1, 2), (2, 3)): + self.make_new_bot(serial, seat) + game.beginTurn(1) + self.pay_blinds() + + self.game.beginTurn(2) + # (blind, missed, wait) + self.check_blinds([ + ('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + ] + ) + game.autoBlindAnte(1) + game.noAutoBlindAnte(1) + game.autoBlindAnte(2) + game.noAutoBlindAnte(2) + game.sitOutNextTurn(2) + self.failUnless(self.game.state, "end") + + # + # Two players came in and are waiting for + # the late blind because they attempted to enter + # either on the small blind or the dealer position. + # Fake this situation instead of playing hands that + # will lead to the same because it introduces an + # complexity that is not necessary. This case can happen + # indeed although very rarely. + # + for (serial, seat) in ((3, 0), (4, 7)): + self.make_new_player(serial, seat) + game.getPlayer(serial).wait_for = 'late' + + self.game.beginTurn(3) + # (blind, missed, wait) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, 'small', False, 0), # 3 + ('small', None, False, 0) # 4 + ]) + + # -------------------------------------------------------------------------- + def test8_updateBlinds(self): + """updateBlinds() test + """ + game = self.game + for (serial, seat) in ((1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)): + self.make_new_bot(serial, seat) + game.player_list = [1, 3, 4, 5, 6] + game.dealer_seat = 3 + for ( serial, blind_info ) in ( + (1, ("big", "n/a", False, 0)), + (2, ("late", "n/a", "first_round", 0)), + (3, (None, None, False, 0)), + (4, (None, "n/a", "late", 0)), + (5, (None, "n/a", "late", 0)), + (6, (True, None, False, 0)), + ): + player = game.getPlayer(serial) + ( player.blind, player.missed_blind, player.wait_for, player.missed_big_blind_count ) = blind_info + + game.updateBlinds() + self.check_blinds([ + ("big", "n/a", False, 0), + ("late", "n/a", "first_round", 0), + (None, None, False, 0), + (None, "n/a", "late", 0), + (None, "n/a", "late", 0), + (True, None, False, 0), + ]) + # -------------------------------------------------------------------------- + def test9_fivePlayers_missedBothBlinds_onlyBigRequired(self): + """ + Less than 6 players, player 4 missed the big and small blinds and + must pay the big blind when back in the game. The missed blind + count only ever goes to one, because the player is not passed again. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3), (5, 4)): + self.make_new_bot(serial, seat) + self.game.beginTurn(1) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + (None, None, False, 0), # 5 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + + self.game.sitOut(4) + + self.game.beginTurn(2) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + (None, None, False, 0), # 2 + ('small', None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ('big', None, False, 0), # 5 + ] + ) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(3, small, 0), (5, big, 0)]) + + self.game.beginTurn(3) + # (blind, missed, wait) + self.check_blinds([('big', None, False, 0), # 1 + (None, None, False, 0), # 2 + (None, None, False, 0), # 3 + (None, 'big', False, 1), # 4 + ('small', None, False, 0), # 5 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(5, small, 0), (1, big, 0)]) + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 1) + self.game.sit(4) + + self.game.beginTurn(4) + # (blind, missed, wait) + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 1) + self.check_blinds([('small', None, False, 0), # 1 + ('big', None, False, 0), # 2 + (None, None, False, 0), # 3 + ('late', 'big', False, 1), # 4 + (None, None, False, 0), # 5 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(1, small, 0), (2, big, 0), + (4, big, 0)]) + + self.assertEquals(self.game.serial2player[4].getMissedRoundCount(), 0) + self.game.beginTurn(5) + # (blind, missed, wait) + self.check_blinds([(None, None, False, 0), # 1 + ('small', None, False, 0), # 2 + ('big', None, False, 0), # 3 + (None, None, False, 0), # 4 + (None, None, False, 0), # 5 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(2, small, 0), (3, big, 0)]) + # -------------------------------------------------------------------------- + def test11_sixPlayers_fiveSitsOutForALongTime(self): + """test11_sixPlayers_fiveSitsOutForALongTime + Tests six players where the fifth sits out for a long time and the counter runs. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((100, 0), (101, 1), (102, 2), (103, 3), (104, 4), (105, 5)): + self.make_new_bot(serial, seat) + + turn = 0 + missedCounterVerify = 0 + missedSoFar = None + self.assertEquals(self.game.sitOut(105), True) + while missedCounterVerify < 4: + for serial in [100, 101, 102, 103, 104, 105]: + amount = self.game.maxBuyIn() - self.game.serial2player[serial].money + self.game.rebuy(serial, amount) + + turn += 1 + self.game.beginTurn(turn) + self.check_button(100) + self.assertEquals(self.game.isSitOut(105), True) + self.check_blinds([(None, None, False, 0), # 100 + ('small', None, False, 0), # 101 + ('big', None, False, 0), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(101, small, 0), (102, big, 0)]) + + turn += 1 + self.assertEquals(self.game.isSitOut(105), True) + self.game.beginTurn(turn) + self.check_button(101) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + ('small', None, False, 0), # 102 + ('big', None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + ]) + + self.pay_blinds(skipSerials = { 105 : 105 }) + self.confirm_blind(self.game.turn_history, [(102, small, 0), (103, big, 0)]) + + turn += 1 + self.assertEquals(self.game.isSitOut(105), True) + self.game.beginTurn(turn) + self.check_button(102) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, None, False, 0), # 102 + ('small', None, False, 0), # 103 + ('big', None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + ]) + self.pay_blinds(skipSerials = { 105 : 105 }) + self.confirm_blind(self.game.turn_history, [(103, small, 0), (104, big, 0)]) + + turn += 1 + missedCounterVerify += 1 + self.assertEquals(self.game.isSitOut(105), True) + self.game.beginTurn(turn) + self.check_button(103) + missedSoFar = 'big' + self.check_blinds([('big', None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, None, False, 0), # 102 + (None, None, False, 0), # 103 + ('small', None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + ]) + self.pay_blinds(skipSerials = { 105 : 105 }) + self.confirm_blind(self.game.turn_history, [(104, small, 0), (100, big, 0)]) + + turn += 1 + self.game.beginTurn(turn) + self.check_button(104) + self.assertEquals(self.game.isSitOut(105), True) + self.check_blinds([('small', None, False, 0), # 100 + ('big', None, False, 0), # 101 + (None, None, False, 0), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + ]) + self.pay_blinds(skipSerials = { 105 : 105 }) + self.confirm_blind(self.game.turn_history, [(100, small, 0), (101, big, 0)]) + + # -------------------------------------------------------------------------- + def test12_fourPlayers_fourSitsOutForALongTime(self): + """test12_fourPlayers_fourSitsOutForALongTime + Tests four players where the fourth sits out for a long time and the counter runs. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + for (serial, seat) in ((100, 0), (101, 1), (102, 2), (103, 3)): + self.make_new_bot(serial, seat) + + turn = 0 + missedCounterVerify = 0 + missedSoFar = None + self.assertEquals(self.game.sitOut(103), True) + while missedCounterVerify < 4: + for serial in [100, 101, 102, 103]: + amount = self.game.maxBuyIn() - self.game.serial2player[serial].money + self.game.rebuy(serial, amount) + + turn += 1 + self.game.beginTurn(turn) + self.check_button(100) + self.assertEquals(self.game.isSitOut(103), True) + self.check_blinds([(None, None, False, 0), # 100 + ('small', None, False, 0), # 101 + ('big', None, False, 0), # 102 + (None, missedSoFar, False, missedCounterVerify), # 103 + ]) + self.pay_blinds(skipSerials = { 103 : 103 }) + self.confirm_blind(self.game.turn_history, [(101, small, 0), (102, big, 0)]) + self.assertEquals(self.game.serial2player[103].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + missedCounterVerify += 1 + missedSoFar = 'big' + self.assertEquals(self.game.isSitOut(103), True) + self.game.beginTurn(turn) + self.check_button(101) + self.check_blinds([('big', None, False, 0), # 100 + (None, None, False, 0), # 101 + ('small', None, False, 0), # 102 + (None, missedSoFar, False, missedCounterVerify), # 103 + ]) + + self.pay_blinds(skipSerials = { 103 : 103 }) + self.confirm_blind(self.game.turn_history, [(102, small, 0), (100, big, 0)]) + self.assertEquals(self.game.serial2player[103].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + self.assertEquals(self.game.isSitOut(103), True) + self.game.beginTurn(turn) + self.check_button(102) + self.check_blinds([('small', None, False, 0), # 100 + ('big', None, False, 0), # 101 + (None, None, False, 0), # 102 + (None, missedSoFar, False, missedCounterVerify), # 103 + ]) + + self.pay_blinds(skipSerials = { 103 : 103 }) + self.confirm_blind(self.game.turn_history, [(100, small, 0), (101, big, 0)]) + self.assertEquals(self.game.serial2player[103].getMissedRoundCount(), + missedCounterVerify) + + + def helperForTest13and14(self, big, small): + """This just sets up a situation that can have two outcomes; after + sitting out for a very long time, the 102 player can sit in while + the blinds are being posted, or before they are.""" + + for (serial, seat) in ((100, 0), (101, 1), (102, 2), (103, 3), (104, 4), (105, 5), (106, 6)): + self.make_new_bot(serial, seat) + + turn = 0 + missedCounterVerify = 0 + missedSoFar = None + turn += 1 + self.game.beginTurn(turn) + self.check_button(100) + self.check_blinds([(None, None, False, 0), # 100 + ('small', None, False, 0), # 101 + ('big', None, False, 0), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, missedSoFar, False, missedCounterVerify), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(101, small, 0), (102, big, 0)]) + + turn += 1 + self.game.beginTurn(turn) + self.check_button(101) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + ('small', None, False, 0), # 102 + ('big', None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(102, small, 0), (103, big, 0)]) + + + turn += 1 + self.game.beginTurn(turn) + self.check_button(102) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, None, False, 0), # 102 + ('small', None, False, 0), # 103 + ('big', None, False, 0), # 104 + (None, None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(103, small, 0), (104, big, 0)]) + + self.assertEquals(self.game.sitOut(102), True) + missedCounterVerify = 0 + missedSoFar = None + + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + while missedCounterVerify < 4: + for serial in [100, 101, 102, 103, 104, 105, 106]: + amount = self.game.maxBuyIn() - self.game.serial2player[serial].money + self.game.rebuy(serial, amount) + + turn += 1 + self.game.beginTurn(turn) + self.check_button(103) + self.assertEquals(self.game.isSitOut(102), True) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + ('small', None, False, 0), # 104 + ('big', None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(104, small, 0), (105, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + self.assertEquals(self.game.isSitOut(102), True) + self.game.beginTurn(turn) + self.check_button(104) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + ('small', None, False, 0), # 105 + ('big', None, False, 0), # 106 + ]) + + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(105, small, 0), (106, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + self.assertEquals(self.game.isSitOut(102), True) + self.game.beginTurn(turn) + self.check_button(105) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.check_blinds([('big', None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, None, False, 0), # 105 + ('small', None, False, 0), # 106 + ]) + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(106, small, 0), (100, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + self.assertEquals(self.game.isSitOut(102), True) + self.game.beginTurn(turn) + self.check_button(106) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.check_blinds([('small', None, False, 0), # 100 + ('big', None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(100, small, 0), (101, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + + turn += 1 + missedCounterVerify += 1 + missedSoFar = 'big' + self.game.beginTurn(turn) + self.check_button(100) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.assertEquals(self.game.isSitOut(102), True) + self.check_blinds([(None, None, False, 0), # 100 + ('small', None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + ('big', None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(101, small, 0), (103, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + + + turn += 1 + self.game.beginTurn(turn) + self.check_button(101) + self.assertEquals(self.game.isSitOut(102), True) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, missedSoFar, False, missedCounterVerify), # 102 + ('small', None, False, 0), # 103 + ('big', None, False, 0), # 104 + (None, None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds(skipSerials = { 102 : 102 }) + self.confirm_blind(self.game.turn_history, [(103, small, 0), (104, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + return(turn, missedSoFar, missedCounterVerify) + # -------------------------------------------------------------------------- + def test13_sevenPlayers_fiveSitsOutForALongTimeAfterInitialPayment_duringBlinds(self): + """test13_sevenPlayers_fiveSitsOutForALongTimeAfterInitialPayment_duringBlinds + Tests seven players where the fifth sits out for a long time and the counter runs. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + (turn, missedSoFar, missedCounterVerify) = self.helperForTest13and14(big, small) + # end of while, now let's try to sit back in! In this test, we + # sit back in during the blind posting period. + turn += 1 + self.game.beginTurn(turn) + self.check_button(103) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.assertEquals(self.game.sit(102), True) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, 'big', 'first_round', missedCounterVerify), # 102 + (None, None, False, 0), # 103 + ('small', None, False, 0), # 104 + ('big', None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(104, small, 0), (105, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + turn += 1 + self.game.beginTurn(turn) + self.check_button(104) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.assertEquals(self.game.isSit(102), True) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + ('big_and_dead', 'big', False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + ('small', None, False, 0), # 105 + ('big', None, False, 0), # 106 + ]) + self.pay_blinds() + # We find 102 has posted big and small, since he can now play again. + self.confirm_blind(self.game.turn_history, [(105, small, 0), (106, big, 0), + (102, big, small)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + turn += 1 + self.game.beginTurn(turn) + self.check_button(105) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + self.assertEquals(self.game.isSit(102), True) + self.check_blinds([('big', None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, None, False, 0), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + (None, None, False, 0), # 105 + ('small', None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(106, small, 0), (100, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + # -------------------------------------------------------------------------- + def test14_sevenPlayers_fiveSitsOutForALongTimeAfterInitialPayment_beforeBlinds(self): + """test14_sevenPlayers_fiveSitsOutForALongTimeAfterInitialPayment_beforeBlinds + Tests seven players where the fifth sits out for a long time and + the counter runs. Then, he sits abck but while they are posting + blinds. + """ + big = self.amounts['big'] + small = self.amounts['small'] + + (turn, missedSoFar, missedCounterVerify) = self.helperForTest13and14(big, small) + # end of while, now let's try to sit back in! In this test, we + # sit back in before the blinds are posted + self.assertEquals(self.game.sit(102), True) + turn += 1 + self.game.beginTurn(turn) + self.check_button(103) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), + missedCounterVerify) + self.assertEquals(self.game.isSit(102), True) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + ('big_and_dead', 'big', False, missedCounterVerify), # 102 + (None, None, False, 0), # 103 + ('small', None, False, 0), # 104 + ('big', None, False, 0), # 105 + (None, None, False, 0), # 106 + ]) + self.pay_blinds() + # We find 102 has posted big and small, since he can now play again. + self.confirm_blind(self.game.turn_history, [(104, small, 0), (105, big, 0), + (102, big, small)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + turn += 1 + self.game.beginTurn(turn) + self.check_button(104) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + self.assertEquals(self.game.isSit(102), True) + self.check_blinds([(None, None, False, 0), # 100 + (None, None, False, 0), # 101 + (None, None, False, 0), # 102 + (None, None, False, 0), # 103 + (None, None, False, 0), # 104 + ('small', None, False, 0), # 105 + ('big', None, False, 0), # 106 + ]) + self.pay_blinds() + self.confirm_blind(self.game.turn_history, [(105, small, 0), (106, big, 0)]) + self.assertEquals(self.game.serial2player[102].getMissedRoundCount(), 0) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestBlinds)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestBlinds, prefix = +# "test12")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/blinds.py ) ; ( cd ../tests ; make TESTS='blinds.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/buyin.py +++ poker-engine-1.3.6/tests/buyin.py @@ -0,0 +1,113 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +import unittest +from pokerengine.pokergame import PokerGameServer + +class TestBuyIn(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_new_player(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + game.botPlayer(serial) + game.noAutoBlindAnte(serial) + + def pay_blinds(self): + game = self.game + for serial in game.serialsAll(): + game.autoBlindAnte(serial) + for serial in game.serialsAll(): + game.noAutoBlindAnte(serial) + + def test1(self): + game = self.game + self.failUnless(game.addPlayer(1)) + self.failIf(game.payBuyIn(1, game.buyIn() - 1)) + self.failIf(game.getPlayer(1).buy_in_payed) + self.failIf(game.payBuyIn(1, game.maxBuyIn() + 1)) + self.failIf(game.getPlayer(1).buy_in_payed) + self.failUnless(game.payBuyIn(1, game.bestBuyIn())) + self.failUnless(game.getPlayer(1).buy_in_payed) + + self.failUnless(game.addPlayer(2)) + self.failUnless(game.payBuyIn(2, game.maxBuyIn())) + self.failUnless(game.getPlayer(2).buy_in_payed) + + def test2(self): + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + self.failIf(self.game.rebuy(300000, self.game.bestBuyIn())) + self.failUnless(self.game.rebuy(1, 1)) + self.assertEqual(self.game.getPlayer(1).rebuy, 1) + self.failIf(self.game.rebuy(1, self.game.maxBuyIn())) + self.assertEqual(self.game.getPlayer(1).rebuy, 1) + self.failUnless(self.game.rebuy(1, 1)) + self.assertEqual(self.game.getPlayer(1).rebuy, 2) + self.pay_blinds() + self.assertEqual(self.game.getPlayer(1).rebuy, 0) + money = self.game.getPlayerMoney(1) + self.failUnless(self.game.rebuy(1, 1)) + self.assertEqual(self.game.getPlayerMoney(1), money + 1) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestBuyIn)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestBuyIn, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/buyin.py ) ; ( cd ../tests ; make TESTS='buyin.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/chips.py +++ poker-engine-1.3.6/tests/chips.py @@ -0,0 +1,152 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +import unittest +from pokerengine.pokerchips import PokerChips +from pokerengine import pokerchips + +class TestChips(unittest.TestCase): + + def setUp(self): + self.verbose = int(os.environ.get('VERBOSE_T', 1)) + + def tearDown(self): + pass + + def test1(self): + """ + """ + pokerchips.MAX_CHIPS_PER_STACK = 100 + values = [100, 200, 500, 1000, 2500] + chips = PokerChips(values, 0) + self.assertEqual(chips.chips, [0, 0, 0, 0, 0]) + + chips = PokerChips(values, 20000) + if self.verbose > 0: print "%s" % chips + self.assertEqual(chips.toint(), 20000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 4]) + chips.add([150, 0, 0, 0, 0]) + self.assertEqual(chips.chips, [100, 35, 4, 6, 4]) + self.assertEqual(chips.toint(), 35000) + + chips = PokerChips(values, 20000) + total = 20000 + sum(map(lambda x: x * 150, values)) + chips.add([150, 150, 150, 150, 150]) + self.assertEqual(chips.chips, [100, 100, 100, 100, 194]) + self.assertEqual(chips.toint(), total) + + chips = PokerChips(values, 20000) + chips.subtract([0, 20, 0, 0, 0]) + self.assertEqual(chips.chips, [8, 6, 3, 5, 3]) + self.assertEqual(chips.toint(), 16000) + + chips = PokerChips(values, 600000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 236]) + + chips = PokerChips(values) + chips.add(600000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 236]) + + chips = PokerChips(values) + chips.set([200, 0, 0, 0, 0]) + self.assertEqual(chips.chips, [100, 50, 0, 0, 0]) + + chips = PokerChips(values, 200) + chips.subtract(250) + self.assertEqual(chips.chips, [0, 0, 0, 0, 0]) + + chips = PokerChips(values, 20000) + self.assertEqual(chips.__str__(), "PokerChips([8, 6, 4, 6, 4]) = 20000 (-0)") + self.assertEqual(chips.__repr__(), "PokerChips([8, 6, 4, 6, 4])") + + def test2(self): + """ + """ + pokerchips.MAX_CHIPS_PER_STACK = 30 + values = [100, 200, 500, 1000, 2500, 500000] + chips = PokerChips(values, 0) + self.assertEqual(chips.chips, [0, 0, 0, 0, 0, 0]) + + chips = PokerChips(values, 20000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 4, 0]) + chips.add([150, 0, 0, 0, 0, 0]) + self.assertEqual(chips.chips, [30, 30, 20, 6, 4, 0]) + self.assertEqual(chips.toint(), 35000) + + chips = PokerChips(values, 20000) + total = 20000 + sum(map(lambda x: x * 150, values)) + chips.add([150, 150, 150, 150, 150, 150]) + self.assertEqual(chips.chips, [30, 30, 30, 31, 44, 151]) + self.assertEqual(chips.toint(), total) + + chips = PokerChips(values, 20000) + chips.subtract([0, 20, 0, 0, 0, 0]) + self.assertEqual(chips.chips, [8, 6, 3, 5, 3, 0]) + self.assertEqual(chips.toint(), 16000) + + chips = PokerChips(values, 600000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 36, 1]) + + chips = PokerChips(values) + chips.add(600000) + self.assertEqual(chips.chips, [8, 6, 4, 6, 36, 1]) + + chips = PokerChips(values) + chips.set([200, 0, 0, 0, 0, 0]) + self.assertEqual(chips.chips, [30, 30, 22, 0, 0, 0]) + + chips = PokerChips(values, 20000) + chips.subtract(25000) + self.assertEqual(chips.chips, [0, 0, 0, 0, 0, 0]) + + chips = PokerChips(values, 20000) + self.assertEqual(chips.__str__(), "PokerChips([8, 6, 4, 6, 4, 0]) = 20000 (-0)") + self.assertEqual(chips.__repr__(), "PokerChips([8, 6, 4, 6, 4, 0])") + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestChips)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestChips, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/chips.py ) ; ( cd ../tests ; make TESTS='chips.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/deal.py +++ poker-engine-1.3.6/tests/deal.py @@ -0,0 +1,100 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from random import shuffle +import unittest +from pokerengine.pokergame import PokerGameServer +from pokerengine.pokercards import PokerCards +from pokereval import PokerEval + +poker_eval = PokerEval() +_initial_money = 1000 + +class TestDeal(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("7stud") + self.game.setBettingStructure("ante-10-20-limit") + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_new_player(self, i, initial_money): + self.assert_(self.game.addPlayer(i)) + player = self.game.serial2player[i] + player.money = initial_money + player.buy_in_payed = True + self.assert_(self.game.sit(i)) + player.auto_blind_ante = True + + def test1(self): + """ + 8 players, non fold, last card is a community card + """ + game = self.game + for serial in xrange(1,9): + self.make_new_player(serial, 2000) + game.beginTurn(1) + while True: + if game.isLastRound(): + self.assertEqual(len(game.board.tolist(True)), 1) + + for x in xrange(1,9): + serial = game.getSerialInPosition() + self.assertEqual(game.check(serial), True) + + if not game.isRunning(): + break; + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestDeal)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestDeal, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/deal.py ) ; ( cd ../tests ; make TESTS='deal.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/eval.py +++ poker-engine-1.3.6/tests/eval.py @@ -0,0 +1,114 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +import unittest +from pokerengine.pokergame import PokerGameServer, PokerGameClient, PokerGame +from pokerengine.pokercards import PokerCards +from pokereval import PokerEval + +poker_eval = PokerEval() +_initial_money = 1000 + +class TestPosition(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_cards(self, *args): + return PokerCards(poker_eval.string2card(args)) + + def make_new_player(self, i, initial_money = _initial_money): + self.assert_(self.game.addPlayer(i)) + player = self.game.serial2player[i] + player.money = initial_money + player.buy_in_payed = True + self.assert_(self.game.sit(i)) + player.auto_blind_ante = True + + def make_cards(self, *args): + return PokerCards(poker_eval.string2card(args)) + + def test1(self): + """ + """ + game = self.game + player = {} + for serial in xrange(1,6): + self.make_new_player(serial) + player[serial] = game.serial2player[serial] + + game.beginTurn(1) + for serial in (2, 3, 4, 5): + player[serial].hand = self.make_cards('__', '__') + player[1].hand = self.make_cards('Ad', 'As') + self.failUnless(game.handEV(1, 10000) in (547,559) ) + player[1].hand = self.make_cards('2c', '7s') + self.failUnless(game.handEV(1, 10000) in (102,105) ) + + game.board = self.make_cards('2c', '3c', '4s') + player[1].hand = self.make_cards('2s', '7s') + self.failUnless(game.handEV(1, 10000) in (171,172) ) + + game.board = self.make_cards('2c', '3c', '4s', '4c') + player[1].hand = self.make_cards('2s', '7s') + self.failUnless(game.handEV(1, 10000) in (74,75) ) + + game.board = self.make_cards('2c', '3c', '4s', '4c', 'Kc') + player[1].hand = self.make_cards('2s', '7s') + self.assertEqual(game.handEV(1, 10000), 5) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestPosition)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestPosition, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/eval.py ) ; ( cd ../tests ; make TESTS='eval.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/history.py +++ poker-engine-1.3.6/tests/history.py @@ -0,0 +1,107 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from pprint import pprint +from string import split +import unittest +from pokerengine.pokergame import PokerGameServer, history2messages +from pokerengine.pokercards import PokerCards + +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + +class TestHistory(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + predefined_decks = [ + "8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6h Ah 6d As 3h 8s", # distributed from the end + ] + self.game.shuffler = PokerPredefinedDecks(map(lambda deck: self.game.eval.string2card(split(deck)), predefined_decks)) + + def tearDown(self): + del self.game + + def make_new_player(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + game.botPlayer(serial) + game.autoBlindAnte(serial) + + def test1(self): + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + self.assertEqual(str(history2messages(self.game, self.game.turn_history, pocket_messages = True)), "('hand #1, holdem, 2-4-limit', ['2 pays 1 blind', '3 pays 2 blind', 'pre-flop, 4 players', 'Cards player 1: 8s Ah', 'Cards player 2: 3h 6h', 'Cards player 3: As 6s', 'Cards player 4: 6d Qs', '4 calls 2', '1 calls 2', '2 calls 1', '3 checks', 'flop, 4 players', 'Board: 4s 7c 4h', 'Cards player 1: 8s Ah', 'Cards player 2: 3h 6h', 'Cards player 3: As 6s', 'Cards player 4: 6d Qs', '2 checks', '3 checks', '4 checks', '1 checks', 'turn, 4 players', 'Board: 4s 7c 4h 5c', 'Cards player 1: 8s Ah', 'Cards player 2: 3h 6h', 'Cards player 3: As 6s', 'Cards player 4: 6d Qs', '2 raises 4', '3 folds', '4 folds', '1 calls 4', 'river, 2 players', 'Board: 4s 7c 4h 5c Ks', 'Cards player 1: 8s Ah', 'Cards player 2: 3h 6h', '2 raises 4', '1 calls 4', 'Rake 1.20', 'Board: 4s 7c 4h 5c Ks', 'Cards player 1: 8s Ah', 'Cards player 2: 3h 6h', '2 shows Straight Seven to Trey for hi ', '1 mucks loosing hand', '2 wins hi ', '2 receives 24'])") + + def test2(self): + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + for event in self.game.historyGet(): + if event[0] == "round": + (type, name, board, pockets) = event + for (player_serial, pocket) in pockets.iteritems(): + pocket.loseNotVisible() + self.assertEqual(pocket, PokerCards([PokerCards.NOCARD] * pocket.len())) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestHistory)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestHistory, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/history.py ) ; ( cd ../tests ; make TESTS='history.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/libxml2leak.py +++ poker-engine-1.3.6/tests/libxml2leak.py @@ -0,0 +1,170 @@ +# -*- mode: python -*- +# +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2008 Bradley M. Kuhn +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +# +# checks that the workarounds for the libxml2 memory leak are effective +# read more about the leak at +# https://mail.gna.org/public/pokersource-users/2008-12/msg00049.html +# +import sys, os, gc +sys.path.insert(0, "..") + +import unittest +import libxml2 + +from pokerengine import pokerengineconfig +from pokerengine import pokergame + +def getVsize(): + return int(os.popen("echo -n $(ps h -o vsize -p " + str(os.getpid()) + ")").read()) + +class LeakTestCase(unittest.TestCase): + + def leakWatch(self, func, message): + # + # check for memory usage every iteration and iterate * times + # + chunk = 5 + leaks = [0] * self.iterations + # + # stabilize memory usage + # + initial = 10 + for j in range(0, initial): + func() + gc.collect() + leaks[0] = getVsize() + for i in range(1, self.iterations): + for j in range(0, chunk): + func() + gc.collect() + leaks[i] = getVsize() + increases = 0 + previous = None + # + # keep track of the greater size found so that decreasing memory + # does not create false positive (i.e. 1000 996 1000 996 1000 996...) + # + greater = None + for leak in leaks: + if previous and previous < leak and leak > greater: + increases += 1 + previous = leak + if leak > greater: + greater = leak + # + # It is almost impossible to be precise when watching the vsize of a process. + # This test suite is not about making sure the process never grows. It is + # designed to spot cases where the process grows most of the time, i.e. has + # a significant leak. + # + self.assertTrue(increases < len(leaks) / 25, " vsize grows " + str(leaks)) + + def test01_config(self): + def func(): + config = pokerengineconfig.Config(['./../conf']) + config.load('poker.holdem.xml') + self.leakWatch(func, "pokerengineconfig.Config") + + def test02_libxml_freeDoc(self): + def func(): + mydoc = libxml2.parseFile('./../conf/poker.holdem.xml') + mydoc.freeDoc() + self.leakWatch(func, "libxml2.freeDoc") + + def test03_game_setVariant(self): + game = pokergame.PokerGame("poker.%s.xml", False, ['./../conf']) + def func(): + game.setVariant("holdem") + self.leakWatch(func, "game.setVariant") + + def test04_config_load(self): + config = pokerengineconfig.Config(['./../conf']) + def func(): + config.load('poker.holdem.xml') + self.leakWatch(func, "Config.load") + config.free() + + def test05_config_reload(self): + config = pokerengineconfig.Config(['./../conf']) + config.load('poker.holdem.xml') + def func(): + config.reload() + self.leakWatch(func, "Config.reload") + + def test06_config_save(self): + config = pokerengineconfig.Config(['./../conf']) + config.load('poker.holdem.xml') + config.path = "leaktmp" + def func(): + config.save() + self.leakWatch(func, "Config.save") + os.unlink("leaktmp") + + def test07_config_headerGet(self): + config = pokerengineconfig.Config(['./../conf']) + config.load('poker.holdem.xml') + def func(): + config.headerGet("/poker/@poker_engine_version") + self.leakWatch(func, "Config.headerGet") + + def test08_config_headerGetProperties(self): + config = pokerengineconfig.Config(['./../conf']) + config.load('poker.holdem.xml') + def func(): + config.headerGetProperties("/poker") + self.leakWatch(func, "Config.headerGetProperties") + +class QuickLeakTestCase(LeakTestCase): + + def setUp(self): + self.iterations = 100 + + +class LongLeakTestCase(LeakTestCase): + + def setUp(self): + self.iterations = 1000 + + +# --------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(QuickLeakTestCase)) # , prefix = "test08")) +# suite.addTest(unittest.makeSuite(LongLeakTestCase)) # , prefix = "test08")) + return suite + +# --------------------------------------------------------- +def GetTestedModule(): + return pokerengineconfig + +# --------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# --------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/libxml2leak.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokerengineconfig.py' TESTS='coverage-reset libxml2leak.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/muck.py +++ poker-engine-1.3.6/tests/muck.py @@ -0,0 +1,231 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from pprint import pprint +from string import split +import unittest +from pokerengine.pokergame import PokerGameServer +from pokerengine import pokergame + +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + +class TestMuck(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + predefined_decks = [ + "8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6d Ah 6d 3h 8s As", # distributed from the end + ] + self.game.shuffler = PokerPredefinedDecks(map(lambda deck: self.game.eval.string2card(split(deck)), predefined_decks)) + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_new_bot(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + game.botPlayer(serial) + game.autoMuck(serial, pokergame.AUTO_MUCK_NEVER) + + def make_new_player(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + self.game.autoBlindAnte(serial) + + def check_blinds(self, descriptions): + players = self.game.playersAll() + players.sort(lambda a,b: int(a.seat - b.seat)) + fail = False + for player in players: + (blind, missed, wait) = descriptions.pop(0) + if(blind != player.blind or missed != player.missed_blind or wait != player.wait_for): + print "check_blinds FAILED actual %s != from expected %s" % ( (player.blind, player.missed_blind, player.wait_for), (blind, missed, wait) ) + fail = True + else: + print "check_blinds %s == %s" % ( (player.blind, player.missed_blind, player.wait_for), (blind, missed, wait) ) + if fail: + self.fail() + + + def test1(self): + """ + won fold, auto_muck always + """ + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + self.game.fold(4) + self.game.fold(1) + self.game.fold(2) + self.assertEqual(len(self.game.winners), 1) + self.assertEqual(self.game.winners[0], 3) + self.failUnless(self.game.isWinnerBecauseFold()) + self.failUnless(self.game.getPlayer(3).hand.areHidden()) + + def test2(self): + """ + won fold, auto_muck lose, decided to muck + """ + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + + self.game.autoMuck(3, pokergame.AUTO_MUCK_LOSE) + self.game.beginTurn(1) + self.game.fold(4) + self.game.fold(1) + self.game.fold(2) + self.assertEqual(len(self.game.winners), 1) + self.assertEqual(self.game.winners[0], 3) + self.failUnless(self.game.isWinnerBecauseFold()) + self.assertEqual(self.game.muckable_serials, [3]) + self.assertEqual(self.game.state, pokergame.GAME_STATE_MUCK) + self.game.muck(serial = 3, want_to_muck = True) + self.failUnless(self.game.getPlayer(3).hand.areHidden()) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + + def test3(self): + """ + won fold, auto_muck lose, decided not to muck (ie show) + """ + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_player(serial, seat) + + self.game.autoMuck(3, pokergame.AUTO_MUCK_LOSE) + self.game.beginTurn(1) + self.game.fold(4) + self.game.fold(1) + self.game.fold(2) + self.assertEqual(len(self.game.winners), 1) + self.assertEqual(self.game.winners[0], 3) + self.failUnless(self.game.isWinnerBecauseFold()) + self.assertEqual(self.game.muckable_serials, [3]) + self.assertEqual(self.game.state, pokergame.GAME_STATE_MUCK) + self.game.muck(serial = 3, want_to_muck = False) + self.failUnless(self.game.getPlayer(3).hand.areVisible()) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + + def test4(self): + """ + fake deck + player p2 wins against p1, p1 is muckable, auto_muck_never, p1 mucks + """ + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_bot(serial, seat) + + self.game.beginTurn(1) + self.assertEqual(self.game.state, pokergame.GAME_STATE_MUCK) + self.game.muck(serial = 1, want_to_muck = True) + self.assertEqual(len(self.game.winners), 1) + self.assertEqual(self.game.winners[0], 2) + self.failUnless(self.game.getPlayer(1).hand.areHidden()) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + + def test5(self): + """ + fake deck + player p2 wins against p1, p1 is muckable, auto_muck_never, p1 does not muck + """ + for (serial, seat) in ((1, 0), (2, 1), (3, 2), (4, 3)): + self.make_new_bot(serial, seat) + + self.game.beginTurn(1) + self.assertEqual(self.game.state, pokergame.GAME_STATE_MUCK) + self.game.muck(serial = 1, want_to_muck = False) + self.assertEqual(len(self.game.winners), 1) + self.assertEqual(self.game.winners[0], 2) + self.failUnless(self.game.getPlayer(1).hand.areVisible()) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + + def test6(self): + """ + game canceled because blind not payed, player p2 get her/his blind back + """ + for (serial, seat) in ((1, 0), (2, 1)): + self.make_new_player(serial, seat) + self.game.noAutoBlindAnte(serial) + + self.game.beginTurn(1) + self.game.blind(2) + self.game.sitOut(1) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + self.assertEqual(len(self.game.winners), 0) + + def test0(self): + """ + game canceled explicitly, player p2 get her/his blind back + """ + for (serial, seat) in ((1, 0), (2, 1)): + self.make_new_player(serial, seat) + self.game.noAutoBlindAnte(serial) + + self.game.beginTurn(1) + self.game.blind(2) + self.game.is_directing = False + self.game.sitOut(1) + self.game.canceled(2, self.game.smallBlind()) + self.assertEqual(self.game.state, pokergame.GAME_STATE_END) + self.assertEqual(len(self.game.winners), 0) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestMuck)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestMuck, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + run() + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/muck.py ) ; ( cd ../tests ; make TESTS='muck.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/positions.py +++ poker-engine-1.3.6/tests/positions.py @@ -0,0 +1,302 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from string import split +import unittest +from pokerengine.pokergame import PokerGameServer, PokerGameClient, PokerGame +from pokerengine.pokercards import PokerCards +from pokereval import PokerEval + +poker_eval = PokerEval() +_initial_money = 1000 + +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + +class TestPosition(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + predefined_decks = [ + "8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6h Ah 6d As 3h 8s", # distributed from the end + ] + self.game.shuffler = PokerPredefinedDecks(map(lambda deck: self.game.eval.string2card(split(deck)), predefined_decks)) + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_cards(self, *args): + return PokerCards(poker_eval.string2card(args)) + + def make_new_player(self, i, initial_money = _initial_money): + self.assert_(self.game.addPlayer(i)) + player = self.game.serial2player[i] + player.money = initial_money + player.buy_in_payed = True + self.assert_(self.game.sit(i)) + player.auto_blind_ante = True + + def test1(self): + """ + Five players, they check/call during rounds and start over. + + Players + serials 1 2 3 4 5 + seats 0 1 2 3 4 + positions 0 1 2 3 4 + """ + game = self.game + player = {} + for serial in xrange(1,6): + player[serial] = serial - 1 + self.make_new_player(serial) + + # + # First turn, everyone checks and stays in game + # + game.beginTurn(1) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[1]) # dealer + self.assertEqual(game.last_to_talk, player[3]) # big blind + + for serial in (4, 5, 1, 2): + self.assertEqual(game.position, player[serial]) + game.call(serial) + + self.assertEqual(game.position, player[3]) + game.check(3) # big blind + + for stage in ("flop", "turn", "river"): + self.assertEqual(game.state, stage) + for serial in (2, 3, 4, 5, 1): + self.assertEqual(game.position, player[serial]) + game.check(serial) + self.assertEqual(game.state, "end") + + # + # Second turn, everyone folds games end prematurely + # + game.beginTurn(2) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[2]) # dealer + self.assertEqual(game.last_to_talk, player[4]) # big blind + for serial in (5, 1, 2, 3): + self.assertEqual(game.position, player[serial]) + self.assertEqual(game.fold(serial), True) + self.assertEqual(game.state, "end") + # + # Third turn, a new player comes in during the turn, two + # players in game. The new player is ignored. + # + game.beginTurn(3) + self.make_new_player(6) + player[6] = 5 + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[3]) # dealer + self.assertEqual(game.last_to_talk, player[5]) # big blind + self.assertEqual(game.position, player[1]) + game.call(1) + for serial in (2, 3, 4): + self.assertEqual(game.position, player[serial]) + game.fold(serial) + self.assertEqual(game.position, player[5]) + game.check(5) + for stage in ("flop", "turn", "river"): + self.assertEqual(game.state, stage) + self.assertEqual(game.position, player[5]) # next to the dealer is gone, therefore it's the next to him + for serial in (5, 1): + self.assertEqual(game.position, player[serial]) + game.check(serial) + self.assertEqual(game.state, "end") + # + # Fourth turn, we now have six players in game, the + # newcomer pays the big blind + # + game.beginTurn(4) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[4]) # dealer + self.assertEqual(game.last_to_talk, player[6]) # big blind + self.assertEqual(game.position, player[1]) + game.call(1) + for serial in (2, 3, 4, 5): + self.assertEqual(game.position, player[serial]) + game.fold(serial) + self.assertEqual(game.position, player[6]) + game.check(6) + for stage in ("flop", "turn", "river"): + self.assertEqual(game.state, stage) + self.assertEqual(game.position, player[6]) # next to the dealer is gone, therefore it's the next to him + for serial in (6, 1): + self.assertEqual(game.position, player[serial]) + game.check(serial) + self.assertEqual(game.state, "end") + # + # Fifth turn, a player (the dealer) leaves in the middle + # of the game, auto_play takes over. + # + game.beginTurn(5) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[5]) # dealer + self.assertEqual(game.last_to_talk, player[1]) # big blind + for serial in (2, 3): + self.assertEqual(game.position, player[serial]) + game.fold(serial) + game.removePlayer(5) + game.autoPlayer(5) + for serial in (4, 6): + self.assertEqual(game.position, player[serial]) + game.call(serial) + self.assertEqual(game.position, player[1]) + game.check(1) + for stage in ("flop", "turn", "river"): + self.assertEqual(game.state, stage) + self.assertEqual(game.last_to_talk, player[4]) + self.assertEqual(game.position, player[6]) # next to the dealer is gone, therefore it's the next to him + for serial in (6, 1, 4): + self.assertEqual(game.position, player[serial]) + game.check(serial) + self.assertEqual(game.state, "end") + # + # Sixth turn, everyone folds and game ends prematurely. + # player[5] is gone for good, discarded at the end of the + # previous turn. + # + player[6] -= 1 + game.beginTurn(6) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[6]) # dealer + self.assertEqual(game.last_to_talk, player[2]) # big blind + for serial in (3, 4, 6, 1): + self.assertEqual(game.position, player[serial]) + game.fold(serial) + self.assertEqual(game.state, "end") + # + # Seventh turn, the dealer passes to player[1] again + # + game.beginTurn(7) + self.assertEqual(game.state, "pre-flop") + self.assertEqual(game.dealer, player[1]) # dealer + self.assertEqual(game.last_to_talk, player[3]) # big blind + for serial in (4, 6, 1, 2): + self.assertEqual(game.position, player[serial]) + game.fold(serial) + self.assertEqual(game.state, "end") + + def test2(self): + """ + getRequestedAction and setPlayerBlind tests + """ + game = self.game + for serial in xrange(1,5): + self.failUnless(game.addPlayer(serial)) + self.failUnless(game.payBuyIn(serial, game.maxBuyIn())) + self.failUnless(game.sit(serial)) + self.failUnless(game.addPlayer(5)) + self.assertEqual(game.getRequestedAction(5), "buy-in") + self.failUnless(game.payBuyIn(5, game.maxBuyIn())) + self.assertEqual(game.getRequestedAction(5), None) + game.getPlayer(5).money= 1 + self.assertEqual(game.getRequestedAction(5), "rebuy") + self.failUnless(game.rebuy(5, game.bestBuyIn())) + self.assertEqual(game.getRequestedAction(5), None) + self.failUnless(game.sit(5)) + # + # turn 1 + # + game.beginTurn(8) + self.assertEqual(game.state, "blindAnte") + self.assertEqual(game.getRequestedAction(2), "blind_ante") + (amount, dead, state) = game.blindAmount(2) + game.blind(2, amount, dead) + self.assertEqual(game.getRequestedAction(3), "blind_ante") + (amount, dead, state) = game.blindAmount(3) + game.blind(3, amount, dead) + self.assertEqual(game.getRequestedAction(4), "play") + for serial in xrange(1,6): + game.botPlayer(serial) + # + # turn 2,3,4 + # + self.failUnless(game.sitOut(4)) + game.beginTurn(9) + game.beginTurn(10) + game.beginTurn(11) + for serial in xrange(1,6): + game.interactivePlayer(serial) + # + # player 4 back in the game must pay the big blind + # + self.failUnless(game.sit(4)) + game.beginTurn(12) + self.assertEqual(game.state, "blindAnte") + self.assertEqual(game.getRequestedAction(2), "blind_ante") + (amount, dead, state) = game.blindAmount(2) + game.blind(2, amount, dead) + self.assertEqual(game.getRequestedAction(3), "blind_ante") + (amount, dead, state) = game.blindAmount(3) + game.blind(3, amount, dead) + self.assertEqual(game.getRequestedAction(4), "blind_ante") + game.setPlayerBlind(4, "big_and_dead") + self.assertEqual(game.getRequestedAction(4), "blind_ante") + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestPosition)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestPosition, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/positions.py ) ; ( cd ../tests ; make TESTS='positions.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/run +++ poker-engine-1.3.6/tests/run @@ -0,0 +1,82 @@ +#!/bin/sh +# +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# Henry Precheur (2004) +# +# +set -e + +: ${srcdir:=.} +export srcdir +: ${top_srcdir:=..} +export top_srcdir + +#DEFAULT_VERBOSE_T=-1 # show the test results automake level, hide error messages +#DEFAULT_VERBOSE_T=0 # show the test results unittest level, hide informative messages +DEFAULT_VERBOSE_T=3 # show very detailed information about everything (~2MB output 2006/07) + +: ${VERBOSE_T:=$DEFAULT_VERBOSE_T} + +export VERBOSE_T + +# build context for i18n testing +mkdir -p ./tmp/fr/LC_MESSAGES/ +msgfmt ../po/fr.po -o ./tmp/fr/LC_MESSAGES/poker-engine.mo + +DEFAULT_COVERAGE_FILES=$(echo ${top_srcdir}/pokerengine/*.py) +: ${COVERAGE_FILES:=$DEFAULT_COVERAGE_FILES} + +case "$1" in + +*coverage-reset) /usr/bin/python ${srcdir}/coverage.py -e ;; + +*coverage-report) + output=$( /usr/bin/python ${srcdir}/coverage.py -m -r ${COVERAGE_FILES} ) + rm -fr annotated ; mkdir annotated + /usr/bin/python ${srcdir}/coverage.py -a -d annotated ${COVERAGE_FILES} + echo "$output" + # + # Don't bark on coverage being incomplete when not verbose : + # print statements are omited. + # + if test "$VERBOSE_T" == "3" ; then + if ! echo "$output" | grep 'TOTAL.*100%' > /dev/null ; then + echo 'FAIL: tests do not cover 100% of the poker-engine code' + exit 1 + fi + fi + ;; + +*.py) /usr/bin/python -u ${srcdir}/coverage.py -x "$1" ;; + +*) + echo unknown test $1 + exit 1 + ;; +esac + +# remove i18n testing context +rm -fr ./tmp --- poker-engine-1.3.6.orig/tests/sit.py +++ poker-engine-1.3.6/tests/sit.py @@ -0,0 +1,154 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +from pprint import pprint +import unittest +from pokerengine.pokergame import PokerGameServer + +class TestSit(unittest.TestCase): + + def setUp(self): + self.game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setVariant("holdem") + self.game.setBettingStructure("2-4-limit") + + def tearDown(self): + del self.game + + def log(self, string): + print string + + def make_new_player(self, serial, seat): + game = self.game + self.failUnless(game.addPlayer(serial, seat)) + self.failUnless(game.payBuyIn(serial, game.bestBuyIn())) + self.failUnless(game.sit(serial)) + + def pay_blinds(self): + game = self.game + for serial in game.serialsAll(): + game.autoBlindAnte(serial) + for serial in game.serialsAll(): + game.noAutoBlindAnte(serial) + + def bot_players(self): + game = self.game + for serial in game.serialsAll(): + game.botPlayer(serial) + + def check_blinds(self, descriptions): + players = self.game.playersAll() + players.sort(lambda a,b: int(a.seat - b.seat)) + for player in players: + (blind, missed, wait) = descriptions.pop(0) + if(blind != player.blind or missed != player.missed_blind or wait != player.wait_for): + print "check_blinds FAILED actual %s != from expected %s" % ( (player.blind, player.missed_blind, player.wait_for), (blind, missed, wait) ) + self.fail() + + + def test1_player_arrive_during_blinds(self): + for (serial, seat) in ((1, 0), (2, 1)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + # + # New player comes in while others are paying the blinds. + # He does not participate in the game. + # + for (serial, seat) in ((3, 2),): + self.make_new_player(serial, seat) + self.pay_blinds() + self.assertEqual(self.game.player_list, [1,2]) + self.bot_players() + + # + # Next round the new player is waiting for the late blind + # + self.game.beginTurn(2) + self.assertEqual(self.game.player_list, [1,2]) + self.pay_blinds() + + # + # This round the new player is in + # + self.game.beginTurn(3) + self.assertEqual(self.game.player_list, [1,2,3]) + self.pay_blinds() + + def test2_player_sitout_during_blinds(self): + for (serial, seat) in ((1, 0), (2, 1), (3, 2)): + self.make_new_player(serial, seat) + self.game.beginTurn(1) + # + # player 1 deals + # player 2 small blind + # player 3 big blind + # + # player 3 sits out while player 2 is in position : she is + # marked as sit_out_next_turn because she is not in position + # + self.assertEqual(2, self.game.getSerialInPosition()) + self.game.sitOutNextTurn(3) + player3 = self.game.getPlayer(3) + self.assertEqual("big", player3.blind) + self.failUnless(player3.isSit()) + self.assertEqual(True, player3.sit_out_next_turn) + # + # player 3 sits back and because she is sit_out_next_turn, + # which can only happen in the blind/ante round if she + # sat out after being included in the player list for the + # turn, she is sit. By contrast, if she had been sit + # during the blind/ante turn, she would have been marked + # wait_for = "first_round" + # + self.game.sit(3) + self.assertEqual(False, player3.sit_out_next_turn) + self.assertEqual(False, player3.wait_for) + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestSit)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestSit, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/sit.py ) ; ( cd ../tests ; make TESTS='sit.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-game.py +++ poker-engine-1.3.6/tests/test-game.py @@ -0,0 +1,5820 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import shutil +import platform +import libxml2 +import time +import string +import tempfile +import math +from types import * + +from pokerengine import pokercards +from pokerengine import pokergame + +CallbackIds = None +CallbackArgs = None + +# --------------------------------------------------------- +def InitCallback(): + global CallbackIds + global CallbackArgs + + CallbackIds = None + CallbackArgs = None + +# --------------------------------------------------------- +def Callback(id, *args): + global CallbackIds + global CallbackArgs + + if not CallbackIds: CallbackIds = [] + if not CallbackArgs: CallbackArgs = [] + + CallbackIds.append(id) + CallbackArgs.append(args) + +# --------------------------------------------------------- +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + +# --------------------------------------------------------- +class PokerGameTestCase(unittest.TestCase): + + TestConfDirectory = './test-data/conf' + + TestVariantInvalidFile = 'unittest.variant.invalid.xml' + TestVariantTemplateFile = 'unittest.variant.template.xml' + TestConfigTemplateFile = 'unittest.config.template.xml' + TestLevelsTemplateFile = 'unittest.levels.template.xml' + + TestUrl = 'unittest.%s.xml' + + TestConfigTemporaryFile = 'config' + TestVariantTemporaryFile = 'variant' + + # --------------------------------------------------------- + def setUp(self): + self.VariantInvalidFile = os.path.join(PokerGameTestCase.TestConfDirectory, PokerGameTestCase.TestVariantInvalidFile) + self.ConfigTmplFile = os.path.join(PokerGameTestCase.TestConfDirectory, PokerGameTestCase.TestConfigTemplateFile) + self.VariantTmplFile = os.path.join(PokerGameTestCase.TestConfDirectory, PokerGameTestCase.TestVariantTemplateFile) + self.LevelsTmplFile = os.path.join(PokerGameTestCase.TestConfDirectory, PokerGameTestCase.TestLevelsTemplateFile) + + self.ConfigTempFile = os.path.join(tempfile.gettempdir(), PokerGameTestCase.TestUrl % PokerGameTestCase.TestConfigTemporaryFile) + self.VariantTempFile = os.path.join(tempfile.gettempdir(), PokerGameTestCase.TestUrl % PokerGameTestCase.TestVariantTemporaryFile) + + self.CreateGameServer() + self.InitGame() + InitCallback() + + # --------------------------------------------------------- + def tearDown(self): + self.DeleteFile(self.ConfigTempFile) + self.DeleteFile(self.VariantTempFile) + + # --------------------------------------------------------- + def testUniq(self): + """Test Poker Game : Uniq""" + + self.failUnlessEqual(pokergame.uniq([1, 4, 4, 7]).sort(), [1, 4, 7].sort()) + self.failUnlessEqual(pokergame.uniq([1, 4, 4, 7, 3, 3, 3, 9, 7]).sort(), [1, 3, 4, 7, 9].sort()) + + # --------------------------------------------------------- + def testPokerRandom(self): + """Test Poker Game : Poker Random""" + + # Only available on unix like systems + if os.name != "posix": return + + # Standard random dev + random1 = pokergame.PokerRandom(False) + # Paranoid random dev + random2 = pokergame.PokerRandom(True) + + # These functions are not implemented + self.failUnlessEqual(random1.getstate(), None) + self.failUnlessEqual(random1.setstate('Ignore'), None) + self.failUnlessEqual(random1.jumpahead('Ignore'), None) + + # Re open the random dev + random1.seed(None) + random2.seed(None) + + numbers1 = [] + numbers2 = [] + for num in range(20): + numbers1.append(random1.random()) + numbers2.append(random2.random()) + + # All the numbers should be different + pokergame.uniq(numbers1) + pokergame.uniq(numbers2) + + self.failUnlessEqual(len(numbers1), 20) + self.failUnlessEqual(len(numbers2), 20) + + # --------------------------------------------------------- + def testGetSerialByNameNoCase(self): + """Test Poker Game : Get serial by name no case sensitive""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Set the player's name + player1.name = 'Player1' + player2.name = 'Player2' + + # Seach player by his name (no case sensitive) + self.failUnlessEqual(self.game.getSerialByNameNoCase('player1'), 1) + self.failUnlessEqual(self.game.getSerialByNameNoCase('pLaYEr2'), 2) + self.failUnlessEqual(self.game.getSerialByNameNoCase('unknown'), 0) + + # --------------------------------------------------------- + def testSetPosition(self): + """Test Poker Game : Set position""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Position initially set to 0 + self.failUnlessEqual(self.game.position, 0) + + # The game is not running, the set position function is not avalaible + self.failIf(self.game.isRunning()) + self.game.setPosition(5) + self.failUnlessEqual(self.game.position, 0) + + # Blind and ante turn + self.game.forced_dealer_seat = 2 + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The game is running, the set position function is available + self.failUnless(self.game.isRunning()) + self.game.setPosition(2) + self.failUnlessEqual(self.game.position, 2) + self.failUnlessEqual(self.game.getSerialInPosition(), 3) + + # Invalid position + self.game.setPosition(-1) + self.failUnlessEqual(self.game.getSerialInPosition(), 0) + + # --------------------------------------------------------- + def testPokerGameSetInvalidMaxPlayer(self): + """Test Poker Game : Set an invalid number max of player""" + + # The minimum number of player is 2 + self.game.setMaxPlayers(0) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + self.failUnlessEqual(self.game.seatsCount(), 0) + + self.game.setMaxPlayers(1) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + self.failUnlessEqual(self.game.seatsCount(), 0) + + # The maximum number of player is sepcified by the ABSOLUTE_MAX_PLAYERS constant + self.game.setMaxPlayers(pokergame.ABSOLUTE_MAX_PLAYERS + 1) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + self.failUnlessEqual(self.game.seatsCount(), 0) + + # --------------------------------------------------------- + def testPokerGameSetValidMaxPlayer(self): + """Test Poker Game : Set a valid number max of player""" + + # Test all the valid numbers of player + for num in range(2,pokergame.ABSOLUTE_MAX_PLAYERS): + self.game.setMaxPlayers(num) + self.failUnlessEqual(self.game.seatsLeftCount(), num) + self.failUnlessEqual(self.game.seatsCount(), num) + + # --------------------------------------------------------- + def testSetSeats(self): + """Test Poker Game : Set seats""" + + # Set the number maximum of players, the available seats are [1, 3, 6, 8] + self.game.setMaxPlayers(4) + + # Create players + for player in range(1, 5): + player = self.AddPlayerAndSit(player) + + # Set the seats of all the players + seats = [0] * pokergame.ABSOLUTE_MAX_PLAYERS + + seats[1] = 1 + seats[3] = 3 + seats[6] = 4 + seats[8] = 2 + + self.game.setSeats(seats) + self.failUnlessEqual(self.GetPlayer(1).seat, 1) + self.failUnlessEqual(self.GetPlayer(2).seat, 8) + self.failUnlessEqual(self.GetPlayer(3).seat, 3) + self.failUnlessEqual(self.GetPlayer(4).seat, 6) + + # Set the seats of all the players + # The seat of the player 3 is not available + seats = [0] * pokergame.ABSOLUTE_MAX_PLAYERS + + seats[1] = 1 + seats[4] = 3 + seats[6] = 4 + seats[8] = 2 + + self.game.setSeats(seats) + self.failUnlessEqual(self.GetPlayer(3).seat, -1) + + # --------------------------------------------------------- + def testPokerGameOpen(self): + """Test Poker Game : Open and close""" + + self.failUnlessEqual(self.game.is_open, True) + self.game.close() + self.failUnlessEqual(self.game.is_open, False) + self.game.open() + self.failUnlessEqual(self.game.is_open, True) + + # --------------------------------------------------------- + def testPokerGameCanAddPlayer(self): + """Test Poker Game : Can add player""" + + # The player can be added to the game + self.failUnless(self.game.canAddPlayer(1)) + + # No player can be added if the game is closed + self.game.close() + self.failIf(self.game.canAddPlayer(2)) + + # Player can be added if the game is opened + self.game.open() + self.failUnless(self.game.canAddPlayer(2)) + + # --------------------------------------------------------- + def testPokerGameAddPlayerWithoutSelectedSeat(self): + """Test Poker Game : Add a player without a selected seat""" + + # Add a new player + self.failUnless(self.game.addPlayer(1)) + self.failUnless(self.game.isSeated(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add the same player + self.failIf(self.game.addPlayer(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Add a new player + self.failUnless(self.game.addPlayer(2)) + self.failUnless(self.game.isSeated(2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + + # Try to add new one but there is no seat left + self.failIf(self.game.addPlayer(3)) + self.failIf(self.game.isSeated(3)) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + + # --------------------------------------------------------- + def testPokerGameAddPlayerWithSelectedSeat(self): + """Test Poker Game : Add a player with a selected seat""" + + # Add a player on the seat 2 + self.failUnless(self.game.addPlayer(1,2)) + self.failUnless(self.game.isSeated(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add the same player on the same seat + self.failUnless(self.game.addPlayer(1,2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add the same player on another seat + self.failIf(self.game.addPlayer(1,7)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add a new player on an invalid seat + self.failIf(self.game.addPlayer(2,3)) + self.failIf(self.game.isSeated(2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add a new player on an unavailable seat + self.failIf(self.game.addPlayer(2,2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Add a player on the seat 7 + self.failUnless(self.game.addPlayer(2,7)) + self.failUnless(self.game.isSeated(2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + + # --------------------------------------------------------- + def testPokerGameAddPlayerClientGame(self): + """Test Poker Game : Add a player client game""" + + # Create a client game + self.CreateGameClient() + self.InitGame() + + # Try to add a new player without a selected seat + self.failIf(self.game.addPlayer(1)) + self.failIf(self.game.isSeated(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 2) + + # Add a player on the seat 2 + self.failUnless(self.game.addPlayer(1,2)) + self.failUnless(self.game.isSeated(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add the same player on the same seat + self.failUnless(self.game.addPlayer(1,2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add the same player on another seat + self.failIf(self.game.addPlayer(1,7)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add a new player on an invalid seat + self.failIf(self.game.addPlayer(2,3)) + self.failIf(self.game.isSeated(2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Try to add a new player on an unavailable seat + self.failIf(self.game.addPlayer(2,2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Add a player on the seat 7 + self.failUnless(self.game.addPlayer(2,7)) + self.failUnless(self.game.isSeated(2)) + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + + # --------------------------------------------------------- + def testPokerGameGetPlayer(self): + """Test Poker Game : Get player""" + + self.failUnlessEqual(self.game.serialsAll(), []) + self.failUnlessEqual(self.game.playersAll(), []) + self.failUnlessEqual(self.game.allCount(), 0) + + self.failUnless(self.game.addPlayer(1)) + player = self.GetPlayer(1) + self.failUnlessEqual(self.game.getPlayer(2), None) + + self.failUnlessEqual(self.game.serialsAll(), [1]) + self.failUnlessEqual(self.game.playersAll(), [player]) + self.failUnlessEqual(self.game.allCount(), 1) + + # --------------------------------------------------------- + def testPokerGameSeats(self): + """Test Poker Game : Seats""" + + seats = self.game.seats() + for seat in seats: + self.failUnlessEqual(seats[seat], 0) + + self.failUnlessEqual(self.game.addPlayer(1, 2), True) + self.failUnlessEqual(self.game.addPlayer(2, 7), True) + + seats = self.game.seats() + self.failUnlessEqual(seats[2], 1) + self.failUnlessEqual(seats[7], 2) + + # --------------------------------------------------------- + def testPokerGamePlayerCanComeBack(self): + """Test Poker Game : Player can come back""" + + # Unknown player + self.failIf(self.game.canComeBack(1)) + self.failIf(self.game.comeBack(1)) + + # Add a new player + player1 = self.AddPlayerAndSit(1, 2) + + # Initially the player are connected and not auto + self.failIf(self.game.canComeBack(1)) + self.failIf(self.game.comeBack(1)) + + # Player disconnected + player1.remove_next_turn = True + self.failUnlessEqual(self.game.serialsDisconnected(), [1]) + + # The player can now come back + self.failUnless(self.game.canComeBack(1)) + self.failUnless(self.game.comeBack(1)) + + # The player is now in the game + self.failIf(self.game.canComeBack(1)) + self.failIf(player1.remove_next_turn) + self.failIf(player1.sit_out_next_turn) + self.failIf(player1.sit_requested) + self.failIf(player1.auto) + + # The player is an automatic player + player1.auto = True + self.failUnless(player1.isAuto()) + + # The player now can come back + self.failUnless(self.game.canComeBack(1)) + self.failUnless(self.game.comeBack(1)) + + # The player is now in the game + self.failIf(self.game.canComeBack(1)) + self.failIf(player1.remove_next_turn) + self.failIf(player1.sit_out_next_turn) + self.failIf(player1.sit_requested) + self.failIf(player1.auto) + + # --------------------------------------------------------- + def testPokerGameSitPlayer(self): + """Test Poker Game : Player sit""" + + self.failUnlessEqual(self.game.sitCount(), 0) + self.failUnlessEqual(self.game.serialsSit(), []) + self.failUnlessEqual(self.game.playersSit(), []) + + self.failUnlessEqual(self.game.sitOutCount(), 0) + self.failUnlessEqual(self.game.serialsSitOut(), []) + self.failUnlessEqual(self.game.playersSitOut(), []) + + self.failUnlessEqual(self.game.addPlayer(1), True) + + player = self.GetPlayer(1) + + self.failUnlessEqual(self.game.sitCount(), 0) + self.failUnlessEqual(self.game.serialsSit(), []) + self.failUnlessEqual(self.game.playersSit(), []) + + self.failUnlessEqual(self.game.sitOutCount(), 1) + self.failUnlessEqual(self.game.serialsSitOut(), [1]) + self.failUnlessEqual(self.game.playersSitOut(), [player]) + + player.sit_out = False + self.failUnlessEqual(self.game.sitCount(), 1) + self.failUnlessEqual(self.game.serialsSit(), [1]) + self.failUnlessEqual(self.game.playersSit(), [player]) + + self.failUnlessEqual(self.game.sitOutCount(), 0) + self.failUnlessEqual(self.game.serialsSitOut(), []) + self.failUnlessEqual(self.game.playersSitOut(), []) + + # --------------------------------------------------------- + def testPokerGameCallback(self): + """Test Poker Game : Callback""" + + # No callback registered + InitCallback() + self.game.runCallbacks('Args1', 'Args2') + self.failUnlessEqual(len(self.game.callbacks), 0) + self.failUnlessEqual(CallbackIds, None) + self.failUnlessEqual(CallbackArgs, None) + + # Register a callback + InitCallback() + self.game.registerCallback(Callback) + self.game.runCallbacks('Args1', 'Args2') + self.failUnlessEqual(len(self.game.callbacks), 1) + self.failUnlessEqual(CallbackIds, [self.game.id]) + self.failUnlessEqual(CallbackArgs, [('Args1', 'Args2')]) + + # Unregister the previous callback + InitCallback() + self.game.unregisterCallback(Callback) + self.game.runCallbacks('Args1', 'Args2') + self.failUnlessEqual(len(self.game.callbacks), 0) + self.failUnlessEqual(CallbackIds, None) + self.failUnlessEqual(CallbackArgs, None) + + # --------------------------------------------------------- + def testPokerGameBettingStructure(self): + """Test Poker Game : Initialisation of the betting structure""" + + self.failUnlessEqual(self.game.getBettingStructureName(), 'Bet Description') + self.failUnlessEqual(self.game.buyIn(), 50) + self.failUnlessEqual(self.game.maxBuyIn(), 10000) + self.failUnlessEqual(self.game.bestBuyIn(), 1600) + self.failUnlessEqual(self.game.getChipUnit(), 300) + + bet_properties = { 'buy-in' : '100', + 'max-buy-in' : '20000', + 'best-buy-in' : '1000', + 'unit' : '600' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, bet_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.buyIn(), 100) + self.failUnlessEqual(self.game.maxBuyIn(), 20000) + self.failUnlessEqual(self.game.bestBuyIn(), 1000) + self.failUnlessEqual(self.game.getChipUnit(), 600) + + rounds_properties = [ \ + { 'name' : 'pre-flop', \ + 'cap' : 3 \ + }, \ + { 'name' : 'flop', \ + 'cap' : sys.maxint \ + }, \ + { 'name' : 'turn', \ + 'cap' : sys.maxint \ + }, \ + { 'name' : 'river', \ + 'cap' : 3 \ + } \ + ] + + self.failUnlessEqual(len(self.game.bet_info), len(rounds_properties)) + + self.game.current_round = 0 + for round_properties in rounds_properties: + for property, value in round_properties.items(): + self.failUnlessEqual(self.game.betInfo()[property], value) + + self.game.current_round += 1 + + # --------------------------------------------------------- + def testPokerGameBlindBettingStructure(self): + """Test Poker Game : Initialisation of the blind betting structure""" + + self.failUnlessEqual(self.game.smallBlind(), 500) + self.failUnlessEqual(self.game.bigBlind(), 1000) + + # Change the blind properties + blind_properties = { 'small' : '1000', + 'big' : '2000', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.smallBlind(), 1000) + self.failUnlessEqual(self.game.bigBlind(), 2000) + + # Change the blind properties + blind_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'small' : '2000', + 'big' : '4000' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.blind_info['small'], 2000) + self.failUnlessEqual(self.game.blind_info['small_reference'], 2000) + self.failUnlessEqual(self.game.blind_info['big'], 4000) + self.failUnlessEqual(self.game.blind_info['big_reference'], 4000) + + # Change the blind properties + blind_properties = { 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + levels_info = [ + { 'small' : 1000, 'big' : 1500, 'value' : 100, 'bring-in' : 150 }, + { 'small' : 1500, 'big' : 3000, 'value' : 150, 'bring-in' : 300 }, + { 'small' : 2500, 'big' : 5000, 'value' : 250, 'bring-in' : 500 } + ] + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.blind_info["levels"], levels_info) + + # --------------------------------------------------------- + def testPokerGameAnteBettingStructure(self): + """Test Poker Game : Initialisation of the ante betting structure""" + + # Change the ante properties + ante_properties = { 'value' : '200', + 'bring-in' : '1000', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.ante_info["value"], 200) + self.failUnlessEqual(self.game.ante_info["bring-in"] , 1000) + + # Change the ante properties + ante_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'value' : '50', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/ante', None, ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.ante_info['value'], 50) + self.failUnlessEqual(self.game.ante_info['value_reference'], 50) + self.failUnlessEqual(self.game.ante_info['bring-in'], 200) + self.failUnlessEqual(self.game.ante_info['bring-in_reference'], 200) + + # Change the ante properties + ante_properties = { 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + levels_info = [ + { 'small' : 1000, 'big' : 1500, 'value' : 100, 'bring-in' : 150 }, + { 'small' : 1500, 'big' : 3000, 'value' : 150, 'bring-in' : 300 }, + { 'small' : 2500, 'big' : 5000, 'value' : 250, 'bring-in' : 500 } + ] + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/ante', None, ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.ante_info["levels"], levels_info) + + # --------------------------------------------------------- + def testPokerGameGetLevelValues(self): + """Test Poker Game : Get level values""" + + # Change the blind properties + blind_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'small' : '2000', + 'big' : '4000' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the ante properties + ante_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'value' : '50', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Change double, check the blind and ante infos + for level in range(3): + blind_info, ante_info = self.game.getLevelValues(level) + + self.failUnlessEqual(blind_info['small'], 2000 * pow(2, level - 1)) + self.failUnlessEqual(blind_info['big'], 4000 * pow(2, level - 1)) + self.failUnlessEqual(ante_info['value'], 50 * pow(2, level - 1)) + self.failUnlessEqual(ante_info['bring-in'], 200 * pow(2, level - 1)) + + # Change the blind properties + blind_properties = { 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the ante properties + ante_properties = { 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/ante', None, ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Change levels, check the blind and ante infos + levels_info = [ + { 'small' : 1000, 'big' : 1500, 'value' : 100, 'bring-in' : 150 }, + { 'small' : 1500, 'big' : 3000, 'value' : 150, 'bring-in' : 300 }, + { 'small' : 2500, 'big' : 5000, 'value' : 250, 'bring-in' : 500 } + ] + + for level in range(3): + blind_info, ante_info = self.game.getLevelValues(level + 1) + + self.failUnlessEqual(blind_info['small'], levels_info[level]['small']) + self.failUnlessEqual(blind_info['big'], levels_info[level]['big']) + self.failUnlessEqual(ante_info['value'], levels_info[level]['value']) + self.failUnlessEqual(ante_info['bring-in'], levels_info[level]['bring-in']) + + # Change the blind properties + blind_properties = { 'change' : 'invalid' } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the ante properties + ante_properties = { 'change' : 'invalid' } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/ante', None, ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Change invalid, check the blind and ante infos + blind_info, ante_info = self.game.getLevelValues(0) + self.failUnlessEqual(blind_info, None) + self.failUnlessEqual(blind_info, ante_info) + + # --------------------------------------------------------- + def testPokerGameSetLevelValues(self): + """Test Poker Game : Set level values""" + + # Change the blind properties + blind_properties = { + 'change' : 'levels', + 'frequency' : '15', + 'unit' : 'minute', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the ante properties + ante_properties = { + 'change' : 'levels', + 'frequency' : '15', + 'unit' : 'minute', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Change the level and check the blind and ante infos + levels_info = [ + { 'small' : 1000, 'big' : 1500, 'value' : 100, 'bring-in' : 150 }, + { 'small' : 1500, 'big' : 3000, 'value' : 150, 'bring-in' : 300 }, + { 'small' : 2500, 'big' : 5000, 'value' : 250, 'bring-in' : 500 } + ] + + # Change the level and check + for level in range(3): + blind_info, ante_info = self.game.getLevelValues(level + 1) + + self.game.setLevel(level + 1) + self.failUnlessEqual(self.game.getLevel(), level + 1) + self.failUnlessEqual(self.game.blind_info['small'], blind_info['small']) + self.failUnlessEqual(self.game.blind_info['big'], blind_info['big']) + self.failUnlessEqual(self.game.ante_info['value'], ante_info['value']) + self.failUnlessEqual(self.game.ante_info['bring-in'], ante_info['bring-in']) + self.failUnlessEqual(self.game.blind_info['hands'], self.game.hands_count) + self.failUnlessEqual(self.game.blind_info['time'], self.game.time) + self.failUnlessEqual(self.game.ante_info['hands'], self.game.hands_count) + self.failUnlessEqual(self.game.ante_info['time'], self.game.time) + + # --------------------------------------------------------- + def testPokerGameSetVariantInvalid(self): + """Test Poker Game : Variant with invalid specifications""" + + if not self.CopyFile(self.VariantInvalidFile, self.VariantTempFile): + self.fail('Error during creation of variant file ' + self.VariantInvalidFile) + + self.failUnlessRaises(UserWarning, self.game.setVariant,PokerGameTestCase.TestVariantTemporaryFile) + + # --------------------------------------------------------- + def testPokerGameSetVariantWinnerOrder(self): + """Test Poker Game : Set variant winner order""" + + # The winner order is set to high in the self.VariantTmplFile file + self.failIf(self.game.isLow()) + self.failIf(self.game.hasLow()) + self.failUnless(self.game.isHigh()) + self.failUnless(self.game.hasHigh()) + self.failIf(self.game.isHighLow()) + + # Change the winner order to low + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/wins/winner', None, {'order' : 'low8'}): + self.fail('Error during modification of variant file ' + self.VariantTempFile) + + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # The winner order is now low + self.failUnless(self.game.isLow()) + self.failUnless(self.game.hasLow()) + self.failIf(self.game.isHigh()) + self.failIf(self.game.hasHigh()) + self.failIf(self.game.isHighLow()) + + # Invalid winner order + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/wins/winner', None, {'order' : 'invalid'}): + self.fail('Error during modification of variant file ' + self.VariantTempFile) + + # An exception is raised if the order is not low8 or hi + self.failUnlessRaises(UserWarning,self.game.setVariant, PokerGameTestCase.TestVariantTemporaryFile) + + # --------------------------------------------------------- + def testPokerGameSetVariantRoundInfos(self): + """Test Poker Game : Set variant round infos""" + + # 2 rounds in the template file + self.failUnlessEqual(len(self.game.round_info),4) + self.failUnlessEqual(len(self.game.round_info_backup),4) + + for round in range(len(self.game.round_info)): + self.failUnlessEqual(self.game.round_info[round],self.game.round_info_backup[round]) + + round1_info = { + 'name': 'pre-flop', + 'position': 'under-the-gun', + 'board': [], + 'board_size': 0, + 'hand_size': 2, + 'cards': ['down', 'down'] + } + + round2_info = { + 'name': 'flop', + 'position': 'next-to-dealer', + 'board': ['', '', ''], + 'board_size': 3, + 'hand_size': 2, + 'cards': [] + } + + self.failUnlessEqual(self.game.round_info[0], round1_info) + self.failUnlessEqual(self.game.round_info[1], round2_info) + + self.failUnlessEqual(self.game.round_info[0],self.game.round_info_backup[0]) + self.failUnlessEqual(self.game.round_info[1],self.game.round_info_backup[1]) + + # --------------------------------------------------------- + def testPokerGameResetRoundInfos(self): + """Test Poker Game : Reset round infos""" + + round1_info = { + 'name': 'pre-flop', + 'position': 'under-the-gun', + 'board': [], + 'board_size': 0, + 'hand_size': 2, + 'cards': ['down', 'down'] + } + + # The round info are loaded from the VariantTmplFile file + self.failUnlessEqual(self.game.round_info[0], round1_info) + + # Change all the round infos + self.game.round_info[0]['name'] = 'ModifiedRound' + self.game.round_info[0]['position'] = 'ModifiedPosition' + self.game.round_info[0]['board'] = ['ModifiedBoard'] + self.game.round_info[0]['board_size'] = 'ModifiedBoardSize' + self.game.round_info[0]['hand_size'] = 'ModifiedHandSize' + self.game.round_info[0]['cards'] = ['up'] + + # Restore the round backup + self.failIfEqual(self.game.round_info[0], round1_info) + self.game.resetRoundInfo() + self.failUnlessEqual(self.game.round_info[0], round1_info) + + # --------------------------------------------------------- + def testPokerGameLoadTournamentLevels(self): + """Test Poker Game : Load tournament levels""" + + # The levels are loaded from the LevelsTmplFile file + levels_info = [ + { 'small' : 1000, 'big' : 1500, 'value' : 100, 'bring-in' : 150 }, + { 'small' : 1500, 'big' : 3000, 'value' : 150, 'bring-in' : 300 }, + { 'small' : 2500, 'big' : 5000, 'value' : 250, 'bring-in' : 500 } + ] + + levels = self.game.loadTournamentLevels(self.LevelsTmplFile) + self.failUnlessEqual(levels, levels_info) + + # --------------------------------------------------------- + def testPokerGamePayBuyIn(self): + """Test Poker Game : Pay buy in""" + + self.failUnlessEqual(self.game.addPlayer(1), True) + player = self.GetPlayer(1) + + # Get the buy in values + self.failUnlessEqual(self.game.buyIn(), 50) + self.failUnlessEqual(self.game.maxBuyIn(), 10000) + self.failUnlessEqual(self.game.bestBuyIn(), 1600) + + # Can not pay more then the max buy in + self.failIf(self.game.payBuyIn(1,20000)) + self.failIf(player.isBuyInPayed()) + + # Can not pay less than the min buy in + self.failIf(self.game.payBuyIn(1,40)) + self.failIf(player.isBuyInPayed()) + + # Pay the buy in + self.failUnless(self.game.payBuyIn(1,100)) + self.failUnless(player.isBuyInPayed()) + self.failUnlessEqual(self.game.getPlayerMoney(1), 100) + + # The game in now a tournament, there is no maximum limit + + # Change the blind properties + blind_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'small' : '2000', + 'big' : '4000' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # The player can pay more than the max buy in + self.failUnless(self.game.payBuyIn(1,20000)) + self.failUnless(player.isBuyInPayed()) + self.failUnlessEqual(self.game.getPlayerMoney(1), 20000) + + # --------------------------------------------------------- + def testPokerGameSitRequested(self): + """Test Poker Game : Sit requested""" + + self.failUnlessEqual(self.game.addPlayer(1), True) + self.game.sitRequested(1) + player = self.GetPlayer(1) + + self.failUnlessEqual(player.isSitRequested(), True) + self.failUnlessEqual(player.isWaitForBlind(), False) + self.failUnlessEqual(player.sit_out_next_turn, False) + + # --------------------------------------------------------- + def testPokerGameSit(self): + """Test Poker Game : Sit""" + + self.failUnlessEqual(self.game.addPlayer(1), True) + player = self.GetPlayer(1) + self.failUnlessEqual(self.game.sit(1), False) + + self.failUnlessEqual(self.game.payBuyIn(1,self.game.bestBuyIn()), True) + self.failUnlessEqual(player.isBuyInPayed(), True) + + self.failUnlessEqual(self.game.sit(1), True) + + # --------------------------------------------------------- + def testPokerGameBuildPlayerList(self): + """Test Poker Game : Build player list""" + + player1 = self.AddPlayerAndSit(1, 7) + + self.failUnless(self.game.addPlayer(2, 2)) + self.failUnless(self.game.payBuyIn(2,self.game.bestBuyIn())) + + # Can not construct the player list because there is only one player sit + self.failIf(self.game.buildPlayerList(False)) + + # The player 2 is now sit + self.failUnlessEqual(self.game.sit(2), True) + + # The construction of the player list is now possible + self.failUnless(self.game.buildPlayerList(False)) + + # The players are ordered by his seat + self.failUnlessEqual(self.game.player_list, [2, 1]) + + # The player 1 is waiting for blind and first round + player1.wait_for = 'first_round' + self.failUnless(player1.isWaitForBlind()) + self.failUnless(self.game.buildPlayerList(False)) + self.failUnlessEqual(self.game.player_list, [2]) + + self.failUnless(self.game.buildPlayerList(True)) + self.failUnlessEqual(self.game.player_list, [2]) + + # The player 1 is only waiting for blind + player1.wait_for = 'big' + self.failUnless(player1.isWaitForBlind()) + self.failUnless(self.game.buildPlayerList(False)) + self.failUnlessEqual(self.game.player_list, [2]) + + self.failUnless(self.game.buildPlayerList(True)) + self.failUnlessEqual(self.game.player_list, [2, 1]) + + # --------------------------------------------------------- + def testMoveDealerLeft(self): + """Test Poker Game : Move dealer left""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The construction of the player list + self.failUnless(self.game.buildPlayerList(False)) + self.failUnlessEqual(self.game.player_list, [1, 2]) + + # The dealer is the player 1 + self.failUnlessEqual(self.game.dealer_seat, 2) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getPlayerDealer(), player1) + + # Move the dealer + self.game.moveDealerLeft() + + # The player 2 is now the dealer + self.failUnlessEqual(self.game.dealer_seat, 7) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getPlayerDealer(), player2) + + # Re init the game players + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # The construction of the player list + self.failUnless(self.game.buildPlayerList(False)) + self.failUnlessEqual(self.game.player_list, [1, 2, 3]) + + # The dealer is the player 1 + self.failUnlessEqual(self.game.dealer_seat, 2) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getPlayerDealer(), player1) + + # Move the dealer + player2.missed_blind = None + self.game.moveDealerLeft() + + # The player 2 is now the dealer + self.failUnlessEqual(self.game.dealer_seat, 5) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getPlayerDealer(), player2) + + # No blind info, nothing done + self.game.blind_info = None + player1.missed_blind = None + self.game.moveDealerLeft() + + # The player 2 is still the dealer + self.failUnlessEqual(self.game.dealer_seat, 5) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getPlayerDealer(), player2) + + # --------------------------------------------------------- + def testDealerFromDealerSeat(self): + """Test Poker Game : Dealer from dealer seat""" + + self.game.setMaxPlayers(3) + + self.failUnlessEqual(self.game.dealer, -1) + self.failUnlessEqual(self.game.dealer_seat, -1) + + self.game.dealerFromDealerSeat() + + # The dealer and his seat are not initialised + self.failUnlessEqual(self.game.dealer, -1) + self.failUnlessEqual(self.game.dealer_seat, -1) + + # Create player 1 + player1 = self.AddPlayerAndSit(1, 2) + + self.failUnlessEqual(self.game.dealer_seat, 2) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.dealer, -1) + + # Create player 2 + player2 = self.AddPlayerAndSit(2, 5) + + self.failUnlessEqual(self.game.dealer_seat, 2) + + # Construct the player list + self.failUnlessEqual(self.game.buildPlayerList(False), True) + self.failUnlessEqual(self.game.player_list, [1, 2]) + + # The dealer is the player 1 + self.failUnlessEqual(self.game.dealer_seat, 2) + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 1) + self.failUnlessEqual(self.game.getPlayerDealer(), player1) + + # Change the dealer seat + self.game.dealer_seat = 5 + + # The dealer is now the player 2 + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 2) + self.failUnlessEqual(self.game.getPlayerDealer(), player2) + + # Add a player but do not reconstruct the player list + player3 = self.AddPlayerAndSit(3) + + # Change the dealer seat + self.game.dealer_seat = 7 + + # The dealder is still the player 2 + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 2) + self.failUnlessEqual(self.game.getPlayerDealer(), player2) + + # --------------------------------------------------------- + def testSetDealer(self): + """Test Poker Game : Set dealer""" + + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Construct the player list + self.failUnless(self.game.buildPlayerList(False)) + + # The game is not running + self.failIf(self.game.isRunning()) + + # The dealer can be set because the game is not running + self.game.setDealer(7) + + # The dealer is the player 2 + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 2) + + # The dealer can be set because the game is not running + self.game.setDealer(2) + + # The dealer is the player 1 + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 1) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The game is now running + self.failUnless(self.game.isRunning()) + self.failUnlessEqual(self.game.getSerialDealer(), 1) + + # The set dealer function has no effect + self.game.setDealer(7) + + # The dealer is still the player 1 + self.game.dealerFromDealerSeat() + self.failUnlessEqual(self.game.getSerialDealer(), 1) + + # --------------------------------------------------------- + def testPokerGameMoney2Bet(self): + """Test Poker Game : Money to bet""" + + self.game.registerCallback(Callback) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Initial player money and bet + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + + # Transfert from money to bet + InitCallback() + self.game.money2bet(1, 500) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + self.failUnlessEqual(player1.bet, 500) + self.failUnlessEqual(player1.isAllIn(), False) + + # Check the callback + self.failUnlessEqual(CallbackIds, [self.game.id]) + self.failUnlessEqual(CallbackArgs, [('money2bet', 1, 500)]) + + # Initial player money and bet + InitCallback() + self.failUnlessEqual(player2.bet, 0) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1600) + + # Transfert from money to bet + self.game.money2bet(2, 2000) + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + self.failUnlessEqual(player2.bet, 1600) + self.failUnlessEqual(player2.isAllIn(), True) + + # Check the callback + self.failUnlessEqual(CallbackIds, [self.game.id, self.game.id]) + self.failUnlessEqual(CallbackArgs, [('money2bet', 2, 1600), ('all-in', 2)]) + + # --------------------------------------------------------- + def testNotFoldCount(self): + """Test Poker Game : Not fold count""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(self.game.notFoldCount(), 2) + self.failUnlessEqual(self.game.serialsNotFold(), [1, 2]) + self.failUnlessEqual(self.game.playersNotFold(), [player1, player2]) + + player1.fold = True + self.failUnlessEqual(self.game.notFoldCount(), 1) + self.failUnlessEqual(self.game.serialsNotFold(), [2]) + self.failUnlessEqual(self.game.playersNotFold(), [player2]) + + # --------------------------------------------------------- + def testPot2Money(self): + """Test Poker Game : Pot to money""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(self.game.getPlayerMoney(1), self.game.bestBuyIn()) + self.game.pot = 500 + self.game.pot2money(1) + self.failUnlessEqual(self.game.getPlayerMoney(1), self.game.bestBuyIn() + 500) + self.failUnlessEqual(self.game.pot, 0) + + # --------------------------------------------------------- + def testGetPotAmount(self): + """Test Poker Game : getPotAmount""" + + # Create players + player1 = self.AddPlayerAndSit(1) + player2 = self.AddPlayerAndSit(2) + + self.game.beginTurn(1) + self.failUnlessEqual(0 ,self.game.getPotAmount()) + + self.game.state = pokergame.GAME_STATE_END + self.failUnlessEqual(0 ,self.game.getPotAmount()) + + # --------------------------------------------------------- + def testCancelState(self): + """Test Poker Game : Cancel state""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + Attributes = { + 'current_round' : -2, + 'position' : -1, + 'state' : 'end' + } + + self.game.position = -1 + self.game.cancelState() + for key, value in Attributes.items(): + self.failUnlessEqual(getattr(self.game,key), value) + + self.game.position = 0 + self.game.turn_history = [] + self.game.cancelState() + + self.failUnlessEqual(self.game.turn_history, [('position', -1)] ) + + # --------------------------------------------------------- + def testHighestBet(self): + """Test Poker Game : Highest bet""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(player2.bet, 0) + player1.bet = 500 + self.failUnlessEqual(self.game.highestBetNotFold(), 500) + self.failUnlessEqual(self.game.highestBetInGame(), 500) + player2.bet = 1000 + self.failUnlessEqual(self.game.highestBetNotFold(), 1000) + self.failUnlessEqual(self.game.highestBetInGame(), 1000) + player2.fold = True + self.failUnlessEqual(self.game.highestBetNotFold(), 500) + self.failUnlessEqual(self.game.highestBetInGame(), 500) + player2.fold = False + player2.all_in = True + self.failUnlessEqual(self.game.highestBetNotFold(), 1000) + self.failUnlessEqual(self.game.highestBetInGame(), 500) + + # --------------------------------------------------------- + def testBetsEqual(self): + """Test Poker Game : Bets equal""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(player2.bet, 0) + player1.bet = 500 + self.failUnlessEqual(self.game.betsEqual(), False) + player2.bet = 500 + self.failUnlessEqual(self.game.betsEqual(), True) + player2.bet = 1000 + player2.all_in = True + self.failUnlessEqual(self.game.betsEqual(), False) + player2.fold = True + self.failUnlessEqual(self.game.betsEqual(), True) + player2.fold = False + player1.all_in = True + self.failUnlessEqual(self.game.betsEqual(), True) + + # --------------------------------------------------------- + def testCanCall(self): + """Test Poker Game : Can call""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + + self.failIf(self.game.canCall(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + player1.bet = 1000 + self.failUnless(self.game.canCall(2)) + player2.bet = 1500 + self.failIf(self.game.canCall(2)) + + # --------------------------------------------------------- + def testCall(self): + """Test Poker Game : Call""" + + self.game.setMaxPlayers(3) + + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.call(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + self.failIf(self.game.canAct(1)) + self.failIf(self.game.call(1)) + + # Deal cards + self.game.dealCards() + + self.failUnless(self.game.callNraise(1, 100)) + + self.failUnless(self.game.canAct(2)) + self.failIf(player2.talked_once) + + self.failUnless(self.game.call(2)) + + self.failUnlessEqual(player2.bet, 100) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1500) + self.failUnless(player2.talked_once) + + self.failUnless(self.game.canAct(3)) + + # --------------------------------------------------------- + def testCanCheck(self): + """Test Poker Game : Can check""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.canCheck(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + player1.bet = 1000 + player2.bet = 500 + self.failIf(self.game.canCheck(2)) + player2.bet = 1000 + self.failUnless(self.game.canCheck(2)) + player2.bet = 1500 + self.failUnless(self.game.canCheck(2)) + + # --------------------------------------------------------- + def testCheck(self): + """Test Poker Game : Check""" + + # Create Players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Check is not available during blind and ante round + self.failIf(self.game.check(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # Player 1 can now raise + self.failUnless(self.game.canAct(1)) + self.failUnless(self.game.callNraise(1, 100)) + + # Player 2 bet is less than the highest bet + self.failUnless(self.game.canAct(2)) + self.failIf(self.game.canCheck(2)) + self.failIf(self.game.check(2)) + + # Player 2 can now check + player2.bet = 100 + self.failUnless(self.game.canCheck(2)) + self.failIf(player2.talked_once) + + # Player 2 check + self.failUnless(self.game.check(2)) + + # Second round + self.failUnless(self.game.isSecondRound()) + + # --------------------------------------------------------- + def testCanFold(self): + """Test Poker Game : Can fold""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player can not fold + self.failIf(self.game.canFold(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # The player can now fold + self.failUnless(self.game.canFold(1)) + + # The player 2 is not in game so he can not fold + player2.all_in = True + self.failIf(self.game.isInGame(2)) + self.failIf(self.game.canFold(2)) + + # --------------------------------------------------------- + def testFold(self): + """Test Poker Game : Fold""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Player can not fold + self.failIf(self.game.fold(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Player 1 not in position + self.failIf(self.game.canAct(1)) + self.failIf(self.game.fold(1)) + + # Deal cards + self.game.dealCards() + + # Player 1 raise + self.failUnless(self.game.callNraise(1, 100)) + + # Player 2 already fold, the fold function has no effect + player2.fold = True + self.failUnless(self.game.canAct(2)) + self.failUnless(self.game.fold(2)) + self.failUnless(self.game.canAct(2)) + + # Player 2 fold + player2.fold = False + + player2.bet = 300 + self.failIf(player2.isFold()) + self.failUnless(self.game.canAct(2)) + + self.failUnless(self.game.fold(2)) + + self.failUnless(player2.isFold()) + self.failUnlessEqual(player2.bet, 0) + self.failUnlessEqual(self.game.pot, 300) + + # Player 3 can act + self.failUnless(self.game.canAct(3)) + + # --------------------------------------------------------- + def testCanRaise(self): + """Test Poker Game : Can raise""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.canRaise(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # The player can now raise + self.failUnless(self.game.canRaise(1)) + + self.game.round_cap_left = 0 + self.failIf(self.game.canRaise(1)) + self.game.round_cap_left = sys.maxint + + player1.bet = 1000 + player1.money = 600 + self.failUnless(self.game.canRaise(2)) + + player1.talked_once = False + self.failUnless(self.game.canRaise(1)) + player1.talked_once = True + self.failIf(self.game.canRaise(1)) + + player1.bet = player2.money + 1000 + self.failIf(self.game.canRaise(2)) + + player2.bet = 1600 + player2.money = 0 + self.failIf(self.game.canRaise(2)) + + # --------------------------------------------------------- + def testCallNRaise(self): + """Test Poker Game : Call N raise""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3 ,7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.canAct(1)) + self.failIf(self.game.callNraise(1, 100)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # The card are not dealt so the players can not act + self.failIf(self.game.canAct(1)) + self.failIf(self.game.callNraise(1, 100)) + + # Deal cards + self.game.dealCards() + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'min' : '100', 'max' : '300'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnlessEqual(self.game.betLimits(1), (100, 300 , 0)) + + self.failUnless(self.game.callNraise(1, 50)) + self.failUnlessEqual(player1.bet, 100) + self.failUnlessEqual(self.game.betLimits(2), (200, 400 , 100)) + + self.failUnless(self.game.canAct(2)) + + self.failUnless(self.game.callNraise(2, 500)) + self.failUnlessEqual(player2.bet, 400) + + self.failUnless(self.game.canAct(3)) + + self.game.round_cap_left = 0 + self.failIf(self.game.callNraise(3, 100)) + + self.game.round_cap_left = -1 + self.failIf(self.game.callNraise(3, 100)) + + # --------------------------------------------------------- + def testCanAct(self): + """Test Poker Game : Can act""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # It the blind and ante turn so the player can act + self.failUnless(self.game.canAct(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Can not act because the cards are not dealt + self.failIf(self.game.cardsDealt()) + self.failIf(self.game.canAct(1)) + + # Deal cards + self.game.dealCards() + + # The cards are now dealt so the player 1 can act + self.failUnless(self.game.cardsDealt()) + self.failUnless(self.game.canAct(1)) + + # The player 2 can not act because it is not its turn + self.failIfEqual(self.game.getSerialInPosition(), 2) + self.failIf(self.game.canAct(2)) + + self.game.callNraise(1, 1000) + + # The player 2 can now play + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + #self.game.setPosition(1) + self.failUnless(self.game.canAct(2)) + + # --------------------------------------------------------- + def testWillAct(self): + """Test Poker Game : Will act""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The game is not running + self.failIf(self.game.isRunning()) + self.failIf(self.game.willAct(1)) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + self.failUnless(self.game.isRunning()) + + # The player 1 can not call + self.failIf(self.game.canCall(1)) + self.failUnless(self.game.willAct(1)) + + # The player 1 raise + self.game.callNraise(1, 100) + + # The player 2 can call and will act + self.failUnless(self.game.canCall(2)) + self.failIf(player2.talked_once) + self.failUnless(self.game.willAct(2)) + + # The player 2 call + self.game.callNraise(2, 200) + + # The player 2 has talked so he won't act + self.failUnless(player2.talked_once) + self.failIf(self.game.willAct(2)) + + # --------------------------------------------------------- + def testPossibleActions(self): + """Test Poker Game : Possible actions""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # It is the blind and ante turn so there is no possible action + self.failUnless(self.game.canAct(1)) + self.failUnless(self.game.isBlindAnteRound()) + self.failUnlessEqual(self.game.possibleActions(1), []) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # The player 1 can raise or check + self.failUnless(self.game.canAct(1)) + self.failUnlessEqual(self.game.possibleActions(1), ['raise', 'check']) + + # The player 2 can not do anything because it is not its turn + self.failUnlessEqual(self.game.possibleActions(2), []) + + # The player 1 raise 1000 + self.game.callNraise(1, 1000) + + # The player 2 can now call, raise or fold + self.failUnlessEqual(self.game.possibleActions(2), ['call', 'raise', 'fold']) + + # The player 2 can not raise because he has not enough money + player1.bet = 1800 + self.failUnlessEqual(self.game.possibleActions(2), ['call', 'fold']) + + # --------------------------------------------------------- + def testBetsNull(self): + """Test Poker Game : Bets null""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Game is not running + self.failIf(self.game.betsNull()) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Game is running + self.failUnless(self.game.betsNull()) + + # The player 1 has bet + player1.bet = 1000 + self.failIf(self.game.betsNull()) + + # Th eplayer 1 is fold + player1.fold =True + self.failUnless(self.game.betsNull()) + + # --------------------------------------------------------- + def testRoundCap(self): + """Test Poker Game : Round cap""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Round cap is 0 because the game is not running + self.failIf(self.game.isRunning()) + self.failUnlessEqual(self.game.roundCap(), 0) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # The game is running + self.failUnless(self.game.isRunning()) + + # First round cap initially equal to 3 + self.failUnlessEqual(self.game.roundCap(), 3) + + # Change the cap of the first level + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round[@name="pre-flop"]', None, {'cap' : '20'}): + self.fail('Error during modification of variant file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # First round cap equal to 20 + self.failUnlessEqual(self.game.roundCap(), 20) + + # --------------------------------------------------------- + def testBetLimits(self): + """Test Poker Game : Bet limits""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The game is not running + self.failUnlessEqual(self.game.betLimits(1), 0) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # No limit set in the configuration file + player1.bet = 1000 + self.failUnlessEqual(self.game.betLimits(2), (1000, 1600 , 1000)) + + # MIN and MAX limits + # Change the bet infos + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'min' : '100', 'max' : '300'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Check the bet limits + self.failUnlessEqual(self.game.betLimits(2), (1100, 1300 , 1000)) + + + # MIN and POT limits + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'min' : 'big', 'max' : 'pot'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Check the bet limts + player1.bet = 400 + self.failUnlessEqual(self.game.betLimits(2), (1400, 1400, 400)) + + + # POW LEVEL limits + # Change the bet infos + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'pow_level' : '100'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Check the bet limits for level 0 + self.failUnlessEqual(self.game.getLevel(), 0) + self.failUnlessEqual(self.game.betLimits(2), (400 + 100 * math.pow(2,-1), 400 + 100 * math.pow(2,-1), 400)) + + + # FIXED limits + # Change the bet infos + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'fixed' : '100'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Check the bet limits + self.failUnlessEqual(self.game.betLimits(2), (500, 500, 400)) + + # ROUND CAP LEFT 0 + self.game.round_cap_left = 0 + + # Check the bet limits + self.failUnlessEqual(self.game.betLimits(2), (0, 0, 400)) + + # --------------------------------------------------------- + def testBestHand(self): + """Test Poker Game : Best hand""" + + player1 = self.AddPlayerAndSit(1, 2) + player1.hand = pokercards.PokerCards(['Ad', 'As', 'Ah', '3s']) + self.game.board = pokercards.PokerCards(['9d', '6s', 'Td', '4d', '4h']) + + self.failUnless(self.game.isHigh()) + + self.game.variant = 'holdem' + bestHand = pokercards.PokerCards(['Ad', 'Ah', 'As', '4d', '4h']) + hand = self.game.bestHand('hi', 1) + self.failUnlessEqual(pokercards.PokerCards(hand[1][1:]), bestHand) + self.failUnlessEqual(self.game.readablePlayerBestHand('hi', 1), 'Aces full of Fours: As, Ad, Ah, 4d, 4h') + + self.game.variant = 'omaha' + bestHand = pokercards.PokerCards(['Ad', 'Ah', '4d', '4h', 'Td']) + hand = self.game.bestHand('hi', 1) + self.failUnlessEqual(pokercards.PokerCards(hand[1][1:]), bestHand) + self.failUnlessEqual(self.game.readablePlayerBestHand('hi', 1), 'Two pairs Aces and Fours, Ten kicker: Ad, Ah, 4d, 4h, Td') + + value, cards = self.game.bestHand('hi', 1) + self.failUnlessEqual(self.game.bestHandValue('hi', 1), value) + self.failUnlessEqual(self.game.bestHandCards('hi', 1), cards) + + # --------------------------------------------------------- + def testBestHands(self): + """Test Poker Game : Best hands""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Players and board cards + player1.hand = pokercards.PokerCards(['Ad', 'As', 'Ah', '3s']) + player2.hand = pokercards.PokerCards(['Jh', '5c', '7d', '2d']) + self.game.board = pokercards.PokerCards(['9d', '6s', 'Td', '4d', '4h']) + + # Best hands + bestHand1 = pokercards.PokerCards(['Ad', 'Ah', 'As', '4d', '4h']) + bestHand2 = pokercards.PokerCards(['7d', '2d', '9d', 'Td', '4d']) + + self.game.variant = 'holdem' + self.failUnless(self.game.isHigh()) + + # Check best hands + results = self.game.bestHands([1, 2]) + + # Player 1 hand + self.failUnless(results.has_key(1)) + self.failUnless(results[1].has_key('hi')) + self.failUnlessEqual(pokercards.PokerCards(results[1]['hi'][1][1:]), bestHand1) + self.failUnlessEqual(self.game.readablePlayerBestHands(1), 'Aces full of Fours: As, Ad, Ah, 4d, 4h') + + # Player 2 hand + self.failUnless(results.has_key(2)) + self.failUnless(results[2].has_key('hi')) + self.failUnlessEqual(pokercards.PokerCards(results[2]['hi'][1][1:]), bestHand2) + self.failUnlessEqual(self.game.readablePlayerBestHands(2), 'Flush Ten high: Td, 9d, 7d, 4d, 2d') + + # Then hand with a NOCARD can not be evaluate + player1.hand = pokercards.PokerCards(['Jh', '5c', '7d', pokercards.PokerCards.NOCARD]) + results = self.game.bestHands([1]) + self.failUnlessEqual(len(results), 0) + + # --------------------------------------------------------- + def testBestHandsHoldemFlopStreet(self): + """Test Poker Game : Best hands, holdem viariant, flop street""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Players and board cards + player1.hand = pokercards.PokerCards(['Ad', 'As']) + player2.hand = pokercards.PokerCards(['Jh', '5c']) + self.game.board = pokercards.PokerCards(['9d', '6s', 'Td']) + + self.game.variant = 'holdem' + self.failUnless(self.game.isHigh()) + + # Player 1 hand + self.failUnlessEqual(self.game.readablePlayerBestHands(1), 'A pair of Aces, Ten kicker: As, Ad, Td, 9d, 6s') + + # Player 2 hand + self.failUnlessEqual(self.game.readablePlayerBestHands(2), 'High card Jack: Jh, Td, 9d, 6s, 5c') + + # --------------------------------------------------------- + def testReadableHandValue(self): + """Test Poker Game : Readable hand value""" + + self.game.variant = 'holdem' + player1 = self.AddPlayerAndSit(1, 2) + + player1.hand = pokercards.PokerCards(['2h', '5s', '6h', '9s', 'Ks']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'High card King') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'High card King') + + player1.hand = pokercards.PokerCards(['2h', '2s', '6h', '9s', 'Ks']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Pair of Deuces') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'A pair of Deuces, King kicker') + + player1.hand = pokercards.PokerCards(['3h', '3s', '6h', '6s', 'Ks']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Pairs of Sixes and Treys') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Two pairs Sixes and Treys, King kicker') + + player1.hand = pokercards.PokerCards(['Th', 'Ts', 'Td', '6s', 'Qs']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Trips Tens') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Three of a kind Tens, Queen kicker') + + player1.hand = pokercards.PokerCards(['7h', '8s', '9d', 'Ts', 'Js']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Straight Jack high') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Straight Jack to Seven') + + player1.hand = pokercards.PokerCards(['2s', '5s', '6s', '9s', 'Ks']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Flush King high') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Flush King high') + + player1.hand = pokercards.PokerCards(['Qh', 'Qs', 'Qc', 'Ts', 'Td']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Queens full of Tens') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Queens full of Tens') + + player1.hand = pokercards.PokerCards(['6h', '6s', '6d', '6c', 'Qs']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Quads Sixes, Queen kicker') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Four of a kind Sixes, Queen kicker') + + player1.hand = pokercards.PokerCards(['7h', '8h', '9h', 'Th', 'Jh']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Straight flush') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Straight flush Jack high') + + player1.hand = pokercards.PokerCards(['Ts', 'Js', 'Qs', 'Ks', 'As']) + cards = self.game.bestHandCards('hi', 1) + self.failUnlessEqual(self.game.readableHandValueShort('hi', cards[0], cards[1:]), 'Royal flush') + self.failUnlessEqual(self.game.readableHandValueLong('hi', cards[0], cards[1:]), 'Royal flush') + + player1.hand = pokercards.PokerCards(['Ac', '2s', '3h', '4d', '5s']) + cards = self.game.bestHandCards('low', 1) + self.failUnlessEqual(self.game.readableHandValueShort('low', cards[0], cards[1:]), 'The wheel') + self.failUnlessEqual(self.game.readableHandValueLong('low', cards[0], cards[1:]), 'The wheel') + + player1.hand = pokercards.PokerCards(['8h', '2s', '3h', '4d', '5s']) + cards = self.game.bestHandCards('low', 1) + self.failUnlessEqual(self.game.readableHandValueShort('low', cards[0], cards[1:]), '8, 5, 4, 3, 2') + self.failUnlessEqual(self.game.readableHandValueLong('low', cards[0], cards[1:]), '8, 5, 4, 3, 2') + + # Unknown values + self.failUnlessEqual(self.game.readableHandValueShort('low', 'Unknown', cards[1:]), 'Unknown') + self.failUnlessEqual(self.game.readableHandValueLong('low', 'Unknown', cards[1:]), 'Unknown') + + # --------------------------------------------------------- + def testHandEV(self): + """Test Poker Game : Hand eval""" + + self.game.variant = 'holdem' + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + player1.hand = pokercards.PokerCards(['Ad', 'As']) + self.failUnless(self.game.handEV(1, 10000) in range(830,870)) + + player1.hand = pokercards.PokerCards(['2c', '7s']) + self.failUnless(self.game.handEV(1, 10000) in range(330,370)) + + self.game.board = pokercards.PokerCards(['2c', '3c', '4s']) + self.failUnless(self.game.handEV(1, 10000) in range(430,470)) + + player2.hand = pokercards.PokerCards(['4h', '5c']) + self.failUnless(self.game.handEV(1, 10000, True) in range(430,470)) + + self.failUnless(self.game.handEV(1, 10000) in range(100, 140)) + + self.failUnless(self.game.handEV(2, 10000, True) in range(690, 730)) + self.failUnless(self.game.handEV(2, 10000) in range(860, 900)) + + self.failUnlessEqual(self.game.handEV(3, 10000), None) + + # --------------------------------------------------------- + def testMoneyMap(self): + """Test Poker Game : Money map""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + player1.money = 1500 + player2.money = 600 + self.failUnlessEqual(self.game.moneyMap(), { 1 : 1500, 2 : 600}) + + player2.fold = True + self.failUnlessEqual(self.game.moneyMap(), { 1 : 1500}) + + # --------------------------------------------------------- + def testHasLevel(self): + """Test Poker Game : Has level""" + + self.failIf(self.game.hasLevel()) + + # Change the blind properties + blind_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'small' : '2000', + 'big' : '4000' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnless(self.game.hasLevel()) + + if not self.CopyFile(self.ConfigTmplFile, self.ConfigTempFile): + self.fail('Error during creation of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failIf(self.game.hasLevel()) + + # Change the ante properties + ante_properties = { 'change' : 'double', + 'frequency' : '15', + 'unit' : 'minute', + 'value' : '50', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnless(self.game.hasLevel()) + + # --------------------------------------------------------- + def testLevelUp(self): + """Test Poker Game : Level up""" + + # The blind properties + self.failIf(self.game.delayToLevelUp()) + + # Change the blind properties + blind_properties = { + 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile, + 'frequency' : '3', + 'unit' : 'minute', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.failUnless(self.game.hasLevel()) + + # Level 0 + self.game.setLevel(0) + self.failUnless(self.game.delayToLevelUp(), (0, 'minute')) + + # Level 1 + self.game.setLevel(1) + # The level is not finished + self.failIf(self.game.levelUp()) + + # 3 minutes to wait is a little bit long so this test is not active + # time.sleep(3 * 60) + # self.failUnless(self.game.levelUp()) + + # Change the blind properties + blind_properties = { + 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile, + 'frequency' : '3', + 'unit' : 'hand', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Level 0 + self.game.setLevel(0) + self.failUnless(self.game.delayToLevelUp(), (0, 'hand')) + + # Level 1 + self.game.setLevel(1) + self.game.setHandsCount(2) + self.failUnless(self.game.delayToLevelUp(), (5, 'hand')) + self.failIf(self.game.levelUp()) + + # Change the blind properties + blind_properties = { + 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile, + 'frequency' : '3', + 'unit' : 'Invalid', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + self.failIf(self.game.delayToLevelUp()) + + # The game is not directing + self.game.is_directing = False + self.failIf(self.game.levelUp()) + + # --------------------------------------------------------- + def testCardsDealt(self): + """Test Poker Game : Cards dealt""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnless(self.game.cardsDealt()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + self.failIf(self.game.cardsDealt()) + self.failUnlessEqual(self.game.roundInfo()["hand_size"], 2) + self.failUnlessEqual(self.game.roundInfo()["board_size"], 0) + + player1.hand = pokercards.PokerCards(['Ad', 'As']) + player2.hand = pokercards.PokerCards(['4d', 'Ts']) + + self.failUnless(self.game.cardsDealt()) + + # Second round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isSecondRound()) + + self.failIf(self.game.cardsDealt()) + + self.failUnlessEqual(self.game.roundInfo()["hand_size"], 2) + self.failUnlessEqual(self.game.roundInfo()["board_size"], 3) + + self.game.board = pokercards.PokerCards(['Qd', 'Kh', '8c']) + self.failUnless(self.game.cardsDealt()) + + # --------------------------------------------------------- + def testBet2Pot(self): + """Test Poker Game : Bet to pot""" + + self.game.registerCallback(Callback) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + InitCallback() + player1.bet = 500 + self.game.bet2pot(serial = 1, dead_money = True) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(player1.dead, 500) + self.failUnlessEqual(self.game.pot, 500) + + self.failUnlessEqual(CallbackIds, [self.game.id]) + self.failUnlessEqual(CallbackArgs, [('bet2pot', 1, 500)]) + + # --------------------------------------------------------- + def testDealCards(self): + """Test Poker Game : Deal cards""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Client game, the deal card has no effect + self.failIf(self.game.cardsDealt()) + self.game.is_directing = False + + # Deal cards + self.game.dealCards() + + self.failIf(self.game.cardsDealt()) + self.game.is_directing = True + + # Deal the cards + self.failIf(self.game.cardsDealt()) + + # Deal cards + self.game.dealCards() + + self.failUnless(self.game.cardsDealt()) + + # The cards are hidden + self.failUnless(player1.hand.areHidden()) + self.failUnless(player2.hand.areHidden()) + + # Check the players cards + player1_cards = pokercards.PokerCards(['8s', 'As']) + player2_cards = pokercards.PokerCards(['3h', '6d']) + player1_cards.allHidden() + player2_cards.allHidden() + + self.failUnlessEqual(player1.hand, player1_cards) + self.failUnlessEqual(player2.hand, player2_cards) + + # Second round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isSecondRound()) + + # Deal cards + self.game.dealCards() + + # Check the board cards + self.failUnlessEqual(self.game.board, pokercards.PokerCards(['6s', '6h', 'Ah'])) + + # Next round + self.game.nextRound() + self.game.initRound() + + # There is not enough cards in the deck for all the players + info = self.game.roundInfo() + info['board'] = ['board', 'board'] + info["board_size"] = 2 + + info['cards'] = ['up', 'down'] + info["hand_size"] = 2 + + self.game.deck = ['8d', '2h', '2c', '8c'] + + # Deal cards + self.game.dealCards() + + # The player cards are transfered to the board + self.failUnlessEqual(info["hand_size"], 0) + self.failUnlessEqual(info["board_size"], 4) + + # Can not deal all the cards needed + info = self.game.roundInfo() + info['board'] = ['board', 'board'] + info["board_size"] = 2 + + info['cards'] = ['up', 'unknown', 'down'] + info["hand_size"] = 3 + + self.game.deck = ['8d', '2h', '2c', '8c'] + + self.failUnlessRaises(UserWarning,self.game.dealCards) + + # --------------------------------------------------------- + def testBotAutoPlay(self): + """Test Poker Game : Bot auto play""" + + # Change the bet properties + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/variants/round', None, {'min' : '100', 'max' : '300'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + # Change the variant name for cards evaluation + self.game.variant = 'holdem' + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # No possible action because the cards are not dealt + self.failUnlessEqual(self.game.possibleActions(1), []) + self.game.botPlayer(1) + self.failIf(player1.talked_once) + + # Deal cards + self.game.dealCards() + + # Player 1 is a bot + self.failUnlessEqual(self.game.possibleActions(1), ['raise', 'check']) + self.game.botPlayer(1) + self.failUnless(player1.isBot()) + self.failUnless(player1.isAutoBlindAnte()) + self.failUnlessEqual(player1.auto_muck, pokergame.AUTO_MUCK_ALWAYS) + self.failUnless(player1.isAuto()) + + # Player 1 automatically bet the minimum + self.failUnlessEqual(player1.bet, 100) + self.failUnlessEqual(player1.money, 1500) + self.failUnless(player1.talked_once) + + # Player 2 automatically call + self.game.botPlayer(2) + + # The game is finished + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + + # --------------------------------------------------------- + def testGetRequestedAction(self): + """Test Poker Game : Get requested action""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 2 is in position + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + self.failUnlessEqual(self.game.getRequestedAction(1), None) + self.failUnlessEqual(self.game.getRequestedAction(2), 'blind_ante') + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Player 2 is in position + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + self.failUnlessEqual(self.game.getRequestedAction(2), 'play') + + # Add a third player + self.failUnless(self.game.addPlayer(3)) + player3 = self.GetPlayer(3) + + # The buy in is not payed + self.failIf(player3.isBuyInPayed()) + self.failUnlessEqual(self.game.getRequestedAction(3), 'buy-in') + + # Pay the buy in + self.failUnless(self.game.payBuyIn(3,self.game.bestBuyIn())) + self.failUnlessEqual(self.game.getRequestedAction(3), None) + + # Player 3 has no money + player3.money = 0 + self.failUnlessEqual(self.game.getRequestedAction(3), 'rebuy') + + # Change the blind properties + blind_properties = { 'change' : 'levels', + 'levels' : PokerGameTestCase.TestLevelsTemplateFile, + 'frequency' : '15', + 'unit' : 'minute' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # The game is now a tournament + self.failUnless(self.game.isTournament()) + + # The player 1 and 3 are not in position + self.failUnlessEqual(self.game.getRequestedAction(3), None) + self.failUnlessEqual(self.game.getRequestedAction(1), None) + + # The player 2 is in position + self.failUnlessEqual(self.game.getRequestedAction(2), 'play') + + # --------------------------------------------------------- + def testTalked(self): + """Test Poker Game : Talked""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.call(1)) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # Player 1 can talk + self.failUnless(self.game.isInPosition(1)) + self.failUnless(self.game.canAct(1)) + self.failIf(player1.talked_once) + + self.failUnless(self.game.callNraise(1, 600)) + + self.failUnlessEqual(player1.bet, 600) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1000) + self.failUnless(player1.talked_once) + + # Player 2 can talk + self.failUnless(self.game.isInPosition(2)) + self.failUnless(self.game.canAct(2)) + self.failIf(player2.talked_once) + + self.failUnless(self.game.call(2)) + + self.failUnlessEqual(self.game.getPlayerMoney(2), 1000) + + # Second round + self.failUnless(self.game.isSecondRound()) + + # --------------------------------------------------------- + def testTalkedClientGame(self): + """Test Poker Game : Talked Client game""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.call(1)) + + # Automatically pay the blind + self.game.autoBlindAnte(1) + self.game.autoBlindAnte(2) + + # First round + self.failUnless(self.game.isFirstRound()) + + # Client game + self.game.is_directing = False + + # player 1 raise + self.failUnless(self.game.callNraise(1, 600)) + + # Player 2 call + self.failUnless(self.game.call(2)) + + # Init round is not done + # The players are mot reset + self.failUnless(player1.talked_once) + self.failUnless(player2.talked_once) + + # --------------------------------------------------------- + def testBlindInfo(self): + """Test Poker Game : Blind info""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Blind info has been set + self.failUnless(self.game.blind_info) + + # Check the blind values + self.failUnlessEqual(self.game.bigBlind(), 1000) + self.failUnlessEqual(self.game.smallBlind(), 500) + + # Check blind amounts + self.game.setPlayerBlind(1, 'big') + self.failUnlessEqual(self.game.blindAmount(1), (self.game.bigBlind(), 0, 'big')) + self.game.setPlayerBlind(1, 'late') + self.failUnlessEqual(self.game.blindAmount(1), (self.game.bigBlind(), 0, 'late')) + self.game.setPlayerBlind(1, 'small') + self.failUnlessEqual(self.game.blindAmount(1), (self.game.smallBlind(), 0, 'small')) + self.game.setPlayerBlind(1, 'big_and_dead') + self.failUnlessEqual(self.game.blindAmount(1), (self.game.bigBlind(), self.game.smallBlind(), 'big_and_dead')) + self.game.setPlayerBlind(1, None) + self.failUnlessEqual(self.game.blindAmount(1), (0, 0, None)) + self.game.setPlayerBlind(1, True) + self.failUnlessEqual(self.game.blindAmount(1), (0, 0, True)) + self.game.setPlayerBlind(1, 'invalid') + self.failUnlessEqual(self.game.blindAmount(1), None) + + # Unset the blind infos + self.game.blind_info = None + self.failUnlessEqual(self.game.bigBlind(), None) + self.failUnlessEqual(self.game.smallBlind(), None) + self.failUnlessEqual(self.game.blindAmount(1), (0, 0, False)) + + # --------------------------------------------------------- + def testSitOutNextTurn(self): + """Test Poker Game : Sit out next turn""" + + self.game.setMaxPlayers(3) + + # Create all the players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 2 is in position + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + + # The player 2 sit out next turn + self.failIf(self.game.isSitOut(2)) + self.failUnless(self.game.sitOutNextTurn(2)) + self.failUnless(player2.isSitOut()) + self.failIf(player2.sit_out_next_turn) + self.failIf(player2.sit_requested) + self.failIf(player2.wait_for) + + # The player 1 is not in position but he want to sit out + self.failIfEqual(self.game.getSerialInPosition(), 1) + self.failIf(player1.sit_out_next_turn) + self.failIf(player1.sit_requested) + self.failIf(self.game.sitOutNextTurn(1)) + self.failUnless(player1.sit_out_next_turn) + self.failIf(player1.sit_requested) + + # Client game + self.game.is_directing = False + + # Player 3 sit out + self.failUnlessEqual(self.game.getSerialInPosition(), 3) + self.failIf(player3.sit_out_next_turn) + self.failIf(player3.sit_requested) + self.failIf(self.game.sitOutNextTurn(3)) + self.failUnless(player3.sit_out_next_turn) + self.failIf(player3.sit_requested) + self.failUnlessEqual(player3.wait_for, False) + + # --------------------------------------------------------- + def testSitOut(self): + """Test Poker Game : Sit out""" + + self.game.setMaxPlayers(4) + + player1 = self.AddPlayerAndSit(1, 1) + player2 = self.AddPlayerAndSit(2, 3) + player3 = self.AddPlayerAndSit(3, 6) + player4 = self.AddPlayerAndSit(4, 8) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Sit out + self.game.setPosition(0) + self.failIf(self.game.getSitOut(1)) + self.failUnless(self.game.sitOut(1)) + self.failUnless(self.game.getSitOut(1)) + self.failIf(player1.sit_out_next_turn) + self.failIf(player1.sit_requested) + self.failIf(player1.wait_for) + + # the player is already sit out + self.failIf(self.game.sitOut(1)) + + self.game.setPosition(1) + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + + self.game.setPosition(2) + self.failIf(self.game.getSitOut(3)) + self.failUnless(self.game.sitOut(3)) + self.failUnless(self.game.getSitOut(3)) + self.failIf(player3.sit_out_next_turn) + self.failIf(player3.sit_requested) + self.failIf(player3.wait_for) + + self.failUnlessEqual(self.game.getSerialInPosition(), 4) + + # + # Check that autoPayBlindAnte skips players that are sit out for some reason. + # + player1.sit_out = True + self.game.setPosition(0) + self.assertEquals([1, 2, 3, 4], self.game.player_list) + self.game.autoPayBlindAnte() + + # --------------------------------------------------------- + def testSit(self): + """Test Poker Game : Sit""" + + self.game.setMaxPlayers(3) + + # Add Player + self.failUnless(self.game.addPlayer(1, 2)) + player1 = self.GetPlayer(1) + self.failIf(player1.isSit()) + + # The buy in is not payed, the player can not be added + self.failIf(player1.isBuyInPayed()) + self.failIf(self.game.sit(1)) + + # Pay the buy in + self.failUnless(self.game.payBuyIn(1,self.game.bestBuyIn())) + self.failUnless(player1.isBuyInPayed()) + + # The player is broke, the player can not be added + money = self.game.getPlayerMoney(1) + player1.money = 0 + self.failUnless(self.game.isBroke(1)) + self.failIf(self.game.sit(1)) + + # Restore the player money + player1.money = money + self.failIf(self.game.isBroke(1)) + + # The player can sit + player1.wait_for = 'big' + self.failUnless(self.game.sit(1)) + + self.failUnless(player1.isSit()) + self.failUnlessEqual(player1.wait_for, False) + self.failIf(player1.auto) + + # Add a second player + player2 = self.AddPlayerAndSit(2, 5) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Add the third player + self.failUnless(self.game.addPlayer(3, 7)) + self.failUnless(self.game.payBuyIn(3,self.game.bestBuyIn())) + player3 = self.GetPlayer(3) + self.failIf(player3.isSit()) + + # The player sit + self.failUnless(self.game.sit(3)) + self.failUnless(player3.isSit()) + self.failUnlessEqual(player3.wait_for, 'first_round') + + # --------------------------------------------------------- + def testRebuy(self): + """Test Poker Game : Rebuy""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + self.failUnlessEqual(self.game.maxBuyIn(), 10000) + + # The player 3 is unknown so it can not rebuy + self.failIf(self.game.rebuy(3, 100)) + + # The player money + the rebuy amount is too high + player1.money = 5000 + self.failIf(self.game.rebuy(1, 5001)) + + # The player money + the player rebuy + the rebuy amount is too high + player1.rebuy = 2000 + self.failIf(self.game.rebuy(1, 3001)) + + # The player 1 rebuy 1000 but the game is not running so the money is added to it rebuy amount + self.failIf(self.game.isPlaying(1)) + self.failUnless(self.game.rebuy(1, 1000)) + self.failUnless(player1.rebuy, 3000) + self.failUnless(self.game.getPlayerMoney(1), 5000) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 rebuy 1000 and the game is not running so the money is added directly to its money amount + self.failUnless(self.game.isPlaying(1)) + self.failUnless(self.game.rebuy(1, 1000)) + self.failUnless(player1.rebuy, 3000) + self.failUnless(self.game.getPlayerMoney(1), 6000) + + # --------------------------------------------------------- + def testFullEmpty(self): + """Test Poker Game : Full empty""" + + # The game must be empty + self.failUnless(self.game.empty()) + self.failIf(self.game.full()) + + # Add one player + player1 = self.AddPlayerAndSit(1, 2) + + # The game is not empty and not full + self.failIf(self.game.empty()) + self.failIf(self.game.full()) + + # Add the second player, the game is now full + player2 = self.AddPlayerAndSit(2, 7) + + self.failIf(self.game.empty()) + self.failUnless(self.game.full()) + + # --------------------------------------------------------- + def testSerialsAllSorted(self): + """Test Poker Game : Serials all sorted""" + + self.game.setMaxPlayers(3) + + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # The dealer is not specified or incorrect so get the list of player sorted by serial number + self.game.dealer = -1 + self.failUnlessEqual(self.game.serialsAllSorted(), [1, 2, 3]) + self.game.dealer = 4 + self.failUnlessEqual(self.game.serialsAllSorted(), [1, 2, 3]) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(self.game.dealer, 0) + self.failUnlessEqual(self.game.serialsAllSorted(), [2, 3, 1]) + + # Remove the player 1, do not reconstruct the player list + del self.game.serial2player[1] + self.failUnlessEqual(self.game.serialsAll(), [2, 3]) + self.failUnlessEqual(self.game.player_list, [1, 2, 3]) + + # The dealer can not be the player 2 + self.failUnlessEqual(self.game.serialsAllSorted(), [3, 2]) + + # --------------------------------------------------------- + def testBlind(self): + """Test Poker Game : Blind""" + + self.game.setMaxPlayers(3) + + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Not Blind or Ante turn + self.failIf(self.game.isBlindAnteRound()) + self.failIf(self.game.blind(1)) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 can not act so it can not blind + self.failIf(self.game.canAct(1)) + self.failIf(self.game.isBlindRequested(1)) + self.failIf(self.game.blind(1)) + + # Get the blind limits for player 2 + self.game.setPlayerBlind(2, 'big_and_dead') + self.failUnlessEqual(self.game.blindAmount(2), (1000, 500, 'big_and_dead')) + + # The player 2 can blind, use the defined limits + self.failUnless(self.game.isBlindRequested(2)) + self.game.blind(2) + self.failUnlessEqual(player2.bet, 1000) + self.failUnlessEqual(self.game.pot, 500) + self.failUnlessEqual(self.game.getPlayerMoney(2), 100) + + # The player 2 has blind + self.failUnless(player2.blind) + self.failUnlessEqual(player2.missed_blind, None) + self.failIf(player2.wait_for) + + # The player 3 can blind, bet 400 and 200 for the dead + self.failUnless(self.game.isBlindRequested(3)) + self.game.blind(3, 400, 200) + self.failUnlessEqual(player3.bet, 400) + self.failUnlessEqual(self.game.pot, 500 + 200) + self.failUnlessEqual(player3.money, 1000) + + # Blind structure unknown + self.game.blind_info = None + + # The blind has not effect + self.failIf(self.game.isBlindRequested(1)) + self.game.blind(1, 400, 200) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.pot, 500 + 200) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + + # --------------------------------------------------------- + def testBlindAnteRoundEnd(self): + """Test Poker Game : Blind and ante round end""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # No effect for server game + self.game.blindAnteRoundEnd() + self.failUnless(self.game.isBlindAnteRound()) + + # Client game + self.game.is_directing = False + + # First Round + self.game.blindAnteRoundEnd() + self.failUnless(self.game.isFirstRound()) + + # Blind and ante round + self.game.resetRound() + self.game.initBlindAnte() + self.failUnless(self.game.isBlindAnteRound()) + + # Player 1 is all in + self.game.payBlind(1, 1600, 0) + self.failUnlessEqual(player1.bet, 1600) + self.failUnlessEqual(self.game.getPlayerMoney(1), 0) + self.failUnless(player1.isAllIn()) + self.failIf(self.game.isInGame(1)) + + self.game.payBlind(2, 1600, 0) + + # All the players are all in except one + self.game.blindAnteRoundEnd() + self.failUnlessEqual(self.game.pot, 3200) + + # First Round + self.failUnless(self.game.isFirstRound()) + + # --------------------------------------------------------- + def testPayBlind(self): + """Test Poker Game : Pay blind""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.isBlindAntePayed()) + + # The player 1 pay blind + self.game.payBlind(1, 600, 200) + self.failUnlessEqual(player1.bet, 600) + self.failUnlessEqual(self.game.pot, 200) + self.failUnlessEqual(self.game.getPlayerMoney(1), 800) + self.failUnless(player1.blind) + self.failUnlessEqual(player1.missed_blind, None) + self.failIf(player1.wait_for) + + # All blinds are not payed + self.failIf(self.game.isBlindAntePayed()) + + # The blind is higher than the player money + self.game.payBlind(2, 2000, 100) + self.failUnlessEqual(player2.bet, 1600) + self.failUnlessEqual(self.game.pot, 200 + 0) + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + self.failUnless(player2.blind) + self.failUnlessEqual(player2.missed_blind, None) + self.failIf(player2.wait_for) + + # All blinds are not payed + self.failIf(self.game.isBlindAntePayed()) + + # The blind + the dead is higher than the player money + self.game.payBlind(3, 1000, 1000) + self.failUnlessEqual(player3.bet, 1000) + self.failUnlessEqual(self.game.pot, 200 + 0 + 600) + self.failUnlessEqual(player3.money, 0) + self.failUnless(player3.blind) + self.failUnlessEqual(player3.missed_blind, None) + self.failIf(player3.wait_for) + + # All blinds are now payed + self.failUnless(self.game.isBlindAntePayed()) + + # --------------------------------------------------------- + def testWaitBigBlind(self): + """Test Poker Game : Wait big blind""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 2 can not act + self.failIf(self.game.canAct(2)) + self.failIf(self.game.waitBigBlind(2)) + + # No blind info + blind_info = self.game.blind_info + self.game.blind_info = None + self.failIf(self.game.waitBigBlind(1)) + self.failIf(self.game.waitBigBlind(2)) + self.game.blind_info = blind_info + + # The player 1 can act + self.failUnless(self.game.canAct(1)) + self.failUnless(self.game.waitBigBlind(1)) + self.failUnlessEqual(player1.wait_for, 'big') + + # Player 2 pay the blind + self.failUnless(self.game.canAct(2)) + self.game.autoBlindAnte(2) + self.failUnlessEqual(self.game.getPlayerMoney(2), 600) + self.failUnlessEqual(player2.bet, 1000) + self.failUnless(player2.isBlind()) + + # Player 1 pay the blind + self.failUnless(self.game.canAct(1)) + self.game.autoBlindAnte(1) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + self.failUnlessEqual(player1.bet, 500) + self.failUnless(player1.isBlind()) + + # Blind and ante turn finished + self.failIf(self.game.isBlindAnteRound()) + + # Waiting big blind is unavalaible + self.failIf(self.game.waitBigBlind(1)) + self.failIf(self.game.waitBigBlind(2)) + + # --------------------------------------------------------- + def testAnte(self): + """Test Poker Game : Ante""" + + # Change the ante properties + ante_properties = { + 'value' : '100', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + self.game.setMaxPlayers(3) + + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Not Blind or Ante turn + self.failIf(self.game.isBlindAnteRound()) + self.failIf(self.game.ante(1)) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 can not act so it can not ante + self.failIf(self.game.canAct(1)) + self.failIf(self.game.isAnteRequested(1)) + self.failIf(self.game.ante(1)) + + # Get the ante value + self.failUnlessEqual(self.game.ante_info['value'], 100) + + # The player 2 can ante, use the defined limits + self.failUnless(self.game.isAnteRequested(2)) + self.game.ante(2) + self.failUnlessEqual(player2.bet, 0) + self.failUnlessEqual(self.game.pot, 100) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1500) + + # The player 2 has ante + self.failUnless(player2.ante) + + # The player 3 can ante 400 + self.failUnless(self.game.isAnteRequested(3)) + self.game.ante(3, 400) + self.failUnlessEqual(player3.bet, 0) + self.failUnlessEqual(self.game.pot, 100 + 400) + self.failUnlessEqual(player3.money, 1200) + + # Ante structure unknown + self.game.ante_info = None + + # The ante has not effect + self.failIf(self.game.isAnteRequested(1)) + self.game.ante(1, 400) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.pot, 100 + 400) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + + # --------------------------------------------------------- + def testAutoPayBlind(self): + """ Test Poker Game : Auto pay blind""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players are not auto + self.failIf(player1.isAutoBlindAnte()) + self.failIf(player2.isAutoBlindAnte()) + self.failIf(player3.isAutoBlindAnte()) + + # The auto pay blind has no effect + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + self.game.autoPayBlindAnte() + + # The player 2 is still in position + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + + # The turn is still blind and ante + self.failUnless(self.game.isBlindAnteRound()) + + # pay the blind for player 2 + player2.auto_blind_ante = True + self.game.autoPayBlindAnte() + + # The player 3 sit out + self.failUnless(self.game.sitOut(3)) + self.failUnless(player3.isSitOut()) + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + + # pay the blind for player 1 + player1.auto_blind_ante = True + self.game.autoPayBlindAnte() + self.failUnlessEqual(True, player1.isBlind()) + + # The blind of the player 1 and 2 are automatically payed + self.game.autoPayBlindAnte() + + self.failUnlessEqual(self.game.getPlayerMoney(1), 600) + self.failUnlessEqual(player1.bet, 1000) + self.failUnless(player1.blind) + + self.failUnlessEqual(self.game.getPlayerMoney(2), 1100) + self.failUnlessEqual(player2.bet, 500) + self.failUnless(player2.blind) + + # First round + self.failUnless(self.game.isFirstRound()) + + # --------------------------------------------------------- + def testAutoPayBlindAllIn(self): + """ Test Poker Game : Auto pay blind all in""" + + self.game.variant = 'holdem' + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player1.money = 400 + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players 1 automatically pay the blind + self.game.autoBlindAnte(1) + self.failUnlessEqual(self.game.getPlayerMoney(1), 0) + self.failUnlessEqual(player1.bet, 400) + self.failUnless(player1.blind) + + # Player 1 is all in + self.failUnless(player1.isAllIn()) + + # The players 2 automatically pay the blind + self.game.autoBlindAnte(2) + + # The game is finished + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + + # Check the end information + self.failUnless(self.game.isGameEndInformationValid()) + + # The player 1 win + self.failUnlessEqual(self.game.winners, [1]) + self.failUnlessEqual(player1.money, 400 + ( 400 - self.game.getRakedAmount() )) + self.failUnlessEqual(player2.money, 1600 - 400) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(player2.bet, 0) + self.failUnlessEqual(self.game.pot, 0) + + # --------------------------------------------------------- + def testAutoPayBlindAllIn2(self): + """ Test Poker Game : Auto pay blind all in and a third player is to act""" + + self.game.variant = 'holdem' + + # Create players + self.game.setMaxPlayers(3) + player1 = self.AddPlayerAndSit(1, 2) + player1.money = 600 + player2 = self.AddPlayerAndSit(2, 5) + player2.money = 400 + player3 = self.AddPlayerAndSit(3, 7) + player3.money = 600 + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players 2 automatically pay the blind + self.game.autoBlindAnte(2) + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + self.failUnlessEqual(player2.bet, 400) + self.failUnless(player2.blind) + + # Player 2 is all in + self.failUnless(player2.isAllIn()) + + # The players 3 automatically pay the blind + self.game.autoBlindAnte(3) + + # The players 1 is to act and calls + self.failUnless(self.game.canAct(1)) + self.failUnless(self.game.call(1)) + + # The game is finished + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + + # Check the end information + self.failUnless(self.game.isGameEndInformationValid()) + + # The player 3 win + self.failUnlessEqual(self.game.winners, [3]) + self.failUnlessEqual(player3.money, 600 + 600 + 400 - self.game.getRakedAmount() ) + self.failUnlessEqual(player2.money, 0) + self.failUnlessEqual(player1.money, 0) + self.failUnlessEqual(self.game.pot, 0) + + # --------------------------------------------------------- + def testAutoPayAnte(self): + """ Test Poker Game : Auto pay ante""" + + # Change the ante properties + ante_properties = { + 'value' : '100', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Reset the blind infos + self.game.blind_info = None + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players are not auto + self.failIf(player1.isAutoBlindAnte()) + self.failIf(player2.isAutoBlindAnte()) + + # The auto pay ante has no effect + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + self.game.autoPayBlindAnte() + # The player 2 is still in position + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + # The turn is still blind and ante + self.failUnless(self.game.isBlindAnteRound()) + + # The antes will be automatically payed + player1.auto_blind_ante = True + player2.auto_blind_ante = True + + # The ante of the player 1 and 2 are automatically payed + self.game.autoPayBlindAnte() + + self.failUnlessEqual(self.game.getPlayerMoney(1), 1500) + self.failUnlessEqual(player1.bet, 0) + self.failUnless(player1.ante) + + self.failUnlessEqual(self.game.getPlayerMoney(2), 1500) + self.failUnlessEqual(player2.bet, 0) + self.failUnless(player2.ante) + + self.failUnlessEqual(self.game.pot, 100 + 100) + + # The blind and ante turn is finished + self.failIf(self.game.isBlindAnteRound()) + + # --------------------------------------------------------- + def testAutoPayAnteAllIn(self): + """ Test Poker Game : Auto pay ante all in""" + + self.game.variant = 'holdem' + + # Change the ante properties + ante_properties = { + 'value' : '900', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Reset the blind infos + self.game.blind_info = None + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players 1 automatically pay the blind + self.game.autoBlindAnte(1) + self.failUnlessEqual(self.game.getPlayerMoney(1), 700) + self.failUnlessEqual(self.game.pot, 900) + self.failUnless(player1.ante) + + # Player 1 is all in + player1.all_in = True + self.failUnless(player1.isAllIn()) + + # The players 2 automatically pay the blind + self.game.autoBlindAnte(2) + + # The game is finished + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + + # Check the end information + self.failUnless(self.game.isGameEndInformationValid()) + + # The player 1 win + self.failUnlessEqual(self.game.winners, [1]) + rake = self.game.getRakedAmount() + self.failUnlessEqual(int(900 * 0.05), rake) + self.failUnlessEqual(player1.money, 1600 + ( 900 - rake )) + self.failUnlessEqual(player2.money, 1600 - ( 900 )) + self.failUnlessEqual(self.game.pot, 0) + + # + # The rake must be deduced from the delta + # + showdown_info = self.game.showdown_stack[0] + self.failUnlessEqual(900 - rake, showdown_info['serial2delta'][1]) + self.failUnlessEqual(-900, showdown_info['serial2delta'][2]) + + # --------------------------------------------------------- + def testPayAnte(self): + """Test Poker Game : Pay ante""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + self.game.variant = 'holdem' + + # Change the ante properties + ante_properties = { + 'value' : '100', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Reset the blind infos + self.game.blind_info = None + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failIf(self.game.isBlindAntePayed()) + + # The player 1 pay ante + self.game.payAnte(1, 600) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.pot, 600) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1000) + self.failUnless(player1.ante) + + # All antes are not payed + self.failIf(self.game.isBlindAntePayed()) + + # The ante is higher than the player money + self.game.payAnte(2, 2000) + self.failUnlessEqual(player2.bet, 0) + self.failUnlessEqual(self.game.pot, 600 + 1600) + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + self.failUnless(player2.ante) + + # All antes are not payed + self.failIf(self.game.isBlindAntePayed()) + + # The player 3 is sit out + self.game.setPosition(2) + self.failUnless(self.game.sitOut(3)) + + # All antes are now payed + self.failUnless(self.game.isBlindAntePayed()) + + # --------------------------------------------------------- + def testMinMoney(self): + """Test Poker Game : min money""" + + # + # game with blinds + # + self.failUnless(self.game.minMoney() > self.game.blind_info["big"]); + + # + # game with antes + # + # Change the ante properties + ante_properties = { + 'value' : '100', + 'bring-in' : '200' + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'ante', ante_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # Reset the blind infos + self.game.blind_info = None + self.failUnless(self.game.minMoney() > self.game.ante_info["bring-in"]); + + # + # tournament + # + self.game.ante_info["change"] = True; + self.failUnlessEqual(self.game.minMoney(), 0) + + # + # no blinds, no antes + # + self.game.blind_info = None + self.game.ante_info = None + self.failUnlessEqual(self.game.minMoney(), 0) + + # --------------------------------------------------------- + def testIsBroke(self): + """Test Poker Game : Is broke""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Unknown players are not broke + self.failIf(self.game.isBroke(3)) + + # No player is broke + self.failIf(self.game.isBroke(1)) + self.failIf(self.game.isBroke(2)) + self.failUnlessEqual(self.game.brokeCount(), 0) + + # The player 1 is broke, no money + player1.money = 0 + + # One player broke + self.failUnless(self.game.isBroke(1)) + self.failUnlessEqual(self.game.brokeCount(), 1) + self.failUnlessEqual(self.game.serialsBroke(), [1]) + self.failUnlessEqual(self.game.playersBroke(), [player1]) + + # The player 2 is borke, not enough money to play + self.failIf(self.game.isTournament()) + + # Change the blind properties + blind_properties = { 'small' : '1000', + 'big' : '2000', + } + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet/blind', None, blind_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + + # All the players are broke + self.failUnless(self.game.isBroke(2)) + self.failUnlessEqual(self.game.brokeCount(), 2) + self.failUnlessEqual(self.game.serialsBroke(), [1, 2]) + self.failUnlessEqual(self.game.playersBroke(), [player1, player2]) + + # --------------------------------------------------------- + def testAllIn(self): + """Test Poker Game : All in""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players are not initially all in + self.failIf(player1.isAllIn()) + self.failIf(player2.isAllIn()) + self.failUnlessEqual(self.game.allInCount(), 0) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # The player 1 put all his money + self.failUnless(self.game.callNraise(1, self.game.getPlayerMoney(1))) + self.failUnless(player1.isAllIn()) + self.failUnlessEqual(self.game.allInCount(), 1) + self.failUnlessEqual(self.game.serialsAllIn(), [1]) + self.failUnlessEqual(self.game.playersAllIn(), [player1]) + + # --------------------------------------------------------- + def testUncalledInvalid(self): + """Test Poker Game : uncalled amount does not pass distributeMoney checks""" + + self.game.setVariant('holdem') + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + player2.money += player1.money + uncalled = player2.money + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The players are not initially all in + self.failIf(player1.isAllIn()) + self.failIf(player2.isAllIn()) + self.failUnlessEqual(self.game.allInCount(), 0) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # The player 1 put all his money + self.failUnless(self.game.call(1)) + self.failUnless(self.game.callNraise(2, self.game.getPlayerMoney(2))) + self.failUnless(player2.isAllIn()) + self.failUnlessEqual(self.game.allInCount(), 1) + self.failUnlessEqual(self.game.serialsAllIn(), [2]) + self.failUnlessEqual(self.game.playersAllIn(), [player2]) + self.failUnlessEqual(self.game.uncalled, uncalled) + distributeMoney = self.game.distributeMoney + def f(): + self.game.uncalled = 42 # invalid value + distributeMoney() + self.game.distributeMoney = f + try: + self.game.call(1) + except UserWarning, arg: + self.failUnlessEqual(str(arg), "serial2side_pot[winner.serial] != self.uncalled (1600 != 42)") + + # --------------------------------------------------------- + def testRakeContributions(self): + """Test Poker Game : rake contributions""" + + self.game.setVariant('holdem') + # Create players + self.game.setMaxPlayers(3) + for i in xrange(1, 4): + self.AddPlayerAndSit(i) + self.game.botPlayer(i) + + self.game.beginTurn(1) + + self.failIf(self.game.isRunning()) + self.failUnlessEqual(150, self.game.getRakedAmount()) + self.failUnlessEqual(3000, self.game.getPotAmount()) + self.failUnlessEqual({1: 50, 2: 50, 3: 50}, self.game.getRakeContributions()) + + # --------------------------------------------------------- + def testRakeContributionsUncalled(self): + """Test Poker Game : rake contributions uncalled""" + + self.game.setVariant('holdem') + # Create players + self.game.setMaxPlayers(3) + for i in xrange(1, 4): + player = self.AddPlayerAndSit(i) + self.game.botPlayer(i) + player.money = 100 + player.money = 3000 + + self.game.beginTurn(1) + + self.failIf(self.game.isRunning()) + self.failUnlessEqual(15, self.game.getRakedAmount()) + self.failUnlessEqual(700, self.game.getPotAmount()) + self.failUnlessEqual({1: 5, 2: 5, 3: 5}, self.game.getRakeContributions()) + + # --------------------------------------------------------- + def testDisconnected(self): + """Test Poker Game : Diconnected""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player are initially connected + self.failIf(player1.remove_next_turn) + self.failIf(player2.remove_next_turn) + self.failUnlessEqual(self.game.disconnectedCount(), 0) + self.failUnlessEqual(self.game.connectedCount(), 2) + self.failUnlessEqual(self.game.serialsDisconnected(), []) + self.failUnlessEqual(self.game.serialsConnected(), [1, 2]) + self.failUnlessEqual(self.game.playersDisconnected(), []) + self.failUnlessEqual(self.game.playersConnected(), [player1, player2]) + + # Remove the player 1 + self.failIf(self.game.removePlayer(1)) + self.failUnless(player1.remove_next_turn) + + # The player 1 is now disconnected + self.failUnlessEqual(self.game.disconnectedCount(), 1) + self.failUnlessEqual(self.game.connectedCount(), 1) + self.failUnlessEqual(self.game.serialsDisconnected(), [1]) + self.failUnlessEqual(self.game.serialsConnected(), [2]) + self.failUnlessEqual(self.game.playersDisconnected(), [player1]) + self.failUnlessEqual(self.game.playersConnected(), [player2]) + + # --------------------------------------------------------- + def testReturnBlindAnte(self): + """Test Poker Game : Return blind ante""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 blind + self.game.setPlayerBlind(1, 'big') + self.game.blind(1) + self.failUnlessEqual(player1.bet, 1000) + self.failUnlessEqual(self.game.getPlayerMoney(1), 600) + + # The player 2 sit out so the game is canceled + self.game.sitOut(2) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + + # The game is finished, there is no winners + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + self.failUnlessEqual(len(self.game.winners), 0) + + # No winner, the end information are not valid + self.failIf(self.game.isGameEndInformationValid()) + + # --------------------------------------------------------- + def testCanceled(self): + """Test Poker Game : Canceled""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 blind + self.game.autoBlindAnte(1) + self.failUnlessEqual(player1.bet, 500) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + + # There is more than one player sit, cancel is not available + self.failIfEqual(self.game.sitCount(), 1) + self.game.canceled(1, 500) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + + # The player 2 sit out + self.failUnless(self.game.sitOut(2)) + self.failUnlessEqual(self.game.sitCount(), 1) + + # Cancel is not available in the current state + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + self.game.canceled(1, 500) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + + # Change the game round to blind and ante + self.game.resetRound() + self.failUnless(self.game.isBlindAnteRound()) + + # The pot value does not correspond to the player bet + self.game.pot = 100 + self.game.canceled(1, 500) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + + # Change the game round to blind and ante + self.game.resetRound() + self.failUnless(self.game.isBlindAnteRound()) + + # The game is explicitely canceled + self.game.pot = 500 + self.game.canceled(1, 500) + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + + # The game is finished, there is no winners + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + self.failUnlessEqual(len(self.game.winners), 0) + + # No winner, the end information are not valid + self.failIf(self.game.isGameEndInformationValid()) + + # --------------------------------------------------------- + def testNoAutoPlayer(self): + """Test Poker Game : No auto player""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The player 1 is an automatic player + player1.auto = True + + # The player 1 is not an automatic player + self.failUnless(self.game.noAutoPlayer(1)) + self.failIf(player1.auto) + + # Invalid player + self.failIf(self.game.noAutoPlayer(3)) + + # --------------------------------------------------------- + def testAutoPlayer(self): + """Test Poker Game : Auto player""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # The player 1 is set an automatic player + self.game.autoPlayer(1) + self.failUnless(player1.auto) + + # The player 1 sit out because he is not a bot + self.game.interactivePlayer(1) + self.game.autoPlayer(1) + + # The blind is automatically payed because the player 2 is a bot + self.game.botPlayer(2) + self.game.autoPlayer(2) + self.failUnlessEqual(player2.blind, True) + + # Client game + self.game.is_directing = False + + # AutoPlayer has no effect + self.game.botPlayer(3) + self.game.autoPlayer(3) + self.failIfEqual(player3.blind, True) + + # --------------------------------------------------------- + def testPlayersPlaying(self): + """Test Poker Game : Players playing""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The game is not running so there is no playing players + self.failUnlessEqual(self.game.playingCount(), 0) + self.failUnlessEqual(self.game.serialsPlaying(), []) + self.failUnlessEqual(self.game.playersPlaying(), []) + self.failUnlessEqual(self.game.notPlayingCount(), 2) + self.failUnlessEqual(self.game.serialsNotPlaying(), [1, 2]) + self.failUnlessEqual(self.game.playersNotPlaying(), [player1, player2]) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # All the players are now playing + self.failUnlessEqual(self.game.playingCount(), 2) + self.failUnlessEqual(self.game.serialsPlaying(), [1, 2]) + self.failUnlessEqual(self.game.playersPlaying(), [player1, player2]) + self.failUnlessEqual(self.game.notPlayingCount(), 0) + self.failUnlessEqual(self.game.serialsNotPlaying(), []) + self.failUnlessEqual(self.game.playersNotPlaying(), []) + + # --------------------------------------------------------- + def testMuckStateSitOut(self): + """Test Poker Game : Muck state sit out""" + player1 = self.AddPlayerAndSit(1, 2) + self.game.state = pokergame.GAME_STATE_MUCK + self.game.player_list = [ 1 ] + self.failIf(self.game.sitOutNextTurn(1)) + self.failUnlessEqual(True, self.game.getPlayer(1).sit_out_next_turn) + + # --------------------------------------------------------- + def testMuckStateWonFold(self): + """Test Poker Game : Muck state won fold""" + + self.game.setVariant('holdem') + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # Buy in amount + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1600) + + # The players raise + self.failUnless(self.game.callNraise(1, 100)) + self.failUnless(self.game.callNraise(2, 200)) + + self.failUnlessEqual(player1.bet, 100) + self.failUnlessEqual(player2.bet, 200) + + # The player 1 fold + self.failUnless(self.game.fold(1)) + + # The winner is the player 2 + self.failUnlessEqual(self.game.winners, [2]) + self.failUnlessEqual(self.game.playersWinner(), [player2]) + self.failUnless(self.game.isWinnerBecauseFold()) + + # Money amounts after + self.failUnlessEqual(self.game.getPlayerMoney(1), 1500) + rake = self.game.getRakedAmount() + self.failUnlessEqual(10, rake) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1700 - rake) + + # --------------------------------------------------------- + def testMuckStateWonAllIn(self): + """Test Poker Game : Muck state won all in""" + + self.game.setVariant('holdem') + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # Buy in amount + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1600) + + # The players raise + self.failUnless(self.game.callNraise(1, 100)) + self.failUnless(self.game.callNraise(2, 1600)) + + self.failUnless(player1.bet, 100) + self.failUnless(player2.bet, 1600) + + # The player 2 is all in + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + self.failUnless(player2.isAllIn()) + + # The player 1 is also all in + self.failUnless(self.game.callNraise(1, self.game.getPlayerMoney(1))) + self.failUnless(player1.isAllIn()) + + # All the players are now all in + # All the cards must be dealt + # Each player has 2 cards, and there are 5 cards in the board + hand1 = pokercards.PokerCards(['8s', 'As']) + hand2 = pokercards.PokerCards(['3h', '6d']) + board = pokercards.PokerCards(['4s', 'Qs', '6s', '6h', 'Ah']) + + self.failUnlessEqual(player1.hand, hand1) + self.failUnlessEqual(player2.hand, hand2) + self.failUnlessEqual(self.game.board, board) + + # The player 1 wins with a flush + self.failUnlessEqual(self.game.winners, [1]) + self.failUnlessEqual(self.game.playersWinner(), [player1]) + + # Money amounts after + self.failUnlessEqual(self.game.getPotAmount(), 3200) + self.failUnlessEqual(self.game.getRakedAmount(), 160) + self.failUnlessEqual(self.game.getPlayerMoney(1), 3040) + self.failUnlessEqual(self.game.getPlayerMoney(2), 0) + + # --------------------------------------------------------- + def testMuckStateWonRegular(self): + """Test Poker Game : Muck state won regular""" + + self.game.setVariant('holdem') + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Deal cards + self.game.dealCards() + + # Buy in amount + self.failUnlessEqual(self.game.getPlayerMoney(1), 1600) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1600) + + # Round 1 + self.failUnless(self.game.callNraise(1, 100)) + self.failUnless(self.game.callNraise(2, 200)) + self.failUnless(self.game.call(1)) + + # Round 2 + self.failUnless(self.game.callNraise(2, 100)) + self.failUnless(self.game.call(1)) + + # Round 3 + self.failUnless(self.game.callNraise(2, 100)) + self.failUnless(self.game.callNraise(1, 300)) + self.failUnless(self.game.call(2)) + + # Round 4 + self.failUnless(self.game.isLastRound()) + self.failUnless(self.game.check(2)) + self.failUnless(self.game.check(1)) + + # The turn is finished + # Each player has 2 cards, and there is 5 cards in the board + hand1 = pokercards.PokerCards(['8s', 'As']) + hand2 = pokercards.PokerCards(['3h', '6d']) + board = pokercards.PokerCards(['4s', 'Qs', '6s', '6h', 'Ah']) + + self.failUnlessEqual(player1.hand, hand1) + self.failUnlessEqual(player2.hand, hand2) + self.failUnlessEqual(self.game.board, board) + + # The player 1 wins with a flush + self.failUnlessEqual(self.game.winners, [1]) + self.failUnlessEqual(self.game.playersWinner(), [player1]) + + # Money amounts after + self.failUnlessEqual(self.game.getPotAmount(), 1200) + self.failUnlessEqual(self.game.getRakedAmount(), 60) + self.failUnlessEqual(self.game.getPlayerMoney(1), 2140) # 2200 - 60 + self.failUnlessEqual(self.game.getPlayerMoney(2), 1000) + + # The money has been already distributed + self.failUnless(self.game.moneyDistributed()) + + # The distribution has no effect + self.game.distributeMoney() + + # Money amounts after + self.failUnlessEqual(self.game.getPlayerMoney(1), 2140) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1000) + + # --------------------------------------------------------- + def testHighLowWinners(self): + """Test Poker Game : high low winners""" + + # Modify wins properties + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/wins', None, { 'ways' : '2'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + winner_properties = { + 'id' : '2', + 'type' : 'hand', + 'order' : 'low8' + } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/wins', 'winner', winner_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + self.game.variant = 'holdem8' + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # High low game + self.failUnless(self.game.isHighLow()) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Auto pay blind + for serial in self.game.serialsAll(): + self.game.autoBlindAnte(serial) + + # Deal all the cards + while not self.game.isLastRound(): + self.game.nextRound() + self.game.dealCards() + + # Check players money and bet + self.failUnlessEqual(player1.bet, 0) + self.failUnlessEqual(player2.bet, 500) + self.failUnlessEqual(player3.bet, 1000) + + self.failUnlessEqual(player1.money, 1600) + self.failUnlessEqual(player2.money, 1100) + self.failUnlessEqual(player3.money, 600) + + self.game.initRound() + + self.failUnless(self.game.callNraise(2,501)) + self.failUnless(self.game.call(3)) + self.failUnless(self.game.call(1)) + + # 2 winners + self.failUnlessEqual(self.game.winners, [2, 3]) + + # Check money distribution + self.failUnlessEqual(self.game.getRakedAmount(), 150) + self.failUnlessEqual(player1.money, 599) + # + # Each player gives his share to the rake, i.e. 150/2 + # + self.failUnlessEqual(player2.money, 2026) # 2101 - (150/2) + self.failUnlessEqual(player3.money, 2025) # 2100 - (150/2) + + # --------------------------------------------------------- + def testRemovePlayer(self): + """Test Poker Game : Remove player""" + + # The number max of player is 2 so there are 2 seats left + self.failUnlessEqual(self.game.seatsLeftCount(), 2) + self.failUnlessEqual(self.game.seats_left, [2, 7]) + + # Add a new player on the seat 7 + player1 = self.AddPlayerAndSit(1, 7) + self.failUnlessEqual(player1.seat, 7) + + # 1 seat is still left + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + self.failUnlessEqual(self.game.seats_left, [2]) + + # Remove the player + self.failUnless(self.game.removePlayer(1)) + + # The Player has been delete + self.failUnlessEqual(self.game.getPlayer(1), None) + + # The player seat is now left + self.failUnlessEqual(self.game.seatsLeftCount(), 2) + self.failUnlessEqual(self.game.seats_left, [7, 2]) + + # Add two players on the same seat + player1 = self.AddPlayerAndSit(1) + player2 = self.AddPlayerAndSit(2) + player2.seat = player1.seat + self.failUnlessEqual(self.game.seatsLeftCount(), 0) + + # Remove the player + self.failUnless(self.game.removePlayer(1)) + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # Remove the second player + self.failUnless(self.game.removePlayer(2)) + + # The number of seat left is still the same + self.failUnlessEqual(self.game.seatsLeftCount(), 1) + + # --------------------------------------------------------- + def testCardsDealtThisRoundCount(self): + """Test Poker Game : Card dealt this round""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The game is not running + self.failUnlessEqual(self.game.cardsDealtThisRoundCount(), -1) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + self.failUnlessEqual(self.game.cardsDealtThisRoundCount(), 0) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # First round 2 cards down + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info["cards"], ['down', 'down']) + self.failUnlessEqual(self.game.cardsDealtThisRoundCount(), 2) + self.failUnlessEqual(self.game.downCardsDealtThisRoundCount(), 2) + self.failUnlessEqual(self.game.upCardsDealtThisRoundCount(), 0) + + # Set a card to up + round_info["cards"] = ['down', 'up'] + self.failUnlessEqual(self.game.downCardsDealtThisRoundCount(), 1) + self.failUnlessEqual(self.game.upCardsDealtThisRoundCount(), 1) + + # --------------------------------------------------------- + def testUpdateStats(self): + """Test Poker Game : Update stats""" + + self.game.setMaxPlayers(3) + + # Initial pots + pots = { + 'contributions': { 'total': {} }, + 'pots': [[0, 0]], + 'last_round': -1, + 'building': 0, + } + + # Initial stats + stats = { + 'flops': [], + 'flops_count': 20, + 'percent_flop': 0, + 'pots': [], + 'pots_count': 20, + 'average_pot': 0, + 'hands_per_hour': 0, + 'time': -1, + 'hands_count': 0, + 'frequency': 180 # seconds + } + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Check stats + for attribute, value in stats.items(): + self.failUnlessEqual(self.game.stats[attribute], value) + + # Update stats flop + self.game.updateStatsFlop(True) + + # Check stats + self.failUnlessEqual(self.game.stats['flops'], [0]) + self.failUnlessEqual(self.game.stats['percent_flop'], 0) + + # Init stats + self.game.stats = stats.copy() + + # Update stats + self.game.updateStatsFlop(False) + + # Check stats + self.failUnlessEqual(self.game.stats['flops'], [100]) + self.failUnlessEqual(self.game.stats['percent_flop'], 100) + + # Update stats end turn + self.failUnlessEqual(self.game.stats['time'], -1) + self.game.updateStatsEndTurn() + self.failIfEqual(self.game.stats['time'], -1) + self.failUnlessEqual(self.game.stats['hands_count'], 0) + + # Set the frequency to 1 hour + self.game.stats['frequency'] = 3600 + + # Modification fo the time + self.game.setTime(4000) + + # Modification of the pots + self.game.side_pots['pots'] = [[500, 300]] + + # Modification of the hand count + self.game.hands_count = 1 + + # Update stats end turn + self.game.updateStatsEndTurn() + + # Check stats + self.failUnlessEqual(self.game.stats['average_pot'], 300) + self.failUnlessEqual(self.game.stats['hands_per_hour'], 1) + self.failUnlessEqual(self.game.stats['hands_count'], 1) + + # --------------------------------------------------------- + def testSidePots(self): + """Test Poker Game : Side pots""" + + # Initial pots + pots = { + 'contributions': { 'total': {} }, + 'pots': [[0, 0]], + 'last_round': -1, + 'building': 0, + } + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # The side pots is initally empty + self.failUnlessEqual(self.game.getPots(), {}) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 0) + self.failIf(self.game.isSingleUncalledBet(self.game.getPots())) + + # The blind contribution has been added to the pots + current_round = self.game.current_round + pots['contributions'][current_round] = {} + self.failUnlessEqual(self.game.getPots(), pots) + + # The player 1 pay the blind + self.game.autoBlindAnte(1) + self.failUnlessEqual(player1.bet, 500) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 1) + self.failUnless(self.game.isSingleUncalledBet(self.game.getPots())) + + # The pots has been updated + pots['building'] += 500 + pots['contributions']['total'][1] = 500 + pots['contributions'][current_round][len(pots['pots']) -1] = {} + pots['contributions'][current_round][len(pots['pots']) -1][1] = 500 + self.failUnlessEqual(self.game.getPots(), pots) + + # The player 2 pay also the blind + self.game.autoBlindAnte(2) + self.failUnlessEqual(player2.bet, 1000) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 2) + self.failIf(self.game.isSingleUncalledBet(self.game.getPots())) + + # First round + self.failUnless(self.game.isFirstRound()) + + # The pots has been updated + pots['building'] += 1000 + pots['contributions']['total'][2] = 1000 + + # The blind turn will be finished so its contribution infos will be copy in the first round infos and deleted + pots['contributions'][current_round][len(pots['pots']) -1][2] = 1000 + pots['contributions'][current_round + 1] = pots['contributions'][-1] + del pots['contributions'][current_round] + pots['last_round'] = 0 + current_round += 1 + + # Check pots + self.failUnlessEqual(self.game.getPots(), pots) + + # The player 1 raises and is allin + self.failUnless(self.game.callNraise(1, 700)) + self.failUnlessEqual(player1.bet, 1200) + + # The pots has been updated + pots['building'] += 700 + pots['contributions']['total'][1] += 700 + pots['contributions'][current_round][len(pots['pots']) -1][1] += 700 + self.failUnlessEqual(self.game.getPots(), pots) + self.failUnlessEqual(self.game.getLatestPotContributions(), {0: {1: 1200, 2: 1000}}) + + # The player 2 call + self.failUnless(self.game.call(2)) + + # Second round + self.failUnless(self.game.isSecondRound()) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 0) + + # The round is finished, the post has been updated + pots['building'] = 0 + pots['pots'][0] = [1200 + 1200, 1200 + 1200] + pots['contributions']['total'][2] += 200 + pots['contributions'][current_round][len(pots['pots']) -1][2] += 200 + + current_round += 1 + pots['last_round'] = 1 + pots['contributions'][current_round] = {} + + # Check pots + self.failUnlessEqual(self.game.getPots(), pots) + self.failUnlessEqual(self.game.getSidePotTotal(), 2400) + + # The player 2 raise 100 + self.failUnless(self.game.callNraise(2, 100)) + self.failUnlessEqual(self.game.getLatestPotContributions(), {0: {2: 100}}) + + # The player 1 call + self.failUnless(self.game.call(1)) + + # Round 3 + self.failUnlessEqual(self.game.current_round, 2) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 0) + + # The pots has been updated + pots['last_round'] = 2 + pots['pots'][0] = [1200 + 1200 + 100 + 100, 1200 + 1200 + 100 + 100] + pots['contributions']['total'][1] += 100 + pots['contributions']['total'][2] += 100 + pots['contributions'][current_round][len(pots['pots']) -1] = {} + pots['contributions'][current_round][len(pots['pots']) -1][1] = 100 + pots['contributions'][current_round][len(pots['pots']) -1][2] = 100 + + current_round += 1 + pots['contributions'][current_round] = {} + + # Check pots + self.failUnlessEqual(self.game.getPots(), pots) + self.failUnlessEqual(self.game.getSidePotTotal(), 2600) + self.failUnlessEqual(self.game.playersInPotCount(self.game.getPots()), 0) + + + # --------------------------------------------------------- + def testEndTurn(self): + """Test Poker Game : End turn""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Pay the blind + self.game.autoBlindAnte(1) + self.game.autoBlindAnte(2) + + # Check the players money and bet + self.failUnlessEqual(player1.bet, 500) + self.failUnlessEqual(player2.bet, 1000) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1100) + self.failUnlessEqual(self.game.getPlayerMoney(2), 600) + + # Set a rebuy amount for each player + self.game.rebuy(1, 400) + self.game.rebuy(2, 600) + self.failUnlessEqual(player1.rebuy, 400) + self.failUnlessEqual(player2.rebuy, 600) + + # The rebuy is credited to the player + self.game.endTurn() + + self.failUnlessEqual(player1.rebuy, 0) + self.failUnlessEqual(player2.rebuy, 0) + self.failUnlessEqual(self.game.getPlayerMoney(1), 1500) + self.failUnlessEqual(self.game.getPlayerMoney(2), 1200) + + # The hand count is incremented + self.failUnlessEqual(self.game.hands_count, 1) + + # The player 1 is broke + player1.money = 0 + self.failUnless(self.game.isBroke(1)) + + # Remove the player 2 + self.game.removePlayer(2) + self.failUnless(player2.remove_next_turn) + + # Make the player remove needed + self.game.endTurn() + + # The player 1 sit out + self.failIfEqual(self.game.getPlayer(1), None) + self.failUnless(self.game.getSitOut(1)) + + # The player 2 has been removed + self.failUnlessEqual(len(self.game.seats_left), 1) + self.failUnlessEqual(self.game.allCount(), 1) + self.failUnlessEqual(self.game.getPlayer(2), None) + + # --------------------------------------------------------- + def testBeginTurn(self): + """Test Poker Game : Begin turn""" + + hand_serial = 1 + + # Create player 1 + player1 = self.AddPlayerAndSit(1, 2) + + # There is not enough player to start + self.failIf(self.game.buildPlayerList(True)) + self.game.beginTurn(hand_serial) + self.failUnlessEqual(self.game.player_list, []) + self.failUnlessEqual(self.game.current_round, -2) + + # Create player 2 + player2 = self.AddPlayerAndSit(2, 7) + + # Warning the muckable list is not empty + self.game.setMuckableSerials([1]) + + # Begin turn + self.game.beginTurn(hand_serial) + + # The muckable serials have been reset + self.game.setMuckableSerials([]) + + # Init player infos + player_infos = { + 'bet' : 0, + 'dead' : 0, + 'fold' : False, + 'hand' : pokercards.PokerCards(), + 'side_pot_index' : 0, + 'all_in' : False, + 'ante' : False + } + + # Init side pots infos + side_pots_infos ={ + 'contributions': { 'total': {} }, + 'pots': [[0, 0]], + 'last_round': -1, + 'building': 0, + } + + # Current round initialisation + side_pots_infos['contributions'][self.game.current_round] = {} + + # Init game infos + game_infos = { + 'hand_serial' : hand_serial, + 'pot' : 0, + 'board' : pokercards.PokerCards(), + 'winners' : [], + 'muckable_serials' : [], + 'win_condition' : pokergame.WON_NULL, + 'serial2best' : {}, + 'showdown_stack' : [], + 'side_pots' : side_pots_infos + } + + # Check game initialisation + for attribute, value in game_infos.items(): + self.failUnlessEqual(getattr(self.game, attribute), value) + + # Check players initialisation + for player in (player1, player2): + for attribute, value in player_infos.items(): + self.failUnlessEqual(getattr(player, attribute), value) + + # Check history, first event of type game + self.failIfEqual(len(self.game.historyGet()), 0) + self.failUnlessEqual(self.game.historyGet()[0][0], 'game') + + # Check player list + self.failUnlessEqual(self.game.player_list, [1, 2]) + + # Blind and ante turn + self.failUnless(self.game.isBlindAnteRound()) + + # Call again begin turn has no effect + self.game.beginTurn(3) + self.failIfEqual(self.game.hand_serial, 3) + + # --------------------------------------------------------- + def testInitRound(self): + """Test Poker Game : Init round""" + + round_infos = { + 0 : { + 'name' : 'pre-flop', + 'position' : 'under-the-gun' + }, + 1 : { + 'name' : 'flop', + 'position' : 'next-to-dealer' + }, + 2 : { + 'name' : 'turn', + 'position' : 'high' + }, + 3 : { + 'name' : 'river', + 'position' : 'invalid' + } + } + + # Change the round turn properties + round_turn_properties = { 'type' : 'high' } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/round[@name="turn"]/position', None, round_turn_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the round river properties + round_river_properties = { 'type' : 'invalid' } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/round[@name="river"]/position', None, round_river_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the variant structure + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Check the round infos + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info['name'], round_infos[self.game.current_round]['name']) + self.failUnlessEqual(round_info['position'], round_infos[self.game.current_round]['position']) + + # Check game init + self.failUnlessEqual(self.game.last_bet, 0) + self.failUnless(self.game.first_betting_pass) + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + self.failUnlessEqual(self.game.getPlayerLastToTalk(), player2) + + # Check players init + for player in (player1, player2): + self.failIf(player.talked_once) + + # Second round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isSecondRound()) + + # Check the round infos + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info['name'], round_infos[self.game.current_round]['name']) + self.failUnlessEqual(round_info['position'], round_infos[self.game.current_round]['position']) + self.failUnlessEqual(self.game.getSerialInPosition(), 2) + self.failUnlessEqual(self.game.getPlayerLastToTalk(), player1) + + # Round 3 + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.current_round, 2) + + # Check the round infos + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info['name'], round_infos[self.game.current_round]['name']) + self.failUnlessEqual(round_info['position'], round_infos[self.game.current_round]['position']) + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + self.failUnlessEqual(self.game.getPlayerLastToTalk(), player2) + + # Round 4 + self.game.nextRound() + self.failUnlessRaises(UserWarning,self.game.initRound) + + # --------------------------------------------------------- + def testInitRoundClientGame(self): + """Test Poker Game : Init round client game""" + + # Create a client game + self.CreateGameClient() + self.InitGame() + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + round_infos = { + 0 : { + 'name' : 'pre-flop', + 'position' : 'under-the-gun' + }, + 1 : { + 'name' : 'flop', + 'position' : 'low' + }, + 2 : { + 'name' : 'turn', + 'position' : 'under-the-gun' + } + } + + # Change the round flop properties + round_flop_properties = { 'type' : 'low' } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/round[@name="flop"]/position', None, round_flop_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Change the round turn properties + round_flop_properties = { 'type' : 'under-the-gun' } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/round[@name="turn"]/position', None, round_flop_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the variant structure + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failUnlessEqual(self.game.player_list, [1, 2, 3]) + + # Player 2 is waiting big blind + player2.wait_for = 'big' + + # First round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isFirstRound()) + + # Check the round infos + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info['name'], round_infos[self.game.current_round]['name']) + self.failUnlessEqual(round_info['position'], round_infos[self.game.current_round]['position']) + self.failUnlessEqual(self.game.player_list, [1, 3]) + + # Check game init + self.failUnlessEqual(self.game.last_bet, 0) + self.failUnless(self.game.first_betting_pass) + self.failUnlessEqual(self.game.getSerialInPosition(), 3) + self.failUnlessEqual(self.game.getPlayerLastToTalk(), player1) + + # Check players init + for player in (player1, player2): + self.failIf(player.talked_once) + + # Second round + self.game.nextRound() + self.game.initRound() + self.failUnless(self.game.isSecondRound()) + + # Check the round infos + round_info = self.game.roundInfo() + self.failUnlessEqual(round_info['name'], round_infos[self.game.current_round]['name']) + self.failUnlessEqual(round_info['position'], round_infos[self.game.current_round]['position']) + self.failUnlessEqual(self.game.getSerialInPosition(), 1) + self.failUnlessEqual(self.game.getPlayerLastToTalk(), player3) + + # The player 1 and 2 are fold + player1.fold = True + player2.fold = True + self.failIf(player1.isInGame()) + self.failIf(player2.isInGame()) + + # Next round + self.game.nextRound() + + # Not enough player in game to init the round + self.failUnless(self.game.inGameCount, 1) + self.failUnlessRaises(UserWarning, self.game.initRound) + + # --------------------------------------------------------- + def testInitRoundBlindAllIn(self): + """Test Poker Game : Init round blinds are all-in""" + + # Create a client game + self.CreateGameClient() + self.InitGame() + + self.game.setMaxPlayers(4) + + # Create players + player1 = self.AddPlayerAndSit(1, 1) + player2 = self.AddPlayerAndSit(2, 3) + player3 = self.AddPlayerAndSit(3, 6) + player4 = self.AddPlayerAndSit(4, 8) + + # Change the round flop properties + round_flop_properties = { 'type' : 'low' } + + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant/round[@name="flop"]/position', None, round_flop_properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Reload the variant structure + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + self.failUnlessEqual(self.game.player_list, [1, 2, 3, 4]) + + # Player 2 & 4 are all_in + player2.all_in = True + player4.all_in = True + self.failUnless("small", player2.blind) + self.failUnless("big", player3.blind) + + # First round + self.game.nextRound() + self.game.initRound() + # + # idx + # players: 0 | 1 dealer - first to talk + # 1 | 2 small blind all in + # 2 | 3 big blind - last to talk + # 3 | 4 all in + # + self.assertEqual(0, self.game.position) + self.assertEqual(2, self.game.last_to_talk) + + # --------------------------------------------------------- + def testMuck(self): + """Test Poker Game : Muck""" + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Init the muckable serials + self.game.setMuckableSerials([10,20]) + self.failUnlessEqual(self.game.muckable_serials, [10,20]) + + # Init the muckable serials + self.game.setMuckableSerials((1,2)) + self.failUnlessEqual(ListType, type(self.game.muckable_serials)); + self.failUnlessEqual(self.game.muckable_serials, [1,2]) + + # Muck not available + self.game.muck(1, True) + self.failUnlessEqual(self.game.muckable_serials, [1,2]) + + # Muck state + self.game.changeState(pokergame.GAME_STATE_MUCK) + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_MUCK) + + # Player 1 muck + self.game.muck(1, False) + self.failUnlessEqual(self.game.muckable_serials, [2]) + self.failUnless(player1.hand.areVisible()) + + # The muck serial list is not empty + # The state is still MUCK STATE + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_MUCK) + + # Unknown player, muck has no effect + self.game.muck(3, True) + self.failUnlessEqual(self.game.muckable_serials, [2]) + + # Client game + self.game.is_directing = False + + # Muck state has no effect + self.game.muckState(pokergame.WON_NULL) + + # Muck has no effect + self.game.muck(2, False) + self.failUnlessEqual(self.game.muckable_serials, [2]) + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_MUCK) + self.game.is_directing = True + + # Player 2 muck + self.game.muck(2, False) + self.failUnlessEqual(self.game.muckable_serials, []) + self.failUnless(player2.hand.areVisible()) + + # The game is finished + self.failUnlessEqual(self.game.state, pokergame.GAME_STATE_END) + + # --------------------------------------------------------- + def testGetMaxBoardSize(self): + """Test Poker Game : Get max board size""" + + # The max board size is initially set to 5 + self.failUnlessEqual(self.game.getMaxBoardSize(), 5) + + # Change the variant type + if not self.ModifyXMLFile(self.VariantTempFile, '/poker/variant', None, {'type' : 'NotCommunity'}): + self.fail('Error during modification of variant file ' + self.VariantTempFile) + + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # Not a community variant, max board size set 0 + self.failUnlessEqual(self.game.getMaxBoardSize(), 0) + + # --------------------------------------------------------- + def testGetParamList(self): + """Test Poker Game : Get param list""" + + self.failUnlessEqual(len(self.game.getParamList('/bet/variants/round')), 4) + self.failUnlessEqual(len(self.game.getParamList('/poker/variant/community/position')), 5) + + # --------------------------------------------------------- + def testGetParam(self): + """Test Poker Game : Get param""" + + self.failUnlessEqual(self.game.getParam('/bet/@buy-in'), '50') + self.failUnlessEqual(self.game.getParam('/poker/variant/@type'), 'community') + + # --------------------------------------------------------- + def testGetParamProperties(self): + """Test Poker Game : Get param properties""" + + bet_properties = { + 'buy-in' : '50', + 'max-buy-in' : '10000', + 'best-buy-in' : '1600', + 'unit' : '300' + } + + properties = self.game.getParamProperties('/bet')[0] + for attribute, value in bet_properties.items(): + self.failUnlessEqual(properties[attribute], value) + + variant_properties = { + 'type' : 'community', + 'name' : 'VariantName', + 'id' : 'VariantTest' + } + + properties = self.game.getParamProperties('/poker/variant')[0] + for attribute, value in variant_properties.items(): + self.failUnlessEqual(properties[attribute], value) + + # --------------------------------------------------------- + def testIsGameEndInformationValid(self): + """Test Poker Game : Is game end information are valid""" + + # The game state is not GAME_STATE_END + self.failIfEqual(self.game.state,pokergame.GAME_STATE_END) + self.failIf(self.game.isGameEndInformationValid()) + + # Change the game state + self.game.changeState(pokergame.GAME_STATE_END) + self.failUnlessEqual(self.game.state,pokergame.GAME_STATE_END) + + # there is no winner + self.failUnlessEqual(len(self.game.winners),0) + self.failIf(self.game.isGameEndInformationValid()) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 7) + + # Set the winners + self.game.winners = [1] + + # The end information are valid + self.failUnless(self.game.isGameEndInformationValid()) + + # Remove the winner from the player list + del self.game.serial2player[1] + + # The end information are now invalid + self.failIf(self.game.isGameEndInformationValid()) + + # --------------------------------------------------------- + def testDispatchMuck(self): + """Test Poker Game : Dispatch Muck""" + + self.game.setVariant('holdem') + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Deal all the cards + while not self.game.isLastRound(): + self.game.nextRound() + self.game.dealCards() + + # Init winners + self.game.setWinners([1]) + + # Init winners per side + self.game.side2winners = { 'hi': [], 'low': [] } + + # Winner because fold + self.game.win_condition = pokergame.WON_FOLD + self.failUnlessEqual(self.game.dispatchMuck(), ((), (1,))) + self.game.win_condition = pokergame.WON_REGULAR + + # Dealer is the player 2 + self.failUnlessEqual(self.game.dealer, 0) + + # The player 2 and 3 muck, the winner show his cards + self.failUnlessEqual(self.game.dispatchMuck(), ([1], [2,3])) + + # Init winners per side + self.game.side2winners = { 'hi': [2], 'low': [] } + + # The player 2 show also his cards + self.failUnlessEqual(self.game.dispatchMuck(), ([2, 3, 1], [])) + + # Init winners per side + self.game.side2winners = { 'hi': [], 'low': [3] } + + # All the player show their cards + self.failUnlessEqual(self.game.dispatchMuck(), ([2,1], [3])) + + # Client game + self.game.is_directing = False + self.failUnlessEqual(self.game.dispatchMuck(), None) + + # --------------------------------------------------------- + def testAutoMuckNever(self): + """Test Poker Game : Auto muck never""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Auto pay blind + for serial in self.game.serialsAll(): + self.game.autoBlindAnte(serial) + + # Set auto muck state + self.game.autoMuck(1, pokergame.AUTO_MUCK_NEVER) + self.game.autoMuck(2, pokergame.AUTO_MUCK_NEVER) + self.game.autoMuck(3, pokergame.AUTO_MUCK_NEVER) + + # Players 1 and 2 fold + self.failUnless(self.game.fold(1)) + self.failUnless(self.game.fold(2)) + + # Player 3 is the winner and muckable + self.failUnlessEqual(self.game.winners, [3]) + self.failUnlessEqual(self.game.muckable_serials, [3]) + + # --------------------------------------------------------- + def testAutoMuckAlways(self): + """Test Poker Game : Auto muck always""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Auto pay blind + for serial in self.game.serialsAll(): + self.game.autoBlindAnte(serial) + + # Set auto muck state + self.game.autoMuck(1, pokergame.AUTO_MUCK_ALWAYS) + self.game.autoMuck(2, pokergame.AUTO_MUCK_ALWAYS) + self.game.autoMuck(3, pokergame.AUTO_MUCK_ALWAYS) + + # Players 1 and 2 fold + self.failUnless(self.game.fold(1)) + self.failUnless(self.game.fold(2)) + + # No muckable players + self.failUnlessEqual(self.game.winners, [3]) + self.failUnlessEqual(self.game.muckable_serials, []) + + # --------------------------------------------------------- + def testAutoMuckWin(self): + """Test Poker Game : Auto muck win""" + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Auto pay blind + for serial in self.game.serialsAll(): + self.game.autoBlindAnte(serial) + + # Set auto muck state + self.game.autoMuck(1, pokergame.AUTO_MUCK_WIN) + self.game.autoMuck(2, pokergame.AUTO_MUCK_WIN) + self.game.autoMuck(3, pokergame.AUTO_MUCK_WIN) + + # Players 1 and 2 fold + self.failUnless(self.game.fold(1)) + self.failUnless(self.game.fold(2)) + + # Player 3 is the winner but not muckable + self.failUnless(self.game.isWinnerBecauseFold()) + self.failUnlessEqual(self.game.winners, [3]) + self.failUnlessEqual(self.game.muckable_serials, []) + + # --------------------------------------------------------- + def testAutoMuckLose(self): + """Test Poker Game : Auto muck lose""" + + self.game.variant = 'holdem' + + self.game.setMaxPlayers(3) + + # Create players + player1 = self.AddPlayerAndSit(1, 2) + player2 = self.AddPlayerAndSit(2, 5) + player3 = self.AddPlayerAndSit(3, 7) + + # Blind and ante turn + self.game.beginTurn(1) + self.failUnless(self.game.isBlindAnteRound()) + + # Auto pay blind + for serial in self.game.serialsAll(): + self.game.autoBlindAnte(serial) + + # Set auto muck state + self.game.autoMuck(1, pokergame.AUTO_MUCK_LOSE) + self.game.autoMuck(2, pokergame.AUTO_MUCK_LOSE) + self.game.autoMuck(3, pokergame.AUTO_MUCK_LOSE) + + # Deal all the cards + while not self.game.isLastRound(): + self.game.nextRound() + self.game.dealCards() + + self.game.initRound() + + self.failUnless(self.game.callNraise(2,100)) + self.failUnless(self.game.call(3)) + self.failUnless(self.game.call(1)) + + # Player 3 is the winner but not muckable + self.failIf(self.game.isWinnerBecauseFold()) + self.failUnlessEqual(self.game.winners, [3]) + self.failUnlessEqual(self.game.muckable_serials, []) + + # --------------------------------------------------------- + def testUpdateBlinds(self): + """Test Poker Game : Update blinds""" + + self.game.setMaxPlayers(4) + + # Create 1 player + player1 = self.AddPlayerAndSit(1, 1) + + # Not enough player sit + # The wait_for attribute is reset if not equal to first round + player1.wait_for = 'first_round' + self.game.updateBlinds() + self.failUnlessEqual(player1.wait_for, 'first_round') + + player1.wait_for = 'big' + self.game.updateBlinds() + self.failUnlessEqual(player1.wait_for, False) + + # Create players + player2 = self.AddPlayerAndSit(2, 3) + player3 = self.AddPlayerAndSit(3, 6) + player4 = self.AddPlayerAndSit(4, 8) + + # Init players infos + self.game.playersBeginTurn() + + # Update blinds + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False} + } + + self.game.updateBlinds() + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Move the dealer + self.game.moveDealerLeft() + + # Update blinds + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False} + } + + self.game.updateBlinds() + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Move the dealer + self.game.moveDealerLeft() + + # Update blinds + blinds = { + 1 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False} + } + + self.game.updateBlinds() + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Forbid missed blinds + player1.missed_blind = 'small' + player1.wait_for = 'late' + + player2.missed_blind = 'small' + player3.missed_blind = 'small' + + self.game.updateBlinds() + + blinds = { + 1 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False} + } + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # --------------------------------------------------------- + def testUpdateSmallBlinds(self): + """Test Poker Game : Update small blinds""" + + self.game.setMaxPlayers(4) + + # Create players + player1 = self.AddPlayerAndSit(1, 1) + player2 = self.AddPlayerAndSit(2, 3) + player3 = self.AddPlayerAndSit(3, 6) + player4 = self.AddPlayerAndSit(4, 8) + + # Update blinds + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False} + } + + self.game.updateBlinds() + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Init players infos + self.game.playersBeginTurn() + + # Player 2 has already payed the blind => + # Nothing is done + player2.blind = True + self.game.updateBlinds() + + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : True, 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False} + } + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Init players infos + self.game.playersBeginTurn() + + # Player 2 has missed a blind + player2.missed_blind = 'small' + self.game.updateBlinds() + + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : None, 'missed_blind' : 'small', 'wait_for' : 'late'}, + 3 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False} + } + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # --------------------------------------------------------- + def testUpdateBigBlinds(self): + """Test Poker Game : Update big blinds""" + + self.game.setMaxPlayers(4) + + # Create players + player1 = self.AddPlayerAndSit(1, 1) + player2 = self.AddPlayerAndSit(2, 3) + player3 = self.AddPlayerAndSit(3, 6) + player4 = self.AddPlayerAndSit(4, 8) + + # Update blinds + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : 'big', 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False} + } + + self.game.updateBlinds() + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # Init players infos + self.game.playersBeginTurn() + + # Player 2 has already payed the blind => + # Nothing is done + player3.blind = True + player3.wait_for = 'small' + self.game.updateBlinds() + + blinds = { + 1 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False}, + 2 : { 'blind' : 'small', 'missed_blind' : None, 'wait_for' : False}, + 3 : { 'blind' : True, 'missed_blind' : None, 'wait_for' : False}, + 4 : { 'blind' : None, 'missed_blind' : None, 'wait_for' : False} + } + + # Check blinds + for player in blinds.keys(): + for attribute, value in blinds[player].items(): + self.failUnlessEqual(getattr(self.game.getPlayer(player), attribute), value) + + # --------------------------------------------------------- + def testUpdateErrorSmallAndBigBlinds(self): + """Test Poker Game : Update error small and big blinds""" + + self.game.setMaxPlayers(pokergame.ABSOLUTE_MAX_PLAYERS) + + # Create players + for num in range(pokergame.ABSOLUTE_MAX_PLAYERS): + player = self.AddPlayerAndSit(num + 1) + player.wait_for = 'big' + self.game.getPlayer(1).wait_for = 'first_round' + + # Error small blind can not be assigned + self.game.updateBlinds() + + # Check player 1 blinds + blinds1 = {'blind' : 'late', 'missed_blind' : None, 'wait_for' : 'first_round'} + + # Check blinds + for attribute, value in blinds1.items(): + self.failUnlessEqual(getattr(self.game.getPlayer(1), attribute), value) + + blinds = {'blind' : 'late', 'missed_blind' : None, 'wait_for' : 'big'} + + # Check players blinds + for num in range(1, pokergame.ABSOLUTE_MAX_PLAYERS): + for attribute, value in blinds.items(): + self.failUnlessEqual(getattr(self.game.getPlayer(num + 1), attribute), value) + + def testAllinWithDead(self): + """ Test Poker Game : Allin with dead blind and lost to the winner although the winner has less money """ + + game = pokergame.PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + game.setVariant("holdem") + game.setBettingStructure("100-200-no-limit") + + player = {} + + money = {} + money[66] = 30000 + money[76] = 10000 + money[77] = 20000 + + for serial in (66, 76, 77): + self.assert_(game.addPlayer(serial)) + player[serial] = game.serial2player[serial] + player[serial].money = 2000000 + player[serial].buy_in_payed = True + self.assert_(game.sit(serial)) + #player[serial].auto_blind_ante = True + player[serial].money = money[serial] + game.autoMuck(serial, pokergame.AUTO_MUCK_ALWAYS) + + game.dealer_seat = 0 + + game.beginTurn(1) + + player[66].blind = 'big_and_dead' + player[76].blind = 'small' + player[77].blind = 'big' + + # + # 77 : 4c 8c + # 76 : 9s 4h + # 66 : 3h Jh + # + game.deck = ['7c', 'Qs', '6c', 'Qc', '2h', '8c', '4h', 'Jh', '4c', '9s', '3h' ] + + game.setPosition(0) + game.blind(66, 20000, 10000) + game.blind(76, 10000, 0) + game.blind(77, 20000, 0) + + self.assertEqual("end", game.state) + rake = game.getRakedAmount() + self.failUnlessEqual(3000, rake) + self.assertEqual(40000 - rake, game.showdown_stack[0]['serial2delta'][77]) + + def testDeadWithUncalled(self): + """ Test Poker Game : dead blind + a player has uncalled bet and is not the winner. + """ + game = pokergame.PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + game.setVariant("holdem") + game.setBettingStructure("100-200-no-limit") + + player = {} + + money = {} + money[66] = 2000000 + money[76] = 1000000 + money[77] = 1000000 + + for serial in (66, 76, 77): + self.assert_(game.addPlayer(serial)) + player[serial] = game.serial2player[serial] + player[serial].money = 200000 + player[serial].buy_in_payed = True + self.assert_(game.sit(serial)) + #player[serial].auto_blind_ante = True + game.autoMuck(serial, pokergame.AUTO_MUCK_ALWAYS) + player[serial].money = money[serial] + + game.dealer_seat = 0 + + game.beginTurn(1) + + player[66].blind = 'big_and_dead' + player[76].blind = 'small' + player[77].blind = 'big' + + # + # 77 : 4c 8c + # 76 : 9s 4h + # 66 : 3h Jh + # + game.deck = ['7c', 'Qs', '6c', 'Qc', '2h', '4h', 'Jh', '8c', '9s', '3h', '4c' ] + + game.setPosition(0) + game.blind(66, 20000, 10000) + game.blind(76, 10000, 0) + game.blind(77, 20000, 0) + + self.assertEqual(game.state, "pre-flop") + + game.callNraise(66, 2000000) + game.call(76) + game.fold(77) + + def testLastInGameDoesNotAct(self): + """ Test Poker Game : player folds (although he could check) while a player is allin and + another player is behind him. The turn ends now, the last player is not asked for his action. + """ + game = pokergame.PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + game.setVariant("holdem") + game.setBettingStructure("100-200-no-limit") + + player = {} + + money = {} + money[66] = 200000 + money[76] = 3000000 + money[77] = 100000 + + for serial in (66, 76, 77): + self.assert_(game.addPlayer(serial)) + player[serial] = game.serial2player[serial] + player[serial].money = 200000 + player[serial].buy_in_payed = True + self.assert_(game.sit(serial)) + #player[serial].auto_blind_ante = True + game.autoMuck(serial, pokergame.AUTO_MUCK_ALWAYS) + game.autoBlindAnte(serial) + player[serial].money = money[serial] + + game.dealer_seat = 0 + + # + # 77 : 4c 8c + # 76 : 9s 4h + # 66 : 3h Jh + # + game.deck = ['7c', 'Qs', '6c', 'Qc', '2h', '4h', 'Jh', '8c', '9s', '3h', '4c' ] + game.board = pokercards.PokerCards(['9c', '3d', '2d', 'Qd', 'Ah']) + + # player list: [66, 76, 77] + # dealer : 66 + game.beginTurn(1) + game.call(66) + game.call(76) + game.check(77) + self.assertEqual(game.state, "flop") + + game.callNraise(76, 150000) + game.call(77) + game.call(66) + self.assertEqual(game.state, "turn") + + game.fold(76) + self.assertEqual(game.state, "end") + + def testAllInAndFoldInNewRound(self): + """ Test Poker Game : player folds to a raise when heads up + in a betting round. Another player was allin in the previous + round. The winner has an uncalled amount AND wins the pot + in which the allin player was not. + """ + game = pokergame.PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + game.setVariant("holdem") + game.setBettingStructure("100-200-no-limit") + + player = {} + + money = {} + money[66] = 200000 + money[76] = 3000000 + money[77] = 100000 + + for serial in (66, 76, 77): + self.assert_(game.addPlayer(serial)) + player[serial] = game.serial2player[serial] + player[serial].money = 200000 + player[serial].buy_in_payed = True + self.assert_(game.sit(serial)) + #player[serial].auto_blind_ante = True + game.autoMuck(serial, pokergame.AUTO_MUCK_ALWAYS) + game.autoBlindAnte(serial) + player[serial].money = money[serial] + + game.dealer_seat = 0 + + # + # 77 : 4c 8c + # 76 : 9s Jd + # 66 : 3h Jh + # + game.deck = ['7c', 'Qs', '6c', 'Qc', '2h', 'Jd', 'Jh', '8c', '9s', '3h', '4c' ] + game.board = pokercards.PokerCards(['9c', '3d', '2d', 'Qd', 'Ah']) + + # player list: [66, 76, 77] + # dealer : 66 + game.beginTurn(1) + game.call(66) + game.call(76) + game.check(77) + self.assertEqual(game.state, "flop") + + game.callNraise(76, 150000) + game.call(77) + game.call(66) + self.assertEqual(game.state, "turn") + + game.callNraise(76, 150000) + game.fold(66) + self.assertEqual(game.state, "end") + + def testUpdateHistoryEnd(self): + game = self.game + game.turn_history = [("one",), + ("two",), + ("end",), + ("three",)] + game.updateHistoryEnd(winners = "winners", showdown_stack = "showdown_stack") + self.assertEqual(("end", "winners", "showdown_stack"), game.turn_history[2]) + + def testEmtpyShowdownStack(self): + turn_history = [("end", [], []),] + pokergame.history2messages(None, turn_history) + + # --------------------------------------------------------- + def AddPlayerAndSit(self, serial, seat = -1): + self.failUnless(self.game.addPlayer(serial, seat)) + self.failUnless(self.game.payBuyIn(serial,self.game.bestBuyIn())) + player = self.GetPlayer(serial) + self.failUnless(player.isBuyInPayed()) + self.failUnless(self.game.sit(serial)) + self.failUnless(self.game.isSit(serial)) + return player + + # --------------------------------------------------------- + def ModifyXMLFile(self, path, parent, child, attributes = {}): + + try: + doc = libxml2.parseFile(path) + except libxml2.parserError: + return False + + header = doc.xpathNewContext() + + node_parent = doc.getRootElement() + if parent: + nodes = header.xpathEval(parent) + if nodes: node_parent = nodes[0] + else: return False + + node = node_parent + if child: + node = node_parent.newChild(ns = None, name = child, content = None) + + for attribute_name, attribute_value in attributes.items(): + if not node.hasProp(attribute_name): + node.newProp(attribute_name,attribute_value) + else: + for property in node.properties: + if property.name == attribute_name: property.setContent(attribute_value) + + doc.saveFile(path) + + doc.freeDoc() + header.xpathFreeContext() + + return True + + # --------------------------------------------------------- + def CopyFile(self, src_path, dst_path): + if src_path and not os.path.isfile(src_path): + return False + + shutil.copyfile(src_path,dst_path) + if os.path.isfile(dst_path): + return True + + return False + + # --------------------------------------------------------- + def DeleteFile(self, path): + if os.path.isfile(path): + os.unlink(path) + + # --------------------------------------------------------- + def GetPlayer(self, serial): + player = self.game.getPlayer(serial) + self.failIfEqual(player, None) + return player + + # --------------------------------------------------------- + def CreateGameClient(self): + if not self.CopyFile(self.ConfigTmplFile, self.ConfigTempFile): + self.fail('Error during creation of configuration file ' + self.ConfigTempFile) + + self.game = pokergame.PokerGameClient(PokerGameTestCase.TestUrl, ['.', PokerGameTestCase.TestConfDirectory, '~/conf', tempfile.gettempdir()]) + + # --------------------------------------------------------- + def CreateGameServer(self): + if not self.CopyFile(self.ConfigTmplFile, self.ConfigTempFile): + self.fail('Error during creation of configuration file ' + self.ConfigTempFile) + + self.game = pokergame.PokerGameServer(PokerGameTestCase.TestUrl, ['.', PokerGameTestCase.TestConfDirectory, '~/conf', tempfile.gettempdir()]) + + # --------------------------------------------------------- + def InitGame(self): + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + self.game.setTime(0) + + if not self.CopyFile(self.VariantTmplFile, self.VariantTempFile): + self.fail('Error during creation of variant file ' + self.VariantTempFile) + + self.game.setVariant(PokerGameTestCase.TestVariantTemporaryFile) + + # Reload the betting structure + self.game.setBettingStructure(PokerGameTestCase.TestConfigTemporaryFile) + self.game.setMaxPlayers(2) + self.game.id = 4 + + predefined_decks = string.split("8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6h Ah 6d As 3h 8s") + shuffler = PokerPredefinedDecks([map(lambda card: self.game.eval.string2card(card), predefined_decks)]) + + self.game.deck = predefined_decks + self.game.shuffler = shuffler + +# --------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerGameTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerGameTestCase, prefix = "test2")) + return suite + +# --------------------------------------------------------- +def GetTestedModule(): + return pokergame + +# --------------------------------------------------------- +def Run(verbose): +# unittest.TestLoader.testMethodPrefix = "testMuckStateSitOut" + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# --------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-game.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokergame.py' TESTS='coverage-reset test-game.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-gamehistory.py +++ poker-engine-1.3.6/tests/test-gamehistory.py @@ -0,0 +1,643 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import shutil +import libxml2 +import time +import string + +from pokerengine import pokercards +from pokerengine import pokergame + +CallbackIds = None +CallbackArgs = None + +# ------------------------------------------------------------ +def InitCallback(): + global CallbackIds + global CallbackArgs + + CallbackIds = None + CallbackArgs = None + +# ------------------------------------------------------------ +def Callback(id, *args): + global CallbackIds + global CallbackArgs + + if not CallbackIds: CallbackIds = [] + if not CallbackArgs: CallbackArgs = [] + + CallbackIds.append(id) + CallbackArgs.append(args) + +# ------------------------------------------------------------ +class PokerGameHistoryTestCase(unittest.TestCase): + + TestConfDirectory = './test-data/conf' + TestConfigUrl = 'unittest.%s.xml' + TestConfigFile = 'config' + + # ------------------------------------------------------------ + def setUp(self): + conf_dirs = ['.', PokerGameHistoryTestCase.TestConfDirectory, '~/conf'] + self.game = pokergame.PokerGameServer(PokerGameHistoryTestCase.TestConfigUrl, conf_dirs) + self.game.verbose = int(os.environ.get('VERBOSE_T', 3)) + InitCallback() + + # ------------------------------------------------------------ + def tearDown(self): + pass + + # ------------------------------------------------------------ + def testPokerGameMessage(self): + """Test Poker game messages""" + + game_time = time.time() + + board = pokercards.PokerCards() + hand1 = pokercards.PokerCards(['4d', 'Ts']) + hand2 = pokercards.PokerCards(['3h', 'Kc']) + + history = [ \ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2], 7, { 1 : 500, 2 : 1000}), \ + ('wait_for', 1, 'first_round'), \ + ('player_list', [1, 2]), \ + ('round', 'round1', board, { 1 : hand1, 2 : hand2}), \ + ('showdown', board, {1 : hand1, 2 : hand2}), \ + ('position', 1), \ + ('blind_request', 1, 1000, 100, 'big_and_dead'), \ + ('wait_blind', 1), \ + ('blind', 1, 1000, 0), \ + ('ante_request', 1, 100), \ + ('ante', 1, 500), \ + ('all-in', 1), \ + ('call', 1, 500), \ + ('check', 1), \ + ('fold', 1), \ + ('raise', 1, 500), \ + ('canceled', 1, 10), \ + ('end', [1], [{ 'serial2share': { 1: 500 } }]), \ + ('sitOut', 1), \ + ('leave', [(1, 2), (2, 7)]), \ + ('finish', 1), \ + ('muck', (1,2)), \ + ('rebuy', 1, 500), \ + ('unknown',) \ + ] + + # Register the callback function + self.game.registerCallback(Callback) + + # Generate all the type of messages managed + for message in history: + apply(self.game.historyAdd,message) + + # All the messages are stored + self.failUnlessEqual(self.game.historyGet(), history) + + # Check the callback calls + self.failUnlessEqual(CallbackArgs, history) + + # ------------------------------------------------------------ + def testHistory2messagesGameEvent(self): + """Test Poker Game History to message Game event""" + + game_time = time.time() + + hand_serial = 2 + variant = 'variant' + betting_structure = 'betting_structure' + + history = [ \ + ('game', 1, hand_serial, 3, game_time, 'variant','betting_structure', [1, 2], 7, { 1 : 500, 2 : 1000}) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, 'hand #%d, %s, %s' % (hand_serial, variant, betting_structure)) + self.failUnlessEqual(message, []) + + # ------------------------------------------------------------ + def testHistory2messagesWaitForEvent(self): + """Test Poker Game History to message wait for event""" + + history = [ \ + ('wait_for', 1, 'first_round'), \ + ('wait_for', 2, 'late') \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + + message1 = '1 waiting for big blind' + message2 = '2 waiting for late blind' + self.failUnlessEqual(message, [message1, message2]) + + # ------------------------------------------------------------ + def testHistory2messagesCheck(self): + """Test Poker Game History to message check""" + + history = [ \ + ('check', 1) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 checks']) + + # ------------------------------------------------------------ + def testHistory2messagesFold(self): + """Test Poker Game History to message fold""" + + history = [ \ + ('fold', 1) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 folds']) + + # ------------------------------------------------------------ + def testHistory2messagesRaise(self): + """Test Poker Game History to message Raise""" + + history = [ \ + ('raise', 1, 500) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 raises 5']) + + # ------------------------------------------------------------ + def testHistory2messagesAllIn(self): + """Test Poker Game History to message All In""" + + history = [ \ + ('all-in', 1) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 is all in']) + + # ------------------------------------------------------------ + def testHistory2messagesSitOut(self): + """Test Poker Game History to message Sit out""" + + history = [ \ + ('sitOut', 1) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 sits out']) + + # ------------------------------------------------------------ + def testHistory2messagesAnte(self): + """Test Poker Game History to message Ante""" + + history = [ \ + ('ante', 1, 500) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 pays 5 ante']) + + # ------------------------------------------------------------ + def testHistory2messagesBlind(self): + """Test Poker Game History to message blind""" + + history = [ \ + ('blind', 1, 1000, 5), \ + ('blind', 1, 1000, 0) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, [ + '1 pays 10 blind and 5 dead', + '1 pays 10 blind' + ]) + + # ------------------------------------------------------------ + def testHistory2messagesCancelled(self): + """Test Poker Game History to message blind""" + + history = [ \ + ('canceled', 1, 100), \ + ('canceled', 0, 100), \ + ('canceled', 0, 0) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, [ + 'turn canceled (1 returned to 1)', + 'turn canceled', + 'turn canceled' + ]) + + # ------------------------------------------------------------ + def testHistory2messagesShowdown(self): + """Test Poker Game History to message showdown""" + + board = pokercards.PokerCards(['Ad', 'As']) + hand1 = pokercards.PokerCards(['4d', 'Ts']) + hand2 = pokercards.PokerCards(['3h', 'Kc']) + nocards = pokercards.PokerCards([pokercards.PokerCards.NOCARD, pokercards.PokerCards.NOCARD]) + + history = [ \ + ('showdown', board, { 1 : hand1, 2 : hand2}), \ + ('showdown', pokercards.PokerCards(), {1 : hand1, 2 : nocards}), \ + ] + + subject, message = self.GetMessagesFromHistory(history, str, True) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, [ + 'Board: Ad As', + 'Cards player 1: 4d Ts', + 'Cards player 2: 3h Kc', + 'Cards player 1: 4d Ts' + ]) + + # ------------------------------------------------------------ + def testHistory2messagesRound(self): + """Test Poker Game History to message showdown""" + + board = pokercards.PokerCards(['Ad', 'As']) + hand1 = pokercards.PokerCards(['4d', 'Ts']) + hand2 = pokercards.PokerCards(['3h', 'Kc']) + nocards = pokercards.PokerCards([pokercards.PokerCards.NOCARD, pokercards.PokerCards.NOCARD]) + + history = [ \ + ('round', 'round1', board, { 1 : hand1, 2 : hand2}), \ + ('round', 'round2', pokercards.PokerCards(), {1 : hand1, 2 : nocards}), \ + ('round', 'round3', pokercards.PokerCards(), {}), \ + ] + + subject, message = self.GetMessagesFromHistory(history, str, True) + self.failUnlessEqual(subject, '') + + self.failUnlessEqual(message, [ + 'round1, 2 players', + 'Board: Ad As', + 'Cards player 1: 4d Ts', + 'Cards player 2: 3h Kc', + 'round2, 2 players', + 'Cards player 1: 4d Ts', + 'round3' + ]) + + # ------------------------------------------------------------ + def testHistory2messagesEnd(self): + """Test Poker Game History to end message""" + + self.game.variant = 'holdem' + + # The player 1 wins because all the other players are fold + game_state ={ 'serial2share': { 1: 500 } } + + history = [ ('end', [1], [game_state]) ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + message1 = '1 receives 5 (everyone else folded)' + self.failUnlessEqual(message, [message1]) + + # Invalid frame + invalid_frame = { 'type': 'invalid'} + + hand1 = pokercards.PokerCards(['Ad', 'As']) + board = pokercards.PokerCards(['9d', '6s', 'Td', '4d', '4h']) + + game_state ={ + 'serial2best' : { 1 : + { 'hi' : self.game.eval.best('hi', hand1.tolist(True) + board.tolist(True), []), + 'low' : self.game.eval.best('low', hand1.tolist(True) + board.tolist(True), []) + } + } + } + + history = [ ('end', [1], [game_state, invalid_frame]) ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, []) + + # Left over frame + frame = { + 'type': 'left_over', + 'serial' : 1, + 'chips_left' : 10 + } + + history = [ ('end', [1], [game_state, frame]) ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['1 receives 10 odd chips']) + + # uncalled frame + frame = { + 'type': 'uncalled', + 'serial' : 1, + 'uncalled' : 10 + } + + history = [ ('end', [1], [game_state, frame]) ] + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, ['returning uncalled bet 0.10 to 1']) + + # Resolve frame 1 + frame = { + 'type': 'resolve', + 'serials' : [1, 2, 3], + 'serial2share': { 1: 300, 2 : 200 }, + 'hi' : [1, 2], + 'low' : [1], + 'pot' : 500, + 'chips_left' : 3 + } + + hand1 = pokercards.PokerCards(['8h', '2s']) + hand2 = pokercards.PokerCards(['Ac', '2c']) + board = pokercards.PokerCards(['9d', '5s', '3h', '4d', '5s']) + + game_state ={ + 'serial2best' : { 1 : + { 'hi' : self.game.eval.best('hi', hand1.tolist(True) + board.tolist(True), []), + 'low' : self.game.eval.best('low', hand1.tolist(True) + board.tolist(True), []) + }, + 2 : + { 'hi' : self.game.eval.best('hi', hand2.tolist(True) + board.tolist(True), []), + 'low' : self.game.eval.best('low', hand2.tolist(True) + board.tolist(True), []) + } + } + } + + history = [ ('end', [1], [game_state, frame]) ] + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + + self.failUnlessEqual(message, [ + '1 shows High card Nine for hi ', + '1 shows 8, 5, 4, 3, 2 for low ', + '2 shows Straight Five to Ace for hi ', + '1 2 tie for hi ', + '1 wins low ', + 'winners share a pot of 5 (minus 3 odd chips)', + '1 receives 3', + '2 receives 2' + ]) + + # Resolve frame 2 + frame = { + 'type': 'resolve', + 'serials' : [1, 2], + 'serial2share': { 1: 300, 2 : 200 }, + 'hi' : [1, 2], + 'pot' : 500, + 'chips_left' : 3 + } + + hand1 = pokercards.PokerCards(['Ad', 'As']) + hand2 = pokercards.PokerCards(['Kd', '3c']) + board = pokercards.PokerCards(['9d', '6s', 'Td', '4d', '4h']) + + game_state ={ + 'serial2best' : { 1 : + { 'hi' : self.game.eval.best('hi', hand1.tolist(True) + board.tolist(True), []), + 'low' : self.game.eval.best('low', hand1.tolist(True) + board.tolist(True), []) + }, + 2 : + { 'hi' : self.game.eval.best('hi', hand2.tolist(True) + board.tolist(True), []) + } + } + } + + history = [ ('end', [1], [game_state, frame]) ] + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, [ + '1 shows Two pairs Aces and Fours, Ten kicker for hi ', + '2 mucks loosing hand', + '1 2 tie for hi ', + 'winners share a pot of 5 (minus 3 odd chips)', + '1 receives 3', + '2 receives 2' + ]) + + # ------------------------------------------------------------ + def testHistory2messagesEmpty(self): + """Test Poker Game History to message empty""" + + history = [ \ + ('player_list', [1, 2]), \ + ('position', 1), \ + ('blind_request', 1, 1000, 100, 'big_and_dead'), \ + ('wait_blind', 1), \ + ('rebuy', 1, 500), \ + ('ante_request', 1, 100), \ + ('leave', [(1, 2), (2, 7)]), \ + ('finish', 1), \ + ('muck', (1,2)), \ + ('Unknown',) \ + ] + + subject, message = self.GetMessagesFromHistory(history) + self.failUnlessEqual(subject, '') + self.failUnlessEqual(message, []) + + # ------------------------------------------------------------ + def testHistoryReduce(self): + """Test Poker Game History reduce""" + + game_time = time.time() + + board = pokercards.PokerCards() + hand1 = pokercards.PokerCards(['4d', 'Ts']) + hand2 = pokercards.PokerCards(['3h', 'Kc']) + + # SitOut & Wait blind + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('position', 0), + ('sitOut', 1), + ('position', 1), + ('wait_blind', 2), + ('sitOut', 3), + ('position', 3) + ] + + self.game.turn_history = history + + self.game.historyReduce() + self.failUnlessEqual(self.game.historyGet(), [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [4], 7, { 4 : 800 }), + ('position', 0) + ]) + + # Player list + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('player_list', [1, 2, 3]), + ('player_list', [1, 2]) + ] + + self.game.turn_history = history + + self.game.historyReduce() + self.failUnlessEqual(self.game.historyGet(), [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('player_list', [1, 2]) + ]) + + # Blind Request + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('blind_request', 1, 500, 0, 'small'), + ('blind_request', 2, 1000, 100, 'big_and_dead') + ] + + self.game.turn_history = history + + self.game.historyReduce() + self.failUnlessEqual(self.game.historyGet(), [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('blind_request', 2, 1000, 100, 'big_and_dead') + ]) + + # Ante Request + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('ante_request', 1, 100), + ('ante_request', 2, 100) + ] + + self.game.turn_history = history + + self.game.historyReduce() + self.failUnlessEqual(self.game.historyGet(), [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('ante_request', 2, 100) + ]) + + + # Unable to update position + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('position', 7), + ] + + self.game.turn_history = history + + # The player 7 does not exist + self.game.historyReduce() + + # The position has not been updated + self.failUnlessEqual(self.game.historyGet(), history) + + # the blind request is removed + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('position', 7), + ('blind', 1, 0), + ('position', 8), + ('blind_request', 2, 0), + ('blind', 2, 0), + ('player_list', [1, 2]), + ] + + self.game.turn_history = history + + self.game.historyReduce() + + self.failUnlessEqual(('position', 8), self.game.turn_history[3]) + self.failUnlessEqual(('blind', 2, 0), self.game.turn_history[4]) + + # the blind request is not removed because it is last + history = [ + ('game', 1, 2, 3, game_time, 'variant','betting_structure', [1, 2, 3, 4], 7, { 1 : 500, 2 : 600, 3 : 700, 4 : 800 }), + ('position', 7), + ('blind', 1, 0), + ('position', 8), + ('blind_request', 2, 0), + ] + + self.game.turn_history = history + + self.game.historyReduce() + + self.failUnlessEqual(('position', 8), self.game.turn_history[3]) + self.failUnlessEqual(('blind_request', 2, 0), self.game.turn_history[4]) + + # ------------------------------------------------------------ + def GetMessagesFromHistory(self, history, serial2name = str, pocket_messages = False): + + self.game.turn_history = [] + for message in history: + apply(self.game.historyAdd,message) + + return pokergame.history2messages(self.game, self.game.historyGet(), serial2name, pocket_messages, int(os.environ.get('VERBOSE_T', 0))) + +# ------------------------------------------------------------ +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerGameHistoryTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerGameHistoryTestCase, prefix = "test2")) + return suite + +# ------------------------------------------------------------ +def GetTestedModule(): + return pokergame + +# ------------------------------------------------------------ +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ------------------------------------------------------------ +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-gamehistory.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokergame.py' TESTS='coverage-reset test-gamehistory.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-i18n.py +++ poker-engine-1.3.6/tests/test-i18n.py @@ -0,0 +1,111 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2008 Bradley M. Kuhn +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Jerome Jeannin +# Bradley M. Kuhn + +import sys, os +sys.path.insert(0, "..") + +import unittest +from pokerengine import pokergame + +#--------------------------- +class FakePlatform: + + def __init__(self, system): + self._system = system + + def system(self): + return self._system + +class FakeLocale: + + def __init__(self, lang): + self._lang = lang + + def getdefaultlocale(self): + return (self._lang, None) + +# --------------------------------------------------------- +class PokerI18NTest(unittest.TestCase): + + # --------------------------------------------------------- + def testTranslationFails(self): + """Test I18N : domains/lang fails""" + + # When we do the init, we've already set it to an _() that returns + # text. + self.assertEquals(pokergame.init_i18n(None)("ANYTHING"), "ANYTHING") + self.failUnlessEqual(pokergame._("Ace"), "Ace") + + # --------------------------------------------------------- + def testWindowsFails(self): + """Test I18N : windows fails""" + + pokergame.platform = FakePlatform("Windows") + pokergame.locale = FakeLocale("french") + pokergame.init_i18n(None) + self.failUnlessEqual(pokergame._("Ace"), "Ace") + + # --------------------------------------------------------- + def testWindowsSuccess(self): + """Test I18N : windows success""" + + pokergame.platform = FakePlatform("Windows") + pokergame.locale = FakeLocale("french") + pokergame.init_i18n("./tmp") + self.failUnlessEqual(pokergame._("Ace"), "As") + + # --------------------------------------------------------- + def testUserWrittenTranslationFunction(self): + """Test I18N : user written translation function""" + self.assertEquals(pokergame.init_i18n(None, + lambda text : + "All your string are translated to us.") + ("DUMMY TEXT RETURN"), + "DUMMY TEXT RETURN") + self.failUnlessEqual(pokergame._("Ace"), + "All your string are translated to us.") +# --------------------------------------------------------- +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerI18NTest)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerI18NTest, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-i18n.py ) ; ( cd ../tests ; make TESTS='test-i18n.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokercards.py +++ poker-engine-1.3.6/tests/test-pokercards.py @@ -0,0 +1,322 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest + +from pokerengine import pokercards + +class PokerCardsTestCase(unittest.TestCase): + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def testInit(self): + """Test PokerCards : Creation of cards""" + + empty = pokercards.PokerCards() + self.failUnlessEqual(empty.toRawList(), []) + + cards = pokercards.PokerCards(12) + self.failUnlessEqual(cards.toRawList(), [12]) + self.failUnless(cards.areVisible()) + + cards = pokercards.PokerCards([12, 25, 37, pokercards.PokerCards.NOCARD]) + self.failUnlessEqual(cards.toRawList(), [12, 25, 37, pokercards.PokerCards.NOCARD]) + self.failIf(cards.areVisible()) + + cards = pokercards.PokerCards('Ah') + self.failUnlessEqual(cards.toRawList(), [12]) + self.failUnless(cards.areVisible()) + + cards = pokercards.PokerCards(['Ah', 'Ad', 'Kc']) + self.failUnlessEqual(cards.toRawList(), [12, 25, 37]) + self.failUnless(cards.areVisible()) + + cards = pokercards.PokerCards(['Ah', 25, 'Kc']) + self.failUnlessEqual(cards.toRawList(), [12, 25, 37]) + self.failUnless(cards.areVisible()) + + cards2 = pokercards.PokerCards(cards) + self.failUnlessEqual(cards2, cards) + + # ----------------------------------------------------------------------------------------------------- + def TestGetValue(self): + """Test PokerCards : Get value""" + + cards = pokercards.PokerCards() + self.failUnlessEqual(cards.getValue(12), 12) + self.failUnlessEqual(cards.getValue('Ah'), 12) + self.failUnlessEqual(cards.getValue(PokerCards.NOCARD)) + self.failUnlessRaises(UserWarning, cards.add, 52, True) + self.failUnlessRaises(UserWarning, cards.add, -1, True) + self.failUnlessRaises(UserWarning, cards.add, 'Aa', True) + + # ----------------------------------------------------------------------------------------------------- + def testAddInvalid(self): + """Test PokerCards : Invalid card adding""" + + cards = pokercards.PokerCards() + self.failUnlessRaises(UserWarning,cards.add, 52, True) + self.failUnlessRaises(UserWarning,cards.add, -1, True) + self.failUnlessRaises(UserWarning,cards.add, 'Aa', True) + + # ----------------------------------------------------------------------------------------------------- + def testAddVisible(self): + """Test PokerCards : Add visible card""" + + cards = pokercards.PokerCards() + cards.add(12, True) + self.failUnless(cards.hasCard(12)) + self.failUnlessEqual(cards.getVisible(), [12]) + + cards = pokercards.PokerCards() + cards.add('3s', True) + self.failUnless(cards.hasCard(40)) + self.failUnlessEqual(cards.getVisible(), [40]) + + cards.add(cards.nocard(), True) + self.failUnless(cards.hasCard(cards.nocard())) + + # ----------------------------------------------------------------------------------------------------- + def testAddInvisible(self): + """Test PokerCards : Add invisible card""" + + cards = pokercards.PokerCards() + cards.add(12, False) + self.failUnless(cards.hasCard(12)) + self.failUnlessEqual(cards.getVisible(), []) + + cards = pokercards.PokerCards() + cards.add('3s', False) + self.failUnless(cards.hasCard(40)) + self.failUnlessEqual(cards.getVisible(), []) + + # ----------------------------------------------------------------------------------------------------- + def testAllVisible(self): + """Test PokerCards : All cards visible""" + + cards = pokercards.PokerCards() + cards.add(12, False) + cards.add(25, False) + cards.add(45, False) + + self.failUnlessEqual(cards.getVisible(), []) + cards.allVisible() + self.failUnless(cards.areVisible()) + + # ----------------------------------------------------------------------------------------------------- + def testAllHidden(self): + """Test PokerCards : All cards hidden""" + + cards = pokercards.PokerCards() + cards.add(12, True) + cards.add(25, False) + cards.add(45, True) + + self.failUnlessEqual(cards.getVisible(), [12, 45]) + self.failIf(cards.areHidden()) + cards.allHidden() + self.failUnless(cards.areHidden()) + + # ----------------------------------------------------------------------------------------------------- + def testSetVisible(self): + """Test PokerCards : Set card visible""" + + cards = pokercards.PokerCards() + cards.add(12, True) + self.failUnlessEqual(cards.getVisible(), [12]) + + cards.setVisible(12,False) + self.failUnlessEqual(cards.getVisible(), []) + + cards.setVisible(12,True) + self.failUnlessEqual(cards.getVisible(), [12]) + + cards.setVisible(15,True) + self.failUnlessEqual(cards.getVisible(), [12]) + + cards.setVisible(cards.nocard(),False) + self.failUnlessEqual(cards.getVisible(), [12]) + + # ----------------------------------------------------------------------------------------------------- + def testIsEmpty(self): + """Test PokerCards : Is empty""" + + cards = pokercards.PokerCards() + self.failUnless(cards.isEmpty()) + + cards.add(12, True) + self.failIf(cards.isEmpty()) + + # ----------------------------------------------------------------------------------------------------- + def testLen(self): + """Test PokerCards : Cards lenght""" + + cards = pokercards.PokerCards() + self.failUnlessEqual(cards.len(), 0) + + cards.add(12, True) + self.failUnlessEqual(cards.len(), 1) + + # ----------------------------------------------------------------------------------------------------- + def testHasCard(self): + """Test PokerCards : Has card""" + + cards = pokercards.PokerCards([12,26]) + self.failUnless(cards.hasCard(12)) + self.failIf(cards.hasCard(27)) + + # ----------------------------------------------------------------------------------------------------- + def testOperatorEqu(self): + """Test PokerCards : Cards operator equ and ne""" + + cards1 = pokercards.PokerCards([12,26]) + cards2 = pokercards.PokerCards([26,12]) + cards3 = pokercards.PokerCards([26,12,50]) + + self.failIf(cards1 == [12,26]) + self.failUnless(cards1 != [12,26]) + + self.failUnless(cards1 == cards2) + self.failIf(cards1 == cards3) + self.failUnless(cards1 != cards3) + + # ----------------------------------------------------------------------------------------------------- + def testCopy(self): + """Test PokerCards : Cards copy""" + + cards1 = pokercards.PokerCards([12,26]) + cards2 = cards1.copy() + self.failUnless(cards1 == cards2) + cards2.add(13,True) + self.failIf(cards1 == cards2) + + # ----------------------------------------------------------------------------------------------------- + def testToList(self): + """Test PokerCards : Cards to list""" + + cards = pokercards.PokerCards([12,26]) + self.failUnlessEqual(cards.tolist(False), [12,26]) + self.failUnlessEqual(cards.tolist(True), [12,26]) + + cards.setVisible(26,False) + self.failUnlessEqual(cards.tolist(False), [12, cards.nocard()]) + self.failUnlessEqual(cards.tolist(True), [12, 26]) + + cards.allHidden() + self.failUnlessEqual(cards.tolist(False), [cards.nocard(), cards.nocard()]) + self.failUnlessEqual(cards.tolist(True), [12, 26]) + + # ----------------------------------------------------------------------------------------------------- + def testNoCard(self): + """Test PokerCards : No card value""" + + cards = pokercards.PokerCards() + self.failUnlessEqual(cards.nocard(), pokercards.PokerCards.NOCARD) + + # ----------------------------------------------------------------------------------------------------- + def testAreAllNocard(self): + """Test PokerCards : Are all no card""" + + cards = pokercards.PokerCards([12,26]) + self.failIf(cards.areAllNocard()) + cards = pokercards.PokerCards([cards.nocard(), 26]) + self.failIf(cards.areAllNocard()) + cards = pokercards.PokerCards([cards.nocard(), cards.nocard()]) + self.failUnless(cards.areAllNocard()) + + # ----------------------------------------------------------------------------------------------------- + def testLoseNotVisible(self): + """Test PokerCards : Lose not visible""" + + cards = pokercards.PokerCards([12,26]) + cards.loseNotVisible() + self.failUnlessEqual(cards.toRawList(), [12,26]) + cards.add(33, False) + cards.loseNotVisible() + self.failUnlessEqual(cards.toRawList(), [12,26,cards.nocard()]) + cards.add(43, True) + cards.loseNotVisible() + self.failUnlessEqual(cards.toRawList(), [12,26,cards.nocard(),43]) + cards.add(cards.nocard(), True) + cards.loseNotVisible() + self.failUnlessEqual(cards.toRawList(), [12,26,cards.nocard(),43, cards.nocard()]) + + # ----------------------------------------------------------------------------------------------------- + def testOperatorRepr(self): + """Test PokerCards : Operator repr""" + + cards = pokercards.PokerCards([12,26]) + self.failUnlessEqual(repr(cards), '%s(%s)' %('PokerCards', [12,26])) + + # ----------------------------------------------------------------------------------------------------- + def testOperatorStr(self): + """Test PokerCards : Operator str""" + + cards = pokercards.PokerCards() + cards.add(12, True) + cards.add(26, False) + self.failUnlessEqual(str(cards), str([ 'Card(12, visible)', 'Card(26, not visible)'])) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerCardsTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerCardsTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +def GetTestedModule(): + return pokercards + +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokercards.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokercards.py' TESTS='coverage-reset test-pokercards.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokerchips.py +++ poker-engine-1.3.6/tests/test-pokerchips.py @@ -0,0 +1,250 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import types + +from pokerengine import pokerchips + +class PokerChipsTestCase(unittest.TestCase): + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def testInit(self): + """Test Poker Chips : Initialisation""" + + values = [5, 10, 20] + pokerchip = pokerchips.PokerChips(values) + + self.failUnlessEqual(pokerchip, pokerchips.PokerChips(values, 0)) + self.failUnlessEqual(pokerchip.toint(), 0) + + pokerchip1 = pokerchips.PokerChips(values, 153) + pokerchip2 = pokerchips.PokerChips(values, pokerchip1) + + self.failUnlessEqual(pokerchip1, pokerchip2) + self.failUnlessEqual(pokerchip2.toint(), 153) + + pokerchip1 = pokerchips.PokerChips(values, [10, 5, 1]) + self.failUnlessEqual(pokerchip1.toint(), 120) + + # ----------------------------------------------------------------------------------------------------- + def testOperatorEqu(self): + """Test Poker Chips : Equality""" + + values = [5, 10, 20] + pokerchip1 = pokerchips.PokerChips(values, 153) + pokerchip2 = pokerchips.PokerChips(values, 153) + pokerchip3 = pokerchips.PokerChips(values, 154) + + self.failUnlessEqual(pokerchip1, pokerchip2) + self.failIfEqual(pokerchip1, pokerchip3) + + self.failUnlessEqual(pokerchip1 != pokerchip2, False) + self.failUnlessEqual(pokerchip1 != pokerchip3, True) + self.failUnlessEqual(pokerchip1 != 153, True) + + # ----------------------------------------------------------------------------------------------------- + def testToInt(self): + """Test Poker Chips : To integer""" + + values = [5, 10, 20] + pokerchip = pokerchips.PokerChips(values) + self.failUnlessEqual(pokerchip.toint(), 0) + + pokerchip = pokerchips.PokerChips(values, 153) + self.failUnlessEqual(pokerchip.toint(), 153) + + pokerchip = pokerchips.PokerChips(values, [1, 1, 1]) + self.failUnlessEqual(pokerchip.toint(), 35) + + # ----------------------------------------------------------------------------------------------------- + def testAdd(self): + """Test Poker Chips : Addition""" + + values = [5, 10, 20] + pokerchip1 = pokerchips.PokerChips(values, 155) + pokerchip2 = pokerchips.PokerChips(values, 223) + + pokerchip1.add(pokerchip2) + self.failUnlessEqual(pokerchip1.toint(), 155 + 223) + + # ----------------------------------------------------------------------------------------------------- + def testSub(self): + """Test Poker Chips : Substraction""" + + values = [5, 10, 20] + pokerchip1 = pokerchips.PokerChips(values, [3, 2, 1]) + pokerchip2 = pokerchips.PokerChips(values, [1, 1, 1]) + + pokerchip1.subtract(pokerchip2) + self.failUnlessEqual(pokerchip1, pokerchips.PokerChips(values, [2, 1, 0])) + + pokerchip1 = pokerchips.PokerChips(values, 155) + pokerchip1.subtract(130) + self.failUnlessEqual(pokerchip1.toint(), 25) + + pokerchip1 = pokerchips.PokerChips(values, 155) + pokerchip1.subtract(160) + self.failUnlessEqual(pokerchip1.toint(), 0) + + # ----------------------------------------------------------------------------------------------------- + def testToString(self): + """Test Poker Chips : String representation""" + + self.failUnlessEqual(pokerchips.PokerChips.tostring(0), '0') + self.failUnlessEqual(pokerchips.PokerChips.tostring(1), '0.01') + self.failUnlessEqual(pokerchips.PokerChips.tostring(10), '0.10') + self.failUnlessEqual(pokerchips.PokerChips.tostring(99), '0.99') + self.failUnlessEqual(pokerchips.PokerChips.tostring(200), '2') + self.failUnlessEqual(pokerchips.PokerChips.tostring(220), '2.20') + self.failUnlessEqual(pokerchips.PokerChips.tostring(1000), '10') + self.failUnlessEqual(pokerchips.PokerChips.tostring(1333), '13.33') + + # ----------------------------------------------------------------------------------------------------- + def testToFloat(self): + """Test Poker Chips : To float""" + + self.failUnlessEqual(pokerchips.PokerChips.tofloat(0), 0) + self.failUnlessEqual(pokerchips.PokerChips.tofloat(1), 0.01) + self.failUnlessEqual(pokerchips.PokerChips.tofloat(133), 1.33) + self.failUnlessEqual(pokerchips.PokerChips.tofloat(1333), 13.33) + + # ----------------------------------------------------------------------------------------------------- + def testInt2Chips(self): + """Test Poker Chips : From integer""" + + values = [5, 10, 20] + self.failUnlessEqual(pokerchips.PokerChips.int2chips([], pokerchips.INT2CHIPS_FACTOR, 15), ([], 15)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 0), ([0, 0, 0], 0)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 5), ([1, 0, 0], 0)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 7), ([1, 0, 0], 2)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 15), ([3, 0, 0], 0)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 50), ([8, 1, 0], 0)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 90), ([8, 3, 1], 0)) + self.failUnlessEqual(pokerchips.PokerChips.int2chips(values, pokerchips.INT2CHIPS_FACTOR, 93), ([6, 4, 1], 3)) + + # ----------------------------------------------------------------------------------------------------- + def testToList(self): + """Test Poker Chips : To list""" + + values = [5, 10, 20] + self.failUnlessEqual(pokerchips.PokerChips(values, 0).tolist(), []) + self.failUnlessEqual(pokerchips.PokerChips(values, 3).tolist(), [1,3]) + self.failUnlessEqual(pokerchips.PokerChips(values, 5).tolist(), [5, 1]) + self.failUnlessEqual(pokerchips.PokerChips(values, 7).tolist(), [1, 2 ,5, 1]) + self.failUnlessEqual(pokerchips.PokerChips(values, 15).tolist(), [5, 3]) + self.failUnlessEqual(pokerchips.PokerChips(values, 50).tolist(), [5, 8, 10, 1]) + self.failUnlessEqual(pokerchips.PokerChips(values, 90).tolist(), [5, 8, 10, 3, 20, 1]) + self.failUnlessEqual(pokerchips.PokerChips(values, 93).tolist(), [1, 3, 5, 6, 10, 4, 20, 1]) + + values = [1, 2, 4] + self.failUnlessEqual(pokerchips.PokerChips(values, 7).tolist(), [1, 7]) + + # ----------------------------------------------------------------------------------------------------- + def testlimitChips(self): + """Test Poker Chips : Limit chips""" + + values = [5, 10, 20] + chips = pokerchips.PokerChips(values, [pokerchips.MAX_CHIPS_PER_STACK + 2, 0, 0]) + self.failUnlessEqual(chips.tolist(), [5, pokerchips.MAX_CHIPS_PER_STACK, 10, 1]) + chips = pokerchips.PokerChips(values, [pokerchips.MAX_CHIPS_PER_STACK + 3, 0, 0]) + self.failUnlessEqual(chips.tolist(), [5, pokerchips.MAX_CHIPS_PER_STACK + 1, 10, 1]) + chips = pokerchips.PokerChips(values, [pokerchips.MAX_CHIPS_PER_STACK + 4, pokerchips.MAX_CHIPS_PER_STACK, pokerchips.MAX_CHIPS_PER_STACK]) + self.failUnlessEqual(chips.tolist(), [5, pokerchips.MAX_CHIPS_PER_STACK, 10, pokerchips.MAX_CHIPS_PER_STACK, 20, pokerchips.MAX_CHIPS_PER_STACK +1]) + + # ----------------------------------------------------------------------------------------------------- + def testStrOperator(self): + """Test Poker Chips : String representation""" + + values = [5, 10, 20] + pokerchip = pokerchips.PokerChips(values, 93) + self.failUnlessEqual(str(pokerchip), 'PokerChips(%s) = %d (-%d)' %([6, 4, 1], 93, 3)) + + # ----------------------------------------------------------------------------------------------------- + def testReprOperator(self): + """Test Poker Chips : Representation""" + + values = [5, 10, 20] + pokerchip = pokerchips.PokerChips(values, 93) + self.failUnlessEqual(repr(pokerchip), '%s(%s)' %('PokerChips', [6, 4, 1])) + + # ----------------------------------------------------------------------------------------------------- + def testCopy(self): + """Test Poker Chips : Copy""" + values = [5, 10, 20] + + pokerchip1 = pokerchips.PokerChips(values, 93) + pokerchip2 = pokerchip1.copy() + self.failUnlessEqual(pokerchip1, pokerchip2) + self.failUnlessEqual(pokerchip2.toint(), 93) + + pokerchip1.add(7) + self.failIfEqual(pokerchip1, pokerchip2) + self.failUnlessEqual(pokerchip1.toint(), 100) + self.failUnlessEqual(pokerchip2.toint(), 93) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerChipsTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerChipsTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +def GetTestedModule(): + return pokerchips + +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokerchips.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokerchips.py' TESTS='coverage-reset test-pokerchips.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokerengineconfig.py +++ poker-engine-1.3.6/tests/test-pokerengineconfig.py @@ -0,0 +1,383 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import libxml2 +import os.path +import types +import shutil +import tempfile + +from pokerengine import version +from pokerengine import version_number +from pokerengine import pokerengineconfig + +class PokerEngineConfigTestCase(unittest.TestCase): + + TestConfDirectory = './test-data/conf' + TestUpgradeDirectory = './test-data/upgrade' + + TestConfigInvalidFile = 'unittest.config.invalid.xml' + TestConfigNotFoundFile = 'unittest.config.notfound.xml' + TestConfigTemplateFile = 'unittest.config.template.xml' + + TestUpgradeInvalidFile = 'unittest.config.invalid.xsl' + TestUpgradeTemplateFile = 'unittest.config.template.xsl' + + TestConfigTemporaryFile = 'unittest.config.xml' + + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + self.verbose = int(os.environ.get('VERBOSE_T', 1)) + pokerengineconfig.Config.verbose = self.verbose + def callback(ctx, str): + if self.verbose >= 0: print "%s %s" % (ctx, str) + libxml2.registerErrorHandler(callback, "-->") + self.Config = pokerengineconfig.Config(['.', PokerEngineConfigTestCase.TestConfDirectory, '~/conf', tempfile.gettempdir()]) + + self.ConfigTmplFile = os.path.join(PokerEngineConfigTestCase.TestConfDirectory, PokerEngineConfigTestCase.TestConfigTemplateFile) + self.ConfigTempFile = os.path.join(tempfile.gettempdir(), PokerEngineConfigTestCase.TestConfigTemporaryFile) + + self.UpgradeTmplFile = os.path.join(PokerEngineConfigTestCase.TestUpgradeDirectory, PokerEngineConfigTestCase.TestUpgradeTemplateFile) + self.UpgradeInvalidFile = os.path.join(PokerEngineConfigTestCase.TestUpgradeDirectory, PokerEngineConfigTestCase.TestUpgradeInvalidFile) + + if not self.CopyFile(self.ConfigTmplFile, self.ConfigTempFile): + self.fail('Error during creation of configuration file ' + self.ConfigTempFile) + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + # self.DeleteFile(self.ConfigTempFile) + pass + # ----------------------------------------------------------------------------------------------------- + def testHeaderGet(self): + """Test Poker Engine : Get header value""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestHeader', {'key' : 'val'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + self.failUnlessEqual(self.Config.headerGet('/bet/TestHeader/@key'), 'val') + + # ----------------------------------------------------------------------------------------------------- + def testHeaderSet(self): + """Test Poker Engine : Set header value""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet','TestHeader', {'key1' : 'val1'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + self.Config.headerSet('/bet/TestHeader/@key1','val2') + self.failUnlessEqual(self.Config.headerGet('/bet/TestHeader/@key1'), 'val2') + + # Attribut not found + self.failUnlessRaises(IndexError,self.Config.headerSet,'/bet/TestHeader/@key2','val2') + self.failUnlessEqual(self.Config.headerGet('/bet/TestHeader/@key2'), '') + + # ----------------------------------------------------------------------------------------------------- + def testHeaderGetInt(self): + """Test Poker Engine : Get attribute value as integer""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestInt', {'int' : '500'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + self.failUnlessEqual(self.Config.headerGetInt('/bet/TestInt/@int'),500) + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestInt', {'int' : 'AB'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.Config.reload() + self.failUnlessEqual(self.Config.headerGetInt('/bet/TestInt/@int'), 0) + + # ----------------------------------------------------------------------------------------------------- + def testHeaderGetList(self): + """Test Poker Engine : Get list""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestList', {'attribute1' : 'val1', 'attribute2' : 'val2', 'attribute3' : 'val3'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + values = self.Config.headerGetList('/bet/TestList/@*') + values.sort() + self.failUnlessEqual(values, ['val1', 'val2', 'val3']) + + # ----------------------------------------------------------------------------------------------------- + def testHeaderGetProperties(self): + """Test Poker Engine : Get properties""" + + properties = {'attribute1' : 'val1', 'attribute2' : 'val2', 'attribute3' : 'val3'} + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestProperties', properties): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + self.failUnlessEqual(self.Config.headerGetProperties('/bet/TestProperties')[0], properties) + + # ----------------------------------------------------------------------------------------------------- + def testSave(self): + """Test Poker Engine : Save""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'attribute1' : 'val1'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.failUnlessEqual(self.Config.save(), None) + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + self.failUnlessEqual(self.Config.save(), None) + + # ----------------------------------------------------------------------------------------------------- + def testConfigLoadFileNotFound(self): + """Test Poker Engine : Load file not found""" + + self.failIf(self.Config.load(PokerEngineConfigTestCase.TestConfigNotFoundFile)) + + # ----------------------------------------------------------------------------------------------------- + def testConfigLoadInvalidFile(self): + """Test Poker Engine : Load invalid file""" + + self.failUnlessRaises(libxml2.parserError,self.Config.load,PokerEngineConfigTestCase.TestConfigInvalidFile) + + # ----------------------------------------------------------------------------------------------------- + def testConfigLoadValidFile(self): + """Test Poker Engine : Load file""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'poker_engine_version' : version_number}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + pokerengineconfig.Config.upgrades_repository = './NotFound' + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + pokerengineconfig.Config.upgrades_repository = PokerEngineConfigTestCase.TestUpgradeDirectory + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + # ----------------------------------------------------------------------------------------------------- + def testConfigReload(self): + """Test Poker Engine : Reload file""" + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestReload', {'key' : 'val1'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + pokerengineconfig.Config.upgrades_repository = None + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + key_value = self.Config.headerGet('/bet/TestReload/@key') + self.failUnlessEqual(key_value, 'val1') + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', 'TestReload', {'key' : 'val2'}): + self.fail('Error during configuration file modification' + self.ConfigTempFile) + + key_value = self.Config.headerGet('/bet/TestReload/@key') + self.failUnlessEqual(key_value, 'val1') + + self.Config.reload() + key_value = self.Config.headerGet('/bet/TestReload/@key') + self.failUnlessEqual(key_value, 'val2') + + # ----------------------------------------------------------------------------------------------------- + def testConfigCheckVersionUpToDate(self): + """Test Poker Engine : Check version up to date""" + + pokerengineconfig.Config.upgrades_repository = None + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'poker_engine_version' : version_number}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + self.failUnless(self.Config.checkVersion('poker_engine_version',version_number,None)) + + # ----------------------------------------------------------------------------------------------------- + def testConfigCheckVersionWithoutVersion(self): + """Test Poker Engine : Check file version without version attribute""" + + pokerengineconfig.Config.upgrades_repository = None + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + # Save the version information + pokerengineconfig.Config.upgrade_dry_run = False + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + self.failUnless(self.Config.checkVersion('poker_engine_version',version_number,None,version_number)) + + self.Config.reload() + self.failUnlessEqual(self.Config.headerGet('/bet/@poker_engine_version'), version_number) + + # ----------------------------------------------------------------------------------------------------- + def testConfigCheckVersionWithInvalidVersion(self): + """Test Poker Engine : Check file version with invalid version attribute""" + + pokerengineconfig.Config.upgrades_repository = None + ver = version.Version(version_number) + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'poker_engine_version' : str(ver + 1)}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + self.failUnlessRaises(Exception,self.Config.checkVersion,'poker_engine_version',str(ver), None) + + # ----------------------------------------------------------------------------------------------------- + def testConfigCheckVersionUpgrade(self): + """Test Poker Engine : Check file version upgrade""" + + pokerengineconfig.Config.upgrade_dry_run = True + pokerengineconfig.Config.upgrades_repository = None + ver = version.Version(version_number) + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'poker_engine_version' : str(ver), 'upgrade' : 'ToUpgrade'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + self.failIf(self.Config.checkVersion('poker_engine_version',str(ver+1),None)) + + upgrade_file = 'upgrade' + str(ver) + '-' + str(ver + 1) + '.xsl' + upgrade_file = os.path.join(tempfile.gettempdir(),upgrade_file) + if not self.CopyFile(self.UpgradeTmplFile, upgrade_file): + self.fail('Error during creation of upgrade file ' + upgrade_file) + + pokerengineconfig.Config.upgrade_dry_run = False + self.failIf(self.Config.checkVersion('poker_engine_version',str(ver+1),tempfile.gettempdir())) + self.failUnlessEqual(self.Config.headerGet('/bet/@upgrade'), 'Upgraded') + + self.DeleteFile(upgrade_file) + + # ----------------------------------------------------------------------------------------------------- + def testConfigCheckVersionInvalidUpgrade(self): + """Test Poker Engine : Check file version invalid upgrade""" + + pokerengineconfig.Config.upgrade_dry_run = False + pokerengineconfig.Config.upgrades_repository = None + ver = version.Version(version_number) + + if not self.ModifyXMLFile(self.ConfigTempFile, '/bet', None, {'poker_engine_version' : str(ver), 'upgrade' : 'ToUpgrade'}): + self.fail('Error during modification of configuration file ' + self.ConfigTempFile) + + self.failUnless(self.Config.load(PokerEngineConfigTestCase.TestConfigTemporaryFile)) + + upgrade_file = 'upgrade' + str(ver) + '-' + str(ver + 1) + '.xsl' + upgrade_file = os.path.join(tempfile.gettempdir(),upgrade_file) + if not self.CopyFile(self.UpgradeInvalidFile, upgrade_file): + self.fail('Error during creation of upgrade file ' + upgrade_file) + + self.failUnlessRaises(libxml2.parserError,self.Config.checkVersion, 'poker_engine_version',str(ver+1),tempfile.gettempdir()) + self.DeleteFile(upgrade_file) + + # ----------------------------------------------------------------------------------------------------- + def ModifyXMLFile(self, path, parent, child, attributes = {}): + + try: + doc = libxml2.parseFile(path) + except libxml2.parserError: + return False + + header = doc.xpathNewContext() + + node_parent = doc.getRootElement() + if parent: + nodes = header.xpathEval(parent) + if nodes: node_parent = nodes[0] + else: return False + + node = node_parent + if child: + child_path = node_parent.nodePath() + '/' + child + nodes = header.xpathEval(child_path) + if nodes: node = nodes[0] + else: + node = node_parent.newChild(ns = None, name = child, content = None) + + for attribute_name, attribute_value in attributes.items(): + if not node.hasProp(attribute_name): + node.newProp(attribute_name,attribute_value) + else: + for property in node.properties: + if property.name == attribute_name: property.setContent(attribute_value) + + doc.saveFile(path) + + doc.freeDoc() + header.xpathFreeContext() + + return True + + # ----------------------------------------------------------------------------------------------------- + def CopyFile(self, src_path, dst_path): + if src_path and not os.path.isfile(src_path): + return False + + shutil.copyfile(src_path,dst_path) + if os.path.isfile(dst_path): + return True + + return False + + # ----------------------------------------------------------------------------------------------------- + def DeleteFile(self, path): + if os.path.isfile(path): + os.unlink(path) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerEngineConfigTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerEngineConfigTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +def GetTestedModule(): + return pokerengineconfig + +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokerengineconfig.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokerengineconfig.py' TESTS='coverage-reset test-pokerengineconfig.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokerplayer.py +++ poker-engine-1.3.6/tests/test-pokerplayer.py @@ -0,0 +1,322 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import random + +from pokerengine import pokercards +from pokerengine import pokergame + +RAND_MAX = 0x7fff + +class PokerPlayerTestCase(unittest.TestCase): + + PokerPlayerAttributes = [ + 'serial' ,\ + 'name' , \ + 'game' , \ + 'fold' , \ + 'remove_next_turn' , \ + 'sit_out' , \ + 'sit_out_next_turn' , \ + 'sit_requested' , \ + 'bot' , \ + 'auto' , \ + 'auto_blind_ante' , \ + 'wait_for' , \ + 'auto_muck' , \ + 'missed_blind' , \ + 'missed_big_blind_count' , \ + 'blind' , \ + 'buy_in_payed' , \ + 'ante' , \ + 'all_in' , \ + 'side_pot_index' , \ + 'seat' , \ + 'hand' , \ + 'money' , \ + 'rebuy' , \ + 'bet' , \ + 'dead' , \ + 'talked_once' ,\ + 'user_data', + ] + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + self.player = pokergame.PokerPlayer(1,None) + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerGetSetUserData(self): + """Test Poker Player : User data accessors""" + + self.failUnlessEqual(self.player.getUserData(), None) + self.player.setUserData('UserData') + self.failUnlessEqual(self.player.getUserData(), 'UserData') + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerIsAllIn(self): + """Test Poker Player : Is all in""" + + self.failUnlessEqual(self.player.isAllIn(), False) + self.player.all_in = True + self.failUnlessEqual(self.player.isAllIn(), True) + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerIsFold(self): + """Test Poker Player : Is fold""" + + self.failUnlessEqual(self.player.isFold(), False) + self.failUnlessEqual(self.player.isNotFold(), True) + self.player.fold = True + self.failUnlessEqual(self.player.isFold(), True) + self.failUnlessEqual(self.player.isNotFold(), False) + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerIsSit(self): + """Test Poker Player : Is sit""" + + self.failUnlessEqual(self.player.isSit(), False) + self.failUnlessEqual(self.player.isSitOut(), True) + self.player.sit_out = False + self.failUnlessEqual(self.player.isSit(), True) + self.failUnlessEqual(self.player.isSitOut(), False) + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerIsConnected(self): + """Test Poker Player : Is connected""" + + self.failUnlessEqual(self.player.isConnected(), True) + self.failUnlessEqual(self.player.isDisconnected(), False) + self.player.remove_next_turn = True + self.failUnlessEqual(self.player.isConnected(), False) + self.failUnlessEqual(self.player.isDisconnected(), True) + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerCopy(self): + """Test Poker Player : Copy""" + + for attribute in PokerPlayerTestCase.PokerPlayerAttributes: + setattr(self.player,attribute,random.randint(0,RAND_MAX)) + + self.player.hand = pokercards.PokerCards() + + copy = self.player.copy() + for attribute in PokerPlayerTestCase.PokerPlayerAttributes: + try: + self.failUnlessEqual(getattr(self.player,attribute), getattr(copy,attribute)) + except: + self.fail('Exception during accessing attribute ' + attribute) + + # ----------------------------------------------------------------------------------------------------- + def testPokerPlayerStringRepresentation(self): + """Test Poker Player : String representation""" + + for attribute in PokerPlayerTestCase.PokerPlayerAttributes: + setattr(self.player,attribute,random.randint(0,RAND_MAX)) + + string = '' + for attribute in PokerPlayerTestCase.PokerPlayerAttributes: + if attribute == 'game': continue + string += attribute + ' = ' + str(getattr(self.player,attribute)) + ', ' + + # Skip the last comma and space character + self.failUnlessEqual(string[:-2], str(self.player)) + + # ----------------------------------------------------------------------------------------------------- + def testBeginTurn(self): + """Test Poker Player : Begin turn""" + + Attributes = { + 'bet' : 0, + 'dead' : 0, + 'fold' : False, + 'hand' : pokercards.PokerCards(), + 'side_pot_index' : 0, + 'all_in' : False, + 'blind' : None, + 'ante' : False + } + + for key in Attributes.keys(): + setattr(self.player,key,random.random()) + + self.player.beginTurn() + + for key, value in Attributes.items(): + self.failUnlessEqual(getattr(self.player, key), value) + + # ----------------------------------------------------------------------------------------------------- + def testIsInGame(self): + """Test Poker Player : Is in game""" + + # Initially the player in in game because not all-in and not fold + self.failIf(self.player.isAllIn()) + self.failIf(self.player.isFold()) + self.failUnless(self.player.isInGame()) + + # Player is all in + self.player.all_in = True + self.failUnless(self.player.isAllIn()) + self.failIf(self.player.isInGame()) + self.player.all_in = False + + # Player is fold + self.player.fold = True + self.failUnless(self.player.isFold()) + self.failIf(self.player.isInGame()) + self.player.fold = False + + # ----------------------------------------------------------------------------------------------------- + def testSitRequested(self): + """Test Poker Player : Sit requested""" + + # Initially the player does not request to sit + self.failIf(self.player.isSitRequested()) + + # Sit is now requested + self.player.sit_requested = True + self.failUnless(self.player.isSitRequested()) + + # ----------------------------------------------------------------------------------------------------- + def testIsBot(self): + """Test Poker Player : Is bot""" + + # Initially the player is not a bot + self.failIf(self.player.isBot()) + + # The player is now a bot + self.player.bot = True + self.failUnless(self.player.isBot()) + + # ----------------------------------------------------------------------------------------------------- + def testIsAuto(self): + """Test Poker Player : Is auto""" + + # Initially the player is not an automatic player + self.failIf(self.player.isAuto()) + + # The player is automatic + self.player.auto = True + self.failUnless(self.player.isAuto()) + + # ----------------------------------------------------------------------------------------------------- + def testIsAutoBlind(self): + """Test Poker Player : Is auto blind""" + + # Initially the player does not in a automatic blind and ante mode + self.failIf(self.player.isAutoBlindAnte()) + + # Sit is now requested + self.player.auto_blind_ante = True + self.failUnless(self.player.isAutoBlindAnte()) + + # ----------------------------------------------------------------------------------------------------- + def testIsWaitForBlind(self): + """Test Poker Player : Is wait for blind""" + + # Initially the player does not wait for blind + self.failIf(self.player.isWaitForBlind()) + + # The player is waiting the first round + self.player.wait_for = 'first_round' + self.failUnless(self.player.isWaitForBlind()) + + # ----------------------------------------------------------------------------------------------------- + def testIsMissedBlind(self): + """Test Poker Player : Is missed blind""" + + # Initially blind is missed + self.failIf(self.player.isMissedBlind()) + + # A blind is missed + self.player.missed_blind = 'big' + self.failUnless(self.player.isMissedBlind()) + + # No blind is missed + self.player.missed_blind = 'n/a' + self.failIf(self.player.isMissedBlind()) + + # ----------------------------------------------------------------------------------------------------- + def testIsBlind(self): + """Test Poker Player : Is blind""" + + # Initially the player blind is late + self.failUnlessEqual(self.player.blind, 'late') + self.failUnless(self.player.isBlind()) + + # The player not blind + self.player.blind = None + self.failIf(self.player.isBlind()) + + # ----------------------------------------------------------------------------------------------------- + def testIsBuyInPayed(self): + """Test Poker Player : Is buy in payed""" + + # Initially the player nuy in is not payed + self.failIf(self.player.isBuyInPayed()) + + # The buy in is payed + self.player.buy_in_payed = True + self.failUnless(self.player.isBuyInPayed()) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerPlayerTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerPlayerTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +def GetTestedModule(): + return pokergame + +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokerplayer.py ) ; ( cd ../tests ; make TESTS='test-pokerplayer.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokerprizes.py +++ poker-engine-1.3.6/tests/test-pokerprizes.py @@ -0,0 +1,190 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2008 Bradley M. Kuhn +# Copyright (C) 2006 Mekensleep +# 26 rue des rosiers, 75004 Paris +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# Bradley M. Kuhn +# Pierre-Andre (05/2006) +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import types +import time + +from tests.testmessages import restore_all_messages, silence_all_messages, search_output, clear_all_messages, get_messages +from pokerengine import pokerprizes + +class PokerPrizesTestCase(unittest.TestCase): + TestConfDirectory = '../conf' + + # --------------------------------------------------------- + def setUp(self): + silence_all_messages() + self.dirs = ['.', PokerPrizesTestCase.TestConfDirectory, '~/conf'] + + # ------------------------------------------------------- + def tearDown(self): + pass + + # ------------------------------------------------------- + def test01_algorithmPrizeInterface(self): + """test01_algorithmPrizeInterface + Test the payout structure of the Algorithm prize interface""" + pa = pokerprizes.__dict__["PokerPrizesAlgorithm"](buy_in_amount = 100, player_count = 4) + self.assertEquals(pa.buy_in, 100) + self.assertEquals(pa.player_count, 4) + + self.failUnlessEqual(pa.getPrizes(), [400]) + + for cnt in range(5, 9): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + if cnt == 5: + pa.removePlayer() + self.assertEquals(pa.player_count, 4) + self.failUnlessEqual(pa.getPrizes(), [400]) + pa.addPlayer() + self.assertEquals(pa.player_count, cnt) + self.failUnlessEqual(pa.getPrizes(), [375, 125]) + + self.failUnlessEqual(pa.getPrizes(), [600, 200]) + + for cnt in range(9, 19): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + self.failUnlessEqual(pa.getPrizes(), [1125, 450, 225]) + + for cnt in range(19, 29): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + + self.failUnlessEqual(pa.getPrizes(), [1575, 700, 350, 175]) + + for cnt in range(29, 39): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + + self.failUnlessEqual(pa.getPrizes(), [1902, 950, 237, 237, 237, 237]) + + for cnt in range(39, 49): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + + self.failUnlessEqual(len(pa.getPrizes()), int(48 * 0.20)) + + for cnt in range(49, 199): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + + self.failUnlessEqual(len(pa.getPrizes()), int(198 * 0.15)) + + for cnt in range(199, 299): + pa.addPlayer() + self.failUnlessEqual(pa.player_count, cnt) + + self.failUnlessEqual(len(pa.getPrizes()), int(298 * 0.10)) + # ------------------------------------------------------- + def test02_tablePrizeInterface(self): + """test02_tablePrizeInterface + Test the payout structure of the table prize interface""" + pt = pokerprizes.__dict__["PokerPrizesTable"](buy_in_amount = 100, player_count = 2, config_dirs = self.dirs) + self.assertEquals(pt.buy_in, 100) + self.assertEquals(pt.player_count, 2) + + self.failUnlessEqual(pt.getPrizes(), [200]) + + for player in range(4, 7): + pt.addPlayer() + if player == 4: + pt.removePlayer() + self.assertEquals(pt.player_count, 2) + self.failUnlessEqual(pt.getPrizes(), [200]) + pt.addPlayer() + self.assertEquals(pt.player_count, 3) + self.failUnlessEqual(pt.getPrizes(), [300]) + + self.failUnlessEqual(pt.getPrizes(), [350, 150]) + + for player in range(7, 28): + pt.addPlayer() + self.failUnlessEqual(pt.getPrizes(), [1300, 780, 520]) + + for player in range(28, 48): + pt.addPlayer() + self.failUnlessEqual(pt.getPrizes(), [1840, 1104, 736, 552, 368]) + + for player in range(48, 198): + pt.addPlayer() + self.failUnlessEqual(pt.getPrizes(), [5880, 3920, 2450, 1764, 1568, 1274, 980, 784, 588, 392]) + + for player in range(198, 298): + pt.addPlayer() + self.failUnlessEqual(len(pt.getPrizes()), 20) + # ------------------------------------------------------- + def test03_virtualBaseClass(self): + """test03_virtualBaseClass + Test minor things not elsewhere covered for the base class""" + v = pokerprizes.PokerPrizes(5, player_count = 3, guarantee_amount = 100) + self.assertEquals(v.buy_in, 5) + self.assertEquals(v.player_count, 3) + self.assertEquals(v.guarantee_amount, 100) + + clear_all_messages() + v.error("test") + self.assertEquals(get_messages(), ['ERROR test']) + + clear_all_messages() + exceptCaught = False + try: + v.getPrizes() + self.failIf(True) # should not reach here + except NotImplementedError, nie: + exceptCaught = True + self.assertEquals(nie.__str__(), 'getPrizes NOT IMPLEMENTED IN ABSTRACT BASE CLASS') + self.failUnless(exceptCaught) + self.assertEquals(get_messages(), ['ERROR getPrizes NOT IMPLEMENTED IN ABSTRACT BASE CLASS']) +# --------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerPrizesTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(Breaks, prefix = "test2")) + return suite + +# --------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# --------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokerprizes.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokerprizes.py' TESTS='coverage-reset test-pokerprizes.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokerrake.py +++ poker-engine-1.3.6/tests/test-pokerrake.py @@ -0,0 +1,86 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import types + +from pokerengine import pokerrake, pokergame + +class PokerRakeTestCase(unittest.TestCase): + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + pokerrake._get_rake_instance = None + + # ----------------------------------------------------------------------------------------------------- + def test01_Init(self): + """Test Poker rake : get_rake_instance""" + game = pokergame.PokerGameClient("unittest.%s.xml", ['nodir']) + rake = pokerrake.get_rake_instance(game) + + # ----------------------------------------------------------------------------------------------------- + def test02_AlternatePokerRake(self): + """Test Poker rake : get_rake_instance alternate PokerRake""" + game = pokergame.PokerGameClient("unittest.%s.xml", ['nodir', './test-data']) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + rake = pokerrake.get_rake_instance(game) + self.failUnless(hasattr(rake, 'gotcha')) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerRakeTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(PokerRakeTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokerrake.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokerrake.py' TESTS='coverage-reset test-pokerrake.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-pokertournament.py +++ poker-engine-1.3.6/tests/test-pokertournament.py @@ -0,0 +1,1246 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2009 Bradley M. Kuhn +# Copyright (C) 2006 Mekensleep +# 26 rue des rosiers, 75004 Paris +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest +import os.path +import types +import time + +class ConstantPlayerShuffler: + def shuffle(self, what): + what.sort() + +from tests.testmessages import restore_all_messages, silence_all_messages, search_output, clear_all_messages, get_messages + +from pokerengine import pokergame +from pokerengine import pokertournament +from pokerengine import pokerprizes +pokertournament.shuffler = ConstantPlayerShuffler() + +class PokerTournamentTestCase(unittest.TestCase): + + TestConfDirectory = '../conf' + + # --------------------------------------------------------- + def setUp(self): + self.dirs = ['.', PokerTournamentTestCase.TestConfDirectory, '~/conf'] + + # ------------------------------------------------------- + def tearDown(self): + pass + + # ------------------------------------------------------- + def testTournamentDefaultInitialisation(self): + """Test Poker Tournament : Default initialisation""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'name' : 'no name', \ + 'description_short' : 'nodescription_short', \ + 'description_long' : 'nodescription_long', \ + 'serial' : 1, \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), \ + 'players_quota' : 10, \ + 'variant' : 'holdem', \ + 'betting_structure' : 'level-15-30-no-limit', \ + 'seats_per_game' : 10, \ + 'sit_n_go' : 'y', \ + 'register_time' : 0, \ + 'start_time' : 0, \ + 'breaks_interval' : 60, \ + 'rebuy_delay' : 0, \ + 'add_on' : 0, \ + 'add_on_delay' : 60, \ + 'prizes_specs' : 'table', \ + } + + tournament = pokertournament.PokerTournament(**arguments) + for attribute, value in arguments.items(): + self.failUnlessEqual(getattr(tournament,attribute), value) + + self.failUnlessEqual(tournament.players, []) + self.failUnlessEqual(tournament.winners, []) + self.failIf(tournament.need_balance) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + self.failUnlessEqual(tournament.registered, 0) + self.failUnless(tournament.can_register) + + + # ------------------------------------------------------- + def testTournamentInitialisation(self): + """Test Poker Tournament : Initialisation""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'name' : 'Test', \ + 'description_short' : 'ShortDescription', \ + 'description_long' : 'LongDescription', \ + 'serial' : 3, \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), \ + 'players_quota' : 20, \ + 'variant' : 'variant', \ + 'betting_structure' : 'config', \ + 'seats_per_game' : 2, \ + 'sit_n_go' : 'n', \ + 'register_time' : time.time() + 60, \ + 'start_time' : '2006/04/22 12:00', \ + 'breaks_interval' : 120, \ + 'rebuy_delay' : 30, \ + 'add_on' : 10, \ + 'add_on_delay' : 120, \ + 'prizes_specs' : 'table', \ + } + + tournament = pokertournament.PokerTournament(**arguments) + for attribute, value in arguments.items(): + if attribute == 'start_time': + value = int(time.mktime(time.strptime(value, "%Y/%m/%d %H:%M"))) + + self.failUnlessEqual(getattr(tournament,attribute), value) + + self.failUnlessEqual(tournament.players, []) + self.failUnlessEqual(tournament.winners, []) + self.failIf(tournament.need_balance) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_ANNOUNCED) + self.failUnlessEqual(tournament.registered, 0) + self.failIf(tournament.can_register) + + # TODO Payout + + # ------------------------------------------------------- + def testUpdateRegistering(self): + """Test Poker Tournament : Update registering""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'register_time' : time.time() + 3, \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_ANNOUNCED) + self.failUnless((tournament.register_time - time.time()) > 0.0) + self.failUnless(tournament.updateRegistering() > 0.0) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_ANNOUNCED) + + time.sleep(4) + self.failIf((tournament.register_time - time.time()) > 0.0) + self.failUnlessEqual(tournament.updateRegistering(), -1) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + self.failUnlessEqual(tournament.updateRegistering(), -1) + + # ------------------------------------------------------- + def testRegister(self): + """Test Poker Tounament : Register""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 25, \ + 'players_min' : 20, \ + 'start_time' : time.time() + 20000, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # The tournament has been created and players can be regsitered + self.failUnless(tournament.can_register) + self.failUnlessEqual(tournament.players, []) + self.failUnlessEqual(tournament.registered, 0) + + # The player 1 can be registered + self.failIf(tournament.isRegistered(1)) + self.failUnless(tournament.canRegister(1)) + + # Register the player + self.failUnless(tournament.register(1)) + self.failUnlessEqual(tournament.players, [1]) + self.failUnlessEqual(tournament.registered, 1) + self.failUnless(tournament.isRegistered(1)) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + # The player 1 can be registered + self.failIf(tournament.isRegistered(2)) + self.failUnless(tournament.canRegister(2)) + + # Register the player + self.failUnless(tournament.register(2)) + self.failUnlessEqual(tournament.players, [1, 2]) + self.failUnlessEqual(tournament.registered, 2) + self.failUnless(tournament.isRegistered(2)) + + # Change the tournament state + tournament.changeState(pokertournament.TOURNAMENT_STATE_RUNNING) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_RUNNING) + # Players can not be regsitered + self.failIf(tournament.canRegister(3)) + self.failIf(tournament.register(3)) + + tournament.can_register = True + # Register the player + self.failUnless(tournament.can_register) + self.failUnless(tournament.canRegister(3)) + self.failUnless(tournament.register(3)) + + # ------------------------------------------------------- + def testChangeState(self): + """Test Poker Tournament : Change state""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Iniitalize state to TOURNAMENT_STATE_ANNOUNCED + tournament.state = pokertournament.TOURNAMENT_STATE_ANNOUNCED + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_ANNOUNCED) + + # Go to state TOURNAMENT_STATE_REGISTERING + tournament.changeState(pokertournament.TOURNAMENT_STATE_REGISTERING) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + # Try to go return to TOURNAMENT_STATE_ANNOUNCED + tournament.changeState(pokertournament.TOURNAMENT_STATE_ANNOUNCED) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + # Go to state TOURNAMENT_STATE_RUNNING + tournament.changeState(pokertournament.TOURNAMENT_STATE_RUNNING) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_RUNNING) + + # Go to state TOURNAMENT_STATE_COMPLETE + tournament.changeState(pokertournament.TOURNAMENT_STATE_COMPLETE) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_COMPLETE) + + + # ------------------------------------------------------- + def testCanUnregister(self): + """Test Poker Tounament : Can unregister""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 2, \ + 'sit_n_go' : 'y', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + self.failIf(tournament.canUnregister(1)) + + self.failUnless(tournament.register(1)) + self.failUnless(tournament.canUnregister(1)) + + self.failUnless(tournament.register(2)) + + self.failIfEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + self.failIf(tournament.canUnregister(1)) + + # ------------------------------------------------------- + def testUnregister(self): + """Test Poker Tounament : Unregister""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 2, \ + 'sit_n_go' : 'y', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + self.failUnless(tournament.register(1)) + self.failUnlessEqual(tournament.players, [1]) + self.failUnlessEqual(tournament.registered, 1) + + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + self.failUnless(tournament.unregister(1)) + self.failUnlessEqual(tournament.players, []) + self.failUnlessEqual(tournament.registered, 0) + + self.failUnless(tournament.register(1)) + self.failUnless(tournament.register(2)) + self.failIfEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + self.failIf(tournament.unregister(1)) + + # ------------------------------------------------------- + def testCreateGames(self): + """Test Poker Tournament : Create games""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 10, \ + 'players_min' : 10, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 3, \ + 'sit_n_go' : 'n', \ + 'variant' : 'holdem', \ + 'betting_structure' : 'level-15-30-no-limit', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + nplayers = 9 + for player in xrange(1,nplayers+1): + self.failUnless(tournament.register(player)) + + self.failUnlessEqual(tournament.registered, nplayers) + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_REGISTERING) + + self.failUnlessEqual(tournament.id2game, {}) + + tournament.createGames() + self.failUnlessEqual(len(tournament.id2game), nplayers / tournament.seats_per_game) + self.failUnlessEqual(len(tournament.games), nplayers / tournament.seats_per_game) + + id = 1 + for game in tournament.games: + self.failUnlessEqual(game.max_players, tournament.seats_per_game) + self.failUnlessEqual(game.allCount(), tournament.seats_per_game) + self.failUnlessEqual(game.variant, 'holdem') + self.failUnlessEqual(game.id, id) + id += 1 + + for serial in game.serial2player: + self.failUnless(game.serial2player[serial].isSit()) + self.failUnless(game.serial2player[serial].isBuyInPayed()) + self.failUnless(game.serial2player[serial].isAutoBlindAnte()) + + self.failIf(game.is_open) + + # ------------------------------------------------------- + def testPrizesSnG(self): + """Test Poker Tournament : Prizes for SnG tournaments""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'buy_in' : 100, \ + 'seats_per_game' : 2, \ + 'sit_n_go' : 'y', \ + 'prizes_specs' : 'table', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + prizes = tournament.prizes() + self.failUnless(tournament.register(1)) + self.assertEquals(prizes, tournament.prizes()) + self.failUnless(tournament.unregister(1)) + self.assertEquals(prizes, tournament.prizes()) + + # ------------------------------------------------------- + def testPrizesGuaranteeAmount(self): + """Test Poker Tournament : Prizes for tournaments with guarantee amount""" + + prize_min = 1000 + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 2, \ + 'buy_in' : 100, \ + 'seats_per_game' : 2, \ + 'prize_min' : prize_min, \ + 'start_time' : time.time() + 20000, \ + 'sit_n_go' : 'n', \ + 'prizes_specs' : 'table', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + self.assertEquals(prize_min, tournament.prizes()[0]) + + # ------------------------------------------------------- + def testPrizesRegular(self): + """Test Poker Tournament : Prizes for regular tournaments""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 40, \ + 'buy_in' : 100, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 2, \ + 'sit_n_go' : 'n', \ + 'prizes_specs' : 'table', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + # + # PrizesTable + # + tournament = pokertournament.PokerTournament(**arguments) + for player in range(1, 21): + self.failUnless(tournament.register(player)) + self.failUnlessEqual(tournament.registered, 20) + p = pokerprizes.__dict__['PokerPrizesTable'](buy_in_amount = 100, player_count = 20, config_dirs = self.dirs) + self.failUnlessEqual(tournament.prizes_object.player_count, p.player_count) + self.failUnlessEqual(tournament.prizes_object.buy_in, p.buy_in) + self.failUnlessEqual(tournament.prizes(), p.getPrizes()) + + # + # register/unregister updates the prizes a new player + # + self.assertEquals(True, tournament.register(21)) + self.failUnlessEqual(tournament.registered, 21) + self.failIfEqual(tournament.prizes(), p.getPrizes()) + tournament.unregister(21) + self.failUnlessEqual(tournament.prizes(), p.getPrizes()) + + # + # PrizesAlgorithm + # + arguments['prizes_specs'] = 'algorithm' + tournament = pokertournament.PokerTournament(**arguments) + for player in range(20): + self.failUnless(tournament.register(player)) + p = pokerprizes.__dict__['PokerPrizesAlgorithm'](buy_in_amount = 100, player_count = 20) + self.failUnlessEqual(tournament.prizes_object.player_count, p.player_count) + self.failUnlessEqual(tournament.prizes_object.buy_in, p.buy_in) + self.failUnlessEqual(tournament.prizes(), p.getPrizes()) + + # + # Invalid prizes_specs + # + arguments['prizes_specs'] = 'invalid' + caught = False + try: + tournament = pokertournament.PokerTournament(**arguments) + except Exception, e: + caught = True + self.failUnless('PokerPrizesInvalid' in str(e)) + self.assertTrue(caught) + + return + + # ------------------------------------------------------- + def testMovePlayer(self): + """Test Poker Tournament : Move player""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 25, \ + 'players_min' : 20, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + for player in range(12): + self.failUnless(tournament.register(player)) + + tournament.createGames() + tournament.removePlayer(tournament.games[0].id, tournament.games[0].serialsAll()[0]) + move = pokertournament.equalizeGames(tournament.games) + self.failUnlessEqual(move, [(2, 1, 3), (3, 1, 0), (3, 1, 1)]) + + from_game = tournament.id2game[move[0][0]] + to_game = tournament.id2game[move[0][1]] + + player = from_game.getPlayer(move[0][2]) + player.name = 'Player' + player.setUserData('UserData') + player.sit_out = True + player.bot = True + + self.failUnlessEqual(from_game.allCount(), 4) + self.failUnlessEqual(to_game.allCount(), 2) + + tournament.movePlayer(from_game.id, to_game.id, player.serial) + + self.failUnlessEqual(from_game.allCount(), 3) + self.failUnlessEqual(to_game.allCount(), 3) + + player = to_game.getPlayer(move[0][2]) + self.failUnlessEqual(player.name, 'Player') + self.failUnlessEqual(player.getUserData(), 'UserData') + self.failUnless(player.isSitOut()) + self.failUnless(player.isBot()) + + # ------------------------------------------------------- + def testEqualizeCandidates(self): + """Test Poker Tournament : Equalize candidates""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'players_min' : 15, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + for player in range(12): + self.failUnless(tournament.register(player)) + + tournament.createGames() + + want, provide = pokertournament.equalizeCandidates(tournament.games) + + # Since balanceGames() is called by createGames(), we should find + # these results. + + self.failUnlessEqual(len(want), 0) + self.failUnlessEqual(len(provide), 3) + self.failUnlessEqual(want, []) + self.failUnlessEqual(provide, [(1, []), (2, [3]), (3, [0, 1])]) + + # Remove one from three and he should have one fewer to provide + tournament.removePlayer(tournament.games[2].id, tournament.games[2].serialsAll()[0]) + + want, provide = pokertournament.equalizeCandidates(tournament.games) + self.failUnlessEqual(len(want), 0) + self.failUnlessEqual(len(provide), 3) + self.failUnlessEqual(provide, [(1, []), (2, [3]), (3, [1])]) + # ------------------------------------------------------- + def testEqualizeGames(self): + """Test Poker Tournament : Equalize games""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 25, \ + 'players_min' : 20, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + # Tournament => 2 complete games (6 players) + tournament = pokertournament.PokerTournament(**arguments) + for player in range(10): + self.failUnless(tournament.register(player)) + + # Create games + tournament.createGames() + + # Check games + self.failUnlessEqual(len(tournament.games), 2) + self.failUnlessEqual(tournament.games[0].allCount(), 5) + self.failUnlessEqual(tournament.games[1].allCount(), 5) + + # No need to equalize game + self.failUnlessEqual(pokertournament.equalizeGames(tournament.games, 3, None), []) + + # Tournament => 3 , has two tables of 3, then two tables of 5 + tournament = pokertournament.PokerTournament(**arguments) + for player in range(16): + self.failUnless(tournament.register(player)) + + # Create games + tournament.createGames() + + # Check games + self.failUnlessEqual(len(tournament.games), 4) + self.failUnlessEqual(tournament.games[0].allCount(), 3) + self.failUnlessEqual(tournament.games[1].allCount(), 3) + self.failUnlessEqual(tournament.games[2].allCount(), 5) + self.failUnlessEqual(tournament.games[3].allCount(), 5) + + # Nothing to equalize at first + self.failUnlessEqual(pokertournament.equalizeGames(tournament.games, int(os.environ.get('VERBOSE_T', 3)), sys.stdout.write), []) + + # Remove one player from first table, means players from 3 must be redistributed + tournament.removePlayer(tournament.games[0].id, tournament.games[0].serialsAll()[0]) + self.failUnlessEqual(pokertournament.equalizeGames(tournament.games, int(os.environ.get('VERBOSE_T', 3)), sys.stdout.write), [(3, 1, 1), (3, 1, 2), (4, 1, 0)]) + + # ------------------------------------------------------- + def testBreakGame(self): + """Test Poker Tournament : Break game""" + + to_break = { \ + 'id' : 1, \ + 'to_add' : [], \ + 'running' : True, \ + 'seats_left' : 0, \ + 'serials' : [1, 2] \ + } + + to_fill_1 = { \ + 'id' : 2, \ + 'to_add' : [], \ + 'running' : False, \ + 'seats_left' : 2, \ + 'serials' : [3, 4] \ + } + + to_fill_2 = { \ + 'id' : 3, \ + 'to_add' : [], \ + 'running' : False, \ + 'seats_left' : 2, \ + 'serials' : [5, 6] \ + } + + self.failIf(pokertournament.breakGame(to_break, [to_fill_1])) + + to_break['to_add'] = [2] + to_break['running'] = False + self.failIf(pokertournament.breakGame(to_break, [to_fill_1])) + + to_break['to_add'] = [] + to_break['running'] = True + self.failIf(pokertournament.breakGame(to_break, [to_fill_1])) + + to_break['running'] = False + to_fill_1['seats_left'] = len(to_break['serials']) - 1 + self.failIf(pokertournament.breakGame(to_break, [to_fill_1])) + + to_fill_1['seats_left'] = len(to_break['serials']) + self.failUnlessEqual(pokertournament.breakGame(to_break, [to_fill_1]), [(1, 2, [1, 2])]) + + to_fill_1['seats_left'] = len(to_break['serials']) - 1 + to_fill_2['seats_left'] = 1 + self.failUnlessEqual(pokertournament.breakGame(to_break, [to_fill_1, to_fill_2]), [(1, 3, [1]), (1, 2, [2])]) + + # ------------------------------------------------------- + def testBreakGames(self): + """Test Poker Tournament : Break games""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 50, \ + 'players_min' : 25, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + for player in range(12): + self.failUnless(tournament.register(player)) + + tournament.createGames() + + self.failUnlessEqual(len(tournament.games), 3) + + self.failUnlessEqual(tournament.games[0].allCount(), 3) + self.failUnlessEqual(tournament.games[1].allCount(), 4) + self.failUnlessEqual(tournament.games[2].allCount(), 5) + + # This remove leaves us with 2, 4, 5, which means that nothing can be broken. + tournament.removePlayer(tournament.games[0].id, tournament.games[0].serialsAll()[0]) + self.failUnlessEqual(pokertournament.breakGames(tournament.games), []) + + # This will leave us with 2, 4, 4, which means table 0 can be broken, and one player + # wil be sent to each table. + tournament.removePlayer(tournament.games[2].id, tournament.games[2].serialsAll()[0]) + + player1 = tournament.games[0].serialsAll()[0] + player2 = tournament.games[0].serialsAll()[1] + + self.failUnlessEqual(pokertournament.breakGames(tournament.games), + [(1, 3, [player1]), (1, 2, [player2])]) + + # Impossible to break less than 2 game + self.failUnlessEqual(pokertournament.breakGames([tournament.games[0]]), []) + + def testBalanceGamesRunning(self): + """Test Poker Tournament : Balance games when state RUNNING""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'players_min' : 15, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(12): + self.failUnless(tournament.register(player)) + + # Note: balanceGames() is called by createGames() so initially, + # the tables will be balanced as 3 players at first table, 4 at + # second, and 5 at third. (This doesn't sound all that balanced, + # but it's consistent with the algorithm in + # pokertournament.equalizeGames() + + tournament.createGames() + tournament.state = pokertournament.TOURNAMENT_STATE_RUNNING + self.failUnlessEqual(len(tournament.games[0].serialsAll()), 3) + self.failUnlessEqual(len(tournament.games[1].serialsAll()), 4) + self.failUnlessEqual(len(tournament.games[2].serialsAll()), 5) + + # Remove one player from every game. + tournament.removePlayer(tournament.games[0].id, tournament.games[0].serialsAll()[0]) + tournament.removePlayer(tournament.games[1].id, tournament.games[1].serialsAll()[0]) + tournament.removePlayer(tournament.games[2].id, tournament.games[2].serialsAll()[0]) + + # Get the players of the first game + player1 = tournament.games[0].serialsAll()[0] + player2 = tournament.games[0].serialsAll()[1] + + # Ensure that the first game is the one selected for breaking + self.failUnlessEqual(pokertournament.breakGames(tournament.games), + [(1, 3, [player1]), (1, 2, [player2])]) + + # Test the balancing. First, ensure that the players are still at + # the first game + self.failUnless(tournament.id2game[1].getPlayer(player1)) + self.failIf(tournament.id2game[2].getPlayer(player1)) + self.failIf(tournament.id2game[3].getPlayer(player1)) + + self.failUnless(tournament.id2game[1].getPlayer(player2)) + self.failIf(tournament.id2game[2].getPlayer(player2)) + self.failIf(tournament.id2game[3].getPlayer(player2)) + + self.failUnless(tournament.balanceGames()) + + self.failUnlessEqual(len(tournament.id2game), 2) + self.failUnless(tournament.id2game[3].getPlayer(player1)) + self.failUnless(tournament.id2game[2].getPlayer(player2)) + + self.failIf(tournament.need_balance) + + # ------------------------------------------------------- + def testBalanceGamesRegistering(self): + """Test Poker Tournament : Balance games when state REGISTERING""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'players_min' : 15, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(12): + self.failUnless(tournament.register(player)) + + # Note: balanceGames() is called by createGames() so initially, + # the tables will be balanced as 3 players at first table, 4 at + # second, and 5 at third. (This doesn't sound all that balanced, + # but it's consistent with the algorithm in + # pokertournament.equalizeGames() + + tournament.createGames() + self.failUnlessEqual(len(tournament.games[0].serialsAll()), 3) + self.failUnlessEqual(len(tournament.games[1].serialsAll()), 4) + self.failUnlessEqual(len(tournament.games[2].serialsAll()), 5) + + # Remove one player from every game. + tournament.removePlayer(tournament.games[0].id, tournament.games[0].serialsAll()[0]) + tournament.removePlayer(tournament.games[1].id, tournament.games[1].serialsAll()[0]) + tournament.removePlayer(tournament.games[2].id, tournament.games[2].serialsAll()[0]) + + # Get the players of the first game + player1 = tournament.games[0].serialsAll()[0] + player2 = tournament.games[0].serialsAll()[1] + + # Ensure that the first game is the one selected for breaking + self.failUnlessEqual(pokertournament.breakGames(tournament.games), + [(1, 3, [player1]), (1, 2, [player2])]) + + # Test the balancing. First, ensure that the players are still at + # the first game + self.failUnless(tournament.id2game[1].getPlayer(player1)) + self.failIf(tournament.id2game[2].getPlayer(player1)) + self.failIf(tournament.id2game[3].getPlayer(player1)) + + self.failUnless(tournament.id2game[1].getPlayer(player2)) + self.failIf(tournament.id2game[2].getPlayer(player2)) + self.failIf(tournament.id2game[3].getPlayer(player2)) + + self.failUnless(tournament.balanceGames()) + + self.failUnlessEqual(len(tournament.id2game), 2) + self.failUnless(tournament.id2game[3].getPlayer(player1)) + self.failUnless(tournament.id2game[2].getPlayer(player2)) + + self.failIf(tournament.need_balance) + + + # Create a new tournament where is no need to break a game + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'players_min' : 15, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(12): + self.failUnless(tournament.register(player)) + + + # As above, note: balanceGames() is called by createGames() so + # initially, the tables will be balanced as 3 players at first + # table, 4 at second, and 5 at third. (This doesn't sound all + # that balanced, but it's consistent with the algorithm in + # pokertournament.equalizeGames() + + tournament.createGames() + self.failUnlessEqual(len(tournament.games[0].serialsAll()), 3) + self.failUnlessEqual(len(tournament.games[1].serialsAll()), 4) + self.failUnlessEqual(len(tournament.games[2].serialsAll()), 5) + + # ...therefore, no table balancing should be needed ... so + # equalizeGames() should return nothing, and balance games should + # be False. + + self.failUnlessEqual(pokertournament.equalizeGames(tournament.games), []) + self.failIf(tournament.balanceGames()) + + + # ------------------------------------------------------- + def testEndTurn(self): + """Test Poker Tournament : End turn""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 10, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'y', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(10): + self.failUnless(tournament.register(player)) + + # 2 games (5 players) + self.failUnlessEqual(len(tournament.games), 2) + + # Ten players in the tournament + self.failUnlessEqual(len(tournament.players), 10) + + # Get created games + game1 = tournament.id2game[1] + game2 = tournament.id2game[2] + + # Game 2, players 1, 2, 3 broke + players = game2.playersAll() + for num in range(3): + players[num].money = 0 + self.failUnless(game2.isBroke(players[num].serial)) + self.failUnlessEqual(game2.brokeCount(), 3) + + # End turn of game 2 + self.failUnless(tournament.endTurn(2)) + + # Players broke removed + # Game balanced + self.failUnlessEqual(len(game1.playersAll()), 3) + self.failUnlessEqual(len(game2.playersAll()), 4) + + # Game 2 players broke + players = game2.playersAll() + for num in range(len(players)): + players[num].money = 0 + self.failUnless(game2.isBroke(players[num].serial)) + + # End turn of game 2 + self.failUnless(tournament.endTurn(2)) + + # Game 2 break + self.failUnlessEqual(len(tournament.games), 1) + + # All the players of game 1 are borke except one + players = game1.playersAll() + for num in range(len(players) - 1): + players[num].money = 0 + self.failUnless(game1.isBroke(players[num].serial)) + + # End turn of game 1 + self.failIf(tournament.endTurn(1)) + + # End of the tounament + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_COMPLETE) + self.failUnlessEqual(len(tournament.games), 0) + self.failUnlessEqual(len(tournament.id2game), 0) + + # ------------------------------------------------------- + def testEndTurnFirstBreakAndBalance(self): + """Test Poker Tournament : + 1) a tournament enters BREAK_WAIT + 2) all tables but table T1 finished their hand + 3) the table T1 finishes its hand AND is destroyed as a side + effect of a call to balanceGames, because the T1 players + are dispatched to the other tables. + This is a special case where updateBreak will be called from endTurn + with a game_id for a table that is gone. updateBreak must gracefully + ignore the fact it is gone and proceed to BREAK state. + """ + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 10, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'y', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), \ + 'breaks_first' : 0 + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(10): + self.failUnless(tournament.register(player)) + + # 2 games (5 players) + self.failUnlessEqual(len(tournament.games), 2) + + # Ten players in the tournament + self.failUnlessEqual(len(tournament.players), 10) + + # Get created games + game1 = tournament.id2game[1] + game2 = tournament.id2game[2] + + # Game 1, players 1 broke + players = game1.playersAll() + for num in range(1): + players[num].money = 0 + self.failUnless(game1.isBroke(players[num].serial)) + self.failUnlessEqual(game1.brokeCount(), 1) + + # End turn of game 1 + self.failUnless(tournament.endTurn(1)) + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_BREAK_WAIT, tournament.state) + self.failUnlessEqual([1], tournament.breaks_games_id) + + # Game 2, players 1, 2, 3, 4 broke as if 5 got all their chips + players = game2.playersAll() + for num in range(4): + players[num].money = 0 + self.failUnless(game2.isBroke(players[num].serial)) + self.failUnlessEqual(game2.brokeCount(), 4) + + # End turn of game 2 + self.failUnless(tournament.endTurn(2)) + + # Players broke removed + # Game balanced, game2 discarded, game1 left + self.failUnlessEqual(len(game1.playersAll()), 5) + self.failUnlessEqual([game1], tournament.games) + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_BREAK, tournament.state) + + tournament.state = pokertournament.TOURNAMENT_STATE_RUNNING + + # Game 1 players broke + players = game1.playersAll() + for num in range(len(players) - 1): + players[num].money = 0 + self.failUnless(game1.isBroke(players[num].serial)) + + # End turn of game 1 + self.failIf(tournament.endTurn(1)) + + # End of the tounament + self.failUnlessEqual(tournament.state, pokertournament.TOURNAMENT_STATE_COMPLETE) + self.failUnlessEqual(len(tournament.games), 0) + self.failUnlessEqual(len(tournament.id2game), 0) + + # ------------------------------------------------------- + def testEndTurnFirstBreakAndSinglePlayer(self): + """Test Poker Tournament : + On a two tables tournament with two players tables (but this applies to N tables) + 1) table T1 finishes its hand and only has one player left + tournament is not on BREAK_WAIT + 2) tournament break time is reached + 3) table T2 finishes its hand, no player is busted. + endTurn is called and tournament enters BREAK_WAIT + T2 is added to the list of tables for which there + is not need to wait before declaring the tournament + on break. Because T1 has only one player left and + all other tables are expecting the break (i.e. no + hand will be played), it can be added to the list + of tables ready for the break. + """ + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 4, \ + 'seats_per_game' : 2, \ + 'sit_n_go' : 'y', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), \ + } + + tournament = pokertournament.PokerTournament(**arguments) + + # Register the players + for player in range(4): + self.failUnless(tournament.register(player)) + + # 2 games (4 players) + self.failUnlessEqual(len(tournament.games), 2) + + # 4 players in the tournament + self.failUnlessEqual(len(tournament.players), 4) + + # Get created games + game1 = tournament.id2game[1] + game2 = tournament.id2game[2] + + # Game 2, players 1 broke as if 2 got all his chips + players = game2.playersAll() + players[0].money = 0 + self.failUnless(game2.isBroke(players[0].serial)) + self.failUnlessEqual(game2.brokeCount(), 1) + + # End turn of game 2 + self.failUnless(tournament.endTurn(2)) + self.failUnlessEqual(len(game2.playersAll()), 1) + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_RUNNING, tournament.state) + + # break time is now + tournament.breaks_first = 0 + + # End turn of game 1 + self.failUnless(tournament.endTurn(1)) + self.failUnlessEqual([game1,game2], tournament.games) + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_BREAK, tournament.state) + self.failUnlessEqual(len(game1.playersAll()), 2) + self.failUnlessEqual(len(game2.playersAll()), 1) + + # ------------------------------------------------------- + def testGetRank(self): + """Test Poker Tournament : Get rank""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'seats_per_game' : 5, \ + 'start_time' : time.time() + 20000, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + for player in range(10): + self.failUnless(tournament.register(player)) + + tournament.winners = [1, 5, 8] + + self.failUnlessEqual(tournament.getRank(1), 8) + self.failUnlessEqual(tournament.getRank(5), 9) + self.failUnlessEqual(tournament.getRank(8), 10) + + for player in range(10): + if player not in tournament.winners: + self.failUnlessEqual(tournament.getRank(player), -1) + + # ------------------------------------------------------- + def testCancel(self): + """Test Poker Tournament : Cancel""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'players_min' : 5, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + for player in range(3): + self.failUnless(tournament.register(player)) + + self.failUnlessEqual([0, 1, 2], tournament.players) + tournament.start_time = 0 + self.assertEqual(None, tournament.canRun()) + tournament.updateRunning() + self.failUnlessEqual([], tournament.players) + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_CANCELED, tournament.state) + self.failIf(tournament.cancel()) + + # ------------------------------------------------------- + def testRunRegular(self): + """Test Poker Tournament : Cancel""" + + arguments = { \ + 'dirs' : self.dirs, \ + 'players_quota' : 20, \ + 'start_time' : time.time() + 20000, \ + 'seats_per_game' : 5, \ + 'sit_n_go' : 'n', \ + 'verbose' : int(os.environ.get('VERBOSE_T', 3)) + } + + tournament = pokertournament.PokerTournament(**arguments) + + self.failUnless(tournament.register(1)) + tournament.start_time = 0 + self.failUnless(tournament.register(2)) + + self.failUnlessEqual(pokertournament.TOURNAMENT_STATE_RUNNING, tournament.state) + +class Breaks(unittest.TestCase): + + def setUp(self): + self.now = time.time() + 20000 + pokertournament.tournament_seconds = self.seconds + + def seconds(self): + return self.now + + def test_remainingBreakSeconds(self): + arguments = { + 'dirs' : [ '../conf' ], + 'players_quota' : 20, + 'start_time' : self.seconds(), + 'seats_per_game' : 5, + 'sit_n_go' : 'n', + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), + } + + tournament = pokertournament.PokerTournament(**arguments) + self.assertEqual(None, tournament.remainingBreakSeconds()) + tournament.breaks_since = self.now - 1 + tournament.breaks_duration = 2 + self.assertEqual(1, tournament.remainingBreakSeconds()) + + def test_updateBreak(self): + + arguments ={ + 'dirs' : [ '../conf' ], + 'players_quota' : 20, + 'start_time' : self.seconds(), + 'seats_per_game' : 5, + 'sit_n_go' : 'n', + 'verbose' : int(os.environ.get('VERBOSE_T', 3)), + } + + tournament = pokertournament.PokerTournament(**arguments) + tournament.state = pokertournament.TOURNAMENT_STATE_RUNNING + # + # No break, updateBreak does nothing + # + tournament.breaks_duration = 0 + self.assertEqual(False, tournament.updateBreak(0)) + # + # RUNNING but not time to break yet + # + tournament.breaks_duration = 5 + tournament.breaks_running_since = tournament.start_time + tournament.breaks_first = 10 + tournament.breaks_interval = 10 + tournament.breaks_duration = 1 + tournament.breaks_count = 1 + self.failUnless(tournament.updateBreak()) + tournament.breaks_count = 0 + self.failUnless(tournament.updateBreak()) + # + # RUNNING -> BREAK_WAIT + # + self.now = tournament.breaks_running_since + tournament.breaks_first + class Game: + def __init__(self, id): + self.id = id + def playersAll(self): + return [1,2,3] + + tournament.games = [Game(1), Game(2)] + self.failUnless(tournament.updateBreak(1)) + self.failUnless(hasattr(tournament, 'breaks_games_id')) + self.assertEqual([1],tournament.breaks_games_id) + self.assertEqual(pokertournament.TOURNAMENT_STATE_BREAK_WAIT, tournament.state) + # + # BREAK_WAIT -> BREAK + # + self.failUnless(tournament.updateBreak(2)) + self.failIf(hasattr(tournament, 'breaks_games_id')) + self.assertEqual(pokertournament.TOURNAMENT_STATE_BREAK, tournament.state) + self.assertEqual(self.now, tournament.breaks_since) + # + # BREAK -> RUNNING + # + self.now += tournament.breaks_duration + self.failUnless(tournament.updateBreak()) + self.assertEqual(self.now, tournament.breaks_running_since) + # + # Call with invalid state + # + tournament.state = pokertournament.TOURNAMENT_STATE_CANCELED + self.assertEqual(None, tournament.updateBreak()) + +# --------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(PokerTournamentTestCase)) +# suite.addTest(unittest.makeSuite(PokerTournamentTestCase, prefix = "testEndTurnFirstBreakAndSinglePlayer")) + suite.addTest(unittest.makeSuite(Breaks)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(Breaks, prefix = "testPrizes")) + return suite + +# --------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# --------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-pokertournament.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/pokertournament.py' TESTS='coverage-reset test-pokertournament.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/test-version.py +++ poker-engine-1.3.6/tests/test-version.py @@ -0,0 +1,243 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Pierre-Andre (05/2006) +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") + +import unittest + +from pokerengine import version + +class VersionTestCase(unittest.TestCase): + + # ----------------------------------------------------------------------------------------------------- + def setUp(self): + version.Version.verbose = int(os.environ.get('VERBOSE_T', 0)) + + # ----------------------------------------------------------------------------------------------------- + def tearDown(self): + pass + + # ----------------------------------------------------------------------------------------------------- + def testStringRepresentation(self): + """Test Version : String representation of the version object""" + + ver = version.Version('1.2.3') + self.failUnlessEqual(repr(ver),ver.__class__.__name__ + ' (\'' + str(ver) + '\')') + + # ----------------------------------------------------------------------------------------------------- + def testParseError(self): + """Test Version : Parsing error with invalid version string""" + + ver = version.Version() + self.failUnlessRaises(ValueError,ver.parse,'') + self.failUnlessRaises(ValueError,ver.parse,'1') + self.failUnlessRaises(ValueError,ver.parse,'1.2') + self.failUnlessRaises(ValueError,ver.parse,'1-2-3') + self.failUnlessRaises(ValueError,ver.parse,'A.B.C') + self.failUnlessRaises(ValueError,ver.parse,'1.2.3.') + self.failUnlessRaises(ValueError,ver.parse,'1.2.3.4') + + # ----------------------------------------------------------------------------------------------------- + def testParseSuccess(self): + """Test Version : Parsing success with valid version string""" + + ver = version.Version() + try: + ver.parse('1.2.3') + major, medium, minor = ver.version + except: + self.fail('Exception generated version parsing') + + self.failUnlessEqual(major,1) + self.failUnlessEqual(medium,2) + self.failUnlessEqual(minor,3) + + # ----------------------------------------------------------------------------------------------------- + def testMajor(self): + """Test Version : Major version number accessor""" + + ver = version.Version('1.2.3') + self.failUnlessEqual(ver.major(),1) + + # ----------------------------------------------------------------------------------------------------- + def testMedium(self): + """Test Version : Medium version number accessor""" + + ver = version.Version('1.2.3') + self.failUnlessEqual(ver.medium(),2) + + # ----------------------------------------------------------------------------------------------------- + def testMinor(self): + """Test Version : Minor version number accessor""" + + ver = version.Version('1.2.3') + self.failUnlessEqual(ver.minor(),3) + + # ----------------------------------------------------------------------------------------------------- + def testStr(self): + """Test Version : String representation""" + + sver = '1.2.3' + ver = version.Version('1.2.3') + self.failUnlessEqual(sver,str(ver)) + + # ----------------------------------------------------------------------------------------------------- + def testAdd(self): + """Test Version : Addition""" + + ver1 = version.Version('1.2.3') + ver2 = ver1 + 1 + self.failUnlessEqual(version.Version('1.2.3'),ver1) + self.failUnlessEqual(version.Version('1.2.4'),ver2) + + # ----------------------------------------------------------------------------------------------------- + def testIAdd(self): + """Test Version : Self addition""" + + ver1 = version.Version('1.2.3') + ver1 += 1 + self.failUnlessEqual(version.Version('1.2.4'),ver1) + + # ----------------------------------------------------------------------------------------------------- + def testSub(self): + """Test Version : Substraction""" + + ver1 = version.Version('3.2.1') + ver2 = ver1 - 1 + self.failUnlessEqual(version.Version('3.2.1'),ver1) + self.failUnlessEqual(version.Version('3.2.0'),ver2) + + ver2 = ver1 - 2 + self.failUnlessEqual(version.Version('3.2.1'),ver1) + self.failUnlessEqual(version.Version('3.0.1'),ver2) + + ver2 = ver1 - 3 + self.failUnlessEqual(version.Version('3.2.1'),ver1) + self.failUnlessEqual(version.Version('0.2.1'),ver2) + + self.failUnlessRaises(UserWarning,ver1.__sub__,4) + + # ----------------------------------------------------------------------------------------------------- + def testISub(self): + """Test Version : Self substraction""" + + ver1 = version.Version('3.2.1') + ver1 -= 1 + self.failUnlessEqual(version.Version('3.2.0'),ver1) + + ver1 = version.Version('3.2.1') + ver1 -= 2 + self.failUnlessEqual(version.Version('3.0.1'),ver1) + + ver1 = version.Version('3.2.1') + ver1 -= 3 + self.failUnlessEqual(version.Version('0.2.1'),ver1) + + ver1 = version.Version('3.2.1') + self.failUnlessRaises(UserWarning,ver1.__sub__,4) + + # ----------------------------------------------------------------------------------------------------- + def testUpgradeChainInvalid(self): + """Test Version : Upgrade chain with invalid input formats""" + + ver_invalid = ['','1.2','1-2-3','A.B.C','1.2.3.','1.2.3.4'] + + chain_invalid = [] + for ver1 in ver_invalid: + for ver2 in ver_invalid: + chain_invalid.append('upgrade-' + ver1 + '-' + ver2) + chain_invalid.append('upgrade-1.2.3-1.2.') + chain_invalid.append('upgrade-1.2.-1.2.3') + chain_invalid.append('upgrade-1.2.3,1.2.4') + + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('4.3.2',chain_invalid),[]) + + # ----------------------------------------------------------------------------------------------------- + def testUpgradeChainFailed(self): + """Test Version : Upgrade chain with invalid inputs""" + + ver_invalid = ['upgrade-3.2.1-3.2.1','upgrade-3.2.1-3.2.0'] + + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('3.2.2',ver_invalid),[]) + + # ----------------------------------------------------------------------------------------------------- + def testUpgradeChainIgnored(self): + """Test Version : Upgrade chain with ignored inputs""" + + ver_ignored = ['upgrade-0.9.0-1.0.0','upgrade-3.0.0-3.1.0'] + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('3.2.3',ver_ignored),[]) + + # ----------------------------------------------------------------------------------------------------- + def testUpgradeChainValid(self): + """Test Version : Upgrade chain with valid inputs""" + + ver_valid = ['upgrade-3.2.1-3.2.2','grade-3.2.2-3.2.3'] + + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('3.2.3',ver_valid),ver_valid) + + ver_valid = ['upgrade-3.2.2-3.2.3', 'upgrade-3.2.2-3.2.3'] + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('3.2.3',ver_valid), ['upgrade-3.2.2-3.2.3']) + + ver_valid = ['upgrade-3.2.1-3.2.6', 'upgrade-3.2.1-3.2.3'] + ver = version.Version('3.2.1') + self.failUnlessEqual(ver.upgradeChain('3.2.7',ver_valid), ['upgrade-3.2.1-3.2.6']) + +# ----------------------------------------------------------------------------------------------------- +def GetTestSuite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(VersionTestCase)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(VersionTestCase, prefix = "test2")) + return suite + +# ----------------------------------------------------------------------------------------------------- +def GetTestedModule(): + return version + +# ----------------------------------------------------------------------------------------------------- +def Run(verbose): + return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite()) + +# ----------------------------------------------------------------------------------------------------- +if __name__ == '__main__': + if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/test-version.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokerengine/version.py' TESTS='coverage-reset test-version.py coverage-report' check )" +# End: --- poker-engine-1.3.6.orig/tests/tournament.py +++ poker-engine-1.3.6/tests/tournament.py @@ -0,0 +1,565 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2004, 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os +sys.path.insert(0, "..") +sys.path.insert(0, "..") + +import time +from string import split + +import unittest +from pokerengine.pokergame import PokerGameServer +from pokerengine.pokertournament import equalizeGames, breakGames, PokerTournament + +NGAMES = 5 + +class PokerPredefinedDecks: + def __init__(self, decks): + self.decks = decks + self.index = 0 + + def shuffle(self, deck): + deck[:] = self.decks[self.index][:] + self.index += 1 + if self.index >= len(self.decks): + self.index = 0 + +class TestTournament(unittest.TestCase): + + def setUp(self): + predefined_decks = [ + "8d 2h 2c 8c 4c Kc Ad 9d Ts Jd 5h Tc 4d 9h 8h 7h 9c 2s 3c Kd 5s Td 5d Th 3s Kh Js Qh 7d 2d 3d 9s Qd Ac Jh Jc Qc 6c 7s Ks 5c 4h 7c 4s Qs 6s 6h Ah 6d As 3h 8s", # distributed from the end + ] + self.games = [] + for i in xrange(NGAMES): + game = PokerGameServer("poker.%s.xml", [ "../conf", "../conf" ]) + game.verbose = int(os.environ.get('VERBOSE_T', 3)) + game.setVariant("7stud") + game.setBettingStructure("0-0-limit") + game.id = i + game.shuffler = PokerPredefinedDecks(map(lambda deck: game.eval.string2card(split(deck)), predefined_decks)) + self.games.append(game) + + def tearDown(self): + del self.games + + def log(self, string): + print string + +class TestEqualize(TestTournament): + + def test1(self): + """ + """ + # + # Five 10 seats tables (0 to 4) + # table 0 : 8 players + # table 1 : 8 players + # table 2 : 7 players + # table 3 : 7 players + # table 4 : 2 players + # + counts = [8, 8, 7, 7, 2] + for game in self.games: + game.serial2player = {} + for serial in xrange(counts.pop(0)): + game.serial2player[game.id * 100 + serial] = None + + # + # 2 players move + # + # table 0 : 8 players -> 1 leave to table 4 + # table 1 : 8 players -> 1 leave to table 4 + # table 2 : 7 players + # table 3 : 7 players + # table 4 : 2 players <- 2 arrive from table 0 and 1 + # + self.assertEqual(equalizeGames(self.games[:]), [(0, 4, 0), (1, 4, 100)]) + + # + # Five 10 seats tables (0 to 4) + # table 0 : 10 players + # table 1 : 8 players + # table 2 : 3 players + # table 3 : 9 players + # table 4 : 5 players + # + counts = [10, 8, 3, 9, 5] + for game in self.games: + game.serial2player = {} + for serial in xrange(counts.pop(0)): + game.serial2player[game.id * 100 + serial] = None + + # + # 6 players move + # + # table 0 : 10 players -> 3 leave (2 to table 2, 1 to table 4) + # table 1 : 8 players -> 1 leave (to table 2) + # table 2 : 3 players <- 4 arrive (2 from table 0, 1 from table 2, 1 from table 3) + # table 3 : 9 players -> 2 leave (1 to table 2, 1 to table 4) + # table 4 : 5 players <- 2 arrive (1 from table 0, 1 from table 3) + # + self.assertEqual(equalizeGames(self.games[:]), [ + (0, 4, 0), + (0, 2, 1), + (0, 4, 2), + (1, 2, 100), + (3, 4, 300), + (3, 2, 301)]) + + # + # Five 10 seats tables (0 to 4) + # table 0 : 10 players + # table 1 : 10 players + # table 2 : 10 players + # table 3 : 10 players + # table 4 : 10 players + # + counts = [10, 10, 10, 10, 10] + for game in self.games: + game.serial2player = {} + for serial in xrange(counts.pop(0)): + game.serial2player[game.id * 100 + serial] = None + # + # Nothing to be done + # + self.assertEqual(equalizeGames(self.games[:]), []) + + def test2(self): + # + # Two 5 seats tables (0, 1) + # table 0 : 2 players + # table 1 : 5 players + # + games = self.games[:2] + games[0].serial2player = {} + games[0].max_players = 5 + for serial in (1, 2): + games[0].serial2player[serial] = None + + games[1].serial2player = {} + games[1].max_players = 5 + for serial in (100, 101, 102, 103, 104): + games[1].serial2player[serial] = None + + self.assertEqual(equalizeGames(games), [(1, 0, 100), (1, 0, 101)]) + + def test3(self): + # + # Three 5 seats tables (0, 1, 2) + # table 0 : 2 players + # table 1 : 5 players (running) + # table 2 : 5 players (running) + # + games = self.games[:3] + games[0].serial2player = {} + games[0].max_players = 5 + for serial in (1, 2): + games[0].serial2player[serial] = None + + games[1].serial2player = {} + games[1].max_players = 5 + games[1].state = "turn" + for serial in (100, 101, 102, 103, 104): + games[1].serial2player[serial] = None + + games[2].serial2player = {} + games[2].max_players = 5 + games[2].state = "turn" + for serial in (200, 201, 202, 203, 204): + games[2].serial2player[serial] = None + + # + # Games that could provide players are running and can't + # provide players. Nothing can be done. + # + self.assertEqual(equalizeGames(games), []) + + # + # Three 5 seats tables (0, 1, 2) + # table 0 : 2 players (running) + # table 1 : 5 players (running) + # table 2 : 5 players + # + games[0].state = "turn" + games[2].state = "end" + # + # Game 2 provide 2 players to game 0 + # + self.assertEqual(equalizeGames(games), [(2, 0, 200), (2, 0, 201)]) + +class TestBreak(TestTournament): + + def test1(self): + """ + """ + # + # Five 10 seats tables (0 to 4), each with 5 players + # + counts = [5] * NGAMES + for game in self.games: + for serial in xrange(counts.pop()): + game.serial2player[game.id * 100 + serial] = None + + # + # Players from table 0 go to table 4 + # Players from table 1 to to table 3 + # + self.assertEqual(breakGames(self.games[:]), [ + (0, 4, [0, 1, 2, 3, 4]), + (1, 3, [104, 100, 101, 102, 103]) + ]) + + # + # Five 10 seats tables (0 to 4), table 0 with 10 players, + # tables 1 to 4 with 5 players + # + for serial in xrange(5,10): + self.games[0].serial2player[serial] = None + + # + # Players from table 1 go to table 4 + # Players from table 2 go to table 3 + # + self.assertEqual(breakGames(self.games[:]), [ + (1, 4, [104, 100, 101, 102, 103]), + (2, 3, [200, 201, 202, 203, 204]) + ]) + + # + # Five 10 seats tables (0 to 4) + # table 0 : 10 players + # table 1 : 7 players + # table 2 : 7 players + # table 3 : 7 players + # table 4 : 7 players + # + for game in self.games: + for serial in xrange(5,7): + game.serial2player[game.id * 100 + serial] = None + + # + # Players from table 1 are spread on tables + # 4, 3, 2 + # + self.assertEqual(breakGames(self.games[:]), [ + (1, 4, [100, 101, 102]), + (1, 3, [103, 104, 105]), + (1, 2, [106]) + ]) + + # + # Five 10 seats tables (0 to 4) + # table 0 : 10 players + # table 1 : 7 players + # table 2 : 7 players + # table 3 : 9 players + # table 4 : 7 players + # + for serial in xrange(7,9): + self.games[3].serial2player[300 + serial] = None + + # + # Players from table 1 are spread on tables + # 3, 4, 2. Table 3 is chosen first because it is the + # table with the largest number of players. + # + self.assertEqual(breakGames(self.games[:]), [ + (1, 3, [100]), + (1, 4, [101, 102, 103]), + (1, 2, [104, 105, 106]) + ]) + + # + # Five 10 seats tables (0 to 4) + # table 0 : 10 players + # table 1 : 8 players + # table 2 : 7 players + # table 3 : 9 players + # table 4 : 7 players + # + for serial in xrange(7,8): + self.games[1].serial2player[100 + serial] = None + + # + # Can't break any table : 6 free seats and smallest table + # has seven players. + # + self.assertEqual(breakGames(self.games[:]), []) + + def test2(self): + # + # Two 5 seats tables (0, 1) + # table 0 : 2 players + # table 1 : 3 players + # + games = self.games[:2] + games[0].serial2player = {} + games[0].max_players = 5 + for serial in (1, 2): + games[0].serial2player[serial] = None + + games[1].serial2player = {} + games[1].max_players = 5 + for serial in (100, 101, 102): + games[1].serial2player[serial] = None + + self.assertEqual(breakGames(games), [(0, 1, [1, 2])]) + + def test3(self): + """ + """ + # + # Five 10 seats tables (0 to 4), each with 5 players + # + counts = [5] * NGAMES + for game in self.games: + for serial in xrange(counts.pop()): + game.serial2player[game.id * 100 + serial] = None + game.state = "turn" + + # + # Tables 0, 1, 2, 3 are running and will not be broken. + # Only table 4 is not running and can be broken. + # + self.games[4].state = "end" + # + # Players from table 4 go to table 3 + # + self.assertEqual(breakGames(self.games[:]), [(4, 3, [400, 401, 402, 403, 404])]) + +class TestCreate(unittest.TestCase): + + def setUp(self): + self.verbose = int(os.environ.get('VERBOSE_T', 1)) + + def test1(self): + tourney = PokerTournament(name = 'Test create', + verbose = int(os.environ.get('VERBOSE_T', 3)), + players_quota = 4, + dirs = [ '../conf', '../conf' ], + seats_per_game = 4, + betting_structure = "level-10-20-no-limit") + + for serial in xrange(1,5): + self.failUnless(tourney.register(serial)) + + self.assertEqual(len(tourney.games), 1) + for game in tourney.games: + for serial in game.serialsAll(): + game.botPlayer(serial) + turn = 1 + running = True + while running: + for game in tourney.games: + if game.sitCount() > 1: + game.beginTurn(turn) + running = tourney.endTurn(game.id) + if not running: break + if self.verbose > 0: + for serial in tourney.winners: + print "%d\thas rank %d" % ( serial, tourney.getRank(serial) ) + + def test2(self): + # + # One table sit-n-go + # + tourney = PokerTournament(name = 'Test create', + verbose = int(os.environ.get('VERBOSE_T', 3)), + players_quota = 4, + dirs = [ '../conf', '../conf' ], + seats_per_game = 4) + + for serial in xrange(1,4): + self.failUnless(tourney.register(serial)) + self.failUnless(tourney.unregister(serial)) + self.failUnless(tourney.register(serial)) + self.failUnless(tourney.register(4)) + self.failIf(tourney.unregister(4)) + + self.assertEqual(len(tourney.games), 1) + game = tourney.games[0] + game.beginTurn(1) + + def test3(self): + # + # Multi tables sit-n-go + # + seats_per_game = 10 + games_count = 2 + players_count = seats_per_game * games_count + tourney = PokerTournament(name = 'Test create', + verbose = int(os.environ.get('VERBOSE_T', 3)), + players_quota = players_count, + dirs = [ '../conf', '../conf' ], + seats_per_game = seats_per_game) + + for serial in xrange(1,players_count + 1): + self.failUnless(tourney.register(serial)) + + self.assertEqual(len(tourney.games), games_count) + for game in tourney.games: + for serial in game.serialsAll(): + game.botPlayer(serial) + turn = 1 + running = True + while running: + for game in tourney.games: + if game.sitCount() > 1: + game.beginTurn(turn) + running = tourney.endTurn(game.id) + if not running: break + if self.verbose > 0: + for serial in tourney.winners: + print "%d\thas rank %d" % ( serial, tourney.getRank(serial) ) + # ---------------------------------------------------------------- + def tourneyTableStartBalancedHelper(self, num_players, seats, num_tables, min_per_table): + """tourneyTableStartBalancedHelper + Helper function to test various scenarios of initial seating""" + + tourney = PokerTournament(name = 'Only%d' % num_players, + verbose = int(os.environ.get('VERBOSE_T', 3)), + players_quota = num_players, + players_min = num_players, + dirs = [ '../conf', '../conf' ], + seats_per_game = seats, + betting_structure = "level-10-20-no-limit") + + for serial in xrange(1,num_players+1): + self.failUnless(tourney.register(serial)) + + self.assertEquals(len(tourney.games), num_tables) + for game in tourney.games: + self.failUnless(len(game.serial2player.values()) >= min_per_table) + # ---------------------------------------------------------------- + def test4_tourneyTableStartBalanced(self): + """test4_tourneyTableStartBalanced + + Start with a table max of 5 players per table, and add 6 players + to it. This should create two tables of 3. Tests other scenarios + like this as well.""" + + self.tourneyTableStartBalancedHelper(6, 5, 2, 2) + self.tourneyTableStartBalancedHelper(13, 6, 3, 4) +# ---------------------------------------------------------------- +class TestPrizes(unittest.TestCase): + + def test1(self): + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'algorithm', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 100) + for ii in range(1, 11): tourney.register(ii) + self.assertEqual(tourney.prizes(), [32, 12, 6]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'algorithm', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 100) + for ii in range(1, 21): tourney.register(ii) + self.assertEqual(tourney.prizes(), [57, 25, 12, 6]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'algorithm', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(1, 51): tourney.register(ii) + self.assertEqual(tourney.prizes(), [129, 62, 31, 7, 7, 7, 7]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'algorithm', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(200): tourney.register(ii) + self.assertEqual(tourney.prizes(), [506, 250, 125, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(3): tourney.register(ii) + self.assertEqual(tourney.prizes(), [15]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(6): tourney.register(ii) + self.assertEqual(tourney.prizes(), [21, 9]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(30): tourney.register(ii) + self.assertEqual(tourney.prizes(), [75, 45, 30]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(50): tourney.register(ii) + self.assertEqual(tourney.prizes(), [100, 60, 40, 30, 20]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(200): tourney.register(ii) + self.assertEqual(tourney.prizes(), [300, 200, 125, 90, 80, 65, 50, 40, 30, 20]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(300): tourney.register(ii) + self.assertEqual(tourney.prizes(), [453, 292, 180, 120, 97, 75, 52, 37, 26, 18, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(500): tourney.register(ii) + self.assertEqual(tourney.prizes(), [641, 375, 250, 200, 125, 100, 75, 50, 43, 31, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 1000) + for ii in range(700): tourney.register(ii) + self.assertEqual(tourney.prizes(), [717, 437, 315, 245, 175, 140, 105, 61, 52, 43, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 5000) + for ii in range(1000): tourney.register(ii) + self.assertEqual(tourney.prizes(), [1026, 600, 450, 350, 250, 200, 150, 87, 75, 62, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) + + tourney = PokerTournament(dirs = [ '../conf', '../conf' ], + prizes_specs = 'table', start_time = time.time() + 20000, sit_n_go = 'n', buy_in = 5, players_quota = 5000) + for ii in range(5000): tourney.register(ii) + self.assertEqual(tourney.prizes(), [5036, 3000, 2000, 1500, 1250, 1000, 625, 437, 312, 250, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37]) + + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestEqualize)) + suite.addTest(unittest.makeSuite(TestBreak)) + suite.addTest(unittest.makeSuite(TestCreate)) + suite.addTest(unittest.makeSuite(TestPrizes)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestCreate, prefix = "test4")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1) + +# Interpreted by emacs +# Local Variables: +# compile-command: "( cd .. ; ./config.status tests/tournament.py ) ; ( cd ../tests ; make TESTS='tournament.py' check )" +# End: --- poker-engine-1.3.6.orig/tests/upgrades.py +++ poker-engine-1.3.6/tests/upgrades.py @@ -0,0 +1,65 @@ +# -*- mode: python -*- +# Copyright (C) 2006 - 2010 Loic Dachary +# Copyright (C) 2005, 2006 Mekensleep +# +# Mekensleep +# 26 rue des rosiers +# 75004 Paris +# licensing@mekensleep.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: +# Loic Dachary +# + +import sys, os, shutil, stat +sys.path.insert(0, "..") +os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + '..' + +import unittest +from pokerengine.pokerengineconfig import Config +from pokerengine.version import version + +class TestUpgrades(unittest.TestCase): + + def test1(self): + verbose = os.environ.get('VERBOSE_T', '1') + shutil.rmtree("conftest", ignore_errors = True) + os.mkdir("conftest") + os.system("../pokerconfigupgrade --verbose=" + verbose + " --upgrades=../upgrades --reference=./conf conftest") + os.chmod("conftest", 0755) + os.system("../pokerconfigupgrade --verbose=" + verbose + " --upgrades=../upgrades conftest") + config = Config(['conftest']) + for file in os.listdir("conftest"): + if ".xml" in file: + config.load(file) + self.assertEqual(config.headerGet("/child::*/@poker_engine_version"), version) + shutil.rmtree("conftest") + +def run(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestUpgrades)) + # Comment out above and use line below this when you wish to run just + # one test by itself (changing prefix as needed). +# suite.addTest(unittest.makeSuite(TestUpgrades, prefix = "test2")) + verbosity = int(os.environ.get('VERBOSE_T', 2)) + return unittest.TextTestRunner(verbosity=verbosity).run(suite) + +if __name__ == '__main__': + if run().wasSuccessful(): + sys.exit(0) + else: + sys.exit(1)