Discussion:
AC_PROG_INSTALL and AC_PROG_MKDIR_P fallbacks
Thomas Jahns
2014-08-07 09:21:37 UTC
Permalink
Hello,

on a friends Mac I noticed a problem with AC_PROG_MKDIR_P which I believe to
also apply to AC_PROG_INSTALL (albeit not on his system): both fall back on
$ac_install_sh which resolves to the relative path $ac_aux_dir/install-sh if
configure was called with a relative path.

This of course does not work when using MKDIR_P from a sub-directory.

I'd like to provide a patch but I'd first like to discuss the ramifications of
changing the definition of ac_install_sh in lib/autoconf/general.m4 or patching
the two above macros in lib/autoconf/programs.m4.

Thomas
Peter Johansson
2014-08-07 23:00:16 UTC
Permalink
Post by Thomas Jahns
Hello,
on a friends Mac I noticed a problem with AC_PROG_MKDIR_P which I believe to
also apply to AC_PROG_INSTALL (albeit not on his system): both fall back on
$ac_install_sh which resolves to the relative path $ac_aux_dir/install-sh if
configure was called with a relative path.
This of course does not work when using MKDIR_P from a sub-directory.
I'd like to provide a patch but I'd first like to discuss the ramifications of
changing the definition of ac_install_sh in lib/autoconf/general.m4 or patching
the two above macros in lib/autoconf/programs.m4.
Hi Thomas,

I think you're welcome to send in a patch given the response I got from
Paul Eggert and Eric Blake when I reported similar thing last year

http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00012.html

Cheers,
--
Peter Johansson
Thomas Jahns
2014-08-08 14:39:33 UTC
Permalink
I think you're welcome to send in a patch given the response I got from Paul
Eggert and Eric Blake when I reported similar thing last year
http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00012.html
Thanks, from that thread I can also see that the fix needs to be in the program
macros because then nothing's lost if the problem with funny path characters
applies, i.e. I'm too timid to modify ac_install_sh but rather mangle the value
of MKDIR_P if and only if it is a relative path.

Please see my attached patch (tested on FreeBSD 10) for AC_PROG_MKDIR_P.

A patch for AC_PROG_INSTALL would have to be identical but I don't have a system
to test. Our AIX machines have a working install program and the same is true
for FreeBSD. If anyone has a suggestion for a platform to test this on
(preferably available for install to a VM) I'd give it a go.

Regards, Thomas
Paul Eggert
2014-08-09 07:51:44 UTC
Permalink
Thanks, but I don't see how that patch addresses the quoting issues
mentioned in:

http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00013.html

http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00014.html
Thomas Jahns
2014-08-11 10:56:09 UTC
Permalink
Hello,
Post by Paul Eggert
http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00013.html
http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00014.html
it doesn't because I wasn't sure how to do that reliably: the stuff automake
does for e.g. autoconf assumes that the contents of the potentially escaped
variable contain a single file path and nothing more. This is unfortunately
untrue for ac_install_sh, which already contains a command with option, spaces
and everything.

The way automake handles this works, because in Makefiles another round of
substition happens. I didn't want to count on that.

Regards, Thomas

Loading...