[vlc-devel] [PATCH v2 03/10] configure: detect how to transform windows pathes
Steve Lhomme
robux4 at ycbcr.xyz
Tue May 12 17:08:06 CEST 2020
winepath, wslpath and cygpath have a compatible syntax (at least -w and -u).
They should be used depending on what is available in the build environment
rather than hardcoding "wine winepath".
---
configure.ac | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/configure.ac b/configure.ac
index cf54d22bee63..f2b8a2e6f82e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -646,6 +646,8 @@ dnl Check for broken versions of mingw-runtime compatability library
])
+PATH_TO_HOST_CMD=echo
+HOST_TO_BUILD_CMD=echo
AS_IF([test "${SYS}" = "mingw32"], [
dnl
dnl Detect if we can call windows apps
@@ -668,6 +670,26 @@ AS_IF([test "${SYS}" = "mingw32"], [
],[
AC_MSG_RESULT([not found])
])
+
+ AC_MSG_CHECKING([whether how to handle windows pathes])
+ win32_path_cmd=no
+ for win_path in "wslpath" "wine winepath" "cygpath"
+ do
+ ac_try="$win_path -u c:\\"
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ if test $ac_status = 0; then
+ win32_path_cmd=$win_path
+ break
+ fi
+ done
+ AS_IF([test "x${win32_path_cmd}" != "xno"],[
+ HOST_TO_BUILD_CMD="${win32_path_cmd} -u"
+ PATH_TO_HOST_CMD="${win32_path_cmd} -w"
+ AC_MSG_RESULT([using '${win32_path_cmd}'])
+ ],[
+ AC_MSG_RESULT([not found])
+ ])
])
dnl
@@ -1333,6 +1355,8 @@ case "${host_cpu}" in
esac
AC_SUBST([RUN_HOST_CMD])
+AC_SUBST([PATH_TO_HOST_CMD])
+AC_SUBST([HOST_TO_BUILD_CMD])
dnl Check for backtrace() support
AC_CHECK_HEADERS([execinfo.h])
--
2.26.2
More information about the vlc-devel
mailing list