• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# configure.in
3#
4# 	This library is free software; you can redistribute it and/or
5#	modify it under the terms of the GNU Lesser General Public
6#	License as published by the Free Software Foundation version 2.1
7#	of the License.
8#
9# Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
10#
11
12AC_INIT(libnl-doc, [3.2.25], [http://www.infradead.org/~tgr/libnl/])
13AC_CONFIG_MACRO_DIR([m4])
14AC_CONFIG_AUX_DIR([build-aux])
15AM_INIT_AUTOMAKE([foreign])
16m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], [])
17
18m4_include([m4/ax_python.m4])
19
20#
21# Generating the documentation
22#
23AC_ARG_ENABLE([doc],
24	      AS_HELP_STRING([--disable-doc], [Do not generate documentation]),
25	      [generate_doc="$enableval"], [generate_doc=auto])
26
27AX_PYTHON
28
29if test "x$generate_doc" != "xno"; then
30	AC_PROG_SED
31	AC_PROG_EGREP
32
33	AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], yes, no)
34	if test "x$HAVE_DOXYGEN" = "xno" -a "x$generate_doc" = "xyes"; then
35		AC_MSG_ERROR([*** doxygen package required to generate documentation])
36	fi
37
38	AC_CHECK_PROG(HAVE_DOT, [dot], yes, no)
39	if test "x$HAVE_DOT" = "xno"; then
40		if test "x$generate_doc" = "xyes"; then
41			AC_MSG_ERROR([*** graphviz package required to generate documentation])
42		else
43			AC_MSG_WARN([*** graphviz not found, disabling building of API reference])
44			HAVE_DOXYGEN=no
45		fi
46	fi
47
48	AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], yes, no)
49	if test "x$HAVE_ASCIIDOC" = "xno"; then
50		if test "x$generate_doc" = "xyes"; then
51			AC_MSG_ERROR([*** asciidoc package required to generate documentation])
52		else
53			AC_MSG_WARN([*** asciidoc not found, disabling building of guides])
54		fi
55	fi
56
57	AC_CHECK_PROG(HAVE_SOURCE_HIGHLIGHT, [source-highlight], yes, no)
58	if test "x$HAVE_SOURCE_HIGHLIGHT" = "xno"; then
59		if test "x$generate_doc" = "xyes"; then
60			AC_MSG_ERROR([*** source-highlight required to generate documentation])
61		else
62			AC_MSG_WARN([*** source-highlight not found, disabling building of guides])
63			HAVE_ASCIIDOC=no
64		fi
65	fi
66
67	AC_CHECK_PROG(HAVE_MSCGEN, [mscgen], yes, no)
68	if test "x$HAVE_MSCGEN" = "xno"; then
69		AC_MSG_WARN([*** mscgen not found, get it at http://www.mcternan.me.uk/mscgen/])
70		if test "x$generate_doc" = "xyes"; then
71			AC_MSG_ERROR([*** mscgen package required to generate documentation])
72		else
73			AC_MSG_WARN([*** Disabling building of guides])
74			HAVE_ASCIIDOC=no
75			HAVE_DOXYGEN=no
76		fi
77	fi
78
79	AC_CHECK_PROG(HAVE_PYGMENTIZE, [pygmentize], yes, no)
80	if test "x$HAVE_PYGMENTIZE" = "xno"; then
81		if test "x$generate_doc" = "xyes"; then
82			AC_MSG_ERROR([*** pygmentize package required to generate documentation])
83		else
84			AC_MSG_WARN([*** Disabling building of guides])
85			HAVE_ASCIIDOC=no
86		fi
87	fi
88
89	link_doc=yes
90	if test "x$HAVE_DOXYGEN" = "xno"; then
91		AC_MSG_WARN([*** Disabling API linking due to missing doxygen package])
92		link_doc=no
93	fi
94fi
95
96AM_CONDITIONAL([LINK_DOC], [test "x$link_doc" = "xyes"])
97AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$HAVE_DOXYGEN" = "xyes"])
98AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$HAVE_ASCIIDOC" = "xyes"])
99
100AM_CONDITIONAL([GENERATE_DOC], [test "x$generate_doc" != "xno"])
101
102AC_CONFIG_FILES([
103Doxyfile
104Makefile
105])
106
107AC_OUTPUT
108