build: Add VKD3D_CHECK_FUNC() macro.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2018-01-11 17:03:45 +01:00
committed by Alexandre Julliard
parent ee8eb9b4e4
commit 54dd321729
3 changed files with 13 additions and 43 deletions

9
m4/check-functions.m4 Normal file
View File

@@ -0,0 +1,9 @@
dnl VKD3D_CHECK_FUNC
AC_DEFUN([VKD3D_CHECK_FUNC],
[AC_MSG_CHECKING([for $2])
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return [$3]; }])],
[AC_MSG_RESULT([yes])
AC_DEFINE([$1],
[1],
[Define to 1 if you have $2.])],
[AC_MSG_RESULT([no])])])