tests:  Migrate screenshot code from internal test to client helpers

These routines provide test cases an ability to capture screen images
for rendering verification.

This commit is a no-change refactoring, except for making the routines
non-static.  Makefile rules are also updated; most notably, this links
test clients against the cairo libraries now.

v2: Fix pointer code styling, suggested in review

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/Makefile.am b/Makefile.am
index 1d66cc0..b82b8ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1153,8 +1153,8 @@
 nodist_libtest_client_la_SOURCES =		\
 	protocol/weston-test-protocol.c	\
 	protocol/weston-test-client-protocol.h
-libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
-libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
+libtest_client_la_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
+libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) $(CAIRO_LIBS) libshared.la libtest-runner.la
 
 
 #
@@ -1162,8 +1162,8 @@
 #
 
 internal_screenshot_weston_SOURCES = tests/internal-screenshot-test.c
-internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS) $(CAIRO_CFLAGS)
-internal_screenshot_weston_LDADD = libtest-client.la  $(CAIRO_LIBS)
+internal_screenshot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
+internal_screenshot_weston_LDADD = libtest-client.la
 
 
 #