Merge #891: build: Add workaround for automake 1.13 and older

f329bba244 build: Add workaround for automake 1.13 and older (Tim Ruffing)

Pull request description:

  Fixes #890.

ACKs for top commit:
  michaelfolkson:
    ACK f329bba244

Tree-SHA512: 1ae3d1587abb402c2d3bb28d3a48aeff056f061e755d65d482204bb502b8427aad376c7319b4a694a5bf79c193acd3c88cb65928f0bc0e5c7587222e1315b6d0
This commit is contained in:
Tim Ruffing 2021-03-02 15:25:00 +01:00
commit ebdba03cb5
No known key found for this signature in database
GPG Key ID: 8C461CCD293F6011
1 changed files with 8 additions and 0 deletions

View File

@ -23,7 +23,15 @@ AC_PATH_TOOL(AR, ar)
AC_PATH_TOOL(RANLIB, ranlib) AC_PATH_TOOL(RANLIB, ranlib)
AC_PATH_TOOL(STRIP, strip) AC_PATH_TOOL(STRIP, strip)
# Save definition of AC_PROG_CC because AM_PROG_CC_C_O in automake<=1.13 will
# redefine AC_PROG_CC to exit with an error, which avoids the user calling it
# accidently and screwing up the effect of AM_PROG_CC_C_O. However, we'll need
# AC_PROG_CC later on in AX_PROG_CC_FOR_BUILD, where its usage is fine, and
# we'll carefully make sure not to call AC_PROG_CC anywhere else.
m4_copy([AC_PROG_CC], [saved_AC_PROG_CC])
AM_PROG_CC_C_O AM_PROG_CC_C_O
# Restore AC_PROG_CC
m4_rename_force([saved_AC_PROG_CC], [AC_PROG_CC])
AC_PROG_CC_C89 AC_PROG_CC_C89
if test x"$ac_cv_prog_cc_c89" = x"no"; then if test x"$ac_cv_prog_cc_c89" = x"no"; then