Skip to content

Commit 6ba0dc8

Browse files
authored
fix: autotools aclocal search dir (#1787)
autools are using system or local builds depending on the version of system tools. This ensures: - `/usr/local/share/aclocal` is searched when using system automake. - system aclocal dir is searched when using local automake.
1 parent d5b5dd5 commit 6ba0dc8

File tree

9 files changed

+43
-0
lines changed

9 files changed

+43
-0
lines changed

docker/build_scripts/install-automake.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ if automake --version > /dev/null 2>&1; then
2323
INSTALLED=$( (automake --version | head -1 || test $? -eq 141) | awk '{ print $NF }')
2424
SMALLEST=$(echo -e "${INSTALLED}\n${AUTOMAKE_VERSION}" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | head -1 || test $? -eq 141)
2525
if [ "${SMALLEST}" == "${AUTOMAKE_VERSION}" ]; then
26+
# add local aclocal files to system automake
27+
echo "/usr/local/share/aclocal" >> "$(aclocal --print-ac-dir)/dirlist"
2628
echo "skipping installation of automake ${AUTOMAKE_VERSION}, system provides automake ${INSTALLED}"
2729
exit 0
2830
fi
2931
fi
3032

33+
SYSTEM_ACLOCAL="$(which aclocal)"
34+
3135
fetch_source "${AUTOMAKE_ROOT}.tar.gz" "${AUTOMAKE_DOWNLOAD_URL}"
3236
check_sha256sum "${AUTOMAKE_ROOT}.tar.gz" "${AUTOMAKE_HASH}"
3337
tar -zxf "${AUTOMAKE_ROOT}.tar.gz"
@@ -45,5 +49,8 @@ cp -rlf /manylinux-rootfs/* /
4549
# Remove temporary rootfs
4650
rm -rf /manylinux-rootfs
4751

52+
# keep system aclocal files with local automake
53+
"${SYSTEM_ACLOCAL}" --print-ac-dir >> "/usr/local/share/aclocal/dirlist"
54+
4855
hash -r
4956
automake --version

tests/autotools/AUTHORS

Whitespace-only changes.

tests/autotools/COPYING

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 manylinux
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

tests/autotools/ChangeLog

Whitespace-only changes.

tests/autotools/Makefile.am

Whitespace-only changes.

tests/autotools/NEWS

Whitespace-only changes.

tests/autotools/README

Whitespace-only changes.

tests/autotools/configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
AC_PREREQ([2.72])
2+
AC_INIT(test_autotools,1.0.0)
3+
AM_INIT_AUTOMAKE([1.17])
4+
AC_PROG_LIBTOOL
5+
LT_PREREQ([2.5.3])
6+
LT_INIT()
7+
AC_CONFIG_FILES([Makefile])
8+
AC_OUTPUT

tests/run_tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,12 @@ int main(int argc, char* argv[])
186186
EOF
187187
/tmp/repro
188188

189+
# check autotools
190+
pushd "$(mktemp -d)"
191+
cp -rf "${MY_DIR}/autotools"/* ./
192+
autoreconf -ifv
193+
./configure
194+
popd
195+
189196
# final report
190197
echo "run_tests successful!"

0 commit comments

Comments
 (0)