autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PATH_PROG and searching for regular files


From: Benoit Sigoure
Subject: Re: AC_PATH_PROG and searching for regular files
Date: Mon, 12 Nov 2007 00:32:39 +0100

Hello John,

On Nov 11, 2007, at 11:10 PM, John Borchardt wrote:

Hello, all, sorry if this is a very basic question.  I looked in the
archives briefly but didn't see anything that covered this...


I am trying to make the build scripts for someone else's decent-sized
source tree better.

In the configure.in script for this package, it is looking for the
paths of various libraries.  But running ./configure generally dies
when it cannot find these libraries.

The basic problem (as far as I can tell), is that configure.in looks
for libraries using AC_PATH_PROG, which (best I can tell) only returns
the path of a file if the file has execute permission.  Libraries are
not normally executable (as far as I can tell) on my Ubuntu 7.10
install, so AC_PATH_PROG doesn't find the library, and this is why
./configure dies.

That's wrong indeed, you should report this bug upstream.

My simple question is -- how should I find the location of a library
or any other regular file such as a C header file?

Looking at the Autoconf documentation, it doesn't look like
AC_CHECK_FILE, AC_CHECK_LIB, or AC_CHECK_HEADER really do what I need.
 (Correct me if I'm wrong.)

If you're looking for a library, then what's wrong with AC_CHECK_LIB? For a header, what's wrong with AC_CHECK_HEADER? These macros have been designed specifically to this end, so?

I could no doubt write my own macro (I'd call it AC_PATH_FILE) to do
what I want.  But since what I want sounds so simple, it makes me
suspicious that either:
(1) There already is a macro that does this, or
(2) What I want to do is fundamentally flawed and I should accomplish
what I want in a different way


Your input is greatly appreciated!

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]