2 # A Nautilus extension which offers configurable context menu actions.
4 # Copyright (C) 2005 The GNOME Foundation
5 # Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
6 # Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
8 # This Program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
13 # This Program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public
19 # License along with this Library; see the file COPYING. If not,
20 # write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307, USA.
24 # Frederic Ruaudel <grumz@grumz.net>
25 # Rodrigo Moya <rodrigo@gnome-db.org>
26 # Pierre Wieser <pwieser@trychlos.org>
27 # ... and many others (see AUTHORS)
29 # serial 3 add 'msg_' prefixed messages
31 dnl --enable-html-manuals[=gdt|db2html]
32 dnl generates HTML manuals for all locales
33 dnl if no option is given, first try gnome-doc-tool (from gnome-doc-utils)
34 dnl then fallback to db2html (from docbook-utils).
35 dnl else one may specify
36 dnl --enable-html-manuals=gdt
38 dnl --enable-html-manuals=db2html
39 dnl in this case, fail if the specified tool is not found
41 dnl --enable-pdf-manuals[=dblatex]
42 dnl output PDF manuals for all locales
43 dnl only use dblatex for now
44 dnl only '=dblatex' option is recognized for now.
46 dnl usage: NA_ENABLE_MANUALS
48 AC_DEFUN([NA_ENABLE_MANUALS],[
49 AC_REQUIRE([_AC_ARG_NA_ENABLE_HTML_MANUALS])dnl
50 AC_REQUIRE([_AC_ARG_NA_ENABLE_PDF_MANUALS])dnl
52 _CHECK_FOR_HTML_MANUALS
53 _CHECK_FOR_PDF_MANUALS
56 AC_DEFUN([_AC_ARG_NA_ENABLE_HTML_MANUALS],[
60 [--enable-html-manuals@<:@=gdt|db2html@:>@],
61 [build HTML user's manuals @<:@gdt@:>@]),
62 [enable_html_manuals=$enableval],
63 [enable_html_manuals="no"])
66 AC_DEFUN([_CHECK_FOR_HTML_MANUALS],[
67 AC_MSG_CHECKING([whether to build HTML manuals])
68 msg_html_manuals="disabled"
69 if test "x${enable_html_manuals}" = "xno"; then
73 if test "x${enable_html_manuals}" = "xyes"; then
74 AC_CHECK_PROG([with_gdt],[gnome-doc-tool],[yes],[no])
75 if test "x${with_gdt}" = "xno"; then
76 AC_CHECK_PROG([with_db2html],[db2html],[yes],[no])
78 elif test "x${enable_html_manuals}" = "xgdt"; then
79 AC_CHECK_PROG([with_gdt],[gnome-doc-tool],[yes],[no])
81 elif test "x${enable_html_manuals}" = "xdb2html"; then
82 AC_CHECK_PROG([with_db2html],[db2html],[yes],[no])
85 AC_MSG_ERROR([${enable_html_manuals} is not a known tool, must be 'gdt' or 'db2html'])
87 if test "x${with_gdt}" = "xno" -a "x${with_db2html}" = "xno"; then
88 AC_MSG_ERROR([neither gnome-doc-tool not db2html have been found, unable to generate HTML manuals])
90 msg_html_manuals="enabled with"
91 if test "x${with_gdt}" = "xno"; then
92 msg_html_manuals="${msg_html_manuals} db2html"
94 msg_html_manuals="${msg_html_manuals} gnome-doc-tool"
98 AC_SUBST([WITH_DB2HTML],[${with_db2html}])
99 AC_SUBST([WITH_GDT],[${with_gdt}])
101 AM_CONDITIONAL([ENABLE_HTML_MANUALS], [test "x${enable_html_manuals}" != "xno"])
104 AC_DEFUN([_AC_ARG_NA_ENABLE_PDF_MANUALS],[
108 [--enable-pdf-manuals@<:@=dblatex@:>@],
109 [build PDF user's manuals @<:@dblatex@:>@]),
110 [enable_pdf_manuals=$enableval],
111 [enable_pdf_manuals="no"])
114 AC_DEFUN([_CHECK_FOR_PDF_MANUALS],[
115 AC_MSG_CHECKING([whether to build PDF manuals])
116 msg_pdf_manuals="disabled"
117 if test "x${enable_pdf_manuals}" = "xno"; then
121 if test "x${enable_pdf_manuals}" = "xyes"; then
122 AC_CHECK_PROG([with_dblatex],[dblatex],[yes],[no])
123 msg_pdf_manuals="enabled with dblatex"
124 elif test "x${enable_pdf_manuals}" = "xdblatex"; then
125 AC_CHECK_PROG([with_dblatex],[dblatex],[yes],[no])
126 msg_pdf_manuals="enabled with dblatex"
128 AC_MSG_ERROR([${enable_pdf_manuals} is not a known tool, must be 'dblatex'])
130 if test "x${with_dblatex}" = "xno"; then
131 AC_MSG_ERROR([dblatex has not been found, unable to generate PDF manuals])
135 AM_CONDITIONAL([ENABLE_PDF_MANUALS], [test "x${enable_pdf_manuals}" != "xno"])