Dear Fink developers,

One of the most common problems experienced by Fink users stems from header
files or libraries which have been placed into /usr/local by some other
software installation.  Rather than continue to advise everyone to just
get rid of /usr/local (and try to convince other software projects not
to install things there), I believe the time has come for a different
approach.

The most consistent way to implement Fink's non-interference policy in
this context would be to disable the headers and libraries found in /usr/local.
This is a bit tricky, since it is gcc itself which includes /usr/local/include
and /usr/local/lib in its search paths, but it turns out that at least
the headers can be disabled with a minimum of fuss.

The solution is to change the default value of CPPFLAGS from -I%p/include
to:
  -DLOCAL_INCLUDE_DIR=\%p/include
The new flag instructs gcc to *replace* /usr/local/include by %p/include
in its search paths.  So we simultaneously eliminate the incorporation of
headers from /usr/local/include, and promote those from %p/include (which
we want to do anyway).

How will this change Fink's behavior?  At present, %p/include comes first
in the search path, and this will make it come last.  So some packages will
have difficulty compiling if this change is made.  However, for any such
package, adding the line "SetCPPFLAGS: -I%p/include" should restore the
previous functionality.

This change is in fact very similar to one in the "isystem branch" which
has been inactive for more than a year.  I am frankly tempted to reimplement
the other change from that branch at the same time (but would like other
opinions about this).  The other change would remove the current default
value of -L%p/lib from LDFLAGS, and instead provide a default value of
%p/lib to both LIBRARY_PATH and DYLD_LIBRARY_PATH.  This makes %p/lib
come *after* other locations being searched, rather than before.

I would appreciate feedback on this idea, both the mild version which affects
only headers, and the more radical version which reimplements the change 
in order of library searching.

  -- Dave


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to