[aisleriot] Require guile 1.8



commit 2c362fe43bd5cdc684364e46310467043f6f1dbd
Author: Christian Persch <chpe gnome org>
Date:   Tue Apr 12 21:54:34 2011 +0200

    Require guile 1.8

 configure.ac         |   56 ++++---------------------------------------------
 src/Makefile.am      |    8 -------
 src/game.c           |    8 -------
 src/guile16-compat.h |   38 ---------------------------------
 4 files changed, 5 insertions(+), 105 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index eb5eb06..632dc35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -508,59 +508,13 @@ AM_GLIB_GNU_GETTEXT
 
 IT_PROG_INTLTOOL([0.35.0])
 
-# ********************
-# Game specific checks
-# ********************
-
-AC_ARG_VAR([GUILE],[path to guile])
-if test "$ac_cv_env_GUILE_set" != "set"; then
-  AC_PATH_TOOL([GUILE],[guile])
-fi
-
-if test -z "$GUILE" ; then
-  AC_MSG_ERROR([guile not found; install guile development headers or use --enable-omitgames=aisleriot])
-fi
-
-AC_ARG_VAR([GUILE_CONFIG],[path to guile-config])
-if test "$ac_cv_env_GUILE_CONFIG_set" != "set"; then
-  AC_PATH_TOOL([GUILE_CONFIG],[guile-config])
-fi
-if test -z "$GUILE_CONFIG"; then
-  AC_MSG_ERROR([guile not found; install guile development headers or use --enable-omitgames=aisleriot])
-fi
-
-GUILE_CFLAGS=`$GUILE_CONFIG compile`
-GUILE_LIBS=`$GUILE_CONFIG link`
-AC_SUBST([GUILE_CFLAGS])
-AC_SUBST([GUILE_LIBS])
-
-# Checking for the header file is basically the only way to find
-# out if the _development_ files are present. guile-config returns
-# a value regardless of what is actually installed. The problem
-# with this is if the header ever gets moved to a non-default location.
-gg_save_CFLAGS="$CFLAGS"
-CFLAGS="$GUILE_CFLAGS $CFLAGS"
-AC_CHECK_HEADER([libguile.h],[have_guile=yes],
-  [AC_MSG_ERROR([guile not found; install guile development headers or use --enable-omitgames=aisleriot])])
-CFLAGS="$gg_save_CFLAGS"
-
-# On 64-bit machines guile < 1.6.5 causes a crash in aisleriot
-if uname -m | grep -q 64 > /dev/null; then
-  GUILE_TARGET="1.6.5"
-else
-  GUILE_TARGET="1.6.0"
-fi
-if test `$GUILE -c '(if (string<? (version) (cadr (command-line))) (display "no") (display "yes")) (newline)' $GUILE_TARGET` != yes ; then
-  AC_MSG_ERROR([Your version of guile is too old, please install a recent guile package (>= $GUILE_TARGET)])
-fi
-
-have_guile_1_8=$($GUILE -c '(if (string<? (version) (cadr (command-line))) (display "no") (display "yes")) (newline)' 1.8.0)
+# *****
+# Guile
+# *****
 
-if test "$have_guile_1_8" = "yes"; then
-  AC_DEFINE([HAVE_GUILE_1_8],[1],[Define if guile version is 1.8.0 or above])
-fi
+GUILE_1_8_REQUIRED=1.8.0
 
-AM_CONDITIONAL([HAVE_GUILE_1_8],[test "$have_guile_1_8" = "yes"])
+PKG_CHECK_MODULES([GUILE],[guile-1.8 >= $GUILE_1_8_REQUIRED])
 
 # *************
 # Documentation
diff --git a/src/Makefile.am b/src/Makefile.am
index d5ad28d..5f3bb43 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,10 +48,6 @@ sol_SOURCES = \
 	window.h	\
 	$(NULL)
 
-if !HAVE_GUILE_1_8
-sol_SOURCES += guile16-compat.h
-endif
-
 if ENABLE_DEBUG_UI
 sol_SOURCES += \
 	prop-editor.c	\
@@ -145,10 +141,6 @@ sol_clutter_SOURCES = \
 	window.h	\
 	$(NULL)
 
-if !HAVE_GUILE_1_8
-sol_clutter_SOURCES += guile16-compat.h
-endif
-		
 if ENABLE_DEBUG_UI
 sol_clutter_SOURCES += \
 	prop-editor.c	\
diff --git a/src/game.c b/src/game.c
index 8d27c32..461fc67 100644
--- a/src/game.c
+++ b/src/game.c
@@ -24,10 +24,6 @@
 
 #include <libguile.h>
 
-#ifndef HAVE_GUILE_1_8
-#include "guile16-compat.h"
-#endif
-
 #include <glib.h>
 #include <glib/gi18n.h>
 
@@ -573,11 +569,7 @@ cscmi_add_slot (SCM slot_data)
                                 SCM_EOL));
   }
 
-#ifdef HAVE_GUILE_1_8
 #define EQUALS_SYMBOL(string,object) (scm_is_true (scm_equal_p (scm_from_locale_symbol (string), object)))
-#else
-#define EQUALS_SYMBOL(string,object) (!strcmp (string, SCM_CHARS (object)))
-#endif
 
   slot_placement = SCM_CADDR (slot_data);
   if (EQUALS_SYMBOL ("expanded", SCM_CAR (slot_placement))) {



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