[project @ 2001-12-06 08:24:36 by sof]
[ghc-hetmet.git] / ghc / driver / PackageSrc.hs
index 465047b..0856ab5 100644 (file)
@@ -35,6 +35,8 @@ package_details installing
  , cGHC_RUNTIME_DIR
  , cGHC_UTILS_DIR
  , cGHC_INCLUDE_DIR
+ , cX_CFLAGS
+ , cX_LIBS
  ] =
 
  [
@@ -62,7 +64,13 @@ package_details installing
         import_dirs    = [],
         source_dirs    = [],
         library_dirs   = if installing
-                            then [ "$libdir" ]
+                            then 
+#ifdef mingw32_TARGET_OS
+                               -- force the dist-provided gcc-lib/ into scope.
+                                [ "$libdir", "$libdir/gcc-lib" ]
+#else
+                                [ "$libdir" ]
+#endif
                             else [ ghc_src_dir cGHC_RUNTIME_DIR ],
         hs_libraries      = [ "HSrts" ],
        extra_libraries   =
@@ -427,8 +435,8 @@ package_details installing
          c_includes     = [ "HsXlib.h" ],
          package_deps   = [ "greencard" ],
          extra_ghc_opts = [],
-         extra_cc_opts  = [],
-         extra_ld_opts  = []
+         extra_cc_opts  = [ cX_CFLAGS ],
+         extra_ld_opts  = [ cX_LIBS ]
         }
 
          ,Package {
@@ -437,7 +445,9 @@ package_details installing
                              then [ "$libdir/imports/HGL" ]
                              else [ "$libdir/hslibs/graphics/lib/x11" ],
          source_dirs    = [],
-         library_dirs   = [],
+         library_dirs   = if installing
+                             then [ "$libdir" ]
+                             else [ "$libdir/hslibs/graphics/lib/x11"],
          hs_libraries   = [ "HSHGL" ],
         extra_libraries= [],
          include_dirs   = [],