2016-09-28 04:07:51 -07:00
|
|
|
dnl VKD3D_CHECK_MINGW32_PROG(cc-variable, crosstarget-variable, [value-if-not-found], [path])
|
2016-09-21 03:57:24 -07:00
|
|
|
AC_DEFUN([VKD3D_CHECK_MINGW32_PROG],
|
2016-09-28 04:07:51 -07:00
|
|
|
[AC_SUBST([$2], [$3])
|
2016-09-28 02:29:11 -07:00
|
|
|
vkd3d_mingw_list="m4_foreach([vkd3d_mingw_prefix], [w64-mingw32, pc-mingw32, mingw32, mingw32msvc],
|
2016-09-28 04:07:51 -07:00
|
|
|
m4_foreach([vkd3d_cpu], [i686, i586, i486, i386], [vkd3d_cpu-vkd3d_mingw_prefix-gcc ])) mingw32-gcc"
|
2016-09-28 02:29:11 -07:00
|
|
|
AC_CHECK_PROGS([$1], [$vkd3d_mingw_list], [$3], [$4])
|
2016-09-28 04:07:51 -07:00
|
|
|
AS_VAR_PUSHDEF([vkd3d_cross_cc], [$1])dnl
|
|
|
|
AS_VAR_IF([vkd3d_cross_cc], [$3],
|
|
|
|
[],
|
|
|
|
[vkd3d_cc_saved="$CC"
|
|
|
|
AS_VAR_COPY([CC], [vkd3d_cross_cc])
|
|
|
|
AC_MSG_CHECKING([whether $CC works])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
$2=`expr "$CC" : '\(.*\)-gcc'`],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
CC="$vkd3d_cc_saved"])
|
|
|
|
AS_VAR_POPDEF([vkd3d_cross_cc])dnl
|
2016-09-21 03:57:24 -07:00
|
|
|
])
|
|
|
|
|
2016-09-28 04:07:51 -07:00
|
|
|
dnl VKD3D_CHECK_MINGW64_PROG(cc-variable, crosstarget-variable, [value-if-not-found], [path])
|
2016-09-21 03:57:24 -07:00
|
|
|
AC_DEFUN([VKD3D_CHECK_MINGW64_PROG],
|
2016-09-28 04:07:51 -07:00
|
|
|
[AC_SUBST([$2], [$3])
|
2016-09-28 02:29:11 -07:00
|
|
|
vkd3d_mingw_list="m4_foreach([vkd3d_mingw_prefix], [pc-mingw32, w64-mingw32, mingw32msvc],
|
|
|
|
m4_foreach([vkd3d_cpu], [x86_64, amd64], [vkd3d_cpu-vkd3d_mingw_prefix-gcc ]))"
|
|
|
|
AC_CHECK_PROGS([$1], [$vkd3d_mingw_list], [$3], [$4])
|
2016-09-28 04:07:51 -07:00
|
|
|
AS_VAR_PUSHDEF([vkd3d_cross_cc], [$1])dnl
|
|
|
|
AS_VAR_IF([vkd3d_cross_cc], [$3],
|
|
|
|
[],
|
|
|
|
[vkd3d_cc_saved="$CC"
|
|
|
|
AS_VAR_COPY([CC], [vkd3d_cross_cc])
|
|
|
|
AC_MSG_CHECKING([whether $CC works])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
$2=`expr "$CC" : '\(.*\)-gcc'`],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
CC="$vkd3d_cc_saved"])
|
|
|
|
AS_VAR_POPDEF([vkd3d_cross_cc])dnl
|
2016-09-21 03:57:24 -07:00
|
|
|
])
|