On Tue, Oct 30, 2007 at 09:48:44PM +0200, Antti Harri wrote: > > Hi, > > I'm having trouble with configure scripts, they aren't > able to find stuff under /usr/local/{lib,include} automatically. > > Greping through the ports tree I found that many ports set > them manually with CFLAGS & co and some --with flags.
well, you usually want CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" instead of setting CFLAGS in the port Makefile, but it depends on the port. > For me the CFLAGS and others has worked well but my question is, > should they be defined by default by the ports framework? > Unless of course setting them by default breaks something? even though building a port when the resulting package is already installed is not explicitly supported, it does work in some cases. adding LDFLAGS can end up breaking port builds in such cases, if the added LDFLAGS cause ld to use a library in ${LOCALBASE}/lib instead of the newly built library in ${WRKBUILD}. there may be other things that break as well. not to mention, there's not always the need to have cpp and ld look through ${LOCALBASE}/include and ${LOCALBASE}/lib. basically, it's a big change with little benefit, IMO. porters should be carefully watching what configure scripts look for, find, and don't find anyway. -- [EMAIL PROTECTED] SDF Public Access UNIX System - http://sdf.lonestar.org