=============================================================================== Subject: Honour AR/CXX from environment Bug: https://bugs.gentoo.org/720964 From: Gavin Pryke =============================================================================== diff -Naru -x '*.swp' rtaudio-5.1.0.orig/configure.ac rtaudio-5.1.0/configure.ac --- rtaudio-5.1.0.orig/configure.ac 2019-04-18 01:24:28.000000000 +0100 +++ rtaudio-5.1.0/configure.ac 2020-12-22 11:37:19.689983090 +0000 @@ -67,10 +67,11 @@ AS_IF([test "x$CFLAGS" = "x" ], [override_c=yes], [override_c=no]) # Checks for programs. -AC_PROG_CXX(g++ CC c++ cxx) -AM_PROG_AR -AC_PATH_PROG(AR, ar, no) -AS_IF([test "x${AR}" = "xno" ], [ +# inherit from environment first then pick standard command names, +# this is to keep distributions happy that allow overrides for toolchain. +AC_PROG_CXX(["$CXX" g++ c++ cxx]) +AM_PROG_AR(["$AR" ar]) +AS_IF([test "x${AR}" = "x" ], [ AC_MSG_ERROR([Could not find ar - needed to create a library]) ])