19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
29
AU_DEFUN([GNOME_COMMON_INIT],
31
dnl this macro should come after AC_CONFIG_MACRO_DIR
32
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
34
dnl ensure that when the Automake generated makefile calls aclocal,
35
dnl it honours the $ACLOCAL_FLAGS environment variable
36
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
37
if test -n "$ac_macro_dir"; then
38
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
41
AC_SUBST([ACLOCAL_AMFLAGS])
43
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
44
in your top-level Makefile.am, instead, where "m4" is the macro directory set
45
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
47
AC_DEFUN([GNOME_DEBUG_CHECK],
49
AC_ARG_ENABLE([debug],
50
AC_HELP_STRING([--enable-debug],
51
[turn on debugging]),,
54
if test x$enable_debug = xyes ; then
55
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
56
[Enable additional debugging at the expense of performance and size])
60
dnl GNOME_MAINTAINER_MODE_DEFINES ()
61
dnl define DISABLE_DEPRECATED
63
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
65
AC_REQUIRE([AM_MAINTAINER_MODE])
68
if test $USE_MAINTAINER_MODE = yes; then
69
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
70
for DOMAIN in $DOMAINS; do
71
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
75
AC_SUBST(DISABLE_DEPRECATED)
79
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
80
dnl the schema should be compiled
83
AC_DEFUN([GLIB_GSETTINGS],
85
m4_pattern_allow([AM_V_GEN])
86
AC_ARG_ENABLE(schemas-compile,
87
AS_HELP_STRING([--disable-schemas-compile],
88
[Disable regeneration of gschemas.compiled on install]),
90
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
91
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
92
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
94
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
95
PKG_PROG_PKG_CONFIG([0.16])
96
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
97
if test x$cross_compiling != xyes; then
98
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
100
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
102
AC_SUBST(GLIB_COMPILE_SCHEMAS)
103
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
104
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
106
ifelse([$1],,[:],[$1])
110
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
112
mostlyclean-am: clean-gsettings-schemas
114
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
116
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
117
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
119
all-am: $(gsettings_SCHEMAS:.xml=.valid)
120
uninstall-am: uninstall-gsettings-schemas
121
install-data-am: install-gsettings-schemas
123
.SECONDARY: $(gsettings_SCHEMAS)
125
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
127
if test -n "$^"; then \
128
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
129
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
130
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
133
uninstall-gsettings-schemas:
135
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
136
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
137
test -n "$$files" || exit 0; \
138
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
139
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
140
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
142
clean-gsettings-schemas:
143
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
145
ifdef gsettings_ENUM_NAMESPACE
146
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
147
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
150
_GSETTINGS_SUBST(GSETTINGS_RULES)
153
dnl _GSETTINGS_SUBST(VARIABLE)
154
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
155
AC_DEFUN([_GSETTINGS_SUBST],
158
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
163
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
164
# serial 42 IT_PROG_INTLTOOL
165
AC_DEFUN([IT_PROG_INTLTOOL], [
167
AC_REQUIRE([AM_NLS])dnl
169
case "$am__api_version" in
171
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
177
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
178
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
179
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
180
if test -n "$1"; then
181
AC_MSG_CHECKING([for intltool >= $1])
182
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
183
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
184
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
187
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
188
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
189
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
190
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
191
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
194
if test -z "$AM_DEFAULT_VERBOSITY"; then
195
AM_DEFAULT_VERBOSITY=1
197
AC_SUBST([AM_DEFAULT_VERBOSITY])
199
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
200
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
201
INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
202
AC_SUBST(INTLTOOL_V_MERGE)
203
AC_SUBST(INTLTOOL__v_MERGE_)
204
AC_SUBST(INTLTOOL__v_MERGE_0)
206
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
207
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
208
intltool__v_merge_options_0='-q'
209
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
210
AC_SUBST(intltool__v_merge_options_)
211
AC_SUBST(intltool__v_merge_options_0)
213
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
214
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
215
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
216
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
217
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
218
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
219
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
220
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
221
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
222
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
223
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
224
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
225
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
227
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
229
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
230
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
231
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
232
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
233
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
234
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
235
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
237
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
238
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
239
_IT_SUBST(INTLTOOL_KEYS_RULE)
240
_IT_SUBST(INTLTOOL_PROP_RULE)
241
_IT_SUBST(INTLTOOL_OAF_RULE)
242
_IT_SUBST(INTLTOOL_PONG_RULE)
243
_IT_SUBST(INTLTOOL_SERVER_RULE)
244
_IT_SUBST(INTLTOOL_SHEET_RULE)
245
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
246
_IT_SUBST(INTLTOOL_UI_RULE)
247
_IT_SUBST(INTLTOOL_XAM_RULE)
248
_IT_SUBST(INTLTOOL_KBD_RULE)
249
_IT_SUBST(INTLTOOL_XML_RULE)
250
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
251
_IT_SUBST(INTLTOOL_CAVES_RULE)
252
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
253
_IT_SUBST(INTLTOOL_THEME_RULE)
254
_IT_SUBST(INTLTOOL_SERVICE_RULE)
255
_IT_SUBST(INTLTOOL_POLICY_RULE)
257
# Check the gettext tools to make sure they are GNU
258
AC_PATH_PROG(XGETTEXT, xgettext)
259
AC_PATH_PROG(MSGMERGE, msgmerge)
260
AC_PATH_PROG(MSGFMT, msgfmt)
261
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
262
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
263
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
265
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
266
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
267
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
268
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
269
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
272
AC_PATH_PROG(INTLTOOL_PERL, perl)
273
if test -z "$INTLTOOL_PERL"; then
274
AC_MSG_ERROR([perl not found])
276
AC_MSG_CHECKING([for perl >= 5.8.1])
277
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
278
if test $? -ne 0; then
279
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
281
IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
282
AC_MSG_RESULT([$IT_PERL_VERSION])
284
if test "x$2" != "xno-xml"; then
285
AC_MSG_CHECKING([for XML::Parser])
286
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
289
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
293
# Substitute ALL_LINGUAS so we can use it in po/Makefile
294
AC_SUBST(ALL_LINGUAS)
296
# Set DATADIRNAME correctly if it is not set yet
297
# (copied from glib-gettext.m4)
298
if test -z "$DATADIRNAME"; then
300
[AC_LANG_PROGRAM([[]],
301
[[extern int _nl_msg_cat_cntr;
302
return _nl_msg_cat_cntr]])],
306
dnl On Solaris, if bind_textdomain_codeset is in libc,
307
dnl GNU format message catalog is always supported,
308
dnl since both are added to the libc all together.
309
dnl Hence, we'd like to go with DATADIRNAME=share
311
AC_CHECK_FUNC(bind_textdomain_codeset,
312
[DATADIRNAME=share], [DATADIRNAME=lib])
319
AC_SUBST(DATADIRNAME)
326
# IT_PO_SUBDIR(DIRNAME)
327
# ---------------------
328
# All po subdirs have to be declared with this macro; the subdir "po" is
329
# declared by IT_PROG_INTLTOOL.
331
AC_DEFUN([IT_PO_SUBDIR],
332
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
334
dnl The following CONFIG_COMMANDS should be executed at the very end
335
dnl of config.status.
336
AC_CONFIG_COMMANDS_PRE([
337
AC_CONFIG_COMMANDS([$1/stamp-it], [
338
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
339
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
341
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
346
'"s|^| $ac_top_srcdir/|" \
347
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
349
[sed '/^POTFILES =/,/[^\\]$/ {
353
' "$1/Makefile.in" >"$1/Makefile"]
354
rm -f "$1/Makefile.tmp"
355
mv "$1/stamp-it.tmp" "$1/stamp-it"
360
# _IT_SUBST(VARIABLE)
361
# -------------------
362
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
364
AC_DEFUN([_IT_SUBST],
367
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
372
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
373
# A hint is needed for aclocal from Automake <= 1.9.4:
374
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
377
# nls.m4 serial 5 (gettext-0.18)
378
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
380
dnl This file is free software; the Free Software Foundation
381
dnl gives unlimited permission to copy and/or distribute it,
382
dnl with or without modifications, as long as this notice is preserved.
384
dnl This file can can be used in projects which are not available under
385
dnl the GNU General Public License or the GNU Library General Public
386
dnl License but which still want to provide support for the GNU gettext
388
dnl Please note that the actual code of the GNU gettext library is covered
389
dnl by the GNU Library General Public License, and the rest of the GNU
390
dnl gettext package package is covered by the GNU General Public License.
391
dnl They are *not* in the public domain.
394
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
395
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
401
AC_MSG_CHECKING([whether NLS is requested])
402
dnl Default is enabled NLS
404
[ --disable-nls do not use Native Language Support],
405
USE_NLS=$enableval, USE_NLS=yes)
406
AC_MSG_RESULT([$USE_NLS])
410
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
411
# serial 1 (pkg-config-0.24)
413
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
415
# This program is free software; you can redistribute it and/or modify
416
# it under the terms of the GNU General Public License as published by
417
# the Free Software Foundation; either version 2 of the License, or
418
# (at your option) any later version.
420
# This program is distributed in the hope that it will be useful, but
421
# WITHOUT ANY WARRANTY; without even the implied warranty of
422
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
423
# General Public License for more details.
425
# You should have received a copy of the GNU General Public License
426
# along with this program; if not, write to the Free Software
427
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
429
# As a special exception to the GNU General Public License, if you
430
# distribute this file as part of a program that contains a
431
# configuration script generated by Autoconf, you may include it under
432
# the same distribution terms that you use for the rest of that program.
434
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
435
# ----------------------------------
436
AC_DEFUN([PKG_PROG_PKG_CONFIG],
437
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
438
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
439
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
440
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
441
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
442
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
444
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
445
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
447
if test -n "$PKG_CONFIG"; then
448
_pkg_min_version=m4_default([$1], [0.9.0])
449
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
450
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
457
])# PKG_PROG_PKG_CONFIG
459
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
461
# Check to see whether a particular set of modules exists. Similar
462
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
464
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
465
# only at the first occurence in configure.ac, so if the first place
466
# it's called might be skipped (such as if it is within an "if", you
467
# have to call PKG_CHECK_EXISTS manually
468
# --------------------------------------------------------------
469
AC_DEFUN([PKG_CHECK_EXISTS],
470
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
471
if test -n "$PKG_CONFIG" && \
472
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
473
m4_default([$2], [:])
474
m4_ifvaln([$3], [else
478
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
479
# ---------------------------------------------
480
m4_define([_PKG_CONFIG],
481
[if test -n "$$1"; then
483
elif test -n "$PKG_CONFIG"; then
484
PKG_CHECK_EXISTS([$3],
485
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
486
test "x$?" != "x0" && pkg_failed=yes ],
493
# _PKG_SHORT_ERRORS_SUPPORTED
494
# -----------------------------
495
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
496
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
497
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
498
_pkg_short_errors_supported=yes
500
_pkg_short_errors_supported=no
502
])# _PKG_SHORT_ERRORS_SUPPORTED
505
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
506
# [ACTION-IF-NOT-FOUND])
509
# Note that if there is a possibility the first call to
510
# PKG_CHECK_MODULES might not happen, you should be sure to include an
511
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
514
# --------------------------------------------------------------
515
AC_DEFUN([PKG_CHECK_MODULES],
516
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
517
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
518
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
521
AC_MSG_CHECKING([for $1])
523
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
524
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
526
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
527
and $1[]_LIBS to avoid the need to call pkg-config.
528
See the pkg-config man page for more details.])
530
if test $pkg_failed = yes; then
532
_PKG_SHORT_ERRORS_SUPPORTED
533
if test $_pkg_short_errors_supported = yes; then
534
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
536
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
538
# Put the nasty error message in config.log where it belongs
539
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
541
m4_default([$4], [AC_MSG_ERROR(
542
[Package requirements ($2) were not met:
546
Consider adjusting the PKG_CONFIG_PATH environment variable if you
547
installed software in a non-standard prefix.
551
elif test $pkg_failed = untried; then
553
m4_default([$4], [AC_MSG_FAILURE(
554
[The pkg-config script could not be found or is too old. Make sure it
555
is in your PATH or set the PKG_CONFIG environment variable to the full
560
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
563
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
564
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
568
])# PKG_CHECK_MODULES
571
# PKG_INSTALLDIR(DIRECTORY)
572
# -------------------------
573
# Substitutes the variable pkgconfigdir as the location where a module
574
# should install pkg-config .pc files. By default the directory is
575
# $libdir/pkgconfig, but the default can be changed by passing
576
# DIRECTORY. The user can override through the --with-pkgconfigdir
578
AC_DEFUN([PKG_INSTALLDIR],
579
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
580
m4_pushdef([pkg_description],
581
[pkg-config installation directory @<:@]pkg_default[@:>@])
582
AC_ARG_WITH([pkgconfigdir],
583
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
584
[with_pkgconfigdir=]pkg_default)
585
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
586
m4_popdef([pkg_default])
587
m4_popdef([pkg_description])
588
]) dnl PKG_INSTALLDIR
591
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
592
# -------------------------
593
# Substitutes the variable noarch_pkgconfigdir as the location where a
594
# module should install arch-independent pkg-config .pc files. By
595
# default the directory is $datadir/pkgconfig, but the default can be
596
# changed by passing DIRECTORY. The user can override through the
597
# --with-noarch-pkgconfigdir parameter.
598
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
599
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
600
m4_pushdef([pkg_description],
601
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
602
AC_ARG_WITH([noarch-pkgconfigdir],
603
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
604
[with_noarch_pkgconfigdir=]pkg_default)
605
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
606
m4_popdef([pkg_default])
607
m4_popdef([pkg_description])
608
]) dnl PKG_NOARCH_INSTALLDIR
610
AC_DEFUN([YELP_HELP_INIT],
612
AC_REQUIRE([AC_PROG_LN_S])
613
m4_pattern_allow([AM_V_at])
614
m4_pattern_allow([AM_V_GEN])
615
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
616
AC_ARG_WITH([help-dir],
617
AC_HELP_STRING([--with-help-dir=DIR],
618
[path where help files are installed]),,
619
[with_help_dir='${datadir}/help'])
620
HELP_DIR="$with_help_dir"
623
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
624
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
625
if test x"$ITSTOOL" = x; then
626
AC_MSG_ERROR([itstool not found])
629
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
630
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
631
if test x"$XMLLINT" = x; then
632
AC_MSG_ERROR([xmllint not found])
643
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
644
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
645
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
646
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
647
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
648
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
649
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
650
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
651
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
653
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
654
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
655
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
656
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
657
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
659
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
662
pot: $(_HELP_POTFILE)
663
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
664
$(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
667
repo: $(_HELP_POTFILE)
668
$(AM_V_at)for po in $(_HELP_POFILES); do \
669
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
670
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
674
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
675
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
676
$(AM_V_GEN)if ! test -f "[$]@"; then \
677
(cd "$(dir [$]@)" && \
678
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
679
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
681
(cd "$(dir [$]@)" && \
682
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
683
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
684
rm "$(notdir [$]@).tmp"); \
687
$(_HELP_MOFILES): %.mo: %.po
688
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
689
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
691
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
692
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
693
$(_HELP_LC_STAMPS): %.stamp: %.mo
694
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
695
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
696
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
697
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
698
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
699
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
703
mostlyclean-am: $(if $(HELP_ID),clean-help)
705
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
708
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
709
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
710
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
711
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
713
distdir: distdir-help-files
715
@for lc in C $(HELP_LINGUAS); do \
716
$(MKDIR_P) "$(distdir)/$$lc"; \
717
for file in $(HELP_FILES); do \
718
if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
719
cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
726
for lc in C $(_HELP_LINGUAS); do \
732
xmlpath="$$lc:$(srcdir)/$$lc"; \
734
for page in $(HELP_FILES); do \
735
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
736
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
742
install-data-am: $(if $(HELP_ID),install-help)
744
@for lc in C $(_HELP_LINGUAS); do \
745
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
747
@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
748
if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
749
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
750
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
751
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
752
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
754
@for f in $(_HELP_C_EXTRA); do \
755
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
756
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
757
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
758
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
759
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
760
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
762
@for f in $(HELP_MEDIA); do \
763
for lc in C $(_HELP_LINGUAS); do \
764
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
765
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
766
mdir=`dirname "$$f"`; \
767
if test "x$mdir" = "x."; then mdir=""; fi; \
768
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
769
if test -f "$$d$$lc/$$f"; then \
770
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
771
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
772
elif test "x$$lc" != "xC"; then \
773
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
774
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
779
.PHONY: uninstall-help
780
uninstall-am: $(if $(HELP_ID),uninstall-help)
782
for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
783
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
784
echo "rm -f $$helpdir`basename $$f`"; \
785
rm -f "$$helpdir`basename $$f`"; \
787
@for f in $(_HELP_C_EXTRA); do \
788
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
789
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
790
echo "rm -f $$helpdir`basename $$f`"; \
791
rm -f "$$helpdir`basename $$f`"; \
793
@for f in $(HELP_MEDIA); do \
794
for lc in C $(_HELP_LINGUAS); do \
795
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
796
echo "rm -f $$helpdir$$f"; \
797
rm -f "$$helpdir$$f"; \
801
AC_SUBST([YELP_HELP_RULES])
802
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
22
805
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
24
807
# This file is free software; the Free Software Foundation
1137
1920
AC_MSG_ERROR([Vala $1 not found.], [77])])])])
1145
dnl GNOME_COMMON_INIT
1147
AU_DEFUN([GNOME_COMMON_INIT],
1149
dnl this macro should come after AC_CONFIG_MACRO_DIR
1150
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1152
dnl ensure that when the Automake generated makefile calls aclocal,
1153
dnl it honours the $ACLOCAL_FLAGS environment variable
1154
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1155
if test -n "$ac_macro_dir"; then
1156
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1159
AC_SUBST([ACLOCAL_AMFLAGS])
1161
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
1162
in your top-level Makefile.am, instead, where "m4" is the macro directory set
1163
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
1165
AC_DEFUN([GNOME_DEBUG_CHECK],
1167
AC_ARG_ENABLE([debug],
1168
AC_HELP_STRING([--enable-debug],
1169
[turn on debugging]),,
1172
if test x$enable_debug = xyes ; then
1173
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1174
[Enable additional debugging at the expense of performance and size])
1178
dnl GNOME_MAINTAINER_MODE_DEFINES ()
1179
dnl define DISABLE_DEPRECATED
1181
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1183
AC_REQUIRE([AM_MAINTAINER_MODE])
1185
DISABLE_DEPRECATED=""
1186
if test $USE_MAINTAINER_MODE = yes; then
1187
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
1188
for DOMAIN in $DOMAINS; do
1189
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1193
AC_SUBST(DISABLE_DEPRECATED)
1197
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1198
# serial 42 IT_PROG_INTLTOOL
1199
AC_DEFUN([IT_PROG_INTLTOOL], [
1200
AC_PREREQ([2.50])dnl
1201
AC_REQUIRE([AM_NLS])dnl
1203
case "$am__api_version" in
1205
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1211
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1212
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1213
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1214
if test -n "$1"; then
1215
AC_MSG_CHECKING([for intltool >= $1])
1216
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1217
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1218
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1221
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1222
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1223
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1224
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1225
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1228
if test -z "$AM_DEFAULT_VERBOSITY"; then
1229
AM_DEFAULT_VERBOSITY=1
1231
AC_SUBST([AM_DEFAULT_VERBOSITY])
1233
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1234
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1235
INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
1236
AC_SUBST(INTLTOOL_V_MERGE)
1237
AC_SUBST(INTLTOOL__v_MERGE_)
1238
AC_SUBST(INTLTOOL__v_MERGE_0)
1240
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1241
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1242
intltool__v_merge_options_0='-q'
1243
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1244
AC_SUBST(intltool__v_merge_options_)
1245
AC_SUBST(intltool__v_merge_options_0)
1247
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1248
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1249
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1250
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1251
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
1252
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1253
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1254
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1255
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1256
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1257
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1258
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1259
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
1261
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
1263
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1264
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1265
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1266
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1267
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1268
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1269
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1271
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1272
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1273
_IT_SUBST(INTLTOOL_KEYS_RULE)
1274
_IT_SUBST(INTLTOOL_PROP_RULE)
1275
_IT_SUBST(INTLTOOL_OAF_RULE)
1276
_IT_SUBST(INTLTOOL_PONG_RULE)
1277
_IT_SUBST(INTLTOOL_SERVER_RULE)
1278
_IT_SUBST(INTLTOOL_SHEET_RULE)
1279
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1280
_IT_SUBST(INTLTOOL_UI_RULE)
1281
_IT_SUBST(INTLTOOL_XAM_RULE)
1282
_IT_SUBST(INTLTOOL_KBD_RULE)
1283
_IT_SUBST(INTLTOOL_XML_RULE)
1284
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1285
_IT_SUBST(INTLTOOL_CAVES_RULE)
1286
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1287
_IT_SUBST(INTLTOOL_THEME_RULE)
1288
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1289
_IT_SUBST(INTLTOOL_POLICY_RULE)
1291
# Check the gettext tools to make sure they are GNU
1292
AC_PATH_PROG(XGETTEXT, xgettext)
1293
AC_PATH_PROG(MSGMERGE, msgmerge)
1294
AC_PATH_PROG(MSGFMT, msgfmt)
1295
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1296
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1297
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1299
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1300
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1301
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1302
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1303
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1306
AC_PATH_PROG(INTLTOOL_PERL, perl)
1307
if test -z "$INTLTOOL_PERL"; then
1308
AC_MSG_ERROR([perl not found])
1310
AC_MSG_CHECKING([for perl >= 5.8.1])
1311
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1312
if test $? -ne 0; then
1313
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1315
IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1316
AC_MSG_RESULT([$IT_PERL_VERSION])
1318
if test "x$2" != "xno-xml"; then
1319
AC_MSG_CHECKING([for XML::Parser])
1320
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1323
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1327
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1328
AC_SUBST(ALL_LINGUAS)
1330
# Set DATADIRNAME correctly if it is not set yet
1331
# (copied from glib-gettext.m4)
1332
if test -z "$DATADIRNAME"; then
1334
[AC_LANG_PROGRAM([[]],
1335
[[extern int _nl_msg_cat_cntr;
1336
return _nl_msg_cat_cntr]])],
1337
[DATADIRNAME=share],
1340
dnl On Solaris, if bind_textdomain_codeset is in libc,
1341
dnl GNU format message catalog is always supported,
1342
dnl since both are added to the libc all together.
1343
dnl Hence, we'd like to go with DATADIRNAME=share
1345
AC_CHECK_FUNC(bind_textdomain_codeset,
1346
[DATADIRNAME=share], [DATADIRNAME=lib])
1353
AC_SUBST(DATADIRNAME)
1360
# IT_PO_SUBDIR(DIRNAME)
1361
# ---------------------
1362
# All po subdirs have to be declared with this macro; the subdir "po" is
1363
# declared by IT_PROG_INTLTOOL.
1365
AC_DEFUN([IT_PO_SUBDIR],
1366
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1368
dnl The following CONFIG_COMMANDS should be executed at the very end
1369
dnl of config.status.
1370
AC_CONFIG_COMMANDS_PRE([
1371
AC_CONFIG_COMMANDS([$1/stamp-it], [
1372
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1373
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1375
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1380
'"s|^| $ac_top_srcdir/|" \
1381
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1383
[sed '/^POTFILES =/,/[^\\]$/ {
1387
' "$1/Makefile.in" >"$1/Makefile"]
1388
rm -f "$1/Makefile.tmp"
1389
mv "$1/stamp-it.tmp" "$1/stamp-it"
1394
# _IT_SUBST(VARIABLE)
1395
# -------------------
1396
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1398
AC_DEFUN([_IT_SUBST],
1401
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1406
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1407
# A hint is needed for aclocal from Automake <= 1.9.4:
1408
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1411
# nls.m4 serial 5 (gettext-0.18)
1412
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1414
dnl This file is free software; the Free Software Foundation
1415
dnl gives unlimited permission to copy and/or distribute it,
1416
dnl with or without modifications, as long as this notice is preserved.
1418
dnl This file can can be used in projects which are not available under
1419
dnl the GNU General Public License or the GNU Library General Public
1420
dnl License but which still want to provide support for the GNU gettext
1422
dnl Please note that the actual code of the GNU gettext library is covered
1423
dnl by the GNU Library General Public License, and the rest of the GNU
1424
dnl gettext package package is covered by the GNU General Public License.
1425
dnl They are *not* in the public domain.
1428
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1429
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1435
AC_MSG_CHECKING([whether NLS is requested])
1436
dnl Default is enabled NLS
1437
AC_ARG_ENABLE([nls],
1438
[ --disable-nls do not use Native Language Support],
1439
USE_NLS=$enableval, USE_NLS=yes)
1440
AC_MSG_RESULT([$USE_NLS])
1444
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1445
# serial 1 (pkg-config-0.24)
1447
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1449
# This program is free software; you can redistribute it and/or modify
1450
# it under the terms of the GNU General Public License as published by
1451
# the Free Software Foundation; either version 2 of the License, or
1452
# (at your option) any later version.
1454
# This program is distributed in the hope that it will be useful, but
1455
# WITHOUT ANY WARRANTY; without even the implied warranty of
1456
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1457
# General Public License for more details.
1459
# You should have received a copy of the GNU General Public License
1460
# along with this program; if not, write to the Free Software
1461
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1463
# As a special exception to the GNU General Public License, if you
1464
# distribute this file as part of a program that contains a
1465
# configuration script generated by Autoconf, you may include it under
1466
# the same distribution terms that you use for the rest of that program.
1468
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1469
# ----------------------------------
1470
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1471
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1472
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1473
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1474
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1475
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1476
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1478
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1479
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1481
if test -n "$PKG_CONFIG"; then
1482
_pkg_min_version=m4_default([$1], [0.9.0])
1483
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1484
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1485
AC_MSG_RESULT([yes])
1491
])# PKG_PROG_PKG_CONFIG
1493
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1495
# Check to see whether a particular set of modules exists. Similar
1496
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1498
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1499
# only at the first occurence in configure.ac, so if the first place
1500
# it's called might be skipped (such as if it is within an "if", you
1501
# have to call PKG_CHECK_EXISTS manually
1502
# --------------------------------------------------------------
1503
AC_DEFUN([PKG_CHECK_EXISTS],
1504
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1505
if test -n "$PKG_CONFIG" && \
1506
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1507
m4_default([$2], [:])
1508
m4_ifvaln([$3], [else
1512
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1513
# ---------------------------------------------
1514
m4_define([_PKG_CONFIG],
1515
[if test -n "$$1"; then
1517
elif test -n "$PKG_CONFIG"; then
1518
PKG_CHECK_EXISTS([$3],
1519
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1520
test "x$?" != "x0" && pkg_failed=yes ],
1527
# _PKG_SHORT_ERRORS_SUPPORTED
1528
# -----------------------------
1529
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1530
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1531
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1532
_pkg_short_errors_supported=yes
1534
_pkg_short_errors_supported=no
1536
])# _PKG_SHORT_ERRORS_SUPPORTED
1539
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1540
# [ACTION-IF-NOT-FOUND])
1543
# Note that if there is a possibility the first call to
1544
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1545
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1548
# --------------------------------------------------------------
1549
AC_DEFUN([PKG_CHECK_MODULES],
1550
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1551
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1552
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1555
AC_MSG_CHECKING([for $1])
1557
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1558
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1560
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1561
and $1[]_LIBS to avoid the need to call pkg-config.
1562
See the pkg-config man page for more details.])
1564
if test $pkg_failed = yes; then
1566
_PKG_SHORT_ERRORS_SUPPORTED
1567
if test $_pkg_short_errors_supported = yes; then
1568
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1570
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1572
# Put the nasty error message in config.log where it belongs
1573
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1575
m4_default([$4], [AC_MSG_ERROR(
1576
[Package requirements ($2) were not met:
1580
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1581
installed software in a non-standard prefix.
1585
elif test $pkg_failed = untried; then
1587
m4_default([$4], [AC_MSG_FAILURE(
1588
[The pkg-config script could not be found or is too old. Make sure it
1589
is in your PATH or set the PKG_CONFIG environment variable to the full
1594
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1597
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1598
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1599
AC_MSG_RESULT([yes])
1602
])# PKG_CHECK_MODULES
1605
# PKG_INSTALLDIR(DIRECTORY)
1606
# -------------------------
1607
# Substitutes the variable pkgconfigdir as the location where a module
1608
# should install pkg-config .pc files. By default the directory is
1609
# $libdir/pkgconfig, but the default can be changed by passing
1610
# DIRECTORY. The user can override through the --with-pkgconfigdir
1612
AC_DEFUN([PKG_INSTALLDIR],
1613
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1614
m4_pushdef([pkg_description],
1615
[pkg-config installation directory @<:@]pkg_default[@:>@])
1616
AC_ARG_WITH([pkgconfigdir],
1617
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1618
[with_pkgconfigdir=]pkg_default)
1619
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1620
m4_popdef([pkg_default])
1621
m4_popdef([pkg_description])
1622
]) dnl PKG_INSTALLDIR
1625
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1626
# -------------------------
1627
# Substitutes the variable noarch_pkgconfigdir as the location where a
1628
# module should install arch-independent pkg-config .pc files. By
1629
# default the directory is $datadir/pkgconfig, but the default can be
1630
# changed by passing DIRECTORY. The user can override through the
1631
# --with-noarch-pkgconfigdir parameter.
1632
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1633
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1634
m4_pushdef([pkg_description],
1635
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1636
AC_ARG_WITH([noarch-pkgconfigdir],
1637
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1638
[with_noarch_pkgconfigdir=]pkg_default)
1639
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1640
m4_popdef([pkg_default])
1641
m4_popdef([pkg_description])
1642
]) dnl PKG_NOARCH_INSTALLDIR
1644
AC_DEFUN([YELP_HELP_INIT],
1646
AC_REQUIRE([AC_PROG_LN_S])
1647
m4_pattern_allow([AM_V_at])
1648
m4_pattern_allow([AM_V_GEN])
1649
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
1650
AC_ARG_WITH([help-dir],
1651
AC_HELP_STRING([--with-help-dir=DIR],
1652
[path where help files are installed]),,
1653
[with_help_dir='${datadir}/help'])
1654
HELP_DIR="$with_help_dir"
1657
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
1658
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
1659
if test x"$ITSTOOL" = x; then
1660
AC_MSG_ERROR([itstool not found])
1663
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
1664
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
1665
if test x"$XMLLINT" = x; then
1666
AC_MSG_ERROR([xmllint not found])
1677
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
1678
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
1679
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
1680
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
1681
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
1682
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
1683
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
1684
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
1685
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
1687
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
1688
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
1689
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
1690
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
1691
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
1693
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
1696
pot: $(_HELP_POTFILE)
1697
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1698
$(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
1701
repo: $(_HELP_POTFILE)
1702
$(AM_V_at)for po in $(_HELP_POFILES); do \
1703
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
1704
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
1708
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1709
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
1710
$(AM_V_GEN)if ! test -f "[$]@"; then \
1711
(cd "$(dir [$]@)" && \
1712
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1713
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
1715
(cd "$(dir [$]@)" && \
1716
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1717
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
1718
rm "$(notdir [$]@).tmp"); \
1721
$(_HELP_MOFILES): %.mo: %.po
1722
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1723
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
1725
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
1726
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
1727
$(_HELP_LC_STAMPS): %.stamp: %.mo
1728
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
1729
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1730
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
1731
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
1732
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
1733
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
1737
mostlyclean-am: $(if $(HELP_ID),clean-help)
1739
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
1742
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1743
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
1744
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
1745
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
1747
distdir: distdir-help-files
1749
@for lc in C $(HELP_LINGUAS); do \
1750
$(MKDIR_P) "$(distdir)/$$lc"; \
1751
for file in $(HELP_FILES); do \
1752
if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
1753
cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
1760
for lc in C $(_HELP_LINGUAS); do \
1761
if test -d "$$lc"; \
1766
xmlpath="$$lc:$(srcdir)/$$lc"; \
1768
for page in $(HELP_FILES); do \
1769
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
1770
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
1775
.PHONY: install-help
1776
install-data-am: $(if $(HELP_ID),install-help)
1778
@for lc in C $(_HELP_LINGUAS); do \
1779
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
1781
@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1782
if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
1783
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1784
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1785
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
1786
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
1788
@for f in $(_HELP_C_EXTRA); do \
1789
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1790
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
1791
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1792
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1793
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
1794
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
1796
@for f in $(HELP_MEDIA); do \
1797
for lc in C $(_HELP_LINGUAS); do \
1798
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
1799
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1800
mdir=`dirname "$$f"`; \
1801
if test "x$mdir" = "x."; then mdir=""; fi; \
1802
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
1803
if test -f "$$d$$lc/$$f"; then \
1804
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
1805
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
1806
elif test "x$$lc" != "xC"; then \
1807
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
1808
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
1813
.PHONY: uninstall-help
1814
uninstall-am: $(if $(HELP_ID),uninstall-help)
1816
for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1817
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1818
echo "rm -f $$helpdir`basename $$f`"; \
1819
rm -f "$$helpdir`basename $$f`"; \
1821
@for f in $(_HELP_C_EXTRA); do \
1822
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1823
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1824
echo "rm -f $$helpdir`basename $$f`"; \
1825
rm -f "$$helpdir`basename $$f`"; \
1827
@for f in $(HELP_MEDIA); do \
1828
for lc in C $(_HELP_LINGUAS); do \
1829
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1830
echo "rm -f $$helpdir$$f"; \
1831
rm -f "$$helpdir$$f"; \
1835
AC_SUBST([YELP_HELP_RULES])
1836
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
1840
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1841
dnl the schema should be compiled
1844
AC_DEFUN([GLIB_GSETTINGS],
1846
m4_pattern_allow([AM_V_GEN])
1847
AC_ARG_ENABLE(schemas-compile,
1848
AS_HELP_STRING([--disable-schemas-compile],
1849
[Disable regeneration of gschemas.compiled on install]),
1850
[case ${enableval} in
1851
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1852
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1853
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1855
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1856
PKG_PROG_PKG_CONFIG([0.16])
1857
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1858
if test x$cross_compiling != xyes; then
1859
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1861
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1863
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1864
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1865
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1867
ifelse([$1],,[:],[$1])
1871
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1873
mostlyclean-am: clean-gsettings-schemas
1875
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1877
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1878
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1880
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1881
uninstall-am: uninstall-gsettings-schemas
1882
install-data-am: install-gsettings-schemas
1884
.SECONDARY: $(gsettings_SCHEMAS)
1886
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1888
if test -n "$^"; then \
1889
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1890
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1891
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1894
uninstall-gsettings-schemas:
1895
@$(NORMAL_UNINSTALL)
1896
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1897
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1898
test -n "$$files" || exit 0; \
1899
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1900
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1901
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1903
clean-gsettings-schemas:
1904
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1906
ifdef gsettings_ENUM_NAMESPACE
1907
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1908
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1911
_GSETTINGS_SUBST(GSETTINGS_RULES)
1914
dnl _GSETTINGS_SUBST(VARIABLE)
1915
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1916
AC_DEFUN([_GSETTINGS_SUBST],
1919
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])