Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 May 1998 00:15:23 -0400 (EDT)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        Peter Haight <psh1@cornell.edu>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Autoconf macro for finding include subdirectories 
Message-ID:  <Pine.BSF.3.96.980517000850.16302m-100000@localhost>
In-Reply-To: <199805170506.WAA06757@wartch.rih.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980517000850.16302m-100000>