2016-09-21 00:05:15 -07:00
|
|
|
AC_PREREQ([2.69])
|
|
|
|
AC_INIT([vkd3d], 0.0.0)
|
|
|
|
|
|
|
|
AC_CONFIG_AUX_DIR([bin])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_LIBOBJ_DIR([portable])
|
|
|
|
AC_CONFIG_HEADERS(include/config.h)
|
|
|
|
|
2016-09-28 05:01:26 -07:00
|
|
|
AC_ARG_VAR(WIDL, [widl IDL compiler])
|
|
|
|
|
2016-09-21 00:05:15 -07:00
|
|
|
dnl Check for progs
|
|
|
|
AM_PROG_AR
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_PROG_SED
|
|
|
|
AC_PROG_MKDIR_P
|
2016-09-21 03:57:24 -07:00
|
|
|
AC_CHECK_PROG(WIDL, [widl], [widl], [no])
|
|
|
|
|
2016-09-28 02:45:46 -07:00
|
|
|
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_ERROR([widl is required to build header files.])])
|
2016-09-21 00:05:15 -07:00
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign silent-rules subdir-objects -Wall -Werror])
|
|
|
|
AM_MAINTAINER_MODE([enable])
|
2016-09-27 03:07:54 -07:00
|
|
|
AM_SILENT_RULES([yes])
|
2016-09-21 00:05:15 -07:00
|
|
|
|
|
|
|
LT_PREREQ([2.4.2])
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
dnl Check compiler specific flags
|
2016-09-21 03:57:24 -07:00
|
|
|
AC_SUBST(VKD3D_CFLAGS, "")
|
2016-09-28 02:45:46 -07:00
|
|
|
AS_IF([test "x${GCC}" = "xyes"],
|
|
|
|
[VKD3D_CFLAGS="-Wall -pipe"
|
|
|
|
VKD3D_CHECK_CFLAGS([-std=c99])
|
|
|
|
VKD3D_CHECK_CFLAGS([-Wdeclaration-after-statement])
|
|
|
|
VKD3D_CHECK_CFLAGS([-Wmissing-prototypes])
|
|
|
|
VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter])
|
|
|
|
VKD3D_CHECK_CFLAGS([-Wvla])])
|
2016-09-21 00:05:15 -07:00
|
|
|
|
2016-09-22 07:56:58 -07:00
|
|
|
dnl Check for headers
|
|
|
|
AC_CHECK_HEADERS([vulkan/vulkan.h], [], [AC_MSG_ERROR([vulkan.h not found.])])
|
|
|
|
|
|
|
|
dnl Check for libraries
|
|
|
|
AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr], [], [AC_MSG_ERROR([libvulkan not found.])])
|
|
|
|
|
2016-09-28 03:20:11 -07:00
|
|
|
dnl Check for functions
|
|
|
|
VKD3D_CHECK_SYNC_ADD_AND_FETCH_FUNC
|
|
|
|
VKD3D_CHECK_SYNC_SUB_AND_FETCH_FUNC
|
2016-09-21 03:57:24 -07:00
|
|
|
|
2016-09-21 03:57:24 -07:00
|
|
|
dnl Check for cross compilers
|
2016-09-28 04:07:51 -07:00
|
|
|
VKD3D_CHECK_MINGW32_PROG(CROSSCC32, CROSSTARGET32, [false])
|
|
|
|
VKD3D_CHECK_MINGW64_PROG(CROSSCC64, CROSSTARGET64, [false])
|
2016-09-21 03:57:24 -07:00
|
|
|
|
|
|
|
AM_CONDITIONAL([HAS_CROSSTARGET32], [test "x$CROSSTARGET32" != xfalse])
|
|
|
|
AM_CONDITIONAL([HAS_CROSSTARGET64], [test "x$CROSSTARGET64" != xfalse])
|
|
|
|
|
2016-09-21 00:05:15 -07:00
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_OUTPUT
|
2016-09-21 03:57:24 -07:00
|
|
|
|
|
|
|
dnl Output configuration info
|
|
|
|
echo ""
|
|
|
|
WIDL_VERSION=`$WIDL -V`
|
2016-09-28 02:45:46 -07:00
|
|
|
AS_IF([test $? -eq 0], [WIDL_VERSION=`echo $WIDL_VERSION | cut -d' ' -f5`])
|
2016-09-21 03:57:24 -07:00
|
|
|
echo " widl version: $WIDL_VERSION"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo " Run '${MAKE-make}' to build vkD3D."
|
|
|
|
echo ""
|