]> hydra-www.ietfng.org Git - gtetrinet/commitdiff
require autoconf 2.52, add switch to enable page detaching. Ifdef around detach UI...
authorJordi Albornoz <jordi@src.gnome.org>
Mon, 14 Oct 2002 10:41:35 +0000 (10:41 +0000)
committerJordi Albornoz <jordi@src.gnome.org>
Mon, 14 Oct 2002 10:41:35 +0000 (10:41 +0000)
ChangeLog
autogen.sh
configure.in
src/commands.c
src/commands.h

index 4d120068fb987ed20f449e56d5a01401aabb3acb..017f50f293268a8cc7a22f12966ef5e91e398218 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-14  Jordi Mallach  <jordi@sindominio.net>
+
+       * configure.in: require autoconf 2.52, add switch to enable page
+       detaching.
+
+       * src/commands.c, src/commands.h: ifdef around detach UI options.
+       * src/commands.h: include ../config.h.
+
 2002-10-12  Jordi Mallach  <jordi@sindominio.net>
 
        * doc/gtetrinet.6: replace notes about tetrinetx's licensing problems
index 05603761cc9298d59403c2f66095be57f9b2aa78..abb2566d14d3982fcd499e5c2fe581178b4428d9 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
 aclocal -I m4
+autoheader
 automake --add-missing
 autoconf
index b872ff5ffd3ed1452aea4ac1c43c66d07ee4bee5..f46d87eb5592de3642bd6c644161d9bf04f1631b 100644 (file)
@@ -1,7 +1,9 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(src/gtetrinet.c)
-
-AM_INIT_AUTOMAKE(gtetrinet, 0.4.2pre1)
+AC_INIT
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR([src/gtetrinet.c])
+AM_CONFIG_HEADER(config.h:config.h.in)
+AM_INIT_AUTOMAKE(gtetrinet, 0.4.2pre2)
 
 AC_PROG_CC
 
@@ -10,7 +12,7 @@ AM_PATH_GTK(1.2.0,,exit 1)
 ALL_LINGUAS="ca"
 GNOME_INIT 
 
-AM_PATH_ESD(0.2.5, AC_DEFINE(HAVE_ESD))
+AM_PATH_ESD(0.2.5, AC_DEFINE(HAVE_ESD, 1, [Define this to enable EsounD support.]))
 
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -23,11 +25,18 @@ if test $ac_cv_func_setenv = no; then
     echo "Error: Couldn't find either putenv() or setenv()"
     exit;
   else
-    AC_DEFINE(HAVE_PUTENV)
+    AC_DEFINE(HAVE_PUTENV, 1, [Define this if putenv() is available.])
   fi
-else
-  AC_DEFINE(HAVE_SETENV)
-fi
+ else
+  AC_DEFINE(HAVE_SETENV, 1, [Define this if setenv() is available.])
+ fi
+
+dnl configure options
+AC_ARG_ENABLE(detach,
+[  --enable-detach         Enable page detaching (default=no)],
+  [if test x$enable_detach != xno; then
+    AC_DEFINE(ENABLE_DETACH, 1, [Define this to enable page detaching.])
+  fi])
 
 AM_GNU_GETTEXT([external])
 
index 9a4ddbacef5a9941de1094e9083ab9e56d899f55..50123b5a376423421d1bad1d1bd61cd709d5a642 100644 (file)
@@ -38,8 +38,12 @@ GnomeUIInfo gamemenu[] = {
     GNOMEUIINFO_ITEM(N_("_Start game"), NULL, start_command, NULL),
     GNOMEUIINFO_ITEM(N_("_Pause game"), NULL, pause_command, NULL),
     GNOMEUIINFO_ITEM(N_("_End game"), NULL, end_command, NULL),
+    /* Detach stuff is not ready, says Ka-shu, so make it configurable at
+     * compile time for now. */
+#ifdef ENABLE_DETACH
     GNOMEUIINFO_SEPARATOR,
     GNOMEUIINFO_ITEM(N_("Detac_h Page..."), NULL, detach_command, NULL),
+#endif /* ENABLE_DETACH */
     GNOMEUIINFO_SEPARATOR,
     GNOMEUIINFO_MENU_EXIT_ITEM(destroymain, NULL),
     GNOMEUIINFO_END
@@ -70,9 +74,11 @@ GnomeUIInfo toolbar[] = {
     GNOMEUIINFO_ITEM(N_("Pause game"), NULL, pause_command, NULL),
     GNOMEUIINFO_ITEM(N_("End game"), NULL, end_command, NULL),
     GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_ITEM(N_("Change team"), NULL, team_command, NULL),\
+    GNOMEUIINFO_ITEM(N_("Change team"), NULL, team_command, NULL),
+#ifdef ENABLE_DETACH
     GNOMEUIINFO_SEPARATOR,
     GNOMEUIINFO_ITEM(N_("Detach Page"), NULL, detach_command, NULL),
+#endif
     GNOMEUIINFO_END
 };
 
@@ -99,10 +105,12 @@ void team_command (GtkWidget *widget, gpointer data)
     teamdialog_new ();
 }
 
+#ifdef ENABLE_DETACH
 void detach_command (GtkWidget *widget, gpointer data)
 {
     move_current_page_to_window ();
 }
+#endif
 
 void start_command (GtkWidget *widget, gpointer data)
 {
index 05a63060ebca5133d535457b0ca9bfd8b715cafa..043ac682aefe62bde379aab75c154eec5aeecf5e 100644 (file)
@@ -1,3 +1,5 @@
+#include "../config.h"
+
 extern GnomeUIInfo menubar[];
 extern GnomeUIInfo toolbar[];
 
@@ -6,7 +8,9 @@ void make_menus (GnomeApp *app);
 void connect_command (GtkWidget *widget, gpointer data);
 void disconnect_command (GtkWidget *widget, gpointer data);
 void team_command (GtkWidget *widget, gpointer data);
+#ifdef ENABLE_DETACH
 void detach_command (GtkWidget *widget, gpointer data);
+#endif
 void start_command (GtkWidget *widget, gpointer data);
 void end_command (GtkWidget *widget, gpointer data);
 void pause_command (GtkWidget *widget, gpointer data);