BUILD: Add $DEFINES and $INCLUDES in cc_check()

When actually compiling things Makefile.common adds these variables to
the command line, so they should be there when testing if something
can be compiled as well, otherwise we could get both false negatives
and positives.

This fixes detection of zlib and MAD on Dreamcast, when installed in
$RONINDIR.
This commit is contained in:
Marcus Comstedt 2018-12-03 20:34:58 +01:00
parent eea066b89b
commit e3da5e043c

6
configure vendored
View file

@ -283,12 +283,12 @@ cc_check_no_clean() {
echo >> "$TMPLOG"
cat "$TMPC" >> "$TMPLOG"
echo >> "$TMPLOG"
echo "$CXX $LDFLAGS $CXXFLAGS $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG"
echo "$CXX $LDFLAGS $CXXFLAGS $DEFINES $INCLUDES $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG"
rm -f "$TMPO$HOSTEXEEXT"
if test "-c" = "$*" ; then
( $CXX $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
( $CXX $CXXFLAGS $DEFINES $INCLUDES "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
else
( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
( $CXX $LDFLAGS $CXXFLAGS $DEFINES $INCLUDES "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
fi
TMPR="$?"
echo "return code: $TMPR" >> "$TMPLOG"