From 70421b0920157ace16a324b89bb9d0874e9ff05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Mon, 17 Aug 2015 14:50:06 +0800 Subject: [PATCH] Don't abort `configure' when PYTHON is missing. When using the tarball, we don't need PYTHON to regenerate 'fc-blanks.h'. --- configure.ac | 3 ++- fc-blanks/Makefile.am | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0ab3cfc..121295f 100644 --- a/configure.ac +++ b/configure.ac @@ -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 = //'` diff --git a/fc-blanks/Makefile.am b/fc-blanks/Makefile.am index e9de1fe..72c8f1b 100644 --- a/fc-blanks/Makefile.am +++ b/fc-blanks/Makefile.am @@ -27,9 +27,11 @@ TMPL = fcblanks.tmpl.h noinst_SCRIPTS = $(BLANKSPY) noinst_HEADERS = $(BLANKS_H) +if HAVE_PYTHON $(BLANKS_H): $(TMPL) $(BLANKSPY) $(AM_V_GEN) $(PYTHON) $(srcdir)/$(BLANKSPY) < $< > $(BLANKS_H).tmp && \ mv $(BLANKS_H).tmp $(BLANKS_H) || ($(RM) $(BLANKS_H).tmp && false) +endif EXTRA_DIST = \ $(BLANKSPY) \ -- 2.4.3