diff --git a/perf/Makefile.am b/perf/Makefile.am index 737e96a..18eed9f 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -55,6 +55,10 @@ cairo_perf_SOURCES += cairo-perf-posix.c endif endif +if CAIRO_HAS_SDL_SURFACE +cairo_perf_LDADD = $(LDADD) $(sdl_LIBS) +endif + libcairoperf_la_SOURCES = \ cairo-perf-report.c \ cairo-stats.c \ diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c index d5f6920..c96e6c2 100644 --- a/perf/cairo-perf.c +++ b/perf/cairo-perf.c @@ -33,6 +33,10 @@ #include "cairo-boilerplate-getopt.h" +#if CAIRO_HAS_SDL_SURFACE +#include +#endif + /* For basename */ #ifdef HAVE_LIBGEN_H #include diff --git a/test/Makefile.am b/test/Makefile.am index 3afac51..9c664b1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -294,6 +294,10 @@ if HAVE_PTHREAD cairo_test_suite_LDADD += -lpthread endif +if CAIRO_HAS_SDL_SURFACE +cairo_test_suite_LDADD += $(sdl_LIBS) +endif + BUILT_SOURCES += cairo-test-constructors.c noinst_SCRIPTS = make-cairo-test-constructors.pl EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index 4fb0cbe..aec90ff 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -33,6 +33,10 @@ #undef CAIRO_VERSION_MICRO #include "../cairo-version.h" +#if CAIRO_HAS_SDL_SURFACE +#include +#endif + #include /* for version information */ #if HAVE_FORK && HAVE_WAITPID