summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-11-29 12:23:36 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-11-30 14:59:39 -0500
commita12cd7d7731b9005bd9c60d95cfcc0a13e3c4dab (patch)
tree3c3002a7fcf7b9bbdbd43fe192cd7d7127b52036
parent29d1dd6bcd2f84e5775a3c03b0b16edc29102b8e (diff)
downloadweston-a12cd7d7731b9005bd9c60d95cfcc0a13e3c4dab.tar.gz
weston-a12cd7d7731b9005bd9c60d95cfcc0a13e3c4dab.tar.bz2
weston-a12cd7d7731b9005bd9c60d95cfcc0a13e3c4dab.zip
configure.ac: Don't link weston to cairo or image libraries
We were pulling in cairo and the image loading libraries through libshared. Split out libshared into a core libshared and a libshared-cairo that pulls in the extra libraries.
-rw-r--r--clients/Makefile.am2
-rw-r--r--configure.ac13
-rw-r--r--shared/Makefile.am27
-rw-r--r--shared/cairo-util.h5
-rw-r--r--shared/config-parser.h5
-rw-r--r--src/Makefile.am2
-rw-r--r--src/xwayland/Makefile.am2
7 files changed, 31 insertions, 25 deletions
diff --git a/clients/Makefile.am b/clients/Makefile.am
index 9259a4eb..81d1b571 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -83,7 +83,7 @@ libtoytoolkit_a_SOURCES = \
toolkit_libs = \
libtoytoolkit.a \
- ../shared/libshared.la \
+ ../shared/libshared-cairo.la \
$(CLIENT_LIBS) $(CAIRO_EGL_LIBS) -lrt -lm
flower_SOURCES = flower.c
diff --git a/configure.ac b/configure.ac
index 04e3ca45..e7a5280c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,19 +137,13 @@ AS_IF([test "x$have_webp" = "xyes"],
AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
if test x$have_jpeglib = xyes; then
- IMAGE_LIBS="$IMAGE_LIBS -ljpeg"
+ JPEG_LIBS="-ljpeg"
else
AC_ERROR([libjpeg not found])
fi
+AC_SUBST(JPEG_LIBS)
PKG_CHECK_MODULES(CAIRO, [cairo])
-SHARED_LIBS="$CAIRO_LIBS $PIXMAN_LIBS $PNG_LIBS $WEBP_LIBS $IMAGE_LIBS"
-SHARED_CFLAGS="$CAIRO_CFLAGS $PIXMAN_CFLAGS $PNG_CFLAGS $WEBP_CFLAGS"
-AC_SUBST(SHARED_LIBS)
-AC_SUBST(SHARED_CFLAGS)
-
-COMPOSITOR_LIBS="$COMPOSITOR_LIBS $IMAGE_LIBS"
-COMPOSITOR_CFLAGS="$COMPOSITOR_CFLAGS $IMAGE_CFLAGS"
AC_ARG_ENABLE(simple-clients,
AS_HELP_STRING([--disable-simple-clients],
@@ -178,9 +172,6 @@ if test x$enable_clients = xyes; then
PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor])
PKG_CHECK_MODULES(WESTON_INFO, [wayland-client])
- CLIENT_CFLAGS="$CLIENT_CFLAGS $IMAGE_CFLAGS"
- CLIENT_LIBS="$CLIENT_LIBS $IMAGE_LIBS"
-
PKG_CHECK_MODULES(POPPLER, [poppler-glib glib-2.0 gobject-2.0 gio-2.0 ],
[have_poppler=yes], [have_poppler=no])
PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules],
diff --git a/shared/Makefile.am b/shared/Makefile.am
index 1f629412..b38cb95d 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -1,15 +1,30 @@
-noinst_LTLIBRARIES = libshared.la
+noinst_LTLIBRARIES = libshared.la libshared-cairo.la
-libshared_la_LIBADD = $(SHARED_LIBS)
-AM_CPPFLAGS = $(SHARED_CFLAGS)
-AM_CFLAGS = $(GCC_CFLAGS)
+libshared_la_CFLAGS = $(GCC_CFLAGS)
libshared_la_SOURCES = \
config-parser.c \
option-parser.c \
- image-loader.c \
config-parser.h \
os-compatibility.c \
- os-compatibility.h \
+ os-compatibility.h
+
+libshared_cairo_la_CFLAGS = \
+ $(GCC_CFLAGS) \
+ $(PIXMAN_CFLAGS) \
+ $(CAIRO_CFLAGS) \
+ $(PNG_CFLAGS) \
+ $(WEBP_CFLAGS)
+
+libshared_cairo_la_LIBADD = \
+ $(PIXMAN_LIBS) \
+ $(CAIRO_LIBS) \
+ $(PNG_LIBS) \
+ $(WEBP_LIBS) \
+ $(JPEG_LIBS)
+
+libshared_cairo_la_SOURCES = \
+ $(libshared_la_SOURCES) \
+ image-loader.c \
cairo-util.c \
cairo-util.h
diff --git a/shared/cairo-util.h b/shared/cairo-util.h
index 3a760a4d..64ed03fe 100644
--- a/shared/cairo-util.h
+++ b/shared/cairo-util.h
@@ -23,6 +23,8 @@
#ifndef _CAIRO_UTIL_H
#define _CAIRO_UTIL_H
+#include <pixman.h>
+
void
surface_flush_device(cairo_surface_t *surface);
@@ -87,4 +89,7 @@ enum theme_location {
enum theme_location
theme_get_location(struct theme *t, int x, int y, int width, int height, int flags);
+pixman_image_t *
+load_image(const char *filename);
+
#endif
diff --git a/shared/config-parser.h b/shared/config-parser.h
index 73902eff..7fa9c3f5 100644
--- a/shared/config-parser.h
+++ b/shared/config-parser.h
@@ -23,8 +23,6 @@
#ifndef CONFIGPARSER_H
#define CONFIGPARSER_H
-#include <pixman.h>
-
enum config_key_type {
CONFIG_KEY_INTEGER, /* typeof data = int */
CONFIG_KEY_UNSIGNED_INTEGER, /* typeof data = unsigned int */
@@ -71,8 +69,5 @@ int
parse_options(const struct weston_option *options,
int count, int argc, char *argv[]);
-pixman_image_t *
-load_image(const char *filename);
-
#endif /* CONFIGPARSER_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index acc2415c..82e2669a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -117,7 +117,7 @@ if ENABLE_WAYLAND_COMPOSITOR
wayland_backend = wayland-backend.la
wayland_backend_la_LDFLAGS = -module -avoid-version
wayland_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(WAYLAND_COMPOSITOR_LIBS) \
- ../shared/libshared.la
+ ../shared/libshared-cairo.la
wayland_backend_la_CFLAGS = \
$(COMPOSITOR_CFLAGS) \
$(WAYLAND_COMPOSITOR_CFLAGS) \
diff --git a/src/xwayland/Makefile.am b/src/xwayland/Makefile.am
index 6772f8dd..1c3b114b 100644
--- a/src/xwayland/Makefile.am
+++ b/src/xwayland/Makefile.am
@@ -11,7 +11,7 @@ xwayland = xwayland.la
xwayland_la_LDFLAGS = -module -avoid-version
xwayland_la_LIBADD = \
$(XWAYLAND_LIBS) \
- $(top_builddir)/shared/libshared.la
+ $(top_builddir)/shared/libshared-cairo.la
xwayland_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
xwayland_la_SOURCES = \
xwayland.h \