+
+ # Lifting this out of this sub brings it out of scope - why??
+ %Supported_syslibs =
+ ( exts,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/exts"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/exts"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/exts"
+ )
+ , '' # no cbits
+ , '' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , '' # extra ld opts
+ ],
+
+ misc,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/misc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/misc"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/misc"
+ )
+ , # where to find the cbits archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/misc/cbits"
+ )
+ , 'exts' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , ( $TargetPlatform =~ /-solaris2$/ ? '-lnsl -lsocket' : '')
+ ],
+ hbc,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/hbc"
+ : "$TopPwd/CONTRIB/libraries/hbc/src"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/CONTRIB/libraries/src/hbc"
+ )
+ , # where to find the cbits archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/CONTRIB/libraries/hbc/cbits"
+ )
+ , 'exts' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , ''
+ ],
+ posix,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/posix"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/posix"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/posix"
+ )
+ , # where to find the cbits archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/posix/cbits"
+ )
+ , 'misc' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , '' # extra ld opts
+ ],
+ concurrent,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/concurrent"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/concurrent"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/concurrent"
+ )
+ , '' # where to find the cbits archive to use when linking
+ , '' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , '' # extra ld opts
+ ],
+ win32,
+ [ # where to slurp interface files from
+ ( $INSTALLING
+ ? "$InstLibDirGhc/imports/win32"
+ : "$TopPwd/hslibs/win32/src"
+ )
+ , # where to find the archive to use when linking
+ ( $INSTALLING
+ ? "$InstLibDirGhc"
+ : "$TopPwd/hslibs/win32/src"
+ )
+ , ''
+ , 'exts' # Syslib dependencies
+ , '' # extra ghc opts
+ , '' # extra cc opts
+ , '-luser32 -lgdi32' # extra ld opts
+ ]
+ );
+
+ # check if it's supported..