Rename TREE_SIGNAL_CONTEXT_MENU to MAIN_SIGNAL_CONTEXT_MENU
[nautilus-actions.git] / configure.ac
blob28b8886155de9cf5ba17d95e03d47ac499271bcb
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, 2012 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 AC_PREREQ([2.53])
31 AC_INIT([Nautilus-Actions],[3.2.0],[maintainer@nautilus-actions.org],,[http://www.nautilus-actions.org])
33 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 AC_CANONICAL_TARGET
35 AM_INIT_AUTOMAKE
37 AC_CONFIG_SRCDIR([src/plugin-menu/nautilus-module.c])
38 AC_CONFIG_HEADERS([src/config.h])
40 AC_CONFIG_FILES([
41         Makefile
42         data/Makefile
43         data/actions/Makefile
44         data/exports/Makefile
45         data/gconf-schemas/Makefile
46         docs/Makefile
47         docs/nact/Makefile
48         docs/reference/Makefile
49         docs/reference/version.xml
50         m4/Makefile
51         icons/Makefile
52         icons/16x16/Makefile
53         icons/22x22/Makefile
54         icons/32x32/Makefile
55         icons/48x48/Makefile
56         icons/scalable/Makefile
57         src/Makefile
58         src/api/Makefile
59         src/core/Makefile
60         src/io-desktop/Makefile
61         src/io-gconf/Makefile
62         src/io-xml/Makefile
63         src/plugin-menu/Makefile
64         src/plugin-tracker/Makefile
65         src/nact/Makefile
66         src/test/Makefile
67         src/utils/Makefile
68         tools/Makefile
69         po/Makefile.in
72 AC_CONFIG_MACRO_DIR([m4])
74 # pwi 2009-05-15 disabled as GNOME_COMMON_INIT takes care of that
75 #AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
77 # don't agree with maintainer mode use
78 # see http://www.gnu.org/software/automake/manual/automake.html#index-AM_005fMAINTAINER_005fMODE-1001
79 # but gnome-autogen.sh forces its usage and gnome_common_init requires it
80 AM_MAINTAINER_MODE
82 # check for compiler characteristics and options
83 AC_PROG_CC
84 AC_PROG_GCC_TRADITIONAL
85 AC_STDC_HEADERS
86 AM_DISABLE_STATIC
88 # other traditional tools
89 AC_PROG_INSTALL
90 AC_PROG_MAKE_SET
92 # Gnome stuff
93 GNOME_COMMON_INIT
94 GNOME_MAINTAINER_MODE_DEFINES
95 NA_LINK_AS_NEEDED
96 NA_GNOME_COMPILE_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
97 AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])
99 # GLib marshaling
100 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
102 # libtool
103 AM_PROG_LIBTOOL
105 # localization
106 # note that this same version is also required by autogen.sh
107 IT_PROG_INTLTOOL([0.35.5])
108 GETTEXT_PACKAGE=${PACKAGE}
109 AC_SUBST([GETTEXT_PACKAGE])
110 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
111 AM_GLIB_GNU_GETTEXT
113 # Enable deprecated functions ?
114 NA_CHECK_FOR_DEPRECATED
116 # Have and want GConf support ?
117 NA_CHECK_FOR_GCONF
119 # note that requiring through pkg-config the version number of the
120 # nautilus-extension library actually returns the version number of
121 # nautilus itself (e.g. 2.24.2) instead of the library version info
122 # (1.1.0) ; for the usual final user, this is very analog to requiring
123 # a whole gnome version
124 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
125 if test "${PKG_CONFIG}" = "no"; then
126         AC_MSG_ERROR([You need to install pkg-config])
129 # Oldest supported distribution: Ubuntu 10 LTS (Gnome 2.30): april 2013
130 glib_required=2.24.0
131 gtk_required=2.20.0
132 NA_CHECK_FOR_GTK
134 # GDBus comes in GIO with 2.26
135 # so uses GDBus if present, or fallback into dbus-glib-1
136 NA_CHECK_MODULE([GLIB],   [glib-2.0 >= ${glib_required}])
137 NA_CHECK_MODULE([GMODULE],[gmodule-2.0 >= ${glib_required}])
138 NA_CHECK_FOR_GDBUS
140 dnl aclocal complains if the comma is not just after the square bracket
141 NA_CHECK_MODULE([GCONF],             [gconf-2.0 >= 2.8.0])
142 NA_CHECK_MODULE([GIO_UNIX],          [gio-unix-2.0])
143 NA_CHECK_MODULE([GTOP],              [libgtop-2.0 >= 2.23.1])
144 NA_CHECK_MODULE([LIBXML],            [libxml-2.0 >= 2.6])
145 NA_CHECK_MODULE([SM],                [sm >= 1.0])
146 NA_CHECK_MODULE([UUID],              [uuid])
147 NA_CHECK_MODULE([NAUTILUS_EXTENSION],[libnautilus-extension >= 2.16])
149 AC_SUBST([NAUTILUS_ACTIONS_CFLAGS])
150 AC_SUBST([NAUTILUS_ACTIONS_LIBS])
152 # check for gtk-doc
153 # - starting with gtk-doc 1.16, is able to handle srcdir != builddir
154 # - API documentation should not be built (would be incomplete) when deprecated
155 #   symbols are not enabled
156 GTK_DOC_CHECK([1.16],[--flavour no-tmpl])
157 if test "${enable_gtk_doc}" = "yes" -a "${enable_deprecated}" = "no"; then
158         AC_MSG_WARN([API documentation will be incomplete as deprecated symbols are disabled])
161 # check for gnome-doc-utils
162 # - starting with N-A 3.1.5, gnome-doc-utils is no more required when one want
163 #   compile the tarball distribution (i.e. without regenerating users's manuals)
164 GNOME_DOC_INIT(,,[gdu_cv_have_gdu=no])
166 # defines log domains when in maintainer mode
167 NA_LOG_DOMAINS
169 # add --enable-html-manuals and --enable-pdf-manuals configure options
170 NA_ENABLE_MANUALS
172 # add --with-default-io-provider option
173 NA_SET_DEFAULT_IO_PROVIDER([na-desktop])
175 # when working in a test environment, nautilus extensions are typically
176 # installed in a non-standard location ; lets specify this location here
177 NA_NAUTILUS_EXTDIR
179 # define NA_MAINTAINER_MODE variable
180 NA_IS_MAINTAINER_MODE
181 AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])
183 # Check for menu update function
184 AC_CHECK_LIB([nautilus-extension],[nautilus_menu_item_new])
185 AC_CHECK_FUNCS([nautilus_menu_provider_emit_items_updated_signal])
186 # starting with 2.91.90, Nautilus no more allows extensions to add toolbar items
187 AC_CHECK_FUNCS([nautilus_menu_provider_get_toolbar_items])
189 # display and keep configuration informations
190 config_options="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 
191 AC_DEFINE_UNQUOTED([NA_CONFIG_OPTIONS],["$0 ${config_options}"],["Configure options"])
193 AC_OUTPUT
195 msg_gtk_doc=`if test "x${enable_gtk_doc}" = "xno"; then echo "disabled"; else echo "enabled"; fi`
196 msg_gtk_version=""
197 if test "${have_gtk3}" = "yes"; then msg_gtk_version="Gtk+ 3.0"; 
198         elif  test "${have_gtk2}" = "yes"; then msg_gtk_version="Gtk+ 2.0"; fi
199 $as_echo "
200         ${PACKAGE_STRING} configuration summary:
202         Installation prefix             ${prefix}
203         Build system type               ${ac_cv_build}
204         Nautilus extensions directory   ${with_nautilus_extdir}
205         Gtk+ version                    ${msg_gtk_version}
206         Default I/O provider            ${with_default_io_provider}
207         Enable deprecated functions     ${enable_deprecated}
208         GConf enabled                   ${enable_gconf}
209         GConf schemas installation      ${msg_schemas_install}
210         Maintainer mode                 ${msg_maintainer_mode}
211         API Reference generation        ${msg_gtk_doc}
212         HTML User's Manuals generation  ${msg_html_manuals}
213         PDF User's Manuals generation   ${msg_pdf_manuals}
215 #       Preprocessor flags              ${AM_CPPFLAGS}
216 #       Compiler flags                  ${AM_CFLAGS} ${NAUTILUS_ACTIONS_CFLAGS}
217 #       Linker flags                    ${NAUTILUS_ACTIONS_LIBS}