]> granicus.if.org Git - libass/commitdiff
configure: proper configure switches for DirectWrite and CoreText
authorwm4 <wm4@nowhere>
Fri, 28 Aug 2015 13:39:32 +0000 (15:39 +0200)
committerwm4 <wm4@nowhere>
Fri, 28 Aug 2015 13:42:32 +0000 (15:42 +0200)
Also, remove the ass_coretext.c conditional compilation hack, and fix
Makefile.am instead.

configure.ac
libass/Makefile.am
libass/ass_coretext.c

index b3538b9bdf338cd185f1095921269da854835a8f..ba0f5e019ac520b1aa29c52b06a678c592155594 100644 (file)
@@ -35,6 +35,10 @@ AC_ARG_ENABLE([enca], AS_HELP_STRING([--disable-enca],
     [disable enca (charset autodetect) support @<:@default=check@:>@]))
 AC_ARG_ENABLE([fontconfig], AS_HELP_STRING([--disable-fontconfig],
     [disable fontconfig support @<:@default=enabled@:>@]))
+AC_ARG_ENABLE([directwrite], AS_HELP_STRING([--disable-directwrite],
+    [disable DirectWrite support (win32 only) @<:@default=check@:>@]))
+AC_ARG_ENABLE([coretext], AS_HELP_STRING([--disable-coretext],
+    [disable CoreText support (OSX only) @<:@default=check@:>@]))
 AC_ARG_ENABLE([harfbuzz], AS_HELP_STRING([--disable-harfbuzz],
     [disable HarfBuzz support @<:@default=check@:>@]))
 AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm],
@@ -165,6 +169,7 @@ AC_LINK_IFELSE([
     AC_MSG_RESULT([no])
   ])
 fi
+AM_CONDITIONAL([CORETEXT], [test x$coretext = xtrue])
 
 
 
index b6965c98be8bf6987322a2e13676f3d2702ac26d..2cf63545dc3c34ba5a0126da3bbef4d25e2a1dc0 100644 (file)
@@ -20,6 +20,7 @@ SRC_INTEL_RASTERIZER = x86/rasterizer.asm
 SRC_RASTERIZER = ass_rasterizer.h ass_rasterizer.c ass_rasterizer_c.c
 
 SRC_DIRECTWRITE = ass_directwrite.c ass_directwrite.h dwrite_c.h
+SRC_CORETEXT = ass_coretext.c ass_coretext.h
 
 lib_LTLIBRARIES = libass.la
 libass_la_SOURCES = ass.c ass_cache.c ass_font.c ass_fontselect.c ass_render.c \
@@ -28,8 +29,7 @@ libass_la_SOURCES = ass.c ass_cache.c ass_font.c ass_fontselect.c ass_render.c \
                     ass_library.h ass_types.h ass_utils.h ass_drawing.c \
                     ass_drawing.h ass_cache_template.h ass_render.h \
                     ass_parse.c ass_parse.h ass_render_api.c ass_shaper.c \
-                    ass_shaper.h ass_strtod.c ass_fontconfig.c ass_fontconfig.h \
-                    ass_coretext.c ass_coretext.h
+                    ass_shaper.h ass_strtod.c ass_fontconfig.c ass_fontconfig.h
 
 libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE)
 libass_la_LDFLAGS += -export-symbols $(srcdir)/libass.sym
@@ -38,6 +38,10 @@ if DIRECTWRITE
 libass_la_SOURCES += $(SRC_DIRECTWRITE)
 endif
 
+if CORETEXT
+libass_la_SOURCES += $(SRC_CORETEXT)
+endif
+
 if RASTERIZER
 libass_la_SOURCES += $(SRC_RASTERIZER)
 endif
index 66277a5bec2fea756508b88938766b4ae2aac58b..bf8a20ae9f3a43c54310c2bec7c0dc564e1aff5c 100644 (file)
@@ -18,8 +18,6 @@
 
 #include "config.h"
 
-#ifdef CONFIG_CORETEXT
-
 #include <CoreFoundation/CoreFoundation.h>
 #include <CoreText/CoreText.h>
 
@@ -291,5 +289,3 @@ ass_coretext_add_provider(ASS_Library *lib, ASS_FontSelector *selector,
 
     return provider;
 }
-
-#endif