summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-11 20:33:15 +0200
committerwm4 <wm4@nowhere>2015-07-11 23:09:59 +0200
commit1c55ca966f356030a863479459055c48e98ed1e5 (patch)
tree6130d9d0aeb16bbfb62ff824c900dfaffc227a42 /configure.ac
parentab9b9cf254a7871f4f8cdee386971f0ba5c58e13 (diff)
downloadlibass-1c55ca966f356030a863479459055c48e98ed1e5.tar.bz2
libass-1c55ca966f356030a863479459055c48e98ed1e5.tar.xz
directwrite: convert to C
Unfortunately, nobody ever tested the MinGW dwrite.h header in C. There are multiple glaring mistakes, and the header doesn't even compile by itself. The main issues are overloaded functions (which doesn't work in C), and broken COBJMACROS defines. dwrite.diff contains changes to dwrite.h which make libass work. Warning: the patch lacks a required change to the DrawInlineObject method of IDWriteTextRenderer (missing THIS_). Additionally, these definitions would ideally be provided by dwrite.h: DEFINE_GUID(IID_IDWriteFactory, 0xb859ee5a,0xd838,0x4b5b,0xa2,0xe8,0x1a,0xdc,0x7d,0x93,0xdb,0x48); DEFINE_GUID(IID_IDWritePixelSnapping, 0xeaf3a2da,0xecf4,0x4d24,0xb6,0x44,0xb3,0x4f,0x68,0x42,0x02,0x4b); DEFINE_GUID(IID_IDWriteTextRenderer, 0xef8a8135,0x5cc6,0x45fe,0x88,0x25,0xc5,0xa0,0x72,0x4e,0xb8,0x19); Also, in order to make libass compile out of the box with current MinGW/msys installations, a very stripped down in-tree copy of dwrite.h is provided.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 2 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 61a8533..4c7e37d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,6 @@ AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
-AC_PROG_CXX
AC_PROG_CPP
AM_PROG_CC_C_O
AM_PROG_AS
@@ -178,14 +177,12 @@ fi
if test x$enable_directwrite != xno; then
-AC_LANG_PUSH([C++])
-CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
# Linking to DirectWrite directly only works from Windows
AC_MSG_CHECKING([for DIRECTWRITE])
AC_LINK_IFELSE([
AC_LANG_PROGRAM(
- [[#include <dwrite.h>]],
- [[DWRITE_FACTORY_TYPE_SHARED;]],)
+ [[#include <windows.h>]],
+ [[;]],)
], [
AC_DEFINE(CONFIG_DIRECTWRITE, 1, [found DirectWrite])
directwrite=true
@@ -194,7 +191,6 @@ AC_LINK_IFELSE([
directwrite=false
AC_MSG_RESULT([no])
])
-AC_LANG_POP([C++])
fi
AM_CONDITIONAL([DIRECTWRITE], [test x$directwrite = xtrue])