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: John Borchardt
Subject: Re: AC_PATH_PROG and searching for regular files
Date: Sun, 11 Nov 2007 19:14:27 -0700

Benoit,

Thanks for the reply.

Can anyone else confirm the execute-only property of AC_PATH_PROG?


As far as AC_CHECK_LIB and AC_CHECK_HEADER are concerned --

Looking at the documentation/definitions:

AC_CHECK_LIB (library, function, [action-if-found],
[action-if-not-found], [other-libraries])
AC_CHECK_HEADER (header-file, [action-if-found],
[action-if-not-found], [includes = `default-includes'])

it isn't clear to me how I can use these functions to get the location
of the library or header file.  I'm just trying to check for the files
existence, not necessarily link against it or anything.

Any help/suggestions greatly appreciated.


Thanks,

--John





On Nov 11, 2007 4:32 PM, Benoit Sigoure <address@hidden> wrote:
> 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
>
>
>




reply via email to

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