Add --disable-eekboard configure option.
This commit is contained in:
		
							
								
								
									
										11
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								configure.ac
									
									
									
									
									
								
							@ -40,8 +40,14 @@ PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
 | 
			
		||||
  [AC_MSG_ERROR([Libxklavier not found])])
 | 
			
		||||
PKG_CHECK_MODULES([LIBFAKEKEY], [libfakekey], ,
 | 
			
		||||
  [AC_MSG_ERROR([libfakekey not found])])
 | 
			
		||||
PKG_CHECK_MODULES([ATK], [atk], ,
 | 
			
		||||
  [AC_MSG_ERROR([ATK not found])])
 | 
			
		||||
 | 
			
		||||
AC_MSG_CHECKING([whether you enable eekboard])
 | 
			
		||||
AC_ARG_ENABLE(eekboard,
 | 
			
		||||
              AS_HELP_STRING([--enable-eekboard=no/yes],
 | 
			
		||||
                             [Build standalone application "ekboard" default=yes]),,
 | 
			
		||||
              enable_eekboard=yes)
 | 
			
		||||
AC_MSG_RESULT($enable_eekboard)
 | 
			
		||||
AM_CONDITIONAL(ENABLE_EEKBOARD, [test x$enable_eekboard = xyes])
 | 
			
		||||
 | 
			
		||||
AC_MSG_CHECKING([whether you enable Clutter])
 | 
			
		||||
AC_ARG_ENABLE(clutter,
 | 
			
		||||
@ -54,7 +60,6 @@ if test x$enable_clutter = xyes; then
 | 
			
		||||
  PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], ,
 | 
			
		||||
    [AC_MSG_ERROR([Clutter not found])])
 | 
			
		||||
  AC_DEFINE([HAVE_CLUTTER], [1], [Define if Clutter is found])
 | 
			
		||||
  enable_clutter_gtk=no
 | 
			
		||||
  PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-0.90],
 | 
			
		||||
    [enable_clutter_gtk=yes])
 | 
			
		||||
  if test x$enable_clutter_gtk = xno; then
 | 
			
		||||
 | 
			
		||||
@ -16,9 +16,25 @@
 | 
			
		||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 | 
			
		||||
# 02110-1301 USA
 | 
			
		||||
 | 
			
		||||
if ENABLE_EEKBOARD
 | 
			
		||||
bin_PROGRAMS = eekboard
 | 
			
		||||
eekboard_CFLAGS = -I$(top_srcdir) $(GOBJECT2_CFLAGS) $(GTK2_CFLAGS) $(XKB_CFLAGS) $(LIBXKLAVIER_CFLAGS) $(LIBFAKEKEY_CFLAGS) $(ATK_CFLAGS)
 | 
			
		||||
eekboard_LDFLAGS = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-xkl.la $(top_builddir)/eek/libeek-gtk.la $(GOBJECT2_LIBS) $(GTK2_CFLAGS) $(XKB_LIBS) $(LIBXKLAVIER_LIBS) $(LIBFAKEKEY_LIBS) $(ATK_LIBS)
 | 
			
		||||
eekboard_CFLAGS = \
 | 
			
		||||
	-I$(top_srcdir) \
 | 
			
		||||
	$(GOBJECT2_CFLAGS) \
 | 
			
		||||
	$(GTK2_CFLAGS) \
 | 
			
		||||
	$(XKB_CFLAGS) \
 | 
			
		||||
	$(LIBXKLAVIER_CFLAGS) \
 | 
			
		||||
	$(LIBFAKEKEY_CFLAGS)
 | 
			
		||||
 | 
			
		||||
eekboard_LDFLAGS = \
 | 
			
		||||
	$(top_builddir)/eek/libeek.la \
 | 
			
		||||
	$(top_builddir)/eek/libeek-xkl.la \
 | 
			
		||||
	$(top_builddir)/eek/libeek-gtk.la \
 | 
			
		||||
	$(GOBJECT2_LIBS) \
 | 
			
		||||
	$(GTK2_CFLAGS) \
 | 
			
		||||
	$(XKB_LIBS) \
 | 
			
		||||
	$(LIBXKLAVIER_LIBS) \
 | 
			
		||||
	$(LIBFAKEKEY_LIBS)
 | 
			
		||||
 | 
			
		||||
if HAVE_CLUTTER
 | 
			
		||||
eekboard_CFLAGS += $(CLUTTER_CFLAGS)
 | 
			
		||||
@ -29,3 +45,4 @@ if HAVE_CLUTTER_GTK
 | 
			
		||||
eekboard_CFLAGS += $(CLUTTER_GTK_CFLAGS)
 | 
			
		||||
eekboard_LDFLAGS += $(top_builddir)/eek/libeek-clutter.la $(CLUTTER_GTK_LIBS)
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,9 @@
 | 
			
		||||
#include <gdk/gdkx.h>
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
#include <libxklavier/xklavier.h>
 | 
			
		||||
#if 0
 | 
			
		||||
#include <atk/atk.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@ -99,9 +101,11 @@ typedef struct _LayoutCallbackData LayoutCallbackData;
 | 
			
		||||
 | 
			
		||||
static void       on_about      (GtkAction       *action,
 | 
			
		||||
                                 GtkWidget       *window);
 | 
			
		||||
#if 0
 | 
			
		||||
static void       on_monitor_key_event_toggled
 | 
			
		||||
                                (GtkToggleAction *action,
 | 
			
		||||
                                 GtkWidget       *window);
 | 
			
		||||
#endif
 | 
			
		||||
static GtkWidget *create_widget (Eekboard        *eekboard,
 | 
			
		||||
                                 gint           initial_width,
 | 
			
		||||
                                 gint           initial_height);
 | 
			
		||||
@ -144,10 +148,12 @@ static const GtkActionEntry action_entry[] = {
 | 
			
		||||
    {"About", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK (on_about)}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
static const GtkToggleActionEntry toggle_action_entry[] = {
 | 
			
		||||
    {"MonitorKeyEvent", NULL, N_("Monitor Key Typing"), NULL, NULL,
 | 
			
		||||
     G_CALLBACK(on_monitor_key_event_toggled), FALSE}
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
on_about (GtkAction * action, GtkWidget *window)
 | 
			
		||||
@ -170,10 +176,10 @@ on_about (GtkAction * action, GtkWidget *window)
 | 
			
		||||
                         "wrap-license", TRUE, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
static gint
 | 
			
		||||
key_snoop (AtkKeyEventStruct *event, gpointer func_data)
 | 
			
		||||
{
 | 
			
		||||
    g_debug ("key_snoop");
 | 
			
		||||
    return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -195,6 +201,7 @@ on_monitor_key_event_toggled (GtkToggleAction *action,
 | 
			
		||||
            eekboard->key_event_listener = 0;
 | 
			
		||||
        }
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
on_key_pressed (EekKeyboard *keyboard,
 | 
			
		||||
@ -385,9 +392,11 @@ create_menus (Eekboard      *eekboard,
 | 
			
		||||
 | 
			
		||||
    gtk_action_group_add_actions (action_group, action_entry,
 | 
			
		||||
                                  G_N_ELEMENTS (action_entry), window);
 | 
			
		||||
#if 0
 | 
			
		||||
    gtk_action_group_add_toggle_actions (action_group, toggle_action_entry,
 | 
			
		||||
                                         G_N_ELEMENTS (toggle_action_entry),
 | 
			
		||||
                                         window);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
 | 
			
		||||
    gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, NULL);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user