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

AC_PREREQ([2.53])

30
AC_INIT([FileManager-Actions],[3.4],[maintainer@nautilus-actions.org],,[http://www.nautilus-actions.org])
Pierre Wieser's avatar
Pierre Wieser committed
31
AX_IS_RELEASE([git-directory])
Pierre Wieser's avatar
Pierre Wieser committed
32

33
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Pierre Wieser's avatar
Pierre Wieser committed
34
AC_CANONICAL_TARGET
35 36
AM_INIT_AUTOMAKE

Pierre Wieser's avatar
Pierre Wieser committed
37 38 39
# Code coverage
AX_CODE_COVERAGE()

40
AC_CONFIG_SRCDIR([src/ui/main.c])
41
AC_CONFIG_HEADERS([src/config.h])
42 43 44 45 46 47 48 49 50
AC_CONFIG_MACRO_DIR([m4])

# check for compiler characteristics and options
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
AC_STDC_HEADERS
AM_DISABLE_STATIC

# define specific compilation options
51 52
FMA_COMPILER_WARNINGS([],[-ansi -Wno-overlength-strings -Wformat=2])
FMA_COMPILER_LINK_AS_NEEDED
53 54
AC_SUBST([AM_CFLAGS],["${AM_CFLAGS} ${WARN_CFLAGS}"])

55 56 57 58
# other traditional tools
AC_PROG_INSTALL
AC_PROG_MAKE_SET

Pierre Wieser's avatar
Pierre Wieser committed
59
# Maintainer mode
60
FMA_MAINTAINER_CHECK_MODE
61 62 63 64

# libtool
AM_PROG_LIBTOOL

65 66 67 68 69 70
# we are using pkgconfig for all development libraries we need
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "${PKG_CONFIG}" = "no"; then
	AC_MSG_ERROR([You need to install pkg-config])
fi

Pierre Wieser's avatar
Pierre Wieser committed
71
# required versions of tools and libraries
72
source ${0%/*}/fma_required_versions
Pierre Wieser's avatar
Pierre Wieser committed
73

Pierre Wieser's avatar
Pierre Wieser committed
74 75 76 77 78
# localization
GETTEXT_PACKAGE=${PACKAGE}
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
AM_GLIB_GNU_GETTEXT
Pierre Wieser's avatar
Pierre Wieser committed
79
IT_PROG_INTLTOOL([${intltool_required}])
Pierre Wieser's avatar
Pierre Wieser committed
80

Pierre Wieser's avatar
Pierre Wieser committed
81
# a counter of fatal warnings emitted
82 83
let fma_fatal_count=0
fma_fatal_list=""
Pierre Wieser's avatar
Pierre Wieser committed
84 85 86 87 88

# GLib marshaling
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
if test "${GLIB_GENMARSHAL}" = "no"; then
	AC_MSG_WARN([glib2-devel installed, but glib-genmarshal not found])
89
	let fma_fatal_count+=1
Pierre Wieser's avatar
Pierre Wieser committed
90
fi
91 92 93 94 95 96

# add --enable-docs (for all documentation stuff)
# have to be set early in the configure.ac in order to set all needed
# variables
FMA_ENABLE_DOCS

Pierre Wieser's avatar
Pierre Wieser committed
97
# Have and want GConf support ?
Pierre Wieser's avatar
Pierre Wieser committed
98
# As of 3.4 release, we are deprecating GConf, disabling it by default.
Pierre Wieser's avatar
Pierre Wieser committed
99 100 101
# We only search for the libraries when explicitely required from 
# configure. This is a first step deprecation; in a second step, we
# will emit a warning.
102
FMA_CHECK_FOR_GCONF
Pierre Wieser's avatar
Pierre Wieser committed
103

Pierre Wieser's avatar
Pierre Wieser committed
104 105
# cf. fma_required_versions
# aclocal complains if the comma is not just after the square bracket
106 107 108 109 110 111
FMA_CHECK_MODULE([GTK3],    [gtk+-3.0],   [${gtk_required}])
FMA_CHECK_MODULE([GLIB],    [glib-2.0],   [${glib_required}])
FMA_CHECK_MODULE([GMODULE], [gmodule-2.0],[${glib_required}])
FMA_CHECK_MODULE([GIO_UNIX],[gio-unix-2.0])
FMA_CHECK_MODULE([GTOP],    [libgtop-2.0],[${gtop_required}])
FMA_CHECK_MODULE([LIBXML],  [libxml-2.0], [${xml_required}])
Pierre Wieser's avatar
Pierre Wieser committed
112
FMA_CHECK_MODULE([UUID],    [uuid],       [${uuid_required}])
Pierre Wieser's avatar
Pierre Wieser committed
113

Pierre Wieser's avatar
Pierre Wieser committed
114 115 116
AC_SUBST([NAUTILUS_ACTIONS_CFLAGS])
AC_SUBST([NAUTILUS_ACTIONS_LIBS])

Pierre Wieser's avatar
Pierre Wieser committed
117 118 119
# print the debug output be printed to the console
AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])

Pierre Wieser's avatar
Pierre Wieser committed
120 121 122
# target a file manager (nautilus, nemo, ...)
FMA_TARGET_FILE_MANAGER

Pierre Wieser's avatar
Pierre Wieser committed
123
# add --with-default-io-provider option
124
FMA_SET_DEFAULT_IO_PROVIDER([io-desktop])
Pierre Wieser's avatar
Pierre Wieser committed
125

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
# Enable deprecated functions ?
FMA_MAINTAINER_CHECK_FOR_DEPRECATED

# check for gtk-doc
# - starting with gtk-doc 1.16, is able to handle srcdir != builddir
# - API documentation should not be built (would be incomplete) when deprecated
#   symbols are not enabled
GTK_DOC_CHECK([1.16],[--flavour no-tmpl])
if test "${enable_gtk_doc}" = "yes" -a "${enable_deprecated}" = "no"; then
	AC_MSG_WARN([API documentation will be incomplete as deprecated symbols are disabled])
fi

# check for gnome-doc-utils
# - starting with N-A 3.1.5, gnome-doc-utils is no more required when one want
#   compile the tarball distribution (i.e. without regenerating users's manuals)
GNOME_DOC_INIT(,,[gdu_cv_have_gdu=no])

# add --enable-html-manuals and --enable-pdf-manuals configure options
FMA_ENABLE_MANUALS

146 147
###

148 149
AC_CONFIG_FILES([
	Makefile
150
	data/Makefile
151
	data/actions/Makefile
152
	data/exports/Makefile
153
	data/gconf-schemas/Makefile
154
	docs/Makefile
155
	docs/manual/Makefile
Pierre Wieser's avatar
Pierre Wieser committed
156 157
	docs/reference/Makefile
	docs/reference/version.xml
158 159 160 161 162 163
	icons/Makefile
	icons/16x16/Makefile
	icons/22x22/Makefile
	icons/32x32/Makefile
	icons/48x48/Makefile
	icons/scalable/Makefile
Pierre Wieser's avatar
Pierre Wieser committed
164 165 166
	m4/Makefile
	maintainer/Makefile
	po/Makefile.in
167 168
	src/Makefile
	src/api/Makefile
169
	src/core/Makefile
170 171
	src/io-desktop/Makefile
	src/io-gconf/Makefile
172
	src/io-xml/Makefile
173 174
	src/plugin-menu/Makefile
	src/plugin-tracker/Makefile
175
	src/test/Makefile
176
	src/ui/Makefile
177
	src/utils/Makefile
178 179
])

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

184
AC_OUTPUT
185

186
msg_gtk_doc=`if test "x${enable_gtk_doc}" = "xno"; then echo "disabled"; else echo "enabled"; fi`
187 188 189 190 191
$as_echo "
	${PACKAGE_STRING} configuration summary:

	Installation prefix             ${prefix}
	Build system type               ${ac_cv_build}
Pierre Wieser's avatar
Pierre Wieser committed
192 193
	Gtk+ version                    ${GTK3_msg_version}
	GLib version                    ${GLIB_msg_version}
194 195 196 197
	Default I/O provider            ${with_default_io_provider}"
if test "${with_nautilus_ok}" = "yes"; then
	$as_echo "	Targeting Nautilus
	  installing extensions in      ${with_nautilus_extdir}"
Pierre Wieser's avatar
Pierre Wieser committed
198
fi
199 200 201
if test "${with_nemo_ok}" = "yes"; then
	$as_echo "	Targeting Nemo
	  installing extensions in      ${with_nemo_extdir}"
Pierre Wieser's avatar
Pierre Wieser committed
202
fi
Pierre Wieser's avatar
Pierre Wieser committed
203 204 205 206 207
$as_echo "	GConf enabled                   ${enable_gconf}"
if test "${enable_gconf}" = "yes"; then
	$as_echo "	GConf schemas installation      ${msg_schemas_install}"
fi
$as_echo "	Maintainer mode                 ${msg_maintainer_mode}
208
	Enable deprecated functions     ${enable_deprecated}
209 210 211
	API Reference generation        ${msg_gtk_doc}
	HTML User's Manuals generation  ${msg_html_manuals}
	PDF User's Manuals generation   ${msg_pdf_manuals}
212
"
213 214
if test ${fma_fatal_count} -gt 0; then
	$as_echo "${fma_fatal_list}
Pierre Wieser's avatar
Pierre Wieser committed
215 216 217 218
"
	exit 1
fi

Pierre Wieser's avatar
Pierre Wieser committed
219 220 221
#	Preprocessor flags              ${AM_CPPFLAGS}
#	Compiler flags                  ${AM_CFLAGS} ${NAUTILUS_ACTIONS_CFLAGS}
#	Linker flags                    ${NAUTILUS_ACTIONS_LIBS}