Permalink
Browse files

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.
  • Loading branch information...
zeldin committed Dec 3, 2018
1 parent eea066b commit e3da5e043c873c241d142b688a646b268371a852
Showing with 3 additions and 3 deletions.
  1. +3 −3 configure
@@ -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"

8 comments on commit e3da5e0

@Vhati

This comment has been minimized.

Contributor

Vhati replied Dec 5, 2018

Something about this commit prevents my SCI32 savegames from being displayed in the restore menu.
Affects both my MinGW environment and the daily build.

I stepped backward with "git reset --hard HEAD~1" and this was when the problem started.

# This commit.
git checkout e3da5e0
./configure --disable-all-engines --enable-engine=sci,sci32
make clean && make && strip scummvm.exe
# menu can't see my savegames

# The commit before this: Duckman demo support.
git checkout eea066b
./configure --disable-all-engines --enable-engine=sci,sci32
make clean && make && strip scummvm.exe
# menu does see my savegames
 

EDIT: "git checkout" is what switches to a specific commit in the past.
Might not be the best way. I haven't done that before.

@zeldin

This comment has been minimized.

Member

zeldin replied Dec 5, 2018

@Vhati

This comment has been minimized.

Contributor

Vhati replied Dec 5, 2018

What happens next?

@zeldin

This comment has been minimized.

Member

zeldin replied Dec 5, 2018

@Vhati

This comment has been minimized.

Contributor

Vhati replied Dec 5, 2018

@zeldin:

I have pushed a tentative fix. Hopefully it will solve the issue,

As of 13a3d52 the restore menu is still empty for me.

someone MinGW savvy will need to take a look.

Has this been announced somewhere they'd notice: ticket, IRC, etc? I didn't see a PR.

@Kirben

This comment has been minimized.

Member

Kirben replied Dec 6, 2018

It would be best to revert these changes, and look at an alternative method.
The failures are due to including SDL in test programs that make no use of SDL, which always results in problems on the Windows side.

@zeldin

This comment has been minimized.

Member

zeldin replied Dec 6, 2018

@zeldin

This comment has been minimized.

Member

zeldin replied Dec 6, 2018

Please sign in to comment.