diff --git a/Makefile.am b/Makefile.am index 774dbe88..916b34b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,7 @@ tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ noinst_PROGRAMS = $(vkd3d_demos) EXTRA_DIST += $(vkd3d_demos_headers) EXTRA_demos_triangle_DEPENDENCIES = $(spv_triangle_shaders) +demos_triangle_CFLAGS = @XCB_CFLAGS@ demos_triangle_LDADD = libvkd3d.la $(LDADD) @XCB_LIBS@ VKD3D_V_WIDL = $(vkd3d_v_widl_@AM_V@) diff --git a/configure.ac b/configure.ac index 91067baa..5ee97d10 100644 --- a/configure.ac +++ b/configure.ac @@ -49,18 +49,17 @@ AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h not found.])]) dnl Check for libraries +m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config autoconf macros not found.])]) + AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads]) AC_CHECK_LIB([pthread], [pthread_create], [AC_SUBST(PTHREAD_LIBS, "-lpthread")], [AC_MSG_ERROR(libpthread not found.)]) -AC_ARG_VAR([XCB_LIBS], [linker flags for xcb]) -AC_CHECK_LIB([xcb], [xcb_connect], - [AC_SUBST(XCB_LIBS, "-lxcb")], - [AC_MSG_ERROR([libxcb not found.])]) - AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr], [], [AC_MSG_ERROR([libvulkan not found.])]) +PKG_CHECK_MODULES([XCB], [xcb], [], [AC_MSG_ERROR[libxcb not found.]]) + dnl Check for functions VKD3D_CHECK_SYNC_ADD_AND_FETCH_FUNC VKD3D_CHECK_SYNC_SUB_AND_FETCH_FUNC