From: John Darrington Date: Thu, 29 May 2008 00:43:01 +0000 (+0000) Subject: Added a --enable-anachronistic-dependencies flag to configure, which allows psppire... X-Git-Tag: v0.6.0~4 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b72c417165e828d7fb6afc6c647f9fc123fd7847;p=pspp-builds.git Added a --enable-anachronistic-dependencies flag to configure, which allows psppire to be built against older versions of GTK and other libraries. --- diff --git a/INSTALL b/INSTALL index 5d79c55e..c1a48ef8 100644 --- 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 ================== diff --git a/configure.ac b/configure.ac index 8f3c96c4..fdfc1662 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/ui/gui/dict-display.c b/src/ui/gui/dict-display.c index 84244137..356758be 100644 --- a/src/ui/gui/dict-display.c +++ b/src/ui/gui/dict-display.c @@ -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 } diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 1f176308..11ca7b04 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -16,11 +16,15 @@ #include +#include + + + #include "checkbox-treeview.h" #include "descriptives-dialog.h" #include -#include + #include #include #include @@ -50,6 +54,30 @@ #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