[virglrenderer-devel] [PATCH 4/4] configure: check for -lgbm

Michal Privoznik mprivozn at redhat.com
Thu Feb 11 12:58:53 UTC 2016


On 11.02.2016 13:56, Marc-André Lureau wrote:
> Hi
> 
> On Thu, Feb 11, 2016 at 1:51 PM, Michal Privoznik <mprivozn at redhat.com> wrote:
>> We use the library unconditionally, however not check it in
>> configure phase. Let's produce an error there and not at
>> compilation phase.
> 
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  configure.ac    | 7 +++++++
>>  src/Makefile.am | 3 ++-
>>  2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 53d9ef4..98d33b1 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -86,6 +86,13 @@ LIBDRM_REQUIRED=2.4.50
>>
>>  PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
>>  PKG_CHECK_MODULES([EPOXY], [epoxy])
>> +save_LIBS="$LIBS"
>> +save_CFLAGS="$CFLAGS"
>> +AC_CHECK_LIB([gbm], [gbm_create_device], [], [AC_MSG_ERROR([gbm library is required for the build])])
>> +GBM_LIBS="-lgbm"
>> +LIBS="$save_LIBS"
>> +CFLAGS="$save_CFLAGS"
>> +AC_SUBST([GBM_LIBS])
> 
> Why not use pkg-config check for that?

Ah, good point. I did not know it has a pkg-config file. I can update
this one.

Michal


More information about the virglrenderer-devel mailing list