tests: fix build with alternate X11 paths.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 4 Oct 2012 13:28:07 +0000 (15:28 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 8 Oct 2012 07:27:55 +0000 (09:27 +0200)
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 <gwenole.beauchesne@intel.com>
(cherry picked from commit c31d2e8a1bb2c1210fee922b5c54e14ec3077605)

test/basic/Makefile.am
test/encode/Makefile.am
test/transcode/Makefile.am

index b52f02e..21f48dd 100644 (file)
@@ -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)
index 01550e2..db7f13c 100644 (file)
@@ -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
index c8b0e8a..1a79b16 100644 (file)
@@ -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 \