[gcompris] chess, on linux we can build the intern gnuchess



commit 7f6de62d4ee3514db0f7d092c71160e6bd5dafee
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Oct 14 16:37:21 2012 +0200

    chess, on linux we can build the intern gnuchess
    
    The internal gnuchess is compiled automatically for Windows
    and MacOSX. On GNU/Linux we rely on the one given by the distro.
    
    This patch adds the ability to use the internal gnuchess even on
    a unix system.
    
    At configure time, just pass the parameter --enable-build-gnuchess

 configure.ac |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ae643d0..b6a2ee0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,6 +216,13 @@ AC_ARG_ENABLE(disable-activation-code,
           [For Windows or MacOSX version, disable the activation code]),
           disable_activation_code="$enableval", disable_activation_code="no")
 
+dnl internal GnuChess
+AC_ARG_ENABLE(build-gnuchess,
+          AC_HELP_STRING(
+          [--enable-build-gnuchess],
+          [For Gnu/Linux, compile our version of GnuChess]),
+          build_gnuchess="$enableval", build_gnuchess="no")
+
 dnl WIN32 Specifics
 AC_MSG_CHECKING([for Win32 platform in general])
 case "$host" in
@@ -359,13 +366,17 @@ else
   AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "/etc", [System GCompris config directory])
 
   dnl Test for gnuchess
-  AC_PATH_PROGS(GNUCHESS, gnuchess gnome-gnuchess, no, [/usr/bin:/usr/games:/usr/local/bin:$PATH])
+  if test x$build_gnuchess = xno; then
+    AC_PATH_PROGS(GNUCHESS, gnuchess gnome-gnuchess, no, [/usr/bin:/usr/games:/usr/local/bin:$PATH])
+  else
+    GNUCHESS="gcompris-gnuchess"
+  fi
+
   if test x$GNUCHESS = xno; then
     AC_MSG_ERROR([Couldn't find gnuchess, please install the gnuchess package version]
-                 [ 5 or above or define the environment variable GNUCHESS.])
+		 [ 5 or above or define the environment variable GNUCHESS.])
   fi
   AC_DEFINE_UNQUOTED(GNUCHESS, "$GNUCHESS", Defines where GNU Chess resides on the system)
-  build_gnuchess=no
 fi
 AM_CONDITIONAL(BUILD_GNUCHESS, test x$build_gnuchess != xno)
 
@@ -917,6 +928,8 @@ echo "Python plugin                            = $build_python_plugin"
 
 echo "SQLITE database (--enable-sqlite)        = $with_sqlite (profiles depend on this)"
 
+echo "Internal GnuChess                        = $build_gnuchess (--enable-build-gnuchess)"
+
 echo "Sugar DE Support                         = $with_sugar"
 echo "BINRELOC (--enable-binreloc)             = $br_cv_binreloc"
 echo "NSBundle (--enable-nsbundle)             = $nsbundle"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]