$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
LDFLAGS = @LDFLAGS@
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
+RADEON_CFLAGS = @RADEON_CFLAGS@
+RADEON_LDFLAGS = @RADEON_LDFLAGS@
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
AC_SUBST([GALLIUM_DRIVER_DIRS])
AC_SUBST([GALLIUM_AUXILIARY_DIRS])
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
+AC_SUBST([RADEON_CFLAGS])
+AC_SUBST([RADEON_LDFLAGS])
dnl
dnl User supplied program configuration
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+ PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], 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
TOP = ../../../../..
include $(TOP)/configs/current
+CFLAGS += $(RADEON_CFLAGS)
+
LIBNAME = r200_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
radeon_dma.c \
radeon_dma.h
-DRI_LIB_DEPS += #-ldrm_radeon
+DRI_LIB_DEPS += $(RADEON_LDFLAGS)
##### TARGETS #####
TOP = ../../../../..
include $(TOP)/configs/current
+CFLAGS += $(RADEON_CFLAGS)
+
LIBNAME = r300_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
radeon_texture.c \
radeon_texture.h
-DRI_LIB_DEPS += #-ldrm_radeon
+DRI_LIB_DEPS += $(RADEON_LDFLAGS)
##### TARGETS #####
TOP = ../../../../..
include $(TOP)/configs/current
+CFLAGS += $(RADEON_CFLAGS)
+
LIBNAME = radeon_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
DRIVER_DEFINES = -DRADEON_COMMON=0
-DRI_LIB_DEPS += #-ldrm_radeon
+DRI_LIB_DEPS += $(RADEON_LDFLAGS)
X86_SOURCES =