summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-03-01 05:21:02 +0000
committerKeith Packard <keithp@keithp.com>2003-03-01 05:21:02 +0000
commit9238fc061d2f89590d578bff69fd3e8fc4b72e2c (patch)
treebbebf03a4e931b5f2bb1b0e797bee3c5ff0e2951
parent0da305f7f85ae0dddc411df53ef077709558d369 (diff)
Add --disable-docs flag
-rw-r--r--configure.in16
-rw-r--r--doc/Makefile.am21
-rw-r--r--src/Makefile.am4
3 files changed, 32 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index ed03f1af..a1234053 100644
--- a/configure.in
+++ b/configure.in
@@ -290,6 +290,22 @@ ORTH_FILES=`cd fc-lang && echo *.orth`
AC_SUBST(ORTH_FILES)
#
+# Let people not build/install docs if they don't have docbook
+#
+
+AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
+
+AC_ARG_ENABLE(docs, [ --disable-docs Don't build and install documentation],,enable_docs=yes)
+
+if test "x$enable_docs" = xyes; then
+ if test "x$HASDOCBOOK" != xyes; then
+ enable_docs=no
+ fi
+fi
+
+AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
+
+#
# Figure out where to install documentation
#
diff --git a/doc/Makefile.am b/doc/Makefile.am
index dc6cb7c2..3be90905 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -22,14 +22,25 @@ SUFFIXES=.sgml .txt .html
EXTRA_DIST = $(TXT) $(HTML) $(SGML)
-all-local: $(TXT) $(HTML)
-
+if ENABLE_DOCS
+DOCS=$(TXT) $(HTML)
+all-local: all-docs
+clean-local: clean-docs
+install-data-local: install-docs
+else
+all-local:
clean-local:
- rm -f $(TXT) $(HTML)
-
install-data-local:
+endif
+
+all-docs: $(DOCS)
+
+clean-docs:
+ rm -f $(DOCS)
+
+install-docs:
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
- for i in $(TXT) $(HTML); do \
+ for i in $(DOCS); do \
echo '-- Installing'$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR)/$$i; \
done
diff --git a/src/Makefile.am b/src/Makefile.am
index 7d9a6514..096ae74c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,10 +25,6 @@ libfontconfig_la_SOURCES = \
fcstr.c \
fcxml.c
-man_MANS = fontconfig.3
-
-EXTRA_DIST = $(man_MANS)
-
lib_LTLIBRARIES = libfontconfig.la
libfontconfig_la_LDFLAGS = \