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)
31 AC_INIT([Nautilus-Actions],[3.1.0],[maintainer@nautilus-actions.org],,[http://www.nautilus-actions.org])
33 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37 AC_CONFIG_SRCDIR([src/plugin-menu/nautilus-module.c])
38 AC_CONFIG_HEADERS([src/config.h])
45 data/gconf-schemas/Makefile
48 docs/reference/Makefile
49 docs/reference/version.xml
56 icons/scalable/Makefile
60 src/io-desktop/Makefile
63 src/plugin-menu/Makefile
64 src/plugin-tracker/Makefile
69 src/utils/nautilus-actions-gconf2desktop.sh
72 chmod a+x src/utils/nautilus-actions-gconf2desktop.sh
75 AC_CONFIG_MACRO_DIR([m4])
77 # pwi 2009-05-15 disabled as GNOME_COMMON_INIT takes care of that
78 #AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
80 # don't agree with maintainer mode use
81 # see http://www.gnu.org/software/automake/manual/automake.html#index-AM_005fMAINTAINER_005fMODE-1001
82 # but gnome-autogen.sh forces its usage and gnome_common_init requires it
85 # check for compiler characteristics and options
87 AC_PROG_GCC_TRADITIONAL
91 # other traditional tools
98 GNOME_MAINTAINER_MODE_DEFINES
100 NA_GNOME_COMPILE_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
101 AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])
104 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
110 # note that this same version is also required by autogen.sh
111 IT_PROG_INTLTOOL([0.35.5])
112 GETTEXT_PACKAGE=${PACKAGE}
113 AC_SUBST([GETTEXT_PACKAGE])
114 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
118 AC_PATH_PROG([GCONFTOOL],[gconftool-2],[no])
120 AC_DEFINE_UNQUOTED([HAVE_GCONF],[1],[Whether we compile against the GConf library])
122 # note that requiring through pkg-config the version number of the
123 # nautilus-extension library actually returns the version number of
124 # nautilus itself (e.g. 2.24.2) instead of the library version info
125 # (1.1.0) ; for the usual final user, this is very analog to requiring
126 # a whole gnome version
128 # GLib >= 2.16: GVFS/GIO
129 # Gtk >= 2.12: GtkBuilder
131 # [configure.ac, nautilus-actions.c] remove test for
132 # nautilus_menu_provider_emit_items_updated_signal() when Gnome >= 2.16
134 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
135 if test "${PKG_CONFIG}" = "no"; then
136 AC_MSG_ERROR([You need to install pkg-config])
144 dnl aclocal complains if the comma is not just after the square bracket
145 NA_CHECK_MODULE([DBUS], [dbus-glib-1])
146 NA_CHECK_MODULE([GCONF], [gconf-2.0 >= 2.8.0])
147 NA_CHECK_MODULE([GMODULE], [gmodule-2.0 >= ${glib_required}])
148 NA_CHECK_MODULE([GLIB], [glib-2.0 >= ${glib_required}])
149 NA_CHECK_MODULE([GTOP], [libgtop-2.0 >= 2.23.1])
150 NA_CHECK_MODULE([LIBXML], [libxml-2.0 >= 2.6])
151 NA_CHECK_MODULE([SM], [sm >= 1.0])
152 NA_CHECK_MODULE([UUID], [uuid])
153 NA_CHECK_MODULE([NAUTILUS_EXTENSION],[libnautilus-extension >= 2.8])
155 AC_SUBST([NAUTILUS_ACTIONS_CFLAGS])
156 AC_SUBST([NAUTILUS_ACTIONS_LIBS])
159 # Starting with gtk-doc 1.15, multiple source dirs are directly handled
161 GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
162 have_gtk_doc_115="no"
163 if test "x${enable_gtk_doc}" = "xyes"; then
164 AC_MSG_CHECKING([for gtk-doc >= 1.15])
165 PKG_CHECK_EXISTS([gtk-doc >= 1.15],[have_gtk_doc_115="yes"],[have_gtk_doc_115="no"])
166 AC_MSG_RESULT([${have_gtk_doc_115}])
168 AM_CONDITIONAL([HAVE_GTK_DOC_115], [test x$have_gtk_doc_115 = xyes])
170 # defines log domains when in maintainer mode
173 # add --enable-html-manuals and --enable-pdf-manuals configure options
176 # add --with-default-io-provider option
177 NA_SET_DEFAULT_IO_PROVIDER([na-desktop])
179 # when working in a test environment, nautilus extensions are typically
180 # installed in a non-standard location ; lets specify this location here
183 # define NA_MAINTAINER_MODE variable
184 NA_IS_MAINTAINER_MODE
185 AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])
187 # Check for menu update function
188 AC_CHECK_LIB(nautilus-extension, nautilus_menu_item_new)
189 AC_CHECK_FUNCS(nautilus_menu_provider_emit_items_updated_signal)
191 # display and keep configuration informations
192 config_options="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
193 AC_DEFINE_UNQUOTED([NA_CONFIG_OPTIONS],["$0 ${config_options}"],["Configure options"])
197 if test "x${enable_schemas_install}" = "xno"; then
198 msg_schemas_install="disabled"; else
199 msg_schemas_install="enabled in ${GCONF_SCHEMA_FILE_DIR}"
201 msg_gtk_doc=`if test "x${enable_gtk_doc}" = "xno"; then echo "disabled"; else echo "enabled"; fi`
203 if test "${have_gtk3}" = "yes"; then msg_gtk_version="Gtk+ 3.0";
204 elif test "${have_gtk2}" = "yes"; then msg_gtk_version="Gtk+ 2.0"; fi
206 ${PACKAGE_STRING} configuration summary:
208 Installation prefix ${prefix}
209 Build system type ${ac_cv_build}
210 Nautilus extensions directory ${with_nautilus_extdir}
211 Gtk+ version ${msg_gtk_version}
212 Default I/O provider ${with_default_io_provider}
213 GConf schemas installation ${msg_schemas_install}
214 Maintainer mode ${msg_maintainer_mode}
215 API Reference generation ${msg_gtk_doc}
216 HTML User's Manuals generation ${msg_html_manuals}
217 PDF User's Manuals generation ${msg_pdf_manuals}
219 # Preprocessor flags ${AM_CPPFLAGS}
220 # Compiler flags ${AM_CFLAGS} ${NAUTILUS_ACTIONS_CFLAGS}
221 # Linker flags ${NAUTILUS_ACTIONS_LIBS}