]> git.wh0rd.org Git - fontconfig.git/commitdiff
Bug 75: dont build docs unless docbook is available. Dont install docs
authorKeith Packard <keithp@keithp.com>
Tue, 17 Jun 2003 18:28:20 +0000 (18:28 +0000)
committerKeith Packard <keithp@keithp.com>
Tue, 17 Jun 2003 18:28:20 +0000 (18:28 +0000)
    unless they are pre-built or buildable

Makefile.am
configure.in
doc/Makefile.am

index fd10fbb3da3984900f18c41f84b46956baf7f325..bf93bebdca30b3a93f24150dfdab70613d485cdf 100644 (file)
@@ -21,7 +21,8 @@
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-SUBDIRS=fontconfig fc-lang fc-glyphname src fc-cache fc-list fc-match doc test
+DOCSRC=@DOCSRC@
+SUBDIRS=fontconfig fc-lang fc-glyphname src fc-cache fc-list fc-match $(DOCSRC) test
 
 EXTRA_DIST = \
         fontconfig.pc.in \
index 76e8d44ebc651e900c1d4887d5dd516f7c2a126d..21652b1899baa0737120952753b71b656ab42f0b 100644 (file)
@@ -335,16 +335,32 @@ AC_SUBST(ORTH_FILES)
 
 AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
 
-AC_ARG_ENABLE(docs,           [  --disable-docs                Don't build and install documentation],,enable_docs=yes)
+AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
 
-if test "x$enable_docs" = xyes; then
-  if test "x$HASDOCBOOK" != xyes; then
-    enable_docs=no
-  fi
+default_docs="yes"
+#
+# Check if docs exist or can be created
+#
+if test x$HASDOCBOOK = xno; then
+       if test -f doc/fonts-conf.5; then
+               :
+       else
+               default_docs="no"
+       fi
 fi
 
+AC_ARG_ENABLE(docs,           [  --disable-docs                Don't build and install documentation],,enable_docs=$default_docs)
+
 AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
 
+if test "x$enable_docs" = xyes; then
+       DOCSRC="doc"
+else
+       DOCSRC=""
+fi
+
+AC_SUBST(DOCSRC)
+
 #
 # Figure out where to install documentation
 #
index 6a9d782762e5e009f7c587fd72c9ec4720346a8c..b98c13b21ee1660e3433e718ece13736c007f58f 100644 (file)
@@ -93,7 +93,7 @@ EXTRA_DIST = $(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL)
        
 SUFFIXES=.fncs .sgml .txt .html
 
-if ENABLE_DOCS
+if USEDOCBOOK
 
 .fncs.sgml:
        $(RM) $@