From ab0f57df76f0dd4ac85166849574bc5ecec63577 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 25 Feb 2016 07:14:26 +0100 Subject: [PATCH] configure: check for -lgbm We use the library unconditionally, however not check it in configure phase. Let's produce an error there and not at compilation phase. And while at it, drop -ldl from LDFLAGS too. I suspect it's coming from the same source because in the gbm pkg-config file private libs are to be linked with dl. But not only we are not a gbm private library, we don't use dl*() anywhere. Signed-off-by: Michal Privoznik --- configure.ac | 1 + src/Makefile.am | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 325e8b9..0a1799d 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,7 @@ LIBDRM_REQUIRED=2.4.50 PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) PKG_CHECK_MODULES([EPOXY], [epoxy]) +PKG_CHECK_MODULES([GBM], [gbm]) AC_SUBST([DEFINES]) AC_CONFIG_FILES([ diff --git a/src/Makefile.am b/src/Makefile.am index df59fc7..9128ec5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,6 @@ SUBDIRS := gallium/auxiliary -AM_LDFLAGS = -lgbm -lm -ldl \ +AM_LDFLAGS = -lm \ + $(GBM_LIBS) \ $(EPOXY_LIBS) \ $(CODE_COVERAGE_LDFLAGS) @@ -9,6 +10,7 @@ AM_CFLAGS = \ $(DEFINES) \ $(PIC_FLAGS) \ $(LIBDRM_CFLAGS) \ + $(GBM_CFLAGS) \ $(EPOXY_CFLAGS) \ $(VISIBILITY_CFLAGS) \ $(CODE_COVERAGE_CFLAGS)