• 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.5.0], [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
18#
19# Generating the documentation
20#
21AC_ARG_ENABLE([doc],
22	      AS_HELP_STRING([--disable-doc], [Do not generate documentation]),
23	      [generate_doc="$enableval"], [generate_doc=auto])
24
25if test "x$generate_doc" != "xno"; then
26	AC_PROG_SED
27	AC_PROG_EGREP
28
29	AC_CHECK_PROG(HAVE_PYTHON, [python], yes, no)
30	if test "x$HAVE_PYTHON" = "xno"  -a "x$generate_doc" = "xyes"; then
31		AC_MSG_ERROR([*** python binary required to generate documentation])
32	fi
33
34	AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], yes, no)
35	if test "x$HAVE_DOXYGEN" = "xno" -a "x$generate_doc" = "xyes"; then
36		AC_MSG_ERROR([*** doxygen package required to generate documentation])
37	fi
38
39	AC_CHECK_PROG(HAVE_DOT, [dot], yes, no)
40	if test "x$HAVE_DOT" = "xno"; then
41		if test "x$generate_doc" = "xyes"; then
42			AC_MSG_ERROR([*** graphviz package required to generate documentation])
43		else
44			AC_MSG_WARN([*** graphviz not found, disabling building of API reference])
45			HAVE_DOXYGEN=no
46		fi
47	fi
48
49	AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], yes, no)
50	if test "x$HAVE_ASCIIDOC" = "xno"; then
51		if test "x$generate_doc" = "xyes"; then
52			AC_MSG_ERROR([*** asciidoc package required to generate documentation])
53		else
54			AC_MSG_WARN([*** asciidoc not found, disabling building of guides])
55		fi
56	fi
57
58	AC_CHECK_PROG(HAVE_SOURCE_HIGHLIGHT, [source-highlight], yes, no)
59	if test "x$HAVE_SOURCE_HIGHLIGHT" = "xno"; then
60		if test "x$generate_doc" = "xyes"; then
61			AC_MSG_ERROR([*** source-highlight required to generate documentation])
62		else
63			AC_MSG_WARN([*** source-highlight not found, disabling building of guides])
64			HAVE_ASCIIDOC=no
65		fi
66	fi
67
68	AC_CHECK_PROG(HAVE_MSCGEN, [mscgen], yes, no)
69	if test "x$HAVE_MSCGEN" = "xno"; then
70		AC_MSG_WARN([*** mscgen not found, get it at http://www.mcternan.me.uk/mscgen/])
71		if test "x$generate_doc" = "xyes"; then
72			AC_MSG_ERROR([*** mscgen package required to generate documentation])
73		else
74			AC_MSG_WARN([*** Disabling building of guides])
75			HAVE_ASCIIDOC=no
76			HAVE_DOXYGEN=no
77		fi
78	fi
79
80	AC_CHECK_PROG(HAVE_PYGMENTIZE, [pygmentize], yes, no)
81	if test "x$HAVE_PYGMENTIZE" = "xno"; then
82		if test "x$generate_doc" = "xyes"; then
83			AC_MSG_ERROR([*** pygmentize package required to generate documentation])
84		else
85			AC_MSG_WARN([*** Disabling building of guides])
86			HAVE_ASCIIDOC=no
87		fi
88	fi
89
90	link_doc=yes
91	if test "x$HAVE_DOXYGEN" = "xno"; then
92		AC_MSG_WARN([*** Disabling API linking due to missing doxygen package])
93		link_doc=no
94	fi
95fi
96
97AM_CONDITIONAL([LINK_DOC], [test "x$link_doc" = "xyes"])
98AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$HAVE_DOXYGEN" = "xyes"])
99AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$HAVE_ASCIIDOC" = "xyes"])
100
101AM_CONDITIONAL([GENERATE_DOC], [test "x$generate_doc" != "xno"])
102
103AC_CONFIG_FILES([
104Doxyfile
105Makefile
106])
107
108AC_OUTPUT
109