From 4b141597c6e079fef4d9a2aff99bea369296f702 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 3 Aug 2012 14:39:16 +0300 Subject: [PATCH] configure: make setbacklight optional Modify the pkg-config check for setbacklight so that failure only disables building setbacklight, instead of failing the whole configure. Signed-off-by: Pekka Paalanen --- configure.ac | 3 ++- tests/Makefile.am | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 754469fe..f8a1b6a7 100644 --- a/configure.ac +++ b/configure.ac @@ -216,7 +216,8 @@ fi AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert) AM_CONDITIONAL(HAVE_RSVG_CONVERT, test -n "$RSVG_CONVERT") -PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm]) +PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no) +AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes") if test "x$GCC" = "xyes"; then my_common_gcc_flags="-Wall -Wextra -Wno-unused-parameter \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 1f5514fc..80f6db86 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -22,7 +22,7 @@ event_test_la_SOURCES = event-test.c $(test_runner_src) test_client_SOURCES = test-client.c test_client_LDADD = $(SIMPLE_CLIENT_LIBS) -noinst_PROGRAMS = setbacklight matrix-test +noinst_PROGRAMS = $(setbacklight) matrix-test matrix_test_SOURCES = \ matrix-test.c \ @@ -38,4 +38,8 @@ setbacklight_SOURCES = \ setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS) setbacklight_LDADD = $(SETBACKLIGHT_LIBS) +if BUILD_SETBACKLIGHT +setbacklight = setbacklight +endif + EXTRA_DIST = weston-test