From 5a315bc72d80c2a622b5a85a7db922da047a96e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 15 May 2012 22:33:43 -0400 Subject: [PATCH] Move cairo-util to shared/ --- clients/Makefile.am | 4 +--- clients/desktop-shell.c | 2 +- clients/dnd.c | 2 +- clients/image.c | 2 +- clients/tablet-shell.c | 2 +- clients/window.c | 2 +- configure.ac | 10 ++++++---- shared/Makefile.am | 8 +++++--- {clients => shared}/cairo-util.c | 0 {clients => shared}/cairo-util.h | 0 10 files changed, 17 insertions(+), 15 deletions(-) rename {clients => shared}/cairo-util.c (100%) rename {clients => shared}/cairo-util.h (100%) diff --git a/clients/Makefile.am b/clients/Makefile.am index 23771898..2325e165 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -57,9 +57,7 @@ noinst_LIBRARIES = libtoytoolkit.a libtoytoolkit_a_SOURCES = \ window.c \ - window.h \ - cairo-util.c \ - cairo-util.h + window.h toolkit_libs = \ libtoytoolkit.a \ diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 3643e466..7554df3e 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -33,8 +33,8 @@ #include #include -#include "cairo-util.h" #include "window.h" +#include "../shared/cairo-util.h" #include "../shared/config-parser.h" #include "desktop-shell-client-protocol.h" diff --git a/clients/dnd.c b/clients/dnd.c index 45adc8a3..b56cd595 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -34,7 +34,7 @@ #include #include "window.h" -#include "cairo-util.h" +#include "../shared/cairo-util.h" struct dnd { struct window *window; diff --git a/clients/image.c b/clients/image.c index 36ab485c..83ed2317 100644 --- a/clients/image.c +++ b/clients/image.c @@ -35,7 +35,7 @@ #include #include "window.h" -#include "cairo-util.h" +#include "../shared/cairo-util.h" struct image { struct window *window; diff --git a/clients/tablet-shell.c b/clients/tablet-shell.c index 3797f887..e2c49d36 100644 --- a/clients/tablet-shell.c +++ b/clients/tablet-shell.c @@ -27,7 +27,7 @@ #include #include "window.h" -#include "cairo-util.h" +#include "../shared/cairo-util.h" #include "../shared/config-parser.h" #include "tablet-shell-client-protocol.h" diff --git a/clients/window.c b/clients/window.c index 286a8ce5..f3b768a1 100644 --- a/clients/window.c +++ b/clients/window.c @@ -59,7 +59,7 @@ #include #include -#include "cairo-util.h" +#include "../shared/cairo-util.h" #include "window.h" diff --git a/configure.ac b/configure.ac index 748115e1..f8ee2fa7 100644 --- a/configure.ac +++ b/configure.ac @@ -109,10 +109,12 @@ PKG_CHECK_MODULES(PNG, [libpng]) PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) AS_IF([test "x$have_webp" = "xyes"], [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) -IMAGE_LIBS="$PIXMAN_LIBS $PNG_LIBS $WEBP_LIBS" -IMAGE_CFLAGS="$PIXMAN_CFLAGS $PNG_CFLAGS $WEBP_CFLAGS" -AC_SUBST(IMAGE_LIBS) -AC_SUBST(IMAGE_CFLAGS) + +PKG_CHECK_MODULES(CAIRO, [cairo]) +SHARED_LIBS="$CAIRO_LIBS $PIXMAN_LIBS $PNG_LIBS $WEBP_LIBS" +SHARED_CFLAGS="$CAIRO_CFLAGS $PIXMAN_CFLAGS $PNG_CFLAGS $WEBP_CFLAGS" +AC_SUBST(SHARED_LIBS) +AC_SUBST(SHARED_CFLAGS) AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes) if test x$have_jpeglib = xyes; then diff --git a/shared/Makefile.am b/shared/Makefile.am index 71816f0c..79af1765 100644 --- a/shared/Makefile.am +++ b/shared/Makefile.am @@ -1,5 +1,5 @@ -libconfig_parser_la_LIBADD = $(IMAGE_LIBS) -AM_CPPFLAGS = $(IMAGE_CFLAGS) +libconfig_parser_la_LIBADD = $(SHARED_LIBS) +AM_CPPFLAGS = $(SHARED_CFLAGS) AM_CFLAGS = $(GCC_CFLAGS) noinst_LTLIBRARIES = libconfig-parser.la @@ -7,4 +7,6 @@ libconfig_parser_la_SOURCES = \ config-parser.c \ option-parser.c \ image-loader.c \ - config-parser.h + config-parser.h \ + cairo-util.c \ + cairo-util.h diff --git a/clients/cairo-util.c b/shared/cairo-util.c similarity index 100% rename from clients/cairo-util.c rename to shared/cairo-util.c diff --git a/clients/cairo-util.h b/shared/cairo-util.h similarity index 100% rename from clients/cairo-util.h rename to shared/cairo-util.h