Fail on make runtime as needed instead of configure if no python installed

python isn't necessarily required to build fontconfig from tarball so that
generated fcblanks.h is available in tarball.

https://bugs.freedesktop.org/show_bug.cgi?id=91663
This commit is contained in:
Akira TAGOH 2015-08-17 16:37:08 +09:00
parent ad9f588050
commit c88d9b6242
2 changed files with 7 additions and 1 deletions

View File

@ -53,7 +53,8 @@ m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/
AM_MISSING_PROG([GIT], [git])
AM_MISSING_PROG([GPERF], [gperf])
AM_PATH_PYTHON
AM_PATH_PYTHON(,, [:])
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
AC_MSG_CHECKING([for RM macro])
_predefined_rm=`make -p -f /dev/null 2>/dev/null|grep '^RM ='|sed -e 's/^RM = //'`

View File

@ -28,8 +28,13 @@ noinst_SCRIPTS = $(BLANKSPY)
noinst_HEADERS = $(BLANKS_H)
$(BLANKS_H): $(TMPL) $(BLANKSPY)
if HAVE_PYTHON
$(AM_V_GEN) $(PYTHON) $(srcdir)/$(BLANKSPY) < $< > $(BLANKS_H).tmp && \
mv $(BLANKS_H).tmp $(BLANKS_H) || ($(RM) $(BLANKS_H).tmp && false)
else
@echo "No python installed. please install python to build $(BLANKS_H)."
@false
endif
EXTRA_DIST = \
$(BLANKSPY) \