configure.ac 6.8 KB
Newer Older
1
# Nautilus Actions
2
# A Nautilus extension which offers configurable context menu actions.
3 4 5
#
# Copyright (C) 2005 The GNOME Foundation
# Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
Pierre Wieser's avatar
Pierre Wieser committed
6
# Copyright (C) 2009, 2010 Pierre Wieser and others (see AUTHORS)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#
# This Program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this Library; see the file COPYING.  If not,
# write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307, USA.
#
# Authors:
#   Frederic Ruaudel <grumz@grumz.net>
#   Rodrigo Moya <rodrigo@gnome-db.org>
#   Pierre Wieser <pwieser@trychlos.org>
Pierre Wieser's avatar
Pierre Wieser committed
27
#   ... and many others (see AUTHORS)
28 29 30

AC_PREREQ([2.53])

Pierre Wieser's avatar
Pierre Wieser committed
31
AC_INIT([Nautilus-Actions],[3.0.4],[maintainer@nautilus-actions.org],,[http://www.nautilus-actions.org])
Pierre Wieser's avatar
Pierre Wieser committed
32
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
Pierre Wieser's avatar
Pierre Wieser committed
33 34

AC_CANONICAL_TARGET
35

36 37
AM_INIT_AUTOMAKE

38
AC_CONFIG_SRCDIR([src/plugin-menu/nautilus-module.c])
39

40
AC_CONFIG_HEADERS([src/config.h])
41 42 43

AC_CONFIG_FILES([
	Makefile
44
	data/Makefile
45
	data/actions/Makefile
46
	data/exports/Makefile
47
	data/gconf-schemas/Makefile
48 49
	docs/Makefile
	docs/nact/Makefile
Pierre Wieser's avatar
Pierre Wieser committed
50 51
	docs/reference/Makefile
	docs/reference/version.xml
52
	m4/Makefile
53 54 55 56 57 58
	icons/Makefile
	icons/16x16/Makefile
	icons/22x22/Makefile
	icons/32x32/Makefile
	icons/48x48/Makefile
	icons/scalable/Makefile
59 60
	src/Makefile
	src/api/Makefile
61
	src/core/Makefile
62 63
	src/io-desktop/Makefile
	src/io-gconf/Makefile
64
	src/io-xml/Makefile
65 66
	src/plugin-menu/Makefile
	src/plugin-tracker/Makefile
67
	src/nact/Makefile
68 69
	src/test/Makefile
	src/utils/Makefile
70
	po/Makefile.in
71 72
])

73 74
AC_CONFIG_MACRO_DIR([m4])

75
# pwi 2009-05-15 disabled as GNOME_COMMON_INIT takes care of that
76 77 78 79 80 81 82 83 84 85 86
#AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")

# don't agree with maintainer mode use
# see http://www.gnu.org/software/automake/manual/automake.html#index-AM_005fMAINTAINER_005fMODE-1001
# but gnome-autogen.sh forces its usage and gnome_common_init requires it
AM_MAINTAINER_MODE

# check for compiler characteristics and options
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
AC_STDC_HEADERS
87
AM_DISABLE_STATIC
88 89 90 91 92 93 94

# other traditional tools
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Gnome stuff
GNOME_COMMON_INIT
95
GNOME_DOC_INIT
96
GNOME_MAINTAINER_MODE_DEFINES
97
NA_LINK_AS_NEEDED
98
NA_GNOME_COMPILE_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
99 100
AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])

Pierre Wieser's avatar
Pierre Wieser committed
101 102 103
# GLib marshaling
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)

104 105 106
# check for gtk-doc
GTK_DOC_CHECK([1.10],[--flavour no-tmpl])

107 108 109 110
# libtool
AM_PROG_LIBTOOL

# localization
Pierre Wieser's avatar
Pierre Wieser committed
111
# note that this same version is also required by autogen.sh
112 113 114 115 116 117 118
IT_PROG_INTLTOOL([0.35.5])
GETTEXT_PACKAGE=${PACKAGE}
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
AM_GLIB_GNU_GETTEXT

# GConf support
119
AC_PATH_PROG([GCONFTOOL],[gconftool-2],[no])
120 121 122 123 124 125 126
AM_GCONF_SOURCE_2

# note that requiring through pkg-config the version number of the
# nautilus-extension library actually returns the version number of
# nautilus itself (e.g. 2.24.2) instead of the library version info
# (1.1.0) ; for the usual final user, this is very analog to requiring
# a whole gnome version
127
#
128 129
# GLib >= 2.16: GVFS/GIO
# Gtk  >= 2.12: GtkBuilder
130
#
131
# [configure.ac, nautilus-actions.c] remove test for
132
# 	nautilus_menu_provider_emit_items_updated_signal() when Gnome >= 2.16
133
#
134 135 136 137 138
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "${PKG_CONFIG}" = "no"; then
	AC_MSG_ERROR([You need to install pkg-config])
