automake
[Top][All Lists]
Advanced

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

Re: configure: error: cannot find install-sh, install.sh, or shtool in "


From: Karl Berry
Subject: Re: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
Date: Thu, 30 Jul 2020 15:05:24 -0600

Hi Tom,

    Using this:

As shown in the Texinfo example, I think the order of the init and
config macros is important. Admittedly this is not clearly documented.

AC_INIT([...
AC_CONFIG_AUX_DIR([...
AM_INIT_AUTOMAKE([...
AC_CONFIG_HEADERS([...
AC_CONFIG_SRCDIR([...

Some variations are possible, but not arbitrary rearrangements. The
above order should work.  I did not see a case where you were trying
that.

    Is the syntax written like this for compatibility reasons with other
    shells?  

Yes. Automake (Autoconf too, and plenty more) has to work with any
/bin/sh. It long predates POSIX shells and cannot assume POSIX, let
alone bash. (For one thing, Solaris /bin/sh is still non-POSIX, as far
as I know.) Almost all shell code in other GNU packages tries to be
maximally portable, too.

    Code snippet:
    # FIXME: To remove some day.

Well, I didn't write that comment and don't agree with it :).

    "x$host_alias" != x;
    I know adding 'x' or another character prevents failures when a variable 
    is empty but that's been deprecated for sometime.

I don't agree with "deprecated".

    [] is deprecated in favor of [[]]

I don't agree with "deprecated". Also, single and double brackets are
two quite different things. Double brackets must not be used by
shell code that needs to be portable; they're a bash/etc. extension.

    `` is deprecated in favor of $()

I don't agree with "deprecated". Left quotes must continue to work
forever and there is every reason to use them, in shell code that must
be maximally portable.

    [] also return false positives allowing conditions to execute in cases 
    where they shouldn't.  

Have to see an example. I am fairly certain that [...] does not have
actual bugs in this regard, barring some truly obscure systems. It is
certainly possible to get unexpected results when not used properly.
See "test" in the node
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html#Limitations-of-Builtins

    Not sure about test though.

test and [ are synonyms. Maximally portable code should use test,
however, because of old os's which could misparse [ ... ] when the ...
contained another ].

See the (long) chapter in the Autoconf manual about shell portability
for the basis of most of the shell usage in autotools. (The previous url
is one )
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Portable-Shell.html#Portable-Shell

Best,
Karl



reply via email to

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