[vlc-devel] [PATCH] configure: use CC_FOR_BUILD for the build system compiler

Steve Lhomme robux4 at ycbcr.xyz
Wed Jun 6 11:06:02 CEST 2018


This is a variable commonly used with AX_PROG_CC_FOR_BUILD.
If our legacy BUILDCC is set, we use that.
If nothing is set we still look for a c99 compiler.

Internally we still compile with BUILDCC

--
sans CFLAGS_FOR_BUILD which can't be handled with the current system
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0b2d8903ce..860a3abe55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,11 @@ AC_PROG_YACC
 
 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
 AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
-AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
-AC_CHECK_PROGS(BUILDCC, [c11-gcc c11 c99-gcc c99], [false])
+AC_ARG_VAR([CC_FOR_BUILD], [Build system C11 or C99 compiler command])
+AS_IF([test -n "$BUILDCC"],[CC_FOR_BUILD=${BUILDCC}])
+AC_CHECK_PROGS(BUILDCC, [${CC_FOR_BUILD} c11-gcc c11 c99-gcc c99], [false])
 AS_IF([test "$BUILDCC" = "false"], [
-  AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
+  AC_MSG_ERROR([Cannot find native C99 compiler: please define CC_FOR_BUILD.])
 ])
 
 dnl Check for compiler properties
-- 
2.17.0



More information about the vlc-devel mailing list