summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b5c9f4e..9f8e7b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,6 +174,26 @@ AC_LINK_IFELSE([
])
fi
+if test x$enable_directwrite != xno; then
+OLDLIBS="$LIBS"
+# Linking to DirectWrite directly only works from Windows
+LIBS="$LIBS -ldwrite"
+AC_MSG_CHECKING([for DIRECTWRITE])
+AC_LINK_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <dwrite.h>]],
+ [[DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), NULL);]],)
+ ], [
+ AC_DEFINE(CONFIG_DIRECTWRITE, 1, [found DirectWrite])
+ directwrite=true
+ AC_MSG_RESULT([yes])
+ ], [
+ LIBS="$OLDLIBS"
+ directwrite=false
+ AC_MSG_RESULT([no])
+ ])
+fi
+
if test x$enable_harfbuzz != xno; then
PKG_CHECK_MODULES([HARFBUZZ], harfbuzz >= 0.9.5, [
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"