Added a --enable-anachronistic-dependencies flag to configure, which allows psppire...
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 29 May 2008 00:43:01 +0000 (00:43 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 29 May 2008 00:43:01 +0000 (00:43 +0000)
INSTALL
configure.ac
src/ui/gui/dict-display.c
src/ui/gui/text-data-import-dialog.c

diff --git a/INSTALL b/INSTALL
index 5d79c55e44109acb8e00ab5859ac2a03220e6fec..c1a48ef8f5e8606508f0b30a931b7e7fb8b61944 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -209,6 +209,14 @@ Optional Features
     In these cases you can use --without-lib{xx} to force configure
     to disregard it.
 
+`--enable-anachronistic-dependencies'
+   If you use this option, some of the checks for dependent libraries
+   will be relaxed, permitting configure to succeed when older versions
+   of libraries are detected.   Use of this option is not recommended.
+   If you use it, some features may be missing and the build may fail
+   with obscure error messages.
+   
+
 Defining Variables
 ==================
 
index 8f3c96c4dd8b8b5d9e3707874aa4527c7aaedddc..fdfc16627c66be11ceea07482ce80ae410131d17 100644 (file)
@@ -16,6 +16,11 @@ AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 PKG_PROG_PKG_CONFIG
 
+AC_ARG_ENABLE(
+  anachronistic-dependencies, 
+  [AS_HELP_STRING([--enable-anachronistic-dependencies], 
+                  [Attempt to allow building against older versions of dependent libraries])])
+
 PSPP_ENABLE_OPTION(-Wdeclaration-after-statement)
 
 AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
@@ -39,9 +44,14 @@ AC_ARG_WITH(
   gui, 
   [AS_HELP_STRING([--without-gui], [don't build the PSPPIRE gui])])
 
+required_gtk_version=2.12
+if test x"$enable_anachronistic_dependencies" = x"yes"  ; then
+  required_gtk_version=2.8.20
+fi
+
 if test x"$with_gui" != x"no" ; then 
-  PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0,,
-    [PSPP_REQUIRED_PREREQ([gtk+ 2.0 v2.12.0 or later (or use --without-gui)])])
+  PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $required_gtk_version,,
+    [PSPP_REQUIRED_PREREQ([gtk+ 2.0 v$required_gtk_version or later (or use --without-gui)])])
   PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0,,
     [PSPP_REQUIRED_PREREQ([libglade 2.0 v2.6.0 or later (or use --without-gui)])])
 fi
index 842441372155a04c847a6f3952cfb09d6df97e13..356758beeea4100c4f4f1fd3feeaae71ebeb2fb4 100644 (file)
@@ -154,6 +154,7 @@ var_description_cell_data_func (GtkTreeViewColumn *col,
 }
 
 
+#if GTK_CHECK_VERSION (2, 12, 0)
 /* Sets the tooltip to be the name of the variable under the cursor */
 static gboolean
 set_tooltip_for_variable (GtkTreeView  *treeview,
@@ -171,6 +172,7 @@ set_tooltip_for_variable (GtkTreeView  *treeview,
   struct variable *var = NULL;
   gboolean ok;
 
+
   gtk_tree_view_convert_widget_to_bin_window_coords (treeview,
                                                      x, y, &bx, &by);
 
@@ -199,6 +201,7 @@ set_tooltip_for_variable (GtkTreeView  *treeview,
 
   return TRUE;
 }
+#endif
 
    /* Sets up TREEVIEW to display the variables of DICT.
    MODE is the selection mode for TREEVIEW.
@@ -269,7 +272,9 @@ attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict,
 
   g_object_set (treeview, "has-tooltip", TRUE, NULL);
 
+#if GTK_CHECK_VERSION (2, 12, 0)
   g_signal_connect (treeview, "query-tooltip", G_CALLBACK (set_tooltip_for_variable), NULL);
+#endif
 }
 
 
index 1f17630852853fc3af9c3aa7efcd037015b92479..11ca7b044e70e3e99196e99856f2a9d7ab6ee01f 100644 (file)
 
 #include <config.h>
 
+#include <gtk/gtk.h>
+
+
+
 #include "checkbox-treeview.h"
 #include "descriptives-dialog.h"
 
 #include <errno.h>
-#include <gtk/gtk.h>
+
 #include <gtksheet/gtksheet.h>
 #include <limits.h>
 #include <stdlib.h>
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
+
+#if !GTK_CHECK_VERSION (2, 10, 0)
+
+void
+text_data_import_assistant (GObject *o, gpointer de_)
+{
+  struct data_editor *de = de_;
+
+  GtkWidget *dialog =
+    gtk_message_dialog_new  (de->parent.window,
+                            GTK_DIALOG_MODAL,
+                            GTK_MESSAGE_WARNING,
+                            GTK_BUTTONS_CLOSE,
+                            _("The text import assistant has not been "
+                              "compiled into this build of PSPPIRE, because "
+                              "GTK+ version 2.10.0 or later was not available."));
+
+  gtk_dialog_run (GTK_DIALOG (dialog));
+
+  gtk_widget_destroy (dialog);
+}
+
+#else
+
 /* TextImportModel, a GtkTreeModel used by the text data import
    dialog. */
 enum
@@ -2282,3 +2310,5 @@ pop_watch_cursor (struct import_assistant *ia)
       gdk_window_set_cursor (widget->window, NULL);
     }
 }
+
+#endif