[libpeas] Allow building libpeas without building libpeasui.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Allow building libpeas without building libpeasui.
- Date: Mon, 5 Jul 2010 21:32:20 +0000 (UTC)
commit 273aeae8b2d4ccffa910f03e14179d80437d00ba
Author: Steve Frécinaux <code istique net>
Date: Mon Jul 5 15:15:59 2010 +0200
Allow building libpeas without building libpeasui.
This can be handy for environments using libpeas but not using Gtk+,
where Gtk+ 3.0 might not be available yet. Such environments include
Clutter/Mx applications or command-line utilities.
https://bugzilla.gnome.org/show_bug.cgi?id=623597
Makefile.am | 6 +++++-
configure.ac | 36 +++++++++++++++++++++++++-----------
data/Makefile.am | 6 +++++-
3 files changed, 35 insertions(+), 13 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a5ed3af..6d6787e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,4 +2,8 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection
-SUBDIRS = libpeas libpeasui loaders data peas-demo po docs
+SUBDIRS = libpeas loaders data po docs
+
+if ENABLE_LIBPEASUI
+SUBDIRS += libpeasui peas-demo
+endif
diff --git a/configure.ac b/configure.ac
index 92375e6..650c030 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,15 @@ PKG_CHECK_MODULES(PEAS, [
gobject-introspection-1.0 >= 0.6.7
])
+dnl ================================================================
+dnl Build libpeasui
+dnl ================================================================
+
+AC_ARG_ENABLE(libpeasui,
+ AS_HELP_STRING([--enable-libpeasui],[Build libpeasui for Gtk widgetry]),
+ [enable_libpeasui=$enableval],
+ [enable_libpeasui=yes])
+
dnl We currently allow building libpeas with Gtk+ 2.0 for testing purposes and
dnl technology preview. but do *not* distribute such a version!
AC_ARG_ENABLE(gtk2-test-build,
@@ -83,18 +92,22 @@ AC_ARG_ENABLE(gtk2-test-build,
[use_gtk2=$enableval],
[use_gtk2=no])
-if test "$use_gtk2" != "yes"; then
- GTK_TYPELIB=Gtk-3.0
- GTK_PKG_REQUIREMENT="gtk+-3.0 >= 2.90"
- GDK_REQUIRED=gdk-3.0
-else
- GTK_TYPELIB=Gtk-2.0
- GTK_PKG_REQUIREMENT="gtk+-2.0 >= 2.16"
- GDK_REQUIRED=gdk-2.0
+if test "$enable_libpeasui" = "yes"; then
+ if test "$use_gtk2" != "yes"; then
+ GTK_TYPELIB=Gtk-3.0
+ GTK_PKG_REQUIREMENT="gtk+-3.0 >= 2.90"
+ GDK_REQUIRED=gdk-3.0
+ else
+ GTK_TYPELIB=Gtk-2.0
+ GTK_PKG_REQUIREMENT="gtk+-2.0 >= 2.16"
+ GDK_REQUIRED=gdk-2.0
+ fi
+ PKG_CHECK_MODULES(PEASUI, [$GTK_PKG_REQUIREMENT])
+ AC_SUBST(GTK_TYPELIB)
+ AC_SUBST(GTK_PKG_REQUIREMENT)
fi
-PKG_CHECK_MODULES(PEASUI, [$GTK_PKG_REQUIREMENT])
-AC_SUBST(GTK_TYPELIB)
-AC_SUBST(GTK_PKG_REQUIREMENT)
+
+AM_CONDITIONAL([ENABLE_LIBPEASUI],[test "x$enable_libpeasui" = "xyes"])
dnl ================================================================
dnl Check for native OSX
@@ -299,6 +312,7 @@ Configuration:
Source code location : ${srcdir}
Compiler : ${CC}
Installation prefix : ${prefix}
+ Build libpeasui : ${enable_libpeasui}
Seed JS support : ${found_seed}
Python support : ${found_python}
"
diff --git a/data/Makefile.am b/data/Makefile.am
index b8dcb7c..1f9d254 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,6 +1,10 @@
SUBDIRS=icons
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libpeas-1.0.pc libpeasui-1.0.pc
+pkgconfig_DATA = libpeas-1.0.pc
+
+if ENABLE_LIBPEASUI
+pkgconfig_DATA += libpeasui-1.0.pc
+endif
EXTRA_DIST = libpeas-1.0.pc.in libpeasui-1.0.pc.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]