Fix make check fail with freetype-2.7.1 and 2.8 with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES enabled.
diff --git a/configure.ac b/configure.ac
index 5b3c45d..d5b1410 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,8 +307,17 @@
 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 92e92be..df12587 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 @@
 
 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 @@
 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=