1*4dc78e53SAndroid Build Coastguard Worker# SPDX-License-Identifier: LGPL-2.1-only 2*4dc78e53SAndroid Build Coastguard Worker# 3*4dc78e53SAndroid Build Coastguard Worker# Copyright (c) 2003-2013 Thomas Graf <[email protected]> 4*4dc78e53SAndroid Build Coastguard Worker# 5*4dc78e53SAndroid Build Coastguard Worker 6*4dc78e53SAndroid Build Coastguard WorkerAC_INIT(libnl-doc, [3.10.0], [http://www.infradead.org/~tgr/libnl/]) 7*4dc78e53SAndroid Build Coastguard WorkerAC_CONFIG_MACRO_DIR([../m4]) 8*4dc78e53SAndroid Build Coastguard WorkerAC_CONFIG_AUX_DIR([build-aux]) 9*4dc78e53SAndroid Build Coastguard WorkerAM_INIT_AUTOMAKE([foreign]) 10*4dc78e53SAndroid Build Coastguard Workerm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], []) 11*4dc78e53SAndroid Build Coastguard Worker 12*4dc78e53SAndroid Build Coastguard Worker# 13*4dc78e53SAndroid Build Coastguard Worker# Generating the documentation 14*4dc78e53SAndroid Build Coastguard Worker# 15*4dc78e53SAndroid Build Coastguard WorkerAC_ARG_ENABLE([doc], 16*4dc78e53SAndroid Build Coastguard Worker AS_HELP_STRING([--disable-doc], [Do not generate documentation]), 17*4dc78e53SAndroid Build Coastguard Worker [generate_doc="$enableval"], [generate_doc=auto]) 18*4dc78e53SAndroid Build Coastguard Worker 19*4dc78e53SAndroid Build Coastguard Workerif test "x$generate_doc" != "xno"; then 20*4dc78e53SAndroid Build Coastguard Worker AC_PROG_SED 21*4dc78e53SAndroid Build Coastguard Worker AC_PROG_EGREP 22*4dc78e53SAndroid Build Coastguard Worker 23*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_PYTHON, [python], yes, no) 24*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_PYTHON" = "xno" -a "x$generate_doc" = "xyes"; then 25*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** python binary required to generate documentation]) 26*4dc78e53SAndroid Build Coastguard Worker fi 27*4dc78e53SAndroid Build Coastguard Worker 28*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], yes, no) 29*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_DOXYGEN" = "xno" -a "x$generate_doc" = "xyes"; then 30*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** doxygen package required to generate documentation]) 31*4dc78e53SAndroid Build Coastguard Worker fi 32*4dc78e53SAndroid Build Coastguard Worker 33*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_DOT, [dot], yes, no) 34*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_DOT" = "xno"; then 35*4dc78e53SAndroid Build Coastguard Worker if test "x$generate_doc" = "xyes"; then 36*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** graphviz package required to generate documentation]) 37*4dc78e53SAndroid Build Coastguard Worker else 38*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** graphviz not found, disabling building of API reference]) 39*4dc78e53SAndroid Build Coastguard Worker HAVE_DOXYGEN=no 40*4dc78e53SAndroid Build Coastguard Worker fi 41*4dc78e53SAndroid Build Coastguard Worker fi 42*4dc78e53SAndroid Build Coastguard Worker 43*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], yes, no) 44*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_ASCIIDOC" = "xno"; then 45*4dc78e53SAndroid Build Coastguard Worker if test "x$generate_doc" = "xyes"; then 46*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** asciidoc package required to generate documentation]) 47*4dc78e53SAndroid Build Coastguard Worker else 48*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** asciidoc not found, disabling building of guides]) 49*4dc78e53SAndroid Build Coastguard Worker fi 50*4dc78e53SAndroid Build Coastguard Worker fi 51*4dc78e53SAndroid Build Coastguard Worker 52*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_SOURCE_HIGHLIGHT, [source-highlight], yes, no) 53*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_SOURCE_HIGHLIGHT" = "xno"; then 54*4dc78e53SAndroid Build Coastguard Worker if test "x$generate_doc" = "xyes"; then 55*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** source-highlight required to generate documentation]) 56*4dc78e53SAndroid Build Coastguard Worker else 57*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** source-highlight not found, disabling building of guides]) 58*4dc78e53SAndroid Build Coastguard Worker HAVE_ASCIIDOC=no 59*4dc78e53SAndroid Build Coastguard Worker fi 60*4dc78e53SAndroid Build Coastguard Worker fi 61*4dc78e53SAndroid Build Coastguard Worker 62*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_MSCGEN, [mscgen], yes, no) 63*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_MSCGEN" = "xno"; then 64*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** mscgen not found, get it at http://www.mcternan.me.uk/mscgen/]) 65*4dc78e53SAndroid Build Coastguard Worker if test "x$generate_doc" = "xyes"; then 66*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** mscgen package required to generate documentation]) 67*4dc78e53SAndroid Build Coastguard Worker else 68*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** Disabling building of guides]) 69*4dc78e53SAndroid Build Coastguard Worker HAVE_ASCIIDOC=no 70*4dc78e53SAndroid Build Coastguard Worker HAVE_DOXYGEN=no 71*4dc78e53SAndroid Build Coastguard Worker fi 72*4dc78e53SAndroid Build Coastguard Worker fi 73*4dc78e53SAndroid Build Coastguard Worker 74*4dc78e53SAndroid Build Coastguard Worker AC_CHECK_PROG(HAVE_PYGMENTIZE, [pygmentize], yes, no) 75*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_PYGMENTIZE" = "xno"; then 76*4dc78e53SAndroid Build Coastguard Worker if test "x$generate_doc" = "xyes"; then 77*4dc78e53SAndroid Build Coastguard Worker AC_MSG_ERROR([*** pygmentize package required to generate documentation]) 78*4dc78e53SAndroid Build Coastguard Worker else 79*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** Disabling building of guides]) 80*4dc78e53SAndroid Build Coastguard Worker HAVE_ASCIIDOC=no 81*4dc78e53SAndroid Build Coastguard Worker fi 82*4dc78e53SAndroid Build Coastguard Worker fi 83*4dc78e53SAndroid Build Coastguard Worker 84*4dc78e53SAndroid Build Coastguard Worker link_doc=yes 85*4dc78e53SAndroid Build Coastguard Worker if test "x$HAVE_DOXYGEN" = "xno"; then 86*4dc78e53SAndroid Build Coastguard Worker AC_MSG_WARN([*** Disabling API linking due to missing doxygen package]) 87*4dc78e53SAndroid Build Coastguard Worker link_doc=no 88*4dc78e53SAndroid Build Coastguard Worker fi 89*4dc78e53SAndroid Build Coastguard Workerfi 90*4dc78e53SAndroid Build Coastguard Worker 91*4dc78e53SAndroid Build Coastguard WorkerAM_CONDITIONAL([LINK_DOC], [test "x$link_doc" = "xyes"]) 92*4dc78e53SAndroid Build Coastguard WorkerAM_CONDITIONAL([HAVE_DOXYGEN], [test "x$HAVE_DOXYGEN" = "xyes"]) 93*4dc78e53SAndroid Build Coastguard WorkerAM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$HAVE_ASCIIDOC" = "xyes"]) 94*4dc78e53SAndroid Build Coastguard Worker 95*4dc78e53SAndroid Build Coastguard WorkerAM_CONDITIONAL([GENERATE_DOC], [test "x$generate_doc" != "xno"]) 96*4dc78e53SAndroid Build Coastguard Worker 97*4dc78e53SAndroid Build Coastguard WorkerAC_CONFIG_FILES([ 98*4dc78e53SAndroid Build Coastguard WorkerDoxyfile 99*4dc78e53SAndroid Build Coastguard WorkerMakefile 100*4dc78e53SAndroid Build Coastguard Worker]) 101*4dc78e53SAndroid Build Coastguard Worker 102*4dc78e53SAndroid Build Coastguard WorkerAC_OUTPUT 103