From e7ffa5d71f5a5751e732797370a43b312ada5e97 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 27 May 2020 10:51:51 +0200 Subject: [PATCH] configure.ac: Use AS_IF instead of AC_CHECK_FILE for font check --- configure.ac | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b832e1ed4..602109b73 100644 --- a/configure.ac +++ b/configure.ac @@ -788,10 +788,11 @@ AC_ARG_WITH([test-font-path], [with_test_font_path="$withval"], [with_test_font_path=`find /usr/share/fonts -name DejaVuSans.ttf || echo /usr/share/fonts/dejavu/DejaVuSans.ttf`] ) -AC_CHECK_FILE("$with_test_font_path", [], [ - AC_MSG_ERROR([Requested font file is missing. Please install a package providing it.]) -]) -AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests]) + +AS_IF([test -f "$with_test_font_path"], + [AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests])], + [AC_MSG_ERROR(DejaVuSans.ttf font file is missing. Please install a package providing it.)] +) # ================ # Check for cflags -- 2.47.2