summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2016-02-25 07:14:26 +0100
committerDave Airlie <airlied@redhat.com>2016-02-26 10:01:58 +1000
commitab0f57df76f0dd4ac85166849574bc5ecec63577 (patch)
treee4323c245f77458a320e807c9ba2161dc5a98887
parent6edb5842bb2669b2e0354ac17da98a84fd040488 (diff)
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 <mprivozn@redhat.com>
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am4
2 files changed, 4 insertions, 1 deletions
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)