]> git.wh0rd.org - fontconfig.git/commitdiff
Add --disable-docs flag
authorKeith Packard <keithp@keithp.com>
Sat, 1 Mar 2003 05:21:02 +0000 (05:21 +0000)
committerKeith Packard <keithp@keithp.com>
Sat, 1 Mar 2003 05:21:02 +0000 (05:21 +0000)
configure.in
doc/Makefile.am
src/Makefile.am

index ed03f1afb8c33bc32edaaf2170a841107feed9db..a12340536d8413041854b10976664d2d34418426 100644 (file)
@@ -289,6 +289,22 @@ AC_SUBST(CONFDIR)
 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
 #
index dc6cb7c2125b00e436cfe9310c969f8022ae291b..3be9090584f5e92f576803d63bedb004e64f79bc 100644 (file)
@@ -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
index 7d9a65147a178fdd6780c2d6b53a1b8f7c05ed17..096ae74c86504ce138db0545553ba26d1273f8a8 100644 (file)
@@ -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 =                     \