]> granicus.if.org Git - libnl/commitdiff
configure: Check for graphviz and source-highlight before building documentation
authorThomas Graf <tgraf@redhat.com>
Thu, 30 Aug 2012 11:15:45 +0000 (13:15 +0200)
committerThomas Graf <tgraf@redhat.com>
Thu, 30 Aug 2012 11:15:45 +0000 (13:15 +0200)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
configure.in

index ad6fad3f5147fe4104fe99c4163aacb0abfe7438..7bf3423e5865645939c1a001e46d2472753a25d8 100644 (file)
@@ -91,6 +91,16 @@ if test "x$generate_doc" != "xno"; then
                AC_MSG_ERROR([*** doxygen package required to generate documentation])
        fi
 
+       AC_CHECK_PROG(HAVE_DOT, [dot], yes, no)
+       if test "x$HAVE_DOT" = "xno"; then
+               if test "x$generate_doc" = "xyes"; then
+                       AC_MSG_ERROR([*** graphviz package required to generate documentation])
+               else
+                       AC_MSG_WARN([*** graphviz not found, disabling building of API reference])
+                       HAVE_DOXYGEN=no
+               fi
+       fi
+
        AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], yes, no)
        if test "x$HAVE_ASCIIDOC" = "xno"; then
                if test "x$generate_doc" = "xyes"; then
@@ -100,6 +110,16 @@ if test "x$generate_doc" != "xno"; then
                fi
        fi
 
+       AC_CHECK_PROG(HAVE_SOURCE_HIGHLIGHT, [source-highlight], yes, no)
+       if test "x$HAVE_SOURCE_HIGHLIGHT" = "xno"; then
+               if test "x$generate_doc" = "xyes"; then
+                       AC_MSG_ERROR([*** source-highlight required to generate documentation])
+               else
+                       AC_MSG_WARN([*** source-highlight not found, disabling building of guides])
+                       HAVE_ASCIIDOC=no
+               fi
+       fi
+
        AC_CHECK_PROG(HAVE_MSCGEN, [mscgen], yes, no)
        if test "x$HAVE_MSCGEN" = "xno"; then
                AC_MSG_WARN([*** mscgen not found, get it at http://www.mcternan.me.uk/mscgen/])