bug-autoconf
[Top][All Lists]
Advanced

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

New feature in AC_PROG_CHECK


From: Mohammad Akhlaghi
Subject: New feature in AC_PROG_CHECK
Date: Mon, 11 Dec 2017 17:19:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Hi Autoconf maintainers,

In the `configure.ac' of GNU Astronomy Utilities (Gnuastro), I need to check if `libtool' is present on the system or not (independent of the libtool that is shipped with Gnuastro and is used for its internal building) [P.S1]. Therefore, I use

AC_CHECK_PROG(has_libtool, libtool, [yes], [no])

Recently a user reported that while they didn't have libtool on their system, this test had passed. From `config.log', I could see that it had found (`.//libtool'). Upon further investigation, I found out that it was because his PATH included the current directory and for some reason, it was finding Gnuastro's internally built Libtool [P.S2].

So I updated the command above to this:

AC_CHECK_PROG(has_libtool, libtool, [yes], [no], , .//libtool)

But today, another user reported a similar problem and when I looked at their `config.log' I found out that on that system, it had found `./libtool'! So I changed the command to this:

AC_CHECK_PROG(has_libtool, libtool, [yes], [no], , .//libtool ./libtool)

But looking at the configure script, I noticed that the last argument to AC_CHECK_PROG must only be a single file, not multiple. The only solution that I have come up with so far is call it two times like below.

AC_CHECK_PROG(has_libtool, libtool, [yes], [no], , ./libtool)
AC_CHECK_PROG(has_libtool, libtool, [yes], [no], , .//libtool)

I wanted to consult you on the best way forward.

I also wanted to see if it would be possible to allow the last argument to AC_CHECK_PROG to accept multiple file names, not just one? In this way, a form like my first try would work and it would also be much more efficient.

Thank you very much,
Mohammad



P.S1. Libtool is necessary for one of Gnuastro's programs to work: BuildProgram (see link below). After installation, it uses the user's system's libtool to fix complications with include file and library directories. The description is given here:

https://www.gnu.org/software/gnuastro/manual/html_node/BuildProgram.html



P.S2. Gnuastro does come with its own implementation of libtool (built from `libtool.m4). But it is strange that the configure script has found libtool in the current directory. Because at least on my system, the configure script builds `libtool' from `libtool.m4' after all the checks not before it. But any way, this is besides the main point here.



reply via email to

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