Skip to content

Commit f329bba

Browse files
build: Add workaround for automake 1.13 and older
Fixes #890.
1 parent 24d1656 commit f329bba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

configure.ac

+8
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ AC_PATH_TOOL(AR, ar)
2323
AC_PATH_TOOL(RANLIB, ranlib)
2424
AC_PATH_TOOL(STRIP, strip)
2525

26+
# Save definition of AC_PROG_CC because AM_PROG_CC_C_O in automake<=1.13 will
27+
# redefine AC_PROG_CC to exit with an error, which avoids the user calling it
28+
# accidently and screwing up the effect of AM_PROG_CC_C_O. However, we'll need
29+
# AC_PROG_CC later on in AX_PROG_CC_FOR_BUILD, where its usage is fine, and
30+
# we'll carefully make sure not to call AC_PROG_CC anywhere else.
31+
m4_copy([AC_PROG_CC], [saved_AC_PROG_CC])
2632
AM_PROG_CC_C_O
33+
# Restore AC_PROG_CC
34+
m4_rename_force([saved_AC_PROG_CC], [AC_PROG_CC])
2735

2836
AC_PROG_CC_C89
2937
if test x"$ac_cv_prog_cc_c89" = x"no"; then

0 commit comments

Comments
 (0)