From owner-freebsd-questions@FreeBSD.ORG Fri Nov 2 09:49:16 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B0B634E for ; Fri, 2 Nov 2012 09:49:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 363678FC08 for ; Fri, 2 Nov 2012 09:49:15 +0000 (UTC) Received: from r56.edvax.de (port-92-195-110-131.dynamic.qsc.de [92.195.110.131]) by mx01.qsc.de (Postfix) with ESMTP id A35933CBA5; Fri, 2 Nov 2012 10:49:08 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qA29n8gt001940; Fri, 2 Nov 2012 10:49:08 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Fri, 2 Nov 2012 10:49:08 +0100 From: Polytropon To: James Colannino Subject: Re: Autotools, libraries and man pages: oh my! Message-Id: <20121102104908.59073016.freebsd@edvax.de> In-Reply-To: <5093539C.8090406@gmail.com> References: <50934F91.4030701@gmail.com> <5093539C.8090406@gmail.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 09:49:16 -0000 On Thu, 01 Nov 2012 22:01:16 -0700, James Colannino wrote: > On 11/01/12 21:44, James Colannino wrote: > > [...]I'm able to use autotools on FreeBSD to > > generate configure and Makefile.in, and can use gmake to compile and > > install it. > > > > Unfortunately, the man pages are installed to /usr/local/share/man > > instead of to /usr/local/man, which I thought the tools would've taken > > care of. Also, even though I see my library was successfully compiled > > and installed to /usr/local/lib, when I try to compile a program with > > gcc source.c -ldstring, I get: > > > > /usr/bin/ld: cannot find -ldstring > > Update: I can compile against my dstring library by using the following > line: > gcc source.c -L/usr/local/lib -ldstring. I guess it didn't know to > search /usr/local/lib. Still having trouble figuring out how to install > the man pages properly, though :( The easiest way to do it is to have a look at the porter's handbook (part of the FreeBSD documentation) and use the predefined target locations for the generated components. http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ However, I always thought /usr/local/lib would be one of the default search paths for ld, so -l for any library residing there should be fine - except of course you override default options of cc... For your project, you could create a Makefile containing the required CFLAGS and LDFLAGS, define a rule for building the target and then just use "make". -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...