From: Jordi Albornoz Date: Mon, 14 Oct 2002 10:41:35 +0000 (+0000) Subject: require autoconf 2.52, add switch to enable page detaching. Ifdef around detach UI... X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=327822513f542238ef982f2d9b8508c6a483ba38;p=gtetrinet require autoconf 2.52, add switch to enable page detaching. Ifdef around detach UI options. --- diff --git a/ChangeLog b/ChangeLog index 4d12006..017f50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-10-14 Jordi Mallach + + * 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 * doc/gtetrinet.6: replace notes about tetrinetx's licensing problems diff --git a/autogen.sh b/autogen.sh index 0560376..abb2566 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,6 @@ #!/bin/sh aclocal -I m4 +autoheader automake --add-missing autoconf diff --git a/configure.in b/configure.in index b872ff5..f46d87e 100644 --- a/configure.in +++ b/configure.in @@ -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]) diff --git a/src/commands.c b/src/commands.c index 9a4ddba..50123b5 100644 --- a/src/commands.c +++ b/src/commands.c @@ -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) { diff --git a/src/commands.h b/src/commands.h index 05a6306..043ac68 100644 --- a/src/commands.h +++ b/src/commands.h @@ -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);