mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-28 10:00:46 +00:00
Check for libdrm_$chipset.pc when needed
This adds missing pkg-config lookup for intel and moves the radeon lookup into a case...esac so it's only looked up when one or more of the radeon drivers are enabled.
This commit is contained in:
parent
a3abb9d1cc
commit
8616cec5c9
@ -22,6 +22,8 @@ LDFLAGS = @LDFLAGS@
|
||||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
RADEON_LDFLAGS = @RADEON_LDFLAGS@
|
||||
INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
|
||||
# Assembler
|
||||
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
|
||||
|
30
configure.ac
30
configure.ac
@ -447,8 +447,6 @@ AC_SUBST([GALLIUM_WINSYS_DIRS])
|
||||
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
|
||||
AC_SUBST([GALLIUM_DRIVERS_DIRS])
|
||||
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
|
||||
AC_SUBST([RADEON_CFLAGS])
|
||||
AC_SUBST([RADEON_LDFLAGS])
|
||||
|
||||
dnl
|
||||
dnl User supplied program configuration
|
||||
@ -576,13 +574,6 @@ dri)
|
||||
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
||||
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
|
||||
|
||||
PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
|
||||
|
||||
if test "$HAVE_LIBDRM_RADEON" = yes; then
|
||||
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
|
||||
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
|
||||
fi
|
||||
|
||||
# find the DRI deps for libGL
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
# add xcb modules if necessary
|
||||
@ -802,6 +793,27 @@ AC_SUBST([DRI_DIRS])
|
||||
AC_SUBST([EXPAT_INCLUDES])
|
||||
AC_SUBST([DRI_LIB_DEPS])
|
||||
|
||||
case $DRI_DIRS in
|
||||
*i915*|*i965*)
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel])
|
||||
;;
|
||||
|
||||
*radeon*|*r200*|*r300*|*r600*)
|
||||
PKG_CHECK_MODULES([LIBDRM_RADEON],
|
||||
[libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
|
||||
HAVE_LIBDRM_RADEON=yes,
|
||||
HAVE_LIBDRM_RADEON=no)
|
||||
|
||||
if test "$HAVE_LIBDRM_RADEON" = yes; then
|
||||
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
|
||||
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([RADEON_CFLAGS])
|
||||
AC_SUBST([RADEON_LDFLAGS])
|
||||
|
||||
|
||||
dnl
|
||||
dnl OSMesa configuration
|
||||
dnl
|
||||
|
@ -64,7 +64,8 @@ DRIVER_DEFINES = -I../intel -I../intel/server -DI915 \
|
||||
$(shell pkg-config libdrm --atleast-version=2.3.1 \
|
||||
&& echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
|
||||
|
||||
DRI_LIB_DEPS += -ldrm_intel
|
||||
INCLUDES += $(INTEL_CFLAGS)
|
||||
DRI_LIB_DEPS += $(INTEL_LIBS)
|
||||
|
||||
include ../Makefile.template
|
||||
|
||||
|
@ -96,7 +96,8 @@ ASM_SOURCES =
|
||||
|
||||
DRIVER_DEFINES = -I../intel -I../intel/server
|
||||
|
||||
DRI_LIB_DEPS += -ldrm_intel
|
||||
INCLUDES += $(INTEL_CFLAGS)
|
||||
DRI_LIB_DEPS += $(INTEL_LIBS)
|
||||
|
||||
include ../Makefile.template
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user