[PATCH] tests: Use pkg-config to find setbacklight CFLAGS and libs
Kristian Høgsberg
hoegsberg at gmail.com
Wed Jul 25 07:41:01 PDT 2012
On Wed, Jul 25, 2012 at 02:51:09PM +0100, Damien Lespiau wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
>
> setbacklight depends on udev and drm, one cannot just add the -l flags
> if you want to support unusual install paths.
Thanks Damien, applied and pushed.
Kristian
> ---
> configure.ac | 1 +
> tests/Makefile.am | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c35d987..a8fc7f2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -224,6 +224,7 @@ 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])
>
> 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 b788977..1f5514f 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -35,6 +35,7 @@ setbacklight_SOURCES = \
> $(top_srcdir)/src/libbacklight.c \
> $(top_srcdir)/src/libbacklight.h
>
> -setbacklight_LDADD = -ludev -ldrm
> +setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
> +setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
>
> EXTRA_DIST = weston-test
> --
> 1.7.7.5
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list