]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
configure.ac: fix cross-compilation without dejavu 263/head
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 13 Jul 2020 21:02:50 +0000 (23:02 +0200)
committerFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 14 Jul 2020 09:50:18 +0000 (11:50 +0200)
Cross-compilation is broken since commit 1d66106. Indeed, when
cross-compiling, dejavu font won't be installed in /usr/share/fonts. The
path (e.g. $(TARGET_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttf) could be
provided through --with-test-font-path which will fix the build failure
but will result in broken test programs.

So when cross-compiling don't try to check if the test-font-path is
valid or not and just use the one provided by the user or the default
one (e.g. /usr/share/fonts/dejavu/DejaVuSans.ttf)

Fix #262

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
configure.ac

index aa905cf5d5d891e6ca75973c246fd6e2ca0e98dc..4cc4fd6e57d20d34dc9976eafee34489a8e326db 100644 (file)
@@ -796,10 +796,10 @@ AC_ARG_WITH([test-font-path],
        [with_test_font_path=`find /usr/share/fonts -name DejaVuSans.ttf || echo /usr/share/fonts/dejavu/DejaVuSans.ttf`]
 )
 
-AS_IF([test -f "$with_test_font_path"],
-       [AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests])],
+AS_IF([test "x$cross_compiling" != "xyes" && ! test -f "$with_test_font_path"],
        [AC_MSG_ERROR(DejaVuSans.ttf font file is missing. Please install a package providing it.)]
 )
+AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests])
 
 # ================
 # Check for cflags