[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / mkworld / site-ghc.jm.in
diff --git a/ghc/mkworld/site-ghc.jm.in b/ghc/mkworld/site-ghc.jm.in
new file mode 100644 (file)
index 0000000..ac01096
--- /dev/null
@@ -0,0 +1,458 @@
+/*
+    @configure_input@
+
+    TargetPlatform.
+    BuildPlatform, HostPlatform are in general site file
+    (e.g. <top>/mkworld/site.jm[.in])
+ */
+#ifndef TargetPlatform
+/* use Host* because of 99-cmd-limit brain-dead seds */
+#define TargetPlatform @HostPlatform@
+#endif
+
+/* --------------- "standard" Haskell compiler --------------------------- */
+
+#define WithHc @WithHc@
+#define WithHcType @WithHcType@
+
+#define WithGhcHc @WithGhcHc@
+#define WithGhcHcType @WithGhcHcType@
+
+#if ! (defined(HaskellCompilerCmd) && defined(HaskellCompilerType))
+# if WithGhcHcType != HC_UNSPECIFIED
+#  define HaskellCompilerCmd  WithGhcHc
+#  define HaskellCompilerType WithGhcHcType
+# else
+#  if WithHcType != HC_UNSPECIFIED
+#   define HaskellCompilerCmd  WithHc
+#   define HaskellCompilerType WithHcType
+#  else                                  
+#   define HaskellCompilerCmd  haskell-compiler-not-specified
+#   define HaskellCompilerType HC_UNSPECIFIED
+#  endif
+# endif
+#endif
+
+/* ----------------------------------------------------------------------- */
+
+/* Info for booting the Haskell compiler proper (written in Haskell):
+
+   If you're going to use a Haskell compiler for booting:
+    hbc -- set GhcWithHscBuiltViaC to NO
+    ghc -- ditto; and set WhatGhcForBootingIsCalled
+    [well, maybe...]
+
+   If you're going to boot from distributed .hc files (the *default*),
+   you needn't set anything here.
+*/
+#ifndef GhcWithHscBuiltViaC
+#define GhcWithHscBuiltViaC @GhcWithHscBuiltViaC@
+#endif
+#ifndef GhcWithHscOptimised
+#define GhcWithHscOptimised @GhcWithHscOptimised@
+#endif
+#ifndef GhcWithHscDebug
+#define GhcWithHscDebug @GhcWithHscDebug@
+#endif
+#ifndef GhcBuilderVersion
+#define GhcBuilderVersion @GhcBuilderVersion@
+#endif
+#ifndef GhcWithRegisterised
+#define GhcWithRegisterised @GhcWithRegisterised@
+#endif
+#ifndef GhcWithNativeCodeGen
+#define GhcWithNativeCodeGen @GhcWithNativeCodeGen@
+#endif
+GHC_WITH_NATIVE_CODEGEN=GhcWithNativeCodeGen
+
+#ifndef BuildGHCI
+#define BuildGHCI @BuildGHCI@
+#endif
+#ifndef GhcWithDeforester
+#define GhcWithDeforester @GhcWithDeforester@
+#endif
+#ifndef GhcWithReadline
+#define GhcWithReadline @GhcWithReadline@
+#endif
+#ifndef GhcWithSockets
+#define GhcWithSockets @GhcWithSockets@
+#endif
+
+/* ================================================================
+   BUILDS stuff: main sequential ones
+*/
+
+#define GhcBuild_normal @GhcBuild_normal@ /* profiled sequential */
+#if GhcBuild_normal == YES
+# define IfGhcBuild_normal(x) x
+GHC_BUILD_FLAG_normal = -build-normal-defined
+#else
+# define IfGhcBuild_normal(x) /**/
+GHC_BUILD_FLAG_normal = -build-normal-not-defined
+#endif
+
+#define GhcBuild_p @GhcBuild_p@                /* profiled sequential */
+#if GhcBuild_p == YES
+# define IfGhcBuild_p(x) x
+GHC_BUILD_FLAG_p = -build-p-defined
+#else
+# define IfGhcBuild_p(x) /**/
+GHC_BUILD_FLAG_p = -build-p-not-defined
+#endif
+
+#define GhcBuild_t @GhcBuild_t@                /* ticky-ticky "profiling" */
+#if GhcBuild_t == YES  
+# define IfGhcBuild_t(x) x
+GHC_BUILD_FLAG_t = -build-t-defined
+#else
+# define IfGhcBuild_t(x) /**/
+GHC_BUILD_FLAG_t = -build-t-not-defined
+#endif
+
+#define GhcBuild_u @GhcBuild_u@                /* unregisterized (most basic boot) */
+#if GhcBuild_u == YES  
+# define IfGhcBuild_u(x) x
+GHC_BUILD_FLAG_u = -build-u-defined
+#else
+# define IfGhcBuild_u(x) /**/
+GHC_BUILD_FLAG_u = -build-u-not-defined
+#endif
+
+/* === builds: concurrent and parallel ============================ */
+
+#define GhcBuild_mc @GhcBuild_mc@      /* concurrent */
+#if GhcBuild_mc == YES
+# define IfGhcBuild_mc(x) x
+GHC_BUILD_FLAG_mc = -build-mc-defined
+#else
+# define IfGhcBuild_mc(x) /**/
+GHC_BUILD_FLAG_mc = -build-mc-not-defined
+#endif
+
+#define GhcBuild_mr @GhcBuild_mr@      /* profiled concurrent */
+#if GhcBuild_mr == YES
+# define IfGhcBuild_mr(x) x
+GHC_BUILD_FLAG_mr = -build-mr-defined
+#else
+# define IfGhcBuild_mr(x) /**/
+GHC_BUILD_FLAG_mr = -build-mr-not-defined
+#endif
+
+#define GhcBuild_mt @GhcBuild_mt@      /* ticky concurrent */
+#if GhcBuild_mt == YES
+# define IfGhcBuild_mt(x) x
+GHC_BUILD_FLAG_mt = -build-mt-defined
+#else
+# define IfGhcBuild_mt(x) /**/
+GHC_BUILD_FLAG_mt = -build-mt-not-defined
+#endif
+
+#define GhcBuild_mp @GhcBuild_mp@      /* parallel (GUM, PVM-based) */
+#if GhcBuild_mp == YES
+# define IfGhcBuild_mp(x) x
+GHC_BUILD_FLAG_mp = -build-mp-defined
+#else
+# define IfGhcBuild_mp(x) /**/
+GHC_BUILD_FLAG_mp = -build-mp-not-defined
+#endif
+
+#define GhcBuild_mg @GhcBuild_mg@      /* GranSim */
+#if GhcBuild_mg == YES
+# define IfGhcBuild_mg(x) x
+GHC_BUILD_FLAG_mg = -build-mg-defined
+#else
+# define IfGhcBuild_mg(x) /**/
+GHC_BUILD_FLAG_mg = -build-mg-not-defined
+#endif
+
+/* === builds: non-std garbage collectors ==========================
+   These use the same mechanism as user ways
+   but do not have any "fed back" options.
+*/
+
+#define GhcBuild_2s @GhcBuild_2s@      /* sequential -- 2-space collector */
+#if GhcBuild_2s == YES
+# define IfGhcBuild_2s(x) x
+GHC_BUILD_FLAG_2s = -gc-2s
+#else
+# define IfGhcBuild_2s(x) /**/
+GHC_BUILD_FLAG_2s = -build-2s-not-defined
+#endif
+
+#define GhcBuild_1s @GhcBuild_1s@      /* sequential -- 1-space collector */
+#if GhcBuild_1s == YES
+# define IfGhcBuild_1s(x) x
+GHC_BUILD_FLAG_1s = -gc-1s
+#else
+# define IfGhcBuild_1s(x) /**/
+GHC_BUILD_FLAG_1s = -build-1s-not-defined
+#endif
+
+#define GhcBuild_du @GhcBuild_du@      /* sequential -- dual-mode collector */
+#if GhcBuild_du == YES
+# define IfGhcBuild_du(x) x
+GHC_BUILD_FLAG_du = -gc-du
+#else
+# define IfGhcBuild_du(x) /**/
+GHC_BUILD_FLAG_du = -build-du-not-defined
+#endif
+
+/* === builds: "user ways" ======================================= */
+
+/* these had to be de-configure-ified because of 99-cmd-limit brain-dead seds */
+
+#define GhcBuild_a NO /*@GhcBuild_a@*/         /* "user way" a */
+#if GhcBuild_a == YES  
+# define IfGhcBuild_a(x) x
+GHC_BUILD_FLAG_a = -build-a-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_a = -build-a-not-defined-error
+#else
+# define IfGhcBuild_a(x) /**/
+GHC_BUILD_FLAG_a = -build-a-not-defined
+GHC_BUILD_OPTS_a = -build-a-not-defined-error
+#endif
+
+#define GhcBuild_b NO /*@GhcBuild_b@*/         /* "user way" b */
+#if GhcBuild_b == YES
+# define IfGhcBuild_b(x) x
+GHC_BUILD_FLAG_b = -build-b-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_b = -build-b-not-defined-error
+#else
+# define IfGhcBuild_b(x) /**/
+GHC_BUILD_FLAG_b = -build-b-not-defined
+GHC_BUILD_OPTS_b = -build-b-not-defined-error
+#endif
+
+#define GhcBuild_c NO /*@GhcBuild_c@*/         /* "user way" c */
+#if GhcBuild_c == YES
+# define IfGhcBuild_c(x) x
+GHC_BUILD_FLAG_c = -build-c-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_c = -build-c-not-defined-error
+#else
+# define IfGhcBuild_c(x) /**/
+GHC_BUILD_FLAG_c = -build-c-not-defined
+GHC_BUILD_OPTS_c = -build-c-not-defined-error
+#endif
+
+#define GhcBuild_d NO /*@GhcBuild_d@*/         /* "user way" d */
+#if GhcBuild_d == YES
+# define IfGhcBuild_d(x) x
+GHC_BUILD_FLAG_d = -build-d-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_d = -build-d-not-defined-error
+#else
+# define IfGhcBuild_d(x) /**/
+GHC_BUILD_FLAG_d = -build-d-not-defined
+GHC_BUILD_OPTS_d = -build-d-not-defined-error
+#endif
+
+#define GhcBuild_e NO /*@GhcBuild_e@*/         /* "user way" e */
+#if GhcBuild_e == YES
+# define IfGhcBuild_e(x) x
+GHC_BUILD_FLAG_e = -build-e-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_e = -build-e-not-defined-error
+#else
+# define IfGhcBuild_e(x) /**/
+GHC_BUILD_FLAG_e = -build-e-not-defined
+GHC_BUILD_OPTS_e = -build-e-not-defined-error
+#endif
+
+#define GhcBuild_f NO /*@GhcBuild_f@*/         /* "user way" f */
+#if GhcBuild_f == YES
+# define IfGhcBuild_f(x) x
+GHC_BUILD_FLAG_f = -build-f-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_f = -build-f-not-defined-error
+#else
+# define IfGhcBuild_f(x) /**/
+GHC_BUILD_FLAG_f = -build-f-not-defined
+GHC_BUILD_OPTS_f = -build-f-not-defined-error
+#endif
+
+#define GhcBuild_g NO /*@GhcBuild_g@*/         /* "user way" g */
+#if GhcBuild_g == YES
+# define IfGhcBuild_g(x) x
+GHC_BUILD_FLAG_g = -build-g-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_g = -build-g-not-defined-error
+#else
+# define IfGhcBuild_g(x) /**/
+GHC_BUILD_FLAG_g = -build-g-not-defined
+GHC_BUILD_OPTS_g = -build-g-not-defined-error
+#endif
+
+#define GhcBuild_h NO /*@GhcBuild_h@*/         /* "user way" h */
+#if GhcBuild_h == YES
+# define IfGhcBuild_h(x) x
+GHC_BUILD_FLAG_h = -build-h-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_h = -build-h-not-defined-error
+#else
+# define IfGhcBuild_h(x) /**/
+GHC_BUILD_FLAG_h = -build-h-not-defined
+GHC_BUILD_OPTS_h = -build-h-not-defined-error
+#endif
+
+#define GhcBuild_i NO /*@GhcBuild_i@*/         /* "user way" i */
+#if GhcBuild_i == YES
+# define IfGhcBuild_i(x) x
+GHC_BUILD_FLAG_i = -build-i-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_i = -build-i-not-defined-error
+#else
+# define IfGhcBuild_i(x) /**/
+GHC_BUILD_FLAG_i = -build-i-not-defined
+GHC_BUILD_OPTS_i = -build-i-not-defined-error
+#endif
+
+#define GhcBuild_j NO /*@GhcBuild_j@*/         /* "user way" j */
+#if GhcBuild_j == YES
+# define IfGhcBuild_j(x) x
+GHC_BUILD_FLAG_j = -build-j-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_j = -build-j-not-defined-error
+#else
+# define IfGhcBuild_j(x) /**/
+GHC_BUILD_FLAG_j = -build-j-not-defined
+GHC_BUILD_OPTS_j = -build-j-not-defined-error
+#endif
+
+#define GhcBuild_k NO /*@GhcBuild_k@*/         /* "user way" k */
+#if GhcBuild_k == YES
+# define IfGhcBuild_k(x) x
+GHC_BUILD_FLAG_k = -build-k-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_k = -build-k-not-defined-error
+#else
+# define IfGhcBuild_k(x) /**/
+GHC_BUILD_FLAG_k = -build-k-not-defined
+GHC_BUILD_OPTS_k = -build-k-not-defined-error
+#endif
+
+#define GhcBuild_l NO /*@GhcBuild_l@*/         /* "user way" l */
+#if GhcBuild_l == YES
+# define IfGhcBuild_l(x) x
+GHC_BUILD_FLAG_l = -build-l-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_l = -build-l-not-defined-error
+#else
+# define IfGhcBuild_l(x) /**/
+GHC_BUILD_FLAG_l = -build-l-not-defined
+GHC_BUILD_OPTS_l = -build-l-not-defined-error
+#endif
+
+#define GhcBuild_m NO /*@GhcBuild_m@*/         /* "user way" m */
+#if GhcBuild_m == YES
+# define IfGhcBuild_m(x) x
+GHC_BUILD_FLAG_m = -build-m-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_m = -build-m-not-defined-error
+#else
+# define IfGhcBuild_m(x) /**/
+GHC_BUILD_FLAG_m = -build-m-not-defined
+GHC_BUILD_OPTS_m = -build-m-not-defined-error
+#endif
+
+#define GhcBuild_n NO /*@GhcBuild_n@*/         /* "user way" n */
+#if GhcBuild_n == YES
+# define IfGhcBuild_n(x) x
+GHC_BUILD_FLAG_n = -build-n-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_n = -build-n-not-defined-error
+#else
+# define IfGhcBuild_n(x) /**/
+GHC_BUILD_FLAG_n = -build-n-not-defined
+GHC_BUILD_OPTS_n = -build-n-not-defined-error
+#endif
+
+#define GhcBuild_o NO /*@GhcBuild_o@*/         /* "user way" o */
+#if GhcBuild_o == YES
+# define IfGhcBuild_o(x) x
+GHC_BUILD_FLAG_o = -build-o-not-defined /* >>>change here<<< if required */
+GHC_BUILD_OPTS_o = -build-o-not-defined-error
+#else
+# define IfGhcBuild_o(x) /**/
+GHC_BUILD_FLAG_o = -build-o-not-defined
+GHC_BUILD_OPTS_o = -build-o-not-defined-error
+#endif
+
+/* ======= END OF BUILD INFO ==================================== */
+
+
+/* As of 0.19, our parser won't go through Sun's /usr/bin/yacc
+   (due to an utterly hardwired limit on the number of states [1000]).
+   You can use: (1) their unbundled /usr/lang/yacc; or (2) the GNU
+   "bison -y".  Do not try Berkeley yacc -- it willnae work.
+*/
+#ifndef YaccCmd
+#define YaccCmd @YaccCmd@
+#endif
+
+/* ================================================================
+   INSTALL stuff:
+*/
+
+/* WHERE TO INSTALL IT:
+
+    By default, the root prefix for where everything is installed is
+    "/usr/local".  Assume you are installing for the <arch>
+    architecture...  Beneath that, things look like this:
+
+    bin/<arch>          for executables the user invokes, e.g., driver "ghc"
+                       [InstBinDir_GHC]
+    bin                        we might install some scripts (not platform-dependent)
+                       here... [InstScriptDir_GHC]
+    lib/ghc/<version>   for support-bits for "ghc" (architecture-independent),
+                       for a specific version. [InstDataDir_GHC]
+    lib/ghc/<version>/<arch>
+                       ditto, but the <arch>itecture-dependent bits
+                       [InstLibDir_GHC]
+    man/man<ext>/       man pages [InstManRoot]
+    info               Info files [InstInfoDir]
+
+    You may alter mkworld's ideas about GHC installation by changing
+    the above-mentioned settings, as shown below.
+
+    The default values are set in only4-ghc.ljm, if you are interested.
+
+    If you are going to install the utility bits (literate, mkworld,
+    glafp-utils) as well as the GHC system itself, you should do
+    similar installation fiddling in your "mkworld/site.jm" file,
+    setting the variables InstRootDir, InstBinDir, InstLibDir, etc.
+    (the non-project-specific ones).
+*/
+
+/*
+    "AT_GLASGOW"  -- Are we installing at Glasgow?
+    (also set in site.jm.in, but we get here and try to use it first)
+ */
+#ifndef AT_GLASGOW
+#define AT_GLASGOW @AT_GLASGOW@
+#endif
+
+/* only the "prefix" things are set here */
+#ifndef InstRootDir_GHC
+#define InstRootDir_GHC @prefix@
+#endif
+#ifndef InstBinRootDir_GHC
+#define InstBinRootDir_GHC @exec_prefix@
+#endif
+
+/* install the compilation system driver as "ghc-<version>" at Glasgow 
+   (default is: "ghc" elsewhere) 
+ */
+#ifndef GhcDriverInstallName
+#if AT_GLASGOW
+#define GhcDriverInstallName ghc-$(PROJECTVERSION)
+#else
+#define GhcDriverInstallName ghc
+#endif
+#endif
+
+/* At Glasgow, make sure things are installed for group "grasp".
+
+   If you do not care what group it is installed for, delete
+   this stuff altogether.  If you leave it in, be sure it is a
+   group that exists at your site!
+ */
+#if AT_GLASGOW && !defined(InstGroup)
+#define InstGroup -g grasp
+#endif
+
+/* At Glasgow, we would rather the installed binaries were stripped.
+   (Delete if you feel otherwise.)
+*/
+#ifndef InstStrip
+#define InstStrip -s
+#endif
+