]> granicus.if.org Git - libass/commitdiff
Completely exclude ass_fontconfig.c from build when it is disabled
authorOleg Oshmyan <chortos@inbox.lv>
Thu, 26 Oct 2017 21:41:36 +0000 (00:41 +0300)
committerOleg Oshmyan <chortos@inbox.lv>
Thu, 26 Oct 2017 22:01:24 +0000 (01:01 +0300)
configure.ac
libass/Makefile.am
libass/ass_fontconfig.c

index cc223d9ad01bdc83b5f613df0e047376fc506072..28f4b59efdd7472f8e00c0627677b4a04c5af308 100644 (file)
@@ -156,6 +156,7 @@ PKG_CHECK_MODULES([FONTCONFIG], fontconfig >= 2.10.92, [
        fontconfig=true
     ], [fontconfig=false])
 fi
+AM_CONDITIONAL([FONTCONFIG], [test x$fontconfig = xtrue])
 
 if test x$enable_coretext != xno; then
 OLDLIBS="$LIBS"
index 12991dc1f6c12b4c6b41a41b623ad48869dc0b09..b72ab6753fbda49637fac54ce33481e776e6245a 100644 (file)
@@ -17,6 +17,7 @@ SRC_INTEL = x86/rasterizer.asm x86/blend_bitmaps.asm x86/blur.asm x86/cpuid.asm
             x86/cpuid.h
 SRC_INTEL64 = x86/be_blur.asm
 
+SRC_FONTCONFIG = ass_fontconfig.c ass_fontconfig.h
 SRC_DIRECTWRITE = ass_directwrite.c ass_directwrite.h dwrite_c.h
 SRC_CORETEXT = ass_coretext.c ass_coretext.h
 
@@ -24,7 +25,7 @@ lib_LTLIBRARIES = libass.la
 libass_la_SOURCES = ass.h ass.c ass_types.h ass_utils.h ass_utils.c \
                     ass_compat.h ass_string.h ass_string.c ass_strtod.c \
                     ass_library.h ass_library.c ass_cache.h ass_cache.c ass_cache_template.h \
-                    ass_font.h ass_font.c ass_fontselect.h ass_fontselect.c ass_fontconfig.h ass_fontconfig.c \
+                    ass_font.h ass_font.c ass_fontselect.h ass_fontselect.c \
                     ass_render.h ass_render.c ass_render_api.c \
                     ass_parse.h ass_parse.c ass_shaper.h ass_shaper.c \
                     ass_outline.h ass_outline.c ass_drawing.h ass_drawing.c \
@@ -34,6 +35,10 @@ libass_la_SOURCES = ass.h ass.c ass_types.h ass_utils.h ass_utils.c \
 libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE)
 libass_la_LDFLAGS += -export-symbols $(srcdir)/libass.sym
 
+if FONTCONFIG
+libass_la_SOURCES += $(SRC_FONTCONFIG)
+endif
+
 if DIRECTWRITE
 libass_la_SOURCES += $(SRC_DIRECTWRITE)
 endif
index 552931f07d86d008e32b6a0aea0cdfbd670b3a55..e87dba9db122bb0c9ae44cd8130aaee43566340e 100644 (file)
@@ -19,8 +19,6 @@
 #include "config.h"
 #include "ass_compat.h"
 
-#ifdef CONFIG_FONTCONFIG
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -322,5 +320,3 @@ ass_fontconfig_add_provider(ASS_Library *lib, ASS_FontSelector *selector,
 
     return provider;
 }
-
-#endif