summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2017-05-31 18:25:01 +0900
committerAkira TAGOH <akira@tagoh.org>2017-05-31 20:08:16 +0900
commitd33be230293978ad3f94b184f2c2770c108269c2 (patch)
tree7132a3a73dffa975ccd98e0266b71e2b5eed56e0
parent3072f14bddfeb0adba52bce26d7b752207a2cffb (diff)
Fix make check fail with freetype-2.7.1 and 2.8 with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES enabled.
-rw-r--r--configure.ac13
-rw-r--r--test/Makefile.am10
2 files changed, 18 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5b3c45de..d5b1410f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,8 +307,17 @@ dnl The outcome of the family property has been changed in freetype-2.7.1.
dnl Our test cases relies on it and need to update the dependency to get it success.
dnl However it isn't exactly required to run fontconfig itself.
dnl so adding another test here for compatibility. it might be simplified in the future.
-PKG_CHECK_EXISTS([freetype2 >= 19.0.13], [have_freetype_2_7_1=yes], [have_freetype_2_7_1=no])
-AM_CONDITIONAL(FREETYPE_2_7_1, test "x$have_freetype_2_7_1" = xyes)
+PKG_CHECK_EXISTS([freetype2 = 19.0.13], [have_freetype_2_7_1=yes], [have_freetype_2_7_1=no])
+PKG_CHECK_EXISTS([freetype2 >= 20.0.14],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <ft2build.h>
+ #include FT_CONFIG_OPTIONS_H
+ #ifndef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+ # error "No pcf long family names support"
+ #endif
+ ]])], [have_pcf_long_family_names=yes], [have_pcf_long_family_names=no])],
+ [have_pcf_long_family_names=no])
+AM_CONDITIONAL(FREETYPE_PCF_LONG_FAMILY_NAMES, test "x$have_freetype_2_7_1" = xyes -o "x$have_pcf_long_family_names" = xyes)
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
diff --git a/test/Makefile.am b/test/Makefile.am
index 92e92bef..df12587d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,4 +1,8 @@
+if FREETYPE_PCF_LONG_FAMILY_NAMES
+check_SCRIPTS=run-test271.sh
+else
check_SCRIPTS=run-test.sh
+endif
TEST_EXTENSIONS = \
.sh \
$(NULL)
@@ -10,13 +14,13 @@ AM_TESTS_ENVIRONMENT= \
SH_LOG_COMPILER = sh
-if FREETYPE_2_7_1
+if FREETYPE_PCF_LONG_FAMILY_NAMES
TESTS=run-test271.sh
else
TESTS=run-test.sh
endif
-TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
+TESTDATA=4x6.pcf 8x16.pcf out.expected out271.expected fonts.conf.in
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
@@ -46,7 +50,7 @@ check_PROGRAMS += test-bz96676
test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
TESTS += test-bz96676
-EXTRA_DIST=$(check_SCRIPTS) $(TESTDATA)
+EXTRA_DIST=run-test.sh run-test271.sh $(TESTDATA)
CLEANFILES=