diff options
author | gwright@antiope.com <unknown> | 2007-08-13 12:42:11 +0000 |
---|---|---|
committer | gwright@antiope.com <unknown> | 2007-08-13 12:42:11 +0000 |
commit | 24311993dfecd6225fb3b26c07d2d054fab5387a (patch) | |
tree | 13611b91f2ee23a43acf218446612caeb04558dc /includes/Makefile | |
parent | dd357a95ee1ecd8bdb9cc7018a5778cec3c31249 (diff) | |
download | haskell-24311993dfecd6225fb3b26c07d2d054fab5387a.tar.gz |
Fix build with external gmp library.
ghc fails to build if you use an external gmp library. This is because
ghc requires the header file gmp.h, which used to be provided by the
internal gmp source code. The file gmp.h is no longer part of the
gmp source code, but is generated as part of the build procedure.
If an external gmp is specified, the internal gmp is not build and the
gmp.h file never gets generated.
Of course, it was a bad idea anyway to use a header file from a potentially
different version of the library.
The patch sets HAVE_LIB_GMP if the gmp library is found during configuration
and conditionalizes including the library header file on it.
Diffstat (limited to 'includes/Makefile')
-rw-r--r-- | includes/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/Makefile b/includes/Makefile index e7292cd8a1..2acf07531e 100644 --- a/includes/Makefile +++ b/includes/Makefile @@ -27,7 +27,11 @@ ifeq "$(GhcEnableTablesNextToCode) $(GhcUnregisterised)" "YES NO" SRC_CC_OPTS += -DTABLES_NEXT_TO_CODE endif +ifeq "$(HaveLibGmp)" "YES" +SRC_CC_OPTS += -I. -I../rts -I$(GMP_INCLUDE_DIRS) +else SRC_CC_OPTS += -I. -I../rts -I../gmp/gmpbuild +endif ifneq "$(GhcWithSMP)" "YES" SRC_CC_OPTS += -DNOSMP |