#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 thorkilnaur):
It is true, as the following session shows, that gcc blocks direct
attempts to place /Library/Frameworks before /usr/include in the list of
directories to be searched for header files:
{{{
$ cat readlineT2.c
#include <readline/readline.h>
int main() { return 0; }
$ gcc readlineT2.c -c -v -F /Library/Frameworks
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++ --program-transform-
name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0
--build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target
=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1 -quiet -v -F
/Library/Frameworks -D__DYNAMIC__ readlineT2.c -fPIC -quiet -dumpbase
readlineT2.c -auxbase readlineT2 -version -o /var/tmp//ccgWIl6U.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
/../../../../powerpc-apple-darwin8/include"
ignoring duplicate directory "/Library/Frameworks"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
End of search list.
...
}}}
However, we can do as follows and get the desired effect:
{{{
$ mkdir localFrameworks
$ ln -s /Library/Frameworks/readline.framework localFrameworks/
$ gcc readlineT2.c -c -v -F localFrameworks
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++ --program-transform-
name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0
--build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target
=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1 -quiet -v -F
localFrameworks -D__DYNAMIC__ readlineT2.c -fPIC -quiet -dumpbase
readlineT2.c -auxbase readlineT2 -version -o /var/tmp//cc7uOQDF.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
/../../../../powerpc-apple-darwin8/include"
#include "..." search starts here:
#include <...> search starts here:
localFrameworks
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
End of search list.
...
}}}
Of the several inconvenient ways that we have for dealing with this
problem, this latter one is my favorite.
Best regards
Thorkil
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1395#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs