[Geany-devel] Geany 0.18 (configure.in) has hidden depends on 'which' utility.

Erik Southworth erik.southworth at xxxxx
Fri Sep 11 18:06:38 UTC 2009


On Fri, Sep 11, 2009 at 12:34 AM, Chow Loong Jin <hyperair at gmail.com> wrote:

> On Friday 11,September,2009 09:58 AM, Erik Southworth wrote:
> > [...]
> > I didn't know that the ``which`` utility was considered a compiler. :p
> It isn't, but it searches your $PATH for the full path of a utility, $CXX
> being
> the utility it's searching for. (CXX is a variable containing its name).


To be clear, if we don't have ``which`` it shouldn't error about a c++
compiler. Also, (1) if we must have ``which``, configure should check for it
before trying to use it. (2) If we need to check a prog use AC_CHECK_PROG or
AC_PATH_PROG.

AFAIK,
> which is a coreutils utility, so it should work on all systems capable of
> executing a shell script.


No. It's not part of coreutils.


> In fact, I think there are many system scripts which
> use 'which', so if you don't have 'which', your system shouldn't even work.
>

It's that Geany is built in a clean chroot build environment along with only
the compilers and libs required. ``which`` is not a necessary build
requirement IMHO. We should have a portable, standard, ``configure`` that
can build Geany, not a system utility script that calls any arbitrary prog
and forces users to figure out which ones are needed.


> Chances are that your $CXX is not defined to a correct variable.
>

> >
> > How about just using a shell builtin, ``hash``, ``type -P`` or just
> ``eval
> > $CXX --version`` as a test instead?
> Does $CXX --version really exist with all C++ compilers?
>

Bottom line: we should use portable autoconf macros not random system
utilities.

>
> > ------------------------------------------------------------------
> > configure.in:18 : which $CXX >/dev/null 2>&1
> > configure.in:51 : GIT=`which git 2>/dev/null`
> > configure.in:60 : SVN=`which svn 2>/dev/null`
> > Found 3 matches for "which".
> The last two are required to get the full path of git and svn into $GIT and
> $SVN. The first is harmless for reasons mentioned above.
>
> --
> Kind regards,
> Chow Loong Jin
>
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
>


-- 
-Erik S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20090911/a9a612e6/attachment.html>


More information about the Devel mailing list