Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -103,10 +103,39 @@ ], [ AC_MSG_RESULT(yes) OBJCFLAGS="$old_OBJCFLAGS" ]) ]) + +AS_IF([test x"$cross_compiling" = x"yes"], [ + case "$host" in + i?86-*-mingw*) + AC_CHECK_PROG(WINE, wine, wine) + ;; + x86_64-*-mingw*) + AC_CHECK_PROG(WINE, wine64, wine64) + ;; + esac + + AS_IF([test x"$WINE" != x""], [ + AC_SUBST(RUN_TESTS, "run") + AC_SUBST(WRAPPER, "$WINE") + ]) + + AS_IF([test x"$with_wii" = x"yes"], [ + dnl Keep this lowercase, as WIILOAD is a variable used by + dnl wiiload and thus likely already set by the user to something + dnl that is not the path of the wiiload binary. + AC_CHECK_PROG(wiiload, wiiload, wiiload) + + AS_IF([test x"$wiiload" != x""], [ + AC_SUBST(WRAPPER, "$wiiload") + ]) + ]) +], [ + AC_SUBST(RUN_TESTS, "run") +]) dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself. AC_SUBST(CPP) AC_SUBST(CPPFLAGS) Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -10,5 +10,6 @@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ LIBOBJSQLITE3_DEP = @LIBOBJSQLITE3_DEP@ OBJFW_CONFIG = @OBJFW_CONFIG@ OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@ OBJFW_LIBS = @OBJFW_LIBS@ +RUN_TESTS = @RUN_TESTS@