--- configure.orig
+++ configure
@@ -370,7 +370,7 @@
     return 0;
 }
 EOF
-if ${CC} ${CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
+if ${BUILD_CC} ${BUILD_CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
        && ./_libversion > _libversion.sh && . ./_libversion.sh
 then
     printf "OK.\n"
