[vlc-devel] [PATCH v2 09/10] configure: decide if we can run built executable during configure

Steve Lhomme robux4 at ycbcr.xyz
Tue May 12 17:08:12 CEST 2020


When cross-compiling for Windows there's a good chance we can run the .exe
that we built. Either because it's built on Windows or wine is available.
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index f2b8a2e6f82e..8dbeed5999b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,7 @@ case "${host_cpu}" in
 esac
 
 RUN_HOST_CMD=
+AS_IF([test "${build}" = "${host}"],[HAVE_RUN_HOST="1"],[HAVE_RUN_HOST="0"])
 case "${host_os}" in
   "")
     SYS=unknown
@@ -666,6 +667,7 @@ AS_IF([test "${SYS}" = "mingw32"], [
     done
     AS_IF([test "x${win32_run_cmd}" != "xno"],[
       RUN_HOST_CMD=${win32_run_cmd}
+      HAVE_RUN_HOST="1"
       AC_MSG_RESULT([using '${win32_run_cmd} app.exe'])
     ],[
       AC_MSG_RESULT([not found])
@@ -1357,6 +1359,7 @@ esac
 AC_SUBST([RUN_HOST_CMD])
 AC_SUBST([PATH_TO_HOST_CMD])
 AC_SUBST([HOST_TO_BUILD_CMD])
+AM_CONDITIONAL([HAVE_RUN_HOST], [test "$HAVE_RUN_HOST" = "1"])
 
 dnl Check for backtrace() support
 AC_CHECK_HEADERS([execinfo.h])
-- 
2.26.2



More information about the vlc-devel mailing list