From 11ef676d6722b5d203b2eff2639de515510c5673 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 4 Oct 2012 15:28:07 +0200 Subject: [PATCH] tests: fix build with alternate X11 paths. If a program explicitly uses libfoo functions (libX11 for instance here), then it shall be explicitly linked against that library. So, fix all instances where X11 functions are called to include the right paths to headers and libraries. Signed-off-by: Gwenole Beauchesne (cherry picked from commit c31d2e8a1bb2c1210fee922b5c54e14ec3077605) --- test/basic/Makefile.am | 2 ++ test/encode/Makefile.am | 4 +++- test/transcode/Makefile.am | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/basic/Makefile.am b/test/basic/Makefile.am index b52f02e..21f48dd 100644 --- a/test/basic/Makefile.am +++ b/test/basic/Makefile.am @@ -37,11 +37,13 @@ noinst_PROGRAMS = \ AM_CFLAGS = \ -DIN_LIBVA \ -I$(top_srcdir) \ + $(X11_CFLAGS) \ $(NULL) TEST_LIBS = \ $(top_builddir)/va/libva.la \ $(top_builddir)/va/libva-x11.la \ + $(X11_LIBS) \ $(NULL) test_01_LDADD = $(TEST_LIBS) diff --git a/test/encode/Makefile.am b/test/encode/Makefile.am index 01550e2..db7f13c 100644 --- a/test/encode/Makefile.am +++ b/test/encode/Makefile.am @@ -31,9 +31,11 @@ INCLUDES = \ $(NULL) h264encode_SOURCES = h264encode_x11.c +h264encode_CFLAGS = $(X11_CFLAGS) h264encode_LDADD = \ $(top_builddir)/va/libva.la \ - $(top_builddir)/va/libva-x11.la + $(top_builddir)/va/libva-x11.la \ + $(X11_LIBS) avcenc_SOURCES = avcenc.c avcenc_CFLAGS = -I$(top_srcdir)/test/common diff --git a/test/transcode/Makefile.am b/test/transcode/Makefile.am index c8b0e8a..1a79b16 100644 --- a/test/transcode/Makefile.am +++ b/test/transcode/Makefile.am @@ -25,9 +25,11 @@ bin_PROGRAMS = mpeg2transcode INCLUDES = -I$(top_srcdir) mpeg2transcode_SOURCES = mpeg2transcode.cpp +mpeg2transcode_CFLAGS = -I$(top_srcdir) $(X11_CFLAGS) mpeg2transcode_LDADD = \ $(top_builddir)/va/libva.la \ - $(top_builddir)/va/libva-x11.la + $(top_builddir)/va/libva-x11.la \ + $(X11_LIBS) valgrind: $(bin_PROGRAMS) for a in $(bin_PROGRAMS); do \ -- 2.7.4