autotools.mk: autoreconf: fix missing install-sh
authorPetr Štetiar <ynezz@true.cz>
Tue, 4 Dec 2018 13:47:23 +0000 (14:47 +0100)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 13 Sep 2019 20:01:05 +0000 (16:01 -0400)
commit4d3131e4ec61cd2b0698db2ad9ef673b7fcb6485
tree917990c1184250e33943d6f9293e14119e64a5d5
parent3d14e5e0d82c7cbe0ad0f9c5414a6e9b37e5ce83
autotools.mk: autoreconf: fix missing install-sh

I'm trying to create a package for libgpiod, which uses
AC_CONFIG_AUX_DIR macro, which is probably leading to the following
configure error:

 autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --force
 OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
 OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
 OpenWrt-libtoolize: putting macros in `m4'.
 ...
 configure: error: cannot find install-sh, install.sh, or shtool in autostuff "."/autostuff

>From the build output it's clear, that libtoolize isn't installing
install-sh symlink, because libtoolize would install install-sh only if
it's being run with --install parameter. Corresponding part in
libtoolize:

 if $opt_install; then
   func_config_update config.guess \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
   func_config_update config.sub \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
   func_install_update install-sh \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
 fi
 func_ltmain_update ltmain.sh \
    "$pkgdatadir/config" "$auxdir" pkgconfig_header

Adding --install parameter to libtoolize fixes this build issue:

 autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --install --force
 OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
 OpenWrt-libtoolize: linking file `autostuff/config.guess'
 OpenWrt-libtoolize: linking file `autostuff/config.sub'
 OpenWrt-libtoolize: linking file `autostuff/install-sh'
 OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
 OpenWrt-libtoolize: putting macros in `m4'.

Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 5cf897779eacf63cdbcdebd1af68c109096665c6)
include/autotools.mk