On Thu, 6 Apr 2017 15:22:39 +0200 Quentin Glidic <[email protected]> wrote:
> On 4/6/17 2:09 PM, Pekka Paalanen wrote: > > From: Pekka Paalanen <[email protected]> > > > > Libdrm provides headers that are useful even without libdrm.so itself, > > particularly drm_fourcc.h. Therefore promote libdrm as a hard build-time > > dependency of libweston core so that we can always rely on libdrm > > headers. > > > > This does not affect any runtime dependencies. Specifically, no runtime > > dependency to libdrm.so is added in any build configuration. > > > > Currently only gl-renderer is using drm_fourcc.h. Now we can drop the > > GL_RENDERER check from configure.ac and just use LIBDRM_CFLAGS. > > > > Signed-off-by: Pekka Paalanen <[email protected]> > > Nice(ly documented) cleanup :-) > Reviewed-by: Quentin Glidic <[email protected]> > > (Nitpick below, for the sake of nitpicking. ;-) ) > > Thanks, > > > --- > > Makefile.am | 2 +- > > configure.ac | 12 +++++++++--- > > 2 files changed, 10 insertions(+), 4 deletions(-) > > > > diff --git a/Makefile.am b/Makefile.am > > index ff927c1..8ecc90c 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -324,7 +324,7 @@ gl_renderer_la_LIBADD = \ > > gl_renderer_la_CFLAGS = \ > > $(COMPOSITOR_CFLAGS) \ > > $(EGL_CFLAGS) \ > > - $(GL_RENDERER_CFLAGS) \ > > + $(LIBDRM_CFLAGS) \ > > $(AM_CFLAGS) > > gl_renderer_la_SOURCES = \ > > libweston/gl-renderer.h \ > > diff --git a/configure.ac b/configure.ac > > index 39c0531..2da3e05 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -105,6 +105,15 @@ AC_CHECK_HEADERS([execinfo.h]) > > > > AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) > > > > +# check for libdrm as a build-time dependency only > > +# libdrm 2.4.30 introduced drm_fourcc.h. > > +PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.30], have_libdrm=yes, > > have_libdrm=no) > > +AS_IF([test "x$have_libdrm" != "xyes"], > > + [AC_MSG_ERROR([libdrm is a hard build-time dependency for libweston > > core, > > + but a sufficient version was not found. However, > > libdrm > > + is not a runtime dependency unless you have features > > + enabled that require it.])]) > > + > > FTR, as said on IRC, could have been > > PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.30], [], [AC_MSG_ERROR([ > libdrm is a hard build-time dependency for libweston core, > but a sufficient version was not found. However, libdrm > is not a runtime dependency unless you have features > enabled that require it.])]) > > or similar. Hi Quentin, I like that, the runtime output actually flows much better than I thought: checking for LIBDRM... no configure: error: libdrm is a hard build-time dependency for libweston core, but a sufficient version was not found. However, libdrm is not a runtime dependency unless you have features enabled that require it. I used your suggestion as is, and pushed all three: c394179..b030897 master -> master Thanks, pq
pgpH58GsUHLKw.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
