#1395: let ./configure check for a GNUreadline framework
-----------------------------+----------------------------------------------
 Reporter:  [EMAIL PROTECTED]    |          Owner:             
     Type:  feature request  |         Status:  reopened   
 Priority:  normal           |      Milestone:  6.8 branch 
Component:  Build System     |        Version:  6.8        
 Severity:  normal           |     Resolution:             
 Keywords:                   |     Difficulty:  Easy (1 hr)
 Testcase:                   |   Architecture:  Multiple   
       Os:  MacOS X          |  
-----------------------------+----------------------------------------------
Comment (by maeder):

 Could some check in my changes to `compiler/ghci/Linker.lhs` (attached)
 which I need for `ghci -package readline`? The diff is:

 {{{
 @@ -74,6 +74,7 @@
  import Foreign

  import System.IO
 +import System.IO.Error as IO
  import System.Directory

  import Control.Exception
 @@ -1129,7 +1130,12 @@
  -- name. They are searched for in different paths than normal libraries.
  #ifdef darwin_TARGET_OS
  loadFramework extraPaths rootname
 -   = do        { mb_fwk <- findFile mk_fwk (extraPaths ++
 defaultFrameworkPaths)
 +   = do        { either_dir <- IO.try getHomeDirectory
 +        ; let homeFrameworkPath = case either_dir of
 +                Left _ -> []
 +                Right dir -> [dir ++ "/Library/Frameworks"]
 +        ; mb_fwk <- findFile mk_fwk
 +            (extraPaths ++ homeFrameworkPath ++ defaultFrameworkPaths)
         ; case mb_fwk of
             Just fwk_path -> loadDLL fwk_path
             Nothing       -> return (Just "not found") }
 }}}

 (I just see that the file uses tabs). My addition allows to find a
 framework in a users home directory.

 My attached configure.ac is also needed for building ghc with frameworks
 under $HOME. (I'm just trying if `compiler/main/DriverPipeline.hs` can be
 extended with `-F$HOME/Library/Frameworks`.)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1395#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to