fixed compilation of XOrg ati video driver
authorJohn Crispin <john@openwrt.org>
Sat, 22 Sep 2007 21:02:51 +0000 (21:02 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 22 Sep 2007 21:02:51 +0000 (21:02 +0000)
SVN-Revision: 8958

XOrg/driver/common.mk

index 110dc44..5ded675 100644 (file)
@@ -12,23 +12,31 @@ _CATEGORY:=driver
 _DEPEND+=+xorg-server-X11R7.2
 include ../../common.mk
 
-EXTRA_CFLAGS+= -I${STAGING_DIR}/usr/include/xorg -I${STAGING_DIR}/usr/include/X11/
+EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \
+               -I$(STAGING_DIR)/usr/include/X11/ \
+               -I$(STAGING_DIR)/usr/include/ \
+               -I$(STAGING_DIR)/include/
 
-CONFIGURE_VARS+=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/"
+EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS)
 
 acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1))))
 
-CONFIGURE_VARS += $(foreach a,dri.h sarea.h dristruct.h exa.h,ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes) \
-               ac_cv_file__usr_share_sgml_X11_defs_ent=yes
+CONFIGURE_VARS +=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/" ac_cv_file__usr_share_sgml_X11_defs_ent=yes \
+       sdkdir=$(STAGING_DIR) 
+       #i\
+       #ac_cv_header_exa_h=yes
 
 define Build/Configure
        (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
        if [ -x $(CONFIGURE_CMD) ]; then \
                $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
+               $(foreach a,dri.h sarea.h dristruct.h exa.h,export ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes;) \
+               sed -i "s|sdkdir=.*|sdkdir=$(STAGING_DIR)/usr/include/xorg|g" $(PKG_BUILD_DIR)/configure ;\
                $(CONFIGURE_VARS) \
                $(CONFIGURE_CMD) \
                $(CONFIGURE_ARGS_XTRA) \
-               $(CONFIGURE_ARGS) ;\
+               $(CONFIGURE_ARGS) \
+               CPPFLAGS="$(EXTRA_CPPFLAGS)" ;\
        fi \
        )
 endef