$NetBSD$
---- ../ghc-6.6.1/mk/bootstrap.mk.orig 2007-04-26 02:10:40.000000000 +0900
-+++ ../ghc-6.6.1/mk/bootstrap.mk
-@@ -30,7 +30,6 @@ PLATFORM_CC_OPTS += -D_HPUX_SOURCE
- endif
+--- libraries/integer-gmp/configure.orig 2010-11-12 18:10:51.000000000 +0000
++++ libraries/integer-gmp/configure
+@@ -3070,42 +3070,6 @@ fi
+ fi
- ifeq "$(powerpc_TARGET_ARCH)" "1"
--PLATFORM_CC_OPTS += -static
- PLATFORM_HC_BOOT_CC_OPTS += -finhibit-size-directive
- endif
-@@ -68,10 +67,6 @@ SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/$(GH
- # yet, so we use lazy expansion.
- SRC_CC_OPTS += $(if $(findstring YES,$(UseGhcForCc)), $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS))
-
--ifeq "$(GhcWithInterpreter)" "YES"
--SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/libraries/readline/include
--endif
--
- # -----------------------------------------------------------------------------
- # Linking: we have to give all the libraries explicitly.
-
-@@ -100,7 +95,6 @@ HC_BOOT_LD_OPTS = \
- ifeq "$(GhcWithInterpreter)" "YES"
- HC_BOOT_LD_OPTS += \
- -L$(FPTOOLS_TOP_ABS)/libraries/template-haskell \
-- -L$(FPTOOLS_TOP_ABS)/libraries/readline \
- -L$(FPTOOLS_TOP_ABS)/libraries/unix \
- -L$(FPTOOLS_TOP_ABS)/libraries/unix/cbits
- endif
-@@ -135,14 +129,12 @@ HC_BOOT_LD_OPTS += \
- -u "$(UNDERSCORE)base_GHCziIOBase_NonTermination_closure" \
- -u "$(UNDERSCORE)base_GHCziIOBase_BlockedOnDeadMVar_closure" \
- -u "$(UNDERSCORE)base_GHCziIOBase_Deadlock_closure" \
-- -u "$(UNDERSCORE)base_GHCziWeak_runFinalizzerBatch_closure" \
-- -u "$(UNDERSCORE)__stginit_Prelude"
+-case $target_os in
+- darwin*)
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP.framework" >&5
+-$as_echo_n "checking for GMP.framework... " >&6; }
+- save_libs="$LIBS"
+- LIBS="-framework GMP"
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
-
-+ -u "$(UNDERSCORE)base_GHCziWeak_runFinalizzerBatch_closure"
-
- HC_BOOT_LIBS =
-
- ifeq "$(GhcWithInterpreter)" "YES"
--HC_BOOT_LIBS += -lHSreadline -lreadline -lHStemplate-haskell -lHSunix -lHSunix_cbits
-+HC_BOOT_LIBS += -lHStemplate-haskell -lHSunix -lHSunix_cbits
- endif
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char __gmpz_fdiv_qr ();
+-int
+-main ()
+-{
+-return __gmpz_fdiv_qr ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- HaveFrameworkGMP=YES; GMP_FRAMEWORK=GMP; GMP_LIBS=
+-else
+- HaveFrameworkGMP=NO
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- LIBS="$save_libs"
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HaveFrameworkGMP" >&5
+-$as_echo "$HaveFrameworkGMP" >&6; }
+- ;;
+-esac
- HC_BOOT_LIBS += -lHSCabal -lHShaskell98 -lHSregex-compat -lHSregex-posix -lHSregex-base -lHSbase -lHSbase_cbits -lHSparsec -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'