[vlc-devel] [PATCH] configure: use CC_FOR_BUILD for the build system compiler
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jun 6 11:02:01 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
---
configure.ac | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0b2d8903ce..942306427e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,12 @@ 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])
+AC_ARG_VAR([CFLAGS_FOR_BUILD], [Build system compiler CFLAGS])
+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