From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: Re: [PATCH v3 1/5] drm: Add config for detecting libdrm Date: Thu, 23 Jul 2015 07:02:03 -0400 Message-ID: <20150723110203.GD1209@vapier> References: <1435755168-16207-1-git-send-email-patrik.jakobsson@linux.intel.com> <1435755168-16207-2-git-send-email-patrik.jakobsson@linux.intel.com> <20150723094821.GC1209@vapier> <20150723104417.GA21575@altlinux.org> Reply-To: strace development list Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2957902316980605419==" Return-path: In-Reply-To: <20150723104417.GA21575-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: strace-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: strace development list , gabriel-tU7rkvAWjlwhT4uAktR2oQ@public.gmane.org, intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: intel-gfx@lists.freedesktop.org --===============2957902316980605419== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BI5RvnYi6R4T2M87" Content-Disposition: inline --BI5RvnYi6R4T2M87 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 23 Jul 2015 13:44, Dmitry V. Levin wrote: > On Thu, Jul 23, 2015 at 05:48:21AM -0400, Mike Frysinger wrote: > > On 01 Jul 2015 14:52, Patrik Jakobsson wrote: > > > Use pkg-config to try to find libdrm. If that fails use the standard > > > include directory for kernel drm headers in /usr/include/drm. > > >=20 > > > * configure.ac: Use pkg-config to find libdrm > > >=20 > > > Signed-off-by: Patrik Jakobsson > > > --- > > > configure.ac | 4 ++++ > > > 1 file changed, 4 insertions(+) > > >=20 > > > diff --git a/configure.ac b/configure.ac > > > index bb8bf46..aa63af7 100644 > > > --- a/configure.ac > > > +++ b/configure.ac > > > @@ -844,6 +844,10 @@ fi > > > AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" =3D xyes]) > > > AC_MSG_RESULT([$use_libunwind]) > > > =20 > > > +PKG_CHECK_MODULES([libdrm], [libdrm], > > > + [CPPFLAGS=3D"$CPPFLAGS $libdrm_CFLAGS"], > > > + [CPPFLAGS=3D"$CPPFLAGS -I/usr/include/drm"]) > >=20 > > yikes, no, this is a really really bad idea. it should read: > > PKG_CHECK_MODULES([LIBDRM], [libdrm], > > [CPPFLAGS=3D"$CPPFLAGS $LIBDRM_CFLAGS"], [:]) >=20 > Why [:] ? Wouldn't [] suffice? probably ... force of habit after being bitten by m4 macros that did not ex= pect to expand empty code and thus lead to shell errors (include macros by autot= ools projects). i.e. if the m4 looked something like: if ...check if pkg is available...; then $3 else $4 fi then the generated configure script would have syntax errors. -mike --BI5RvnYi6R4T2M87 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVsMmrAAoJEEFjO5/oN/WBEhAP/0Lg+fOKeWoPeuOH6jtyAvaJ VplVw3yFCHCjwXHUAxkIIFCd28ewdqUD0KmR3E7lnaXTL6I22ZpoTQaLKAVeFHEU 9fvbqBs4W9XTSqfZ2xowIatRykmFZEN89FZMN7lM1vb6KMB+YtlXRKJ72lF9B0WK /eSNXWkYMcmqUvoDn8RLRpyl6oDbwkEevbC4xY6skHBP8cCePVt2vB8Kf8XjGkIK z8XedJOhxOhnt3MKN9Kmyf6YM7EwvaTkTCUtAmQzue3Koib9/BL1fm8EkJOfLDU4 rimGB4TuAtTM1Ql31r/zcN3EsZ7+fX+B/v/l2lP8vnKYiNgVAz1BKHlH495BexlS cQxOZzVX9Vlsm1a3cbO7j31MUWPLt7yudms1FtO4q1NeY41+eUSJJxYdowaZ6uX5 3XPUSfd7PRQWEgi92Bn5Inyl6lLeY+0oR+tLHrlqWK3mMHV44WHB5lMwX+ZPPV9Z f9KxpLRSjPD+cEq7V7jrJ62iutcsF+fP5szFy2uIYQUKoBagjjNcpxQsfGs228p+ nrJ8fbU/tZGXMTzitFRKFGBMQcRAdtJb3+FK1q/6ngTRN5ac8FS/ILT7LCJhXja5 CWRvqF7FYFnn6pdhLwKN7LUB3HDYUk17rpySbbdC/smtly55HYgMaqy6TQ5SCLPt aUWbHnyeadqJTiOCgID6 =uBYc -----END PGP SIGNATURE----- --BI5RvnYi6R4T2M87-- --===============2957902316980605419== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ --===============2957902316980605419== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Strace-devel mailing list Strace-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/strace-devel --===============2957902316980605419==--