[Xfce4-commits] [xfce/exo] 01/01: Allow libexo-1 to be disabled (bug #15138)

noreply at xfce.org noreply at xfce.org
Sun Feb 17 13:54:51 CET 2019


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/exo.

commit 2097708c789a11b98e40a4aa49adc803613d57c0
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Feb 17 07:54:41 2019 -0500

    Allow libexo-1 to be disabled (bug #15138)
---
 configure.ac.in            |  14 ++++-
 docs/reference/Makefile.am |   4 +-
 exo/Makefile.am            | 131 ++++++++++++++++++++++++---------------------
 tests/Makefile.am          |  12 ++---
 4 files changed, 91 insertions(+), 70 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 638c4b0..2bf9dcc 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -165,7 +165,6 @@ dnl *** Check for required packages ***
 dnl ***********************************
 XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
 XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.42.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0])
 XDT_CHECK_PACKAGE([GTK3], [gtk+-3.0], [3.22.0])
 XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.42.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])
@@ -173,6 +172,14 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.12.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UI2], [libxfce4ui-2], [4.12.0])
 XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.42.0], [gio-unix], [GIO-Unix features])
 
+dnl ***********************************************************
+dnl *** Optional support for a GTK+2 version of the library ***
+dnl ***********************************************************
+XDT_CHECK_OPTIONAL_PACKAGE([GTK2],
+                           [gtk+-2.0], [2.24.0], [gtk2],
+                           [GTK+ 2 support])
+AM_CONDITIONAL([ENABLE_GTK2_LIBRARY], [test "x$GTK2_FOUND" = "xyes"])
+
 dnl *********************
 dnl *** Check for X11 ***
 dnl *********************
@@ -274,4 +281,9 @@ echo "Build Configuration:"
 echo
 echo "* Debug Support:        $enable_debug"
 echo "* GNU Visibility:       $have_gnuc_visibility"
+if test x"$GTK2_FOUND" = x"yes"; then
+echo "* GTK+ 2 Support:       yes"
+else
+echo "* GTK+ 2 Support:       no"
+fi
 echo
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 36fb8fa..561caaf 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -51,13 +51,13 @@ content_files = 							\
 AM_CPPFLAGS =	 							\
 	-I$(top_srcdir) 						\
 	-I$(top_builddir) 						\
