Date: Fri, 31 Oct 2008 12:46:39 -0700 (PDT) From: Nate Eldredge <neldredge@math.ucsd.edu> To: Steve Franks <stevefranks@ieee.org> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders Message-ID: <Pine.GSO.4.64.0810311238580.16737@zeno.ucsd.edu> In-Reply-To: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <Pine.GSO.4.64.0810311154030.16737@zeno.ucsd.edu> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Oct 2008, Steve Franks wrote: > Let's backup. What's the 'right' way to get a bloody linux program > that expects all it's headers in /usr/include to compile on freebsd > where all the headers are in /usr/local/include? That's all I'm > really asking. Specifically, it's looking for libusb & libftdi. If I > just type gmake, it can't find it, but if I manually edit the > Makefiles to add -I/usr/local/include, it can. Obviously, manually > editing the makefiles is *not* the right way to fix it (plus it's > driving me crazy). C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib export C_INCLUDE_PATH LIBRARY_PATH ./configure gmake Adjust as appropriate if using csh. Personally, I set those environment variables in my .profile. By the way, I think you're being a little unfair to blame this on Linux programs or programmers. Normally it's the user's responsibility to ensure that their compiler searches for include files, etc, in the appropriate place. Many Linux distributions put everything in /usr/include, which is searched by default. FreeBSD puts stuff from ports in /usr/local/include which isn't searched by default. I find that behavior inconvenient, which is why I set those environment variables, so I don't have to think about it. -- Nate Eldredge neldredge@math.ucsd.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0810311238580.16737>