+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
#!/bin/sh
aclocal -I m4
+autoheader
automake --add-missing
autoconf
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
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
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])
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
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
};
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)
{
+#include "../config.h"
+
extern GnomeUIInfo menubar[];
extern GnomeUIInfo toolbar[];
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);