1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

configure: detect how to transform windows pathes

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".
This commit is contained in:
Steve Lhomme 2020-05-12 09:18:06 +02:00
parent 385db2b181
commit 6151644c32

View File

@ -1406,6 +1406,30 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
fi
WIN32_PATH_CMD=
AS_IF([test "${SYS}" = "mingw32"], [
AC_MSG_CHECKING([how to transform windows pathes])
win32_path_cmd=no
for win_path in "cygpath" "wslpath" "wine winepath"
do
ac_try="$win_path -u c: >/dev/null"
(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"],[
WIN32_PATH_CMD=${win32_path_cmd}
AC_MSG_RESULT([using '${win32_path_cmd}'])
],[
AC_MSG_RESULT([not possible])
])
])
AC_SUBST([WIN32_PATH_CMD])
dnl
dnl Check the CPU
dnl