summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkeller <unknown>2001-12-04 04:54:26 +0000
committerkeller <unknown>2001-12-04 04:54:26 +0000
commitc3c0cd456206940c81b90888829e2d9767de5610 (patch)
treee861a54ac4fbb3c642f078f4327affb0946b236d
parent51e20412f92ca2ef5d4d9ee359ce3d3778bc6466 (diff)
downloadhaskell-c3c0cd456206940c81b90888829e2d9767de5610.tar.gz
[project @ 2001-12-04 04:54:26 by keller]
Sets the X11 C compiler and linker flags for package xlib correctly now
-rw-r--r--ghc/driver/Makefile6
-rw-r--r--ghc/driver/PackageSrc.hs10
2 files changed, 12 insertions, 4 deletions
diff --git a/ghc/driver/Makefile b/ghc/driver/Makefile
index cd2a720ffb..a7667bfb26 100644
--- a/ghc/driver/Makefile
+++ b/ghc/driver/Makefile
@@ -22,7 +22,11 @@ PKGCONF_OPTS = "$(TARGETPLATFORM)" \
"$(GHC_LIB_DIR)" \
"$(GHC_RUNTIME_DIR)" \
"$(GHC_UTILS_DIR)" \
- "$(GHC_INCLUDE_DIR)"
+ "$(GHC_INCLUDE_DIR)" \
+ "$(X_CFLAGS)" \
+ "$(X_LIBS)"
+
+# the latter two are needed to setup the package details for hslibs/xlib
SRC_HC_OPTS += -fglasgow-exts -cpp
diff --git a/ghc/driver/PackageSrc.hs b/ghc/driver/PackageSrc.hs
index 465047b3da..eab4a010d1 100644
--- a/ghc/driver/PackageSrc.hs
+++ b/ghc/driver/PackageSrc.hs
@@ -35,6 +35,8 @@ package_details installing
, cGHC_RUNTIME_DIR
, cGHC_UTILS_DIR
, cGHC_INCLUDE_DIR
+ , cX_CFLAGS
+ , cX_LIBS
] =
[
@@ -427,8 +429,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 +439,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 = [],