summaryrefslogtreecommitdiff
path: root/rts/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-03-11 17:50:25 +0000
committerIan Lynagh <igloo@earth.li>2007-03-11 17:50:25 +0000
commitca5ded310c0a596be199a3da5f14be2fb2020687 (patch)
tree40a62ff03dc093e157fbec315cef60be4fb78a66 /rts/Makefile
parent642ac8a05ea7f449c367cd4293b0e07ca3305fd8 (diff)
downloadhaskell-ca5ded310c0a596be199a3da5f14be2fb2020687.tar.gz
Have configure take arguments telling it where gmp is; fixes trac #957
Diffstat (limited to 'rts/Makefile')
-rw-r--r--rts/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/rts/Makefile b/rts/Makefile
index e9612a9e71..6bf42712cb 100644
--- a/rts/Makefile
+++ b/rts/Makefile
@@ -292,6 +292,24 @@ endif
CLEAN_FILES += gmp/libgmp.a
+# Need to get the GMP vars in through CPP to package.conf.in, and put
+# quotes around each element.
+
+empty =
+space = $(empty) $(empty)
+comma = ,
+PACKAGE_CPP_OPTS += -DGMP_INCLUDE_DIRS='$(subst $(space),$(comma),$(patsubst %,"%",$(strip $(GMP_INCLUDE_DIRS))))'
+PACKAGE_CPP_OPTS += -DGMP_LIB_DIRS='$(subst $(space),$(comma),$(patsubst %,"%",$(strip $(GMP_LIB_DIRS))))'
+
+ifneq "$(GMP_INCLUDE_DIRS)" ""
+SRC_HC_OPTS += -I$(GMP_INCLUDE_DIRS)
+SRC_CC_OPTS += -I$(GMP_INCLUDE_DIRS)
+SRC_HSC2HS_OPTS += -I$(GMP_INCLUDE_DIRS)
+endif
+ifneq "$(GMP_LIB_DIRS)" ""
+SRC_LD_OPTS += -L$(GMP_LIB_DIRS)
+endif
+
#-----------------------------------------------------------------------------
#
# Building the GUM SysMan