From owner-freebsd-ports Sat May 16 22:17:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA05232 for freebsd-ports-outgoing; Sat, 16 May 1998 22:17:57 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA05224 for ; Sat, 16 May 1998 22:17:53 -0700 (PDT) (envelope-from chuckr@glue.umd.edu) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.8.8/8.8.5) with SMTP id AAA13482; Sun, 17 May 1998 00:15:23 -0400 (EDT) Date: Sun, 17 May 1998 00:15:23 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@localhost To: Peter Haight cc: freebsd-ports@FreeBSD.ORG Subject: Re: Autoconf macro for finding include subdirectories In-Reply-To: <199805170506.WAA06757@wartch.rih.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 16 May 1998, Peter Haight wrote: > > >From what I've seen of configure scripts, they're all over the place (I > >mean they don't follow a standard too closely), usually with significant > >amounts of purely custom code in them. I don't know of a single macro > >that can be used in all situations (including significant amounts of > >custom code) to find whatever you want. I've done what you're referring > >to myself, but on a one by one basis. > > Heh heh. This is exactly why I was wondering if someone had a good > generalized one. I've got one, but it expects you to give it a hint as to > what the subdirectory is called. I'm thinking I might add a feature that it > will just do a find in /usr/include and /usr/local/include if all else > fails. That's what most of the ones out there do now. You give them a list of directories to search, the filename to search for, and among the dirs to search are /usr and /usr/local. I might be missing something, but it sounds like what you have is already done. You won't help the ones that are messy code, and the good ones already have the search code you're looking for. Nothing fancy, just a shell for loop with a test to see if the file exists: for _dir in $(DIRLIST); if [ -e $(_dir)/myfilename.h ] then whatever. > > > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message