MERGED: Pass GMP paths when compiling mkGmpDerivedConstants; fixes trac #3784
authorIan Lynagh <igloo@earth.li>
Mon, 18 Jan 2010 21:51:42 +0000 (21:51 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 18 Jan 2010 21:51:42 +0000 (21:51 +0000)
Ian Lynagh <igloo@earth.li>**20100118191831

gmp/config.mk.in
gmp/ghc.mk

index 1937bc4..93a4f53 100644 (file)
@@ -5,3 +5,7 @@ endif
 ifeq "$(HaveFrameworkGMP)" ""
  HaveFrameworkGMP = @HaveFrameworkGMP@
 endif
 ifeq "$(HaveFrameworkGMP)" ""
  HaveFrameworkGMP = @HaveFrameworkGMP@
 endif
+
+GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
+GMP_LIB_DIRS = @GMP_LIB_DIRS@
+
index 8497eea..91e7b96 100644 (file)
@@ -16,6 +16,9 @@ ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
 include libraries/integer-gmp/gmp/config.mk
 endif
 
 include libraries/integer-gmp/gmp/config.mk
 endif
 
+libraries/integer-gmp_CC_OPTS += $(addprefix -I,$(GMP_INCLUDE_DIRS))
+libraries/integer-gmp_CC_OPTS += $(addprefix -L,$(GMP_LIB_DIRS))
+
 libraries/integer-gmp/cbits/mkGmpDerivedConstants$(exeext): libraries/integer-gmp/cbits/mkGmpDerivedConstants.c
        "$(CC)" $(SRC_CC_OPTS) $(CONF_CC_OPTS) $(libraries/integer-gmp_CC_OPTS) $< -o $@
 
 libraries/integer-gmp/cbits/mkGmpDerivedConstants$(exeext): libraries/integer-gmp/cbits/mkGmpDerivedConstants.c
        "$(CC)" $(SRC_CC_OPTS) $(CONF_CC_OPTS) $(libraries/integer-gmp_CC_OPTS) $< -o $@