From e480f8892def9a78c9b973f41b4071b02c319aac Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 1 Oct 2020 23:55:07 +0000 Subject: [PATCH] Fix automatically running tests FossilOrigin-Name: 076176fd9898dd36494693d893bf2ba76e27665cadf1c058a208b7cb61e22bb9 --- configure.ac | 29 +++++++++++++++++++++++++++++ extra.mk.in | 1 + 2 files changed, 30 insertions(+) diff --git a/configure.ac b/configure.ac index 3d7938e..f13bd71 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,35 @@ AS_IF([test x"$GOBJC" = x"yes"], [ ]) ]) +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) diff --git a/extra.mk.in b/extra.mk.in index 6b525c1..8f83b9d 100644 --- a/extra.mk.in +++ b/extra.mk.in @@ -12,3 +12,4 @@ LIBOBJSQLITE3_DEP = @LIBOBJSQLITE3_DEP@ OBJFW_CONFIG = @OBJFW_CONFIG@ OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@ OBJFW_LIBS = @OBJFW_LIBS@ +RUN_TESTS = @RUN_TESTS@