From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:30:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED6A9106564A for ; Fri, 31 Oct 2008 19:30:47 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D71B8FC0C for ; Fri, 31 Oct 2008 19:30:47 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so589938yxb.13 for ; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=Fl5j9ODUmySQcNuC6TwDdVB4MBilZAjusdQEQa4VFJM=; b=iMHcmMK4LArIjKG/wr42ONggR9pZ6+KSSwTZuhoL8Qa5wIyTppoSnNPJoglRO/tG9F hPfTz6APBGhkS0dQNk3NABoo6o6zj2s31wHH3eANy1Kiq29KQQwxwg7MLFPrVKaDSWZO G8tRXjjKxBC1SuCUoxcyGmz+R6V4UhoanyHAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=QRC0rOsyRGugDqYXHoHrArgyWBBVs84ETQ0HBzeVmyuWsUHuazOuk7kkH4q/FiqKQb 6hzZU9JxdHIg/3qtCn5a6zI9xa0tx128grGupghLjP4XQdxLLrVvaPEn0ThD9UReDaU1 zj25g1K6HfNWQK6S59nTPmcSd7ceWBLiYgtBc= Received: by 10.142.70.16 with SMTP id s16mr5593858wfa.120.1225481446494; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) Received: by 10.142.141.5 with HTTP; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) Message-ID: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> Date: Fri, 31 Oct 2008 12:30:46 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "Nate Eldredge" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> X-Google-Sender-Auth: 67c634b05763899b Cc: freebsd-hackers Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 19:30:48 -0000 On Fri, Oct 31, 2008 at 12:11 PM, Nate Eldredge wrote: > On Fri, 31 Oct 2008, Steve Franks wrote: > >> I believe someone has told me on this list that the proper way to >> compile a linux program is to run configure >> --includedir=/usr/local/include --libdir=/usr/local/lib. > > Nitpick: not specifically a Linux program, but a program using a configure > script generated by GNU's autoconf system. Programs using autoconf may > run on systems other than Linux (usually do, in fact, since the point of > autoconf is portability), and many Linux programs don't use autoconf. > > And I'll assume that by 'linux' you actually mean FreeBSD, in order for this > to be on-topic for this list :) > >> Is that >> correct? I've got a bunch of linux weenies trying to tell me their >> code isn't broken because I'm supposed to have headers where theirs >> are. > > I don't understand this sentence. > >> They state that includedir is used by *their* project to locate >> it's *own* headers, so they never bothered to wire it up in >> Makefile.in....it gets ignored entirely. >> >> I figured I'd better know what I'm talking about before I tell someone >> they are 'wrong'. Especially as it's usually me ;) > > It looks to me like both of you are wrong. :) Looking at the configure that > comes with wget-1.11.2, running configure --help says > > Fine tuning of the installation directories: > ... > --libdir=DIR object code libraries [EPREFIX/lib] > --includedir=DIR C header files [PREFIX/include] > > So it looks like --libdir is supposed to specify where libraries are to be > *installed*, not where they are to be searched for. > > Further up in the help we have > > --prefix=PREFIX install architecture-independent files in PREFIX > [/usr/local] > --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX > [PREFIX] > > So libraries would already be installed in /usr/local/lib by default, unless > you used a --prefix or --exec-prefix option to override that. Similarly for > include files. > > If you need the program being built to search for libraries or include files > in a certain place (such as /usr/local/include and /usr/local/lib, which are > not searched by default on FreeBSD), AFAIK the right way to do it is to set > the LIBRARY_PATH and C_INCLUDE_PATH (or CPLUS_INCLUDE_PATH) environment > variables. > > -- > > Nate Eldredge > neldredge@math.ucsd.edu > 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). Steve Steve