ghc source build cannot find -lgmp even with the build.mk changes and configure options
Hi, I have been trying to build ghc 7.0.3 from source, but the configure script itself always fails when it tries to build ghc-pwd with the error "cannot find -lgmp". I have gmp installed in a non-standard directory, but I have copied mk/build.mk.sample to mk/build.mk and added
EXTRA_CABAL_CONFIGURE_FLAGS = --extra-include-dirs=MY_INCLUDE_DIR \
--extra-lib-dirs=MY_LIB_DIR
to the end. Moreover, I have used
--with-gmp-includes=MY_INCLUDE_DIR --with-gmp-libraries=MY_LIB_DIR
as the configure option. Yet, the configure script fails every time at the attempt to build ghc-pwd with the error message "cannot find -lgmp". If I manually modify "configure" to add -LMY_LIB_DIR to the command to build ghc-pwd, then the configure can succeed, but the make will fail when it tries to link ghc-cabal, with the same error.
Is there any way at all I can let the build take in MY_LIB_DIR? Thanks!