Updated and new screenshots for Nautilus-Actions Configuration Tool 3.1
[nautilus-actions.git] / m4 / na-enable-manuals.m4
blobb7f35e27e11639746076973526c7ff146401bb21
1 # Nautilus-Actions
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.
23 # Authors:
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
37 dnl   or
38 dnl   --enable-html-manuals=db2html
39 dnl   in this case, fail if the specified tool is not found
40 dnl
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.
45 dnl
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
51         
52         _CHECK_FOR_HTML_MANUALS
53         _CHECK_FOR_PDF_MANUALS
56 AC_DEFUN([_AC_ARG_NA_ENABLE_HTML_MANUALS],[
57         AC_ARG_ENABLE(
58                 [html-manuals],
59                 AC_HELP_STRING(
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
70                 AC_MSG_RESULT([no])
71         else
72                 AC_MSG_RESULT([yes])
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])
77                         fi
78                 elif test "x${enable_html_manuals}" = "xgdt"; then
79                         AC_CHECK_PROG([with_gdt],[gnome-doc-tool],[yes],[no])
80                         with_db2html="no"
81                 elif test "x${enable_html_manuals}" = "xdb2html"; then
82                         AC_CHECK_PROG([with_db2html],[db2html],[yes],[no])
83                         with_gdt="no"
84                 else
85                         AC_MSG_ERROR([${enable_html_manuals} is not a known tool, must be 'gdt' or 'db2html'])
86                 fi
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])
89                 fi
90                 msg_html_manuals="enabled with"
91                 if test "x${with_gdt}" = "xno"; then
92                         msg_html_manuals="${msg_html_manuals} db2html"
93                 else
94                         msg_html_manuals="${msg_html_manuals} gnome-doc-tool"
95                 fi
96         fi
98         AC_SUBST([WITH_DB2HTML],[${with_db2html}])
99         AC_SUBST([WITH_GDT],[${with_gdt}])
100         AM_CONDITIONAL([ENABLE_HTML_MANUALS], [test "x${enable_html_manuals}" != "xno"])
103 AC_DEFUN([_AC_ARG_NA_ENABLE_PDF_MANUALS],[
104         AC_ARG_ENABLE(
105                 [pdf-manuals],
106                 AC_HELP_STRING(
107                         [--enable-pdf-manuals@<:@=dblatex@:>@],
108                         [build PDF user's manuals @<:@dblatex@:>@]),
109                         [enable_pdf_manuals=$enableval],
110                         [enable_pdf_manuals="no"])
113 AC_DEFUN([_CHECK_FOR_PDF_MANUALS],[
114         AC_MSG_CHECKING([whether to build PDF manuals])
115         msg_pdf_manuals="disabled"
116         if test "x${enable_pdf_manuals}" = "xno"; then
117                 AC_MSG_RESULT([no])
118         else
119                 AC_MSG_RESULT([yes])
120                 if test "x${enable_pdf_manuals}" = "xyes"; then
121                         AC_CHECK_PROG([with_dblatex],[dblatex],[yes],[no])
122                         msg_pdf_manuals="enabled with dblatex"
123                 elif test "x${enable_pdf_manuals}" = "xdblatex"; then
124                         AC_CHECK_PROG([with_dblatex],[dblatex],[yes],[no])
125                         msg_pdf_manuals="enabled with dblatex"
126                 else
127                         AC_MSG_ERROR([${enable_pdf_manuals} is not a known tool, must be 'dblatex'])
128                 fi
129                 if test "x${with_dblatex}" = "xno"; then
130                         AC_MSG_ERROR([dblatex has not been found, unable to generate PDF manuals])
131                 fi
132         fi
134         AM_CONDITIONAL([ENABLE_PDF_MANUALS], [test "x${enable_pdf_manuals}" != "xno"])