configure: run AX_PROG_CC_FOR_BUILD before AM_PROG_CC_C_O.

It was working fine for me, but someone had the error:
error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
/usr/share/aclocal/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded
from...
I can indeed see that AX_PROG_CC_FOR_BUILD code runs AC_PROG_CC again.
So let's make sure this is run before AM_PROG_CC_C_O.
Thanks to Francesco Riosa for reporting the bug.
This commit is contained in:
Jehan 2016-06-13 01:47:19 +02:00
parent 8159aa04a9
commit 3618df0999
1 changed files with 1 additions and 2 deletions

View File

@ -220,6 +220,7 @@ AS_IF([test "x$0" != "x./configure"], [
# Determine a C compiler to use
AC_PROG_CC
AX_PROG_CC_FOR_BUILD
AM_PROG_CC_C_O
# Determine a C++ compiler to use
@ -2075,8 +2076,6 @@ if test "x$enable_vector_icons" = "xyes"; then
fi
if test "x$enable_vector_icons" = "xyes"; then
AX_PROG_CC_FOR_BUILD
# We must not use $PKG_CONFIG nor PKG_CHECK_* macros because we need
# to make sure we use the native pkg-config (in case we cross-compile).
if pkg-config --atleast-version=glib_required_version glib-2.0 &&