-	$(GTK_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
 	$(LIBXFCE4UTIL_CFLAGS)						\
 	$(GTK_DOC_EXTRA_CFLAGS)
 
 GTKDOC_LIBS =  								\
 	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la \
-	$(GTK_LIBS)
+	$(GTK2_LIBS)
 
 include $(top_srcdir)/gtk-doc.make
 
diff --git a/exo/Makefile.am b/exo/Makefile.am
index e67916e..3c30b9b 100644
--- a/exo/Makefile.am
+++ b/exo/Makefile.am
@@ -8,7 +8,6 @@ AM_CPPFLAGS = 								\
 	-DLIBEXO_VERSION_API=\"$(LIBEXO_VERSION_API)\"			\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
 
-lib_LTLIBRARIES = libexo-1.la
 
 libexo_headers =							\
 	exo-binding.h							\
@@ -52,64 +51,6 @@ libexoinclude_HEADERS =							\
 	exo.h								\
 	exo-config.h
 
-libexo_1_la_SOURCES =							\
-	$(libexoinclude_HEADERS)					\
-	$(libexo_built_sources)						\
-	exo-binding.c							\
-	exo-cell-renderer-ellipsized-text.c				\
-	exo-cell-renderer-icon.c					\
-	exo-config.c							\
-	exo-execute.c							\
-	exo-gdk-pixbuf-extensions.c					\
-	exo-gtk-extensions.c						\
-	exo-gobject-extensions.c					\
-	exo-icon-bar.c							\
-	exo-icon-chooser-dialog.c					\
-	exo-icon-chooser-model.c					\
-	exo-icon-chooser-model.h					\
-	exo-icon-view.c							\
-	exo-job.c							\
-	exo-job.h							\
-	exo-simple-job.c						\
-	exo-private.c							\
-	exo-private.h							\
-	exo-string.c							\
-	exo-thumbnail-preview.c						\
-	exo-thumbnail-preview.h						\
-	exo-thumbnail.c							\
-	exo-thumbnail.h							\
-	exo-toolbars-editor-dialog.c					\
-	exo-toolbars-editor.c						\
-	exo-toolbars-model.c						\
-	exo-toolbars-private.c						\
-	exo-toolbars-private.h						\
-	exo-toolbars-view.c						\
-	exo-tree-view.c							\
-	exo-utils.c							\
-	exo-wrap-table.c						\
-	exo-xsession-client.c
-
-libexo_1_la_CFLAGS =							\
-	$(GIO_CFLAGS)							\
-	$(GTK_CFLAGS)							\
-	$(LIBX11_CFLAGS)						\
-	$(LIBXFCE4UTIL_CFLAGS)
-
-libexo_1_la_LDFLAGS =							\
-	-export-dynamic							\
-	-version-info $(LIBEXO_VERINFO)					\
-	-export-symbols-regex "^[^_].*"					\
-	-no-undefined
-
-libexo_1_la_LIBADD =							\
-	$(GIO_LIBS)							\
-	$(GTK_LIBS)							\
-	$(LIBX11_LIBS)							\
-	$(LIBXFCE4UTIL_LIBS)						\
-	-lm
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = exo-$(LIBEXO_VERSION_API).pc
 
 ##
 ## GTK+ 3 support library
@@ -117,7 +58,7 @@ pkgconfig_DATA = exo-$(LIBEXO_VERSION_API).pc
 
 libexo_2_includedir = $(includedir)/exo-2/exo
 
-lib_LTLIBRARIES += libexo-2.la
+lib_LTLIBRARIES = libexo-2.la
 
 libexo_2_include_HEADERS =						\
 	exo.h								\
@@ -185,7 +126,75 @@ libexo_2_la_LIBADD =							\
 	$(LIBX11_LIBS)							\
 	-lm
 
-pkgconfig_DATA += exo-2.pc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = exo-2.pc
+
+#
+# Gtk+ 2 support library
+#
+if ENABLE_GTK2_LIBRARY
+
+lib_LTLIBRARIES += libexo-1.la
+
+libexo_1_la_SOURCES =							\
+	$(libexoinclude_HEADERS)					\
+	$(libexo_built_sources)						\
+	exo-binding.c							\
+	exo-cell-renderer-ellipsized-text.c				\
+	exo-cell-renderer-icon.c					\
+	exo-config.c							\
+	exo-execute.c							\
+	exo-gdk-pixbuf-extensions.c					\
+	exo-gtk-extensions.c						\
+	exo-gobject-extensions.c					\
+	exo-icon-bar.c							\
+	exo-icon-chooser-dialog.c					\
+	exo-icon-chooser-model.c					\
+	exo-icon-chooser-model.h					\
+	exo-icon-view.c							\
+	exo-job.c							\
+	exo-job.h							\
+	exo-simple-job.c						\
+	exo-private.c							\
+	exo-private.h							\
+	exo-string.c							\
+	exo-thumbnail-preview.c						\
+	exo-thumbnail-preview.h						\
+	exo-thumbnail.c							\
+	exo-thumbnail.h							\
+	exo-toolbars-editor-dialog.c					\
+	exo-toolbars-editor.c						\
+	exo-toolbars-model.c						\
+	exo-toolbars-private.c						\
+	exo-toolbars-private.h						\
+	exo-toolbars-view.c						\
+	exo-tree-view.c							\
+	exo-utils.c							\
+	exo-wrap-table.c						\
+	exo-xsession-client.c
+
+libexo_1_la_CFLAGS =							\
+	$(GIO_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
+	$(LIBX11_CFLAGS)						\
+	$(LIBXFCE4UTIL_CFLAGS)
+
+libexo_1_la_LDFLAGS =							\
+	-export-dynamic							\
+	-version-info $(LIBEXO_VERINFO)					\
+	-export-symbols-regex "^[^_].*"					\
+	-no-undefined
+
+libexo_1_la_LIBADD =							\
+	$(GIO_LIBS)							\
+	$(GTK2_LIBS)							\
+	$(LIBX11_LIBS)							\
+	$(LIBXFCE4UTIL_LIBS)						\
+	-lm
+
+pkgconfig_DATA += exo-1.pc
+
+endif
 
 ##
 ## Rules to auto-generate built sources
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5fca68a..aa7f4e6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,7 @@ test_exo_noop_SOURCES =							\
 	test-exo-noop.c
 
 test_exo_noop_CFLAGS =							\
-	$(GTK_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
 	$(LIBXFCE4UTIL_CFLAGS)
 
 test_exo_noop_DEPENDENCIES =						\
@@ -47,7 +47,7 @@ test_exo_string_SOURCES =						\
 	test-exo-string.c
 
 test_exo_string_CFLAGS =						\
-	$(GTK_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
 	$(LIBXFCE4UTIL_CFLAGS)
 
 test_exo_string_DEPENDENCIES =						\
@@ -61,14 +61,14 @@ test_exo_icon_chooser_dialog_SOURCES =					\
 	test-exo-icon-chooser-dialog.c
 
 test_exo_icon_chooser_dialog_CFLAGS =					\
-	$(GTK_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
 	$(LIBXFCE4UTIL_CFLAGS)
 
 test_exo_icon_chooser_dialog_DEPENDENCIES =				\
 	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_icon_chooser_dialog_LDADD =					\
-	$(GTK_LIBS)							\
+	$(GTK2_LIBS)							\
 	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_icon_chooser_dialog_gtk3_SOURCES =					\
@@ -89,14 +89,14 @@ test_exo_wrap_table_SOURCES =						\
 	test-exo-wrap-table.c
 
 test_exo_wrap_table_CFLAGS =						\
-	$(GTK_CFLAGS)							\
+	$(GTK2_CFLAGS)							\
 	$(LIBXFCE4UTIL_CFLAGS)
 
 test_exo_wrap_table_DEPENDENCIES =					\
 	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_wrap_table_LDADD =						\
-	$(GTK_LIBS)							\
+	$(GTK2_LIBS)							\
 	$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 DISTCLEANFILES = test-exo-csource-data.c

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list