On Tue, 17 Apr 2012 10:24:11 +0900 Miles Bader <miles@xxxxxxx> wrote: > I installed "libjpeg" using the FreeBSD ports infrastructure, but my > configure script still couldn't "see" it... once I explicitly added > "-I/usr/local/include" to CPPFLAGS, and "-L/usr/local/lib" to LDFLAGS, > then it did find it. That in fact is the right solution. The package should honor CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, and LIBS. As long as it doesn't overwrite them, the user can describe the location of any needed libraries through them to the package. Keep in mind that the default search paths are configurable, either someplace like /etc/ld.so.conf, or when the compiler/linker itself was built. I don't know how autoconf discovers these settings, though. The pkgsrc system puts things in /usr/pkg. Sometimes these override older versions /usr; sometimes packages are themselves overridden in /usr/local. It's up to the person building the package to know what's where, and to communicate that to the package. All you as packager can do is make it possible. Autoconf could help, though. It would be nice if configure.ac supported an option to define a simple search path for library finding, e.g. DETECT_ROOTS=${HOME}:/usr/local:/usr/pkg:/usr and generated all the magical -I, -L, and -Wl arguments. There's an awful lot of redundancy and arcania required to get this stuff right, and quite a bit of variety among packages. --jkl _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf