diff options
author | Emil Velikov <[email protected]> | 2015-07-07 15:57:41 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-07-22 16:35:25 +0100 |
commit | 9ab5b644ef64ee23f88a6687cc541ee4e745234a (patch) | |
tree | ee48ab8d85d85c8b7511451bc4494b13982d27c6 /src/mesa/drivers/dri/common | |
parent | 1c328b8aa79b0644160082b7e9e02df18ab3ca48 (diff) |
dri/common: use HAVE_LIBDRM over __NOT_HAVE_DRM_H
See previous commit message for details.
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/Android.mk | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/Makefile.am | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/SConscript | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 4 |
4 files changed, 5 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk index 6986f5e8cb4..6e29bafe4d7 100644 --- a/src/mesa/drivers/dri/common/Android.mk +++ b/src/mesa/drivers/dri/common/Android.mk @@ -43,10 +43,8 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(LOCAL_PATH) \ $(intermediates) -# swrast only -ifeq ($(MESA_GPU_DRIVERS),swrast) -LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H -else +ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),) +LOCAL_CFLAGS := -DHAVE_LIBDRM LOCAL_SHARED_LIBRARIES := libdrm endif @@ -110,13 +108,6 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_C_INCLUDES := \ $(MESA_DRI_C_INCLUDES) -# swrast only -ifeq ($(MESA_GPU_DRIVERS),swrast) -LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H -else -LOCAL_SHARED_LIBRARIES := libdrm -endif - LOCAL_SRC_FILES := $(megadriver_stub_FILES) include $(MESA_COMMON_MK) diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am index ae19fcb3565..ee6c6914499 100644 --- a/src/mesa/drivers/dri/common/Makefile.am +++ b/src/mesa/drivers/dri/common/Makefile.am @@ -58,5 +58,5 @@ if DRICOMMON_NEED_LIBDRM AM_CFLAGS += $(LIBDRM_CFLAGS) libdricommon_la_LIBADD = $(LIBDRM_LIBS) else -AM_CFLAGS += -D__NOT_HAVE_DRM_H +AM_CFLAGS += -UHAVE_LIBDRM endif diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript index b402736db69..adaac291662 100644 --- a/src/mesa/drivers/dri/common/SConscript +++ b/src/mesa/drivers/dri/common/SConscript @@ -32,10 +32,7 @@ drienv.AppendUnique(LIBS = [ 'expat', ]) -# if HAVE_DRI2 drienv.PkgUseModules('DRM') -# else -#env.Append(CPPDEFINES = ['__NOT_HAVE_DRM_H']) sources = drienv.ParseSourceList('Makefile.sources', ['DRI_COMMON_FILES', 'XMLCONFIG_FILES' ]) @@ -57,7 +54,6 @@ env.Append(CPPPATH = [ ]) env.Append(CPPDEFINES = [ - '__NOT_HAVE_DRM_H', 'HAVE_DLADDR', ]) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index ae4592c739d..100a7272369 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -40,7 +40,7 @@ #include <stdbool.h> -#ifndef __NOT_HAVE_DRM_H +#ifdef HAVE_LIBDRM #include <xf86drm.h> #endif #include "dri_util.h" @@ -137,7 +137,7 @@ driCreateNewScreen2(int scrn, int fd, setupLoaderExtensions(psp, extensions); -#ifndef __NOT_HAVE_DRM_H +#ifdef HAVE_LIBDRM if (fd != -1) { drmVersionPtr version = drmGetVersion(fd); if (version) { |