[gucharmap] Add --enable-charmap
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Add --enable-charmap
- Date: Sat, 12 Jun 2010 15:55:00 +0000 (UTC)
commit 19e5bb7416ed73caf75967f9c4d9bf63f9fc09fc
Author: Christian Persch <chpe gnome org>
Date: Sat Jun 12 17:50:16 2010 +0200
Add --enable-charmap
Add configure switch to disable building the charmap programme.
While it makes sense to allow gtk2 and gtk3 versions of libgucharmap,
there's no need to allow parallel installable charmap programmes for
each version.
When using --disable-charmap, the charmap programme is built as
noinst_PROGRAMS, so it can still be used to test libgucharmap.
Makefile.am | 7 +++++--
configure.ac | 13 +++++++++++++
gucharmap/Makefile.am | 30 +++++++++++++++---------------
3 files changed, 33 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ae35ce3..e85c961 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,9 +9,11 @@ if HAVE_GTK_2
SUBDIRS += bindings
endif
+if ENABLE_CHARMAP
if HAVE_GNOME_DOC_UTILS
SUBDIRS += help
endif
+endif
distuninstallcheck_listfiles = find . -type -f -print | grep -v scrollkeeper
@@ -68,6 +70,7 @@ MAINTAINERCLEANFILES = \
$(srcdir)/gnome-doc-utils.make \
`find "$(srcdir)" -type f -name Makefile.in -print`
+if ENABLE_CHARMAP
install-data-local: $(schema_DATA)
if GCONF_SCHEMAS_INSTALL
if test -z "$(DESTDIR)" ; then \
@@ -75,8 +78,8 @@ if GCONF_SCHEMAS_INSTALL
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
done \
fi
-endif
-
+endif # GCONF_SCHEMAS_INSTALL
+endif # ENABLE_CHARMAP
ChangeLog:
$(AM_V_GEN) if test -f $(top_srcdir)/.git/HEAD; then \
diff --git a/configure.ac b/configure.ac
index d78ae29..b39d307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,19 @@ AC_SUBST([GCONFPKGS])
AM_GCONF_SOURCE_2
AC_PATH_PROG([GCONFTOOL],[gconftool-2],[no])
+AC_MSG_CHECKING([whether to build the charmap programme])
+AC_ARG_ENABLE([charmap],
+ [AS_HELP_STRING([--disable-charmap],[disable building the charmap programme])],
+ [],
+ [case "$with_gtk" in
+ 2.0) enable_charmap=yes ;;
+ 3.0) enable_charmap=no ;;
+ esac
+ ])
+AC_MSG_RESULT([$enable_charmap])
+
+AM_CONDITIONAL([ENABLE_CHARMAP],[test "$enable_charmap" = "yes"])
+
# checks for funcs
AC_CHECK_FUNCS([bind_textdomain_codeset])
diff --git a/gucharmap/Makefile.am b/gucharmap/Makefile.am
index 5063944..d6fdc45 100644
--- a/gucharmap/Makefile.am
+++ b/gucharmap/Makefile.am
@@ -113,9 +113,13 @@ nodist_libgucharmapinclude_HEADERS = \
gucharmap-type-builtins.h \
$(NULL)
-bin_PROGRAMS = gucharmap- GUCHARMAP_API_MAJOR_VERSION@ GUCHARMAP_API_MINOR_VERSION@
+if ENABLE_CHARMAP
+bin_PROGRAMS = gucharmap
+else
+noinst_PROGRAMS = gucharmap
+endif
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_SOURCES = \
+gucharmap_SOURCES = \
gucharmap-mini-fontsel.c \
gucharmap-mini-fontsel.h \
gucharmap-print-operation.c \
@@ -129,7 +133,7 @@ gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_SOURCES =
main.c \
$(NULL)
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_CPPFLAGS = \
+gucharmap_CPPFLAGS = \
-I$(top_srcdir) \
-DDATADIR=\"$(datadir)\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
@@ -143,23 +147,23 @@ gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_CPPFLAGS =
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_CFLAGS = \
+gucharmap_CFLAGS = \
$(GTK_CFLAGS) \
$(GCONF_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_LDFLAGS = \
+gucharmap_LDFLAGS = \
$(AM_LDFLAGS)
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_LDADD = \
+gucharmap_LDADD = \
libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la \
$(GTK_LIBS) \
$(GCONF_LIBS) \
$(INTL_LIBS)
if OS_WIN32
-gucharmap_ GUCHARMAP_API_MAJOR_VERSION@_ GUCHARMAP_API_MINOR_VERSION@_LDADD += gucharmaprc.o
+gucharmap_LDADD += gucharmaprc.o
gucharmaprc.o: gucharmaprc.rc
$(AM_V_GEN) windres -i $< -o $@
endif
@@ -250,10 +254,12 @@ CLEANFILES = \
$(typelib_DATA) \
$(NULL)
+if ENABLE_CHARMAP
+
# don't do the symlink stuff if this is windows
if !OS_WIN32
# install a symlink to the binary called "charmap"
-install-exec-hook: install-exec-compat-symlinks
+install-exec-hook:
test -e "$(DESTDIR)$(bindir)/charmap" \
|| (cd "$(DESTDIR)$(bindir)" && $(LN_S) gucharmap charmap) ; \
test -e "$(DESTDIR)$(bindir)/gnome-character-map" \
@@ -269,12 +275,6 @@ uninstall-local:
endif # !OS_WIN32
-install-exec-compat-symlinks:
-if HAVE_GTK_2
-if !OS_WIN32
- test -e "$(DESTDIR)$(bindir)/gucharmap" \
- || (cd "$(DESTDIR)$(bindir)" && $(LN_S) gucharmap-2.0 gucharmap) ;
-endif
-endif
+endif # ENABLE_CHARMAP
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]