fi

139
NA_CHECK_FOR_GTK
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155

glib_required=2.16.0

dnl aclocal complains if the comma is not just after the square bracket
NA_CHECK_MODULE([DBUS],              [dbus-glib-1])
NA_CHECK_MODULE([GCONF],             [gconf-2.0 >= 2.8.0])
NA_CHECK_MODULE([GMODULE],           [gmodule-2.0 >= ${glib_required}])
NA_CHECK_MODULE([GLIB],              [glib-2.0 >= ${glib_required}])
NA_CHECK_MODULE([GTOP],              [libgtop-2.0 >= 2.23.1])
NA_CHECK_MODULE([LIBXML],            [libxml-2.0 >= 2.6])
NA_CHECK_MODULE([SM],                [sm >= 1.0])
NA_CHECK_MODULE([UUID],              [uuid])
NA_CHECK_MODULE([NAUTILUS_EXTENSION],[libnautilus-extension >= 2.8])

AC_SUBST([NAUTILUS_ACTIONS_CFLAGS])
AC_SUBST([NAUTILUS_ACTIONS_LIBS])
156

157 158 159
# defines log domains when in maintainer mode
NA_LOG_DOMAINS

Pierre Wieser's avatar
Pierre Wieser committed
160
# add --enable-html-manuals and --enable-pdf-manuals configure options
161 162
NA_ENABLE_MANUALS

163
# add --with-default-io-provider option
164
NA_SET_DEFAULT_IO_PROVIDER([na-desktop])
165 166

# when working in a test environment, nautilus extensions are typically
167
# installed in a non-standard location ; lets specify this location here
168
NA_NAUTILUS_EXTDIR
169

Pierre Wieser's avatar
Pierre Wieser committed
170
# define NA_MAINTAINER_MODE variable
171
NA_IS_MAINTAINER_MODE
172
AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])
Pierre Wieser's avatar
Pierre Wieser committed
173

174 175 176 177
# Check for menu update function
AC_CHECK_LIB(nautilus-extension, nautilus_menu_item_new)
AC_CHECK_FUNCS(nautilus_menu_provider_emit_items_updated_signal)

178 179 180 181
# display and keep configuration informations
config_options="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 
AC_DEFINE_UNQUOTED([NA_CONFIG_OPTIONS],["$0 ${config_options}"],["Configure options"])

182
AC_OUTPUT
183 184

if test "x${enable_schemas_install}" = "xno"; then
185 186
	msg_schemas_install="disabled"; else
	msg_schemas_install="enabled in ${GCONF_SCHEMA_FILE_DIR}"
187
fi
188 189
msg_gtk_html_doc=`if test "x${enable_gtk_doc_html}" = "xno"; then echo disabled; else echo "enabled with gtk-doc"; fi`
msg_gtk_pdf_doc=`if test "x${enable_gtk_doc_pdf}" = "xno"; then echo disabled; else echo enabled; fi`
190 191 192
msg_gtk_version=""
if test "${have_gtk3}" = "yes"; then msg_gtk_version="Gtk+ 3.0"; 
	elif  test "${have_gtk2}" = "yes"; then msg_gtk_version="Gtk+ 2.0"; fi
193 194 195 196 197
$as_echo "
	${PACKAGE_STRING} configuration summary:

	Installation prefix             ${prefix}
	Build system type               ${ac_cv_build}
198 199
	Nautilus extensions directory   ${with_nautilus_extdir}
	Gtk+ version                    ${msg_gtk_version}
200
	Default I/O provider            ${with_default_io_provider}
201 202 203 204 205 206
	GConf schemas installation      ${msg_schemas_install}
	Maintainer mode                 ${msg_maintainer_mode}
	HTML API Reference generation   ${msg_gtk_html_doc}
	PDF API Reference generation    ${msg_gtk_pdf_doc}
	HTML manuals generation         ${msg_html_manuals}
	PDF manuals generation          ${msg_pdf_manuals}
207
"
Pierre Wieser's avatar
Pierre Wieser committed
208 209 210
#	Preprocessor flags              ${AM_CPPFLAGS}
#	Compiler flags                  ${AM_CFLAGS} ${NAUTILUS_ACTIONS_CFLAGS}
#	Linker flags                    ${NAUTILUS_ACTIONS_LIBS}