19
20
If you have problems, you may need to regenerate the build system entirely.
20
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
24
dnl the schema should be compiled
27
AC_DEFUN([GLIB_GSETTINGS],
29
m4_pattern_allow([AM_V_GEN])
30
AC_ARG_ENABLE(schemas-compile,
31
AS_HELP_STRING([--disable-schemas-compile],
32
[Disable regeneration of gschemas.compiled on install]),
34
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
35
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
36
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
38
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
39
PKG_PROG_PKG_CONFIG([0.16])
40
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
41
if test x$cross_compiling != xyes; then
42
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
44
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
46
AC_SUBST(GLIB_COMPILE_SCHEMAS)
47
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
48
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
50
ifelse([$1],,[:],[$1])
54
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
56
mostlyclean-am: clean-gsettings-schemas
58
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
60
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
61
$(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 [$]@
63
all-am: $(gsettings_SCHEMAS:.xml=.valid)
64
uninstall-am: uninstall-gsettings-schemas
65
install-data-am: install-gsettings-schemas
67
.SECONDARY: $(gsettings_SCHEMAS)
69
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
71
if test -n "$^"; then \
72
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
73
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
74
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
77
uninstall-gsettings-schemas:
79
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
80
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
81
test -n "$$files" || exit 0; \
82
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
83
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
84
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
86
clean-gsettings-schemas:
87
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
89
ifdef gsettings_ENUM_NAMESPACE
90
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
91
$(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 [$]@
94
_GSETTINGS_SUBST(GSETTINGS_RULES)
97
dnl _GSETTINGS_SUBST(VARIABLE)
98
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
99
AC_DEFUN([_GSETTINGS_SUBST],
102
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
106
# nls.m4 serial 5 (gettext-0.18)
107
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
109
dnl This file is free software; the Free Software Foundation
110
dnl gives unlimited permission to copy and/or distribute it,
111
dnl with or without modifications, as long as this notice is preserved.
113
dnl This file can can be used in projects which are not available under
114
dnl the GNU General Public License or the GNU Library General Public
115
dnl License but which still want to provide support for the GNU gettext
117
dnl Please note that the actual code of the GNU gettext library is covered
118
dnl by the GNU Library General Public License, and the rest of the GNU
119
dnl gettext package package is covered by the GNU General Public License.
120
dnl They are *not* in the public domain.
123
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
124
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
130
AC_MSG_CHECKING([whether NLS is requested])
131
dnl Default is enabled NLS
133
[ --disable-nls do not use Native Language Support],
134
USE_NLS=$enableval, USE_NLS=yes)
135
AC_MSG_RESULT([$USE_NLS])
139
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
140
# serial 1 (pkg-config-0.24)
142
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
144
# This program is free software; you can redistribute it and/or modify
145
# it under the terms of the GNU General Public License as published by
146
# the Free Software Foundation; either version 2 of the License, or
147
# (at your option) any later version.
149
# This program is distributed in the hope that it will be useful, but
150
# WITHOUT ANY WARRANTY; without even the implied warranty of
151
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
152
# General Public License for more details.
154
# You should have received a copy of the GNU General Public License
155
# along with this program; if not, write to the Free Software
156
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
158
# As a special exception to the GNU General Public License, if you
159
# distribute this file as part of a program that contains a
160
# configuration script generated by Autoconf, you may include it under
161
# the same distribution terms that you use for the rest of that program.
163
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
164
# ----------------------------------
165
AC_DEFUN([PKG_PROG_PKG_CONFIG],
166
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
167
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
168
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
169
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
170
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
171
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
173
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
174
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
176
if test -n "$PKG_CONFIG"; then
177
_pkg_min_version=m4_default([$1], [0.9.0])
178
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
179
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
186
])# PKG_PROG_PKG_CONFIG
188
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
190
# Check to see whether a particular set of modules exists. Similar
191
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
193
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
194
# only at the first occurence in configure.ac, so if the first place
195
# it's called might be skipped (such as if it is within an "if", you
196
# have to call PKG_CHECK_EXISTS manually
197
# --------------------------------------------------------------
198
AC_DEFUN([PKG_CHECK_EXISTS],
199
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
200
if test -n "$PKG_CONFIG" && \
201
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
202
m4_default([$2], [:])
203
m4_ifvaln([$3], [else
207
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
208
# ---------------------------------------------
209
m4_define([_PKG_CONFIG],
210
[if test -n "$$1"; then
212
elif test -n "$PKG_CONFIG"; then
213
PKG_CHECK_EXISTS([$3],
214
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
215
test "x$?" != "x0" && pkg_failed=yes ],
222
# _PKG_SHORT_ERRORS_SUPPORTED
223
# -----------------------------
224
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
225
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
226
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
227
_pkg_short_errors_supported=yes
229
_pkg_short_errors_supported=no
231
])# _PKG_SHORT_ERRORS_SUPPORTED
234
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
235
# [ACTION-IF-NOT-FOUND])
238
# Note that if there is a possibility the first call to
239
# PKG_CHECK_MODULES might not happen, you should be sure to include an
240
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
243
# --------------------------------------------------------------
244
AC_DEFUN([PKG_CHECK_MODULES],
245
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
246
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
247
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
250
AC_MSG_CHECKING([for $1])
252
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
253
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
255
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
256
and $1[]_LIBS to avoid the need to call pkg-config.
257
See the pkg-config man page for more details.])
259
if test $pkg_failed = yes; then
261
_PKG_SHORT_ERRORS_SUPPORTED
262
if test $_pkg_short_errors_supported = yes; then
263
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
265
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
267
# Put the nasty error message in config.log where it belongs
268
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
270
m4_default([$4], [AC_MSG_ERROR(
271
[Package requirements ($2) were not met:
275
Consider adjusting the PKG_CONFIG_PATH environment variable if you
276
installed software in a non-standard prefix.
280
elif test $pkg_failed = untried; then
282
m4_default([$4], [AC_MSG_FAILURE(
283
[The pkg-config script could not be found or is too old. Make sure it
284
is in your PATH or set the PKG_CONFIG environment variable to the full
289
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
292
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
293
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
297
])# PKG_CHECK_MODULES
300
# PKG_INSTALLDIR(DIRECTORY)
301
# -------------------------
302
# Substitutes the variable pkgconfigdir as the location where a module
303
# should install pkg-config .pc files. By default the directory is
304
# $libdir/pkgconfig, but the default can be changed by passing
305
# DIRECTORY. The user can override through the --with-pkgconfigdir
307
AC_DEFUN([PKG_INSTALLDIR],
308
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
309
m4_pushdef([pkg_description],
310
[pkg-config installation directory @<:@]pkg_default[@:>@])
311
AC_ARG_WITH([pkgconfigdir],
312
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
313
[with_pkgconfigdir=]pkg_default)
314
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
315
m4_popdef([pkg_default])
316
m4_popdef([pkg_description])
317
]) dnl PKG_INSTALLDIR
320
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
321
# -------------------------
322
# Substitutes the variable noarch_pkgconfigdir as the location where a
323
# module should install arch-independent pkg-config .pc files. By
324
# default the directory is $datadir/pkgconfig, but the default can be
325
# changed by passing DIRECTORY. The user can override through the
326
# --with-noarch-pkgconfigdir parameter.
327
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
328
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
329
m4_pushdef([pkg_description],
330
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
331
AC_ARG_WITH([noarch-pkgconfigdir],
332
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
333
[with_noarch_pkgconfigdir=]pkg_default)
334
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
335
m4_popdef([pkg_default])
336
m4_popdef([pkg_description])
337
]) dnl PKG_NOARCH_INSTALLDIR
340
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
341
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
342
# -------------------------------------------
343
# Retrieves the value of the pkg-config variable for the given module.
344
AC_DEFUN([PKG_CHECK_VAR],
345
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
346
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
348
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
349
AS_VAR_COPY([$1], [pkg_cv_][$1])
351
AS_VAR_IF([$1], [""], [$5], [$4])dnl
354
AC_DEFUN([YELP_HELP_INIT],
356
AC_REQUIRE([AC_PROG_LN_S])
357
m4_pattern_allow([AM_V_at])
358
m4_pattern_allow([AM_V_GEN])
359
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
360
AC_ARG_WITH([help-dir],
361
AC_HELP_STRING([--with-help-dir=DIR],
362
[path where help files are installed]),,
363
[with_help_dir='${datadir}/help'])
364
HELP_DIR="$with_help_dir"
367
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
368
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
369
if test x"$ITSTOOL" = x; then
370
AC_MSG_ERROR([itstool not found])
373
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
374
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
375
if test x"$XMLLINT" = x; then
376
AC_MSG_ERROR([xmllint not found])
387
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
388
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
389
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
390
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
391
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
392
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
393
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
394
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
395
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
397
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
398
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
399
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
400
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
401
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
403
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
406
pot: $(_HELP_POTFILE)
407
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
408
$(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
411
repo: $(_HELP_POTFILE)
412
$(AM_V_at)for po in $(_HELP_POFILES); do \
413
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
414
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
418
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
419
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
420
$(AM_V_GEN)if ! test -f "[$]@"; then \
421
(cd "$(dir [$]@)" && \
422
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
423
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
425
(cd "$(dir [$]@)" && \
426
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
427
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
428
rm "$(notdir [$]@).tmp"); \
431
$(_HELP_MOFILES): %.mo: %.po
432
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
433
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
435
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
436
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
437
$(_HELP_LC_STAMPS): %.stamp: %.mo
438
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
439
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
440
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
441
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
442
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
443
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
447
mostlyclean-am: $(if $(HELP_ID),clean-help)
449
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
452
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
453
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
454
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
455
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
457
distdir: distdir-help-files
459
@for lc in C $(HELP_LINGUAS); do \
460
$(MKDIR_P) "$(distdir)/$$lc"; \
461
for file in $(HELP_FILES); do \
462
if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
463
cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
470
for lc in C $(_HELP_LINGUAS); do \
476
xmlpath="$$lc:$(srcdir)/$$lc"; \
478
for page in $(HELP_FILES); do \
479
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
480
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
486
install-data-am: $(if $(HELP_ID),install-help)
488
@for lc in C $(_HELP_LINGUAS); do \
489
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
491
@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
492
if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
493
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
494
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
495
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
496
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
498
@for f in $(_HELP_C_EXTRA); do \
499
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
500
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
501
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
502
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
503
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
504
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
506
@for f in $(HELP_MEDIA); do \
507
for lc in C $(_HELP_LINGUAS); do \
508
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
509
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
510
mdir=`dirname "$$f"`; \
511
if test "x$mdir" = "x."; then mdir=""; fi; \
512
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
513
if test -f "$$d$$lc/$$f"; then \
514
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
515
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
516
elif test "x$$lc" != "xC"; then \
517
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
518
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
523
.PHONY: uninstall-help
524
uninstall-am: $(if $(HELP_ID),uninstall-help)
526
for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
527
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
528
echo "rm -f $$helpdir`basename $$f`"; \
529
rm -f "$$helpdir`basename $$f`"; \
531
@for f in $(_HELP_C_EXTRA); do \
532
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
533
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
534
echo "rm -f $$helpdir`basename $$f`"; \
535
rm -f "$$helpdir`basename $$f`"; \
537
@for f in $(HELP_MEDIA); do \
538
for lc in C $(_HELP_LINGUAS); do \
539
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
540
echo "rm -f $$helpdir$$f"; \
541
rm -f "$$helpdir$$f"; \
545
AC_SUBST([YELP_HELP_RULES])
546
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
549
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
23
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
551
25
# This file is free software; the Free Software Foundation
552
26
# gives unlimited permission to copy and/or distribute it,
1472
1035
# Substitute a variable $(am__untar) that extract such
1473
1036
# a tarball read from stdin.
1474
1037
# $(am__untar) < result.tar
1475
1039
AC_DEFUN([_AM_PROG_TAR],
1476
1040
[# Always define AMTAR for backward compatibility. Yes, it's still used
1477
1041
# in the wild :-( We should find a proper way to deprecate it ...
1478
1042
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1044
# We'll loop over all known methods to create a tar archive until one works.
1045
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1479
1047
m4_if([$1], [v7],
1480
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1481
[m4_case([$1], [ustar],, [pax],,
1482
[m4_fatal([Unknown tar format])])
1483
AC_MSG_CHECKING([how to create a $1 tar archive])
1484
# Loop over all known methods to create a tar archive until one works.
1485
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1486
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1487
# Do not fold the above two line into one, because Tru64 sh and
1488
# Solaris sh will not grok spaces in the rhs of '-'.
1489
for _am_tool in $_am_tools
1493
for _am_tar in tar gnutar gtar;
1495
AM_RUN_LOG([$_am_tar --version]) && break
1497
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1498
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1499
am__untar="$_am_tar -xf -"
1502
# Must skip GNU tar: if it does not support --format= it doesn't create
1503
# ustar tarball either.
1504
(tar --version) >/dev/null 2>&1 && continue
1505
am__tar='tar chf - "$$tardir"'
1506
am__tar_='tar chf - "$tardir"'
1507
am__untar='tar xf -'
1510
am__tar='pax -L -x $1 -w "$$tardir"'
1511
am__tar_='pax -L -x $1 -w "$tardir"'
1515
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1516
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1517
am__untar='cpio -i -H $1 -d'
1526
# If the value was cached, stop now. We just wanted to have am__tar
1527
# and am__untar set.
1528
test -n "${am_cv_prog_tar_$1}" && break
1530
# tar/untar a dummy directory, and stop if the command works
1533
echo GrepMe > conftest.dir/file
1534
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1536
if test -s conftest.tar; then
1537
AM_RUN_LOG([$am__untar <conftest.tar])
1538
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1543
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1544
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1048
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1052
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053
# There is notably a 21 bits limit for the UID and the GID. In fact,
1054
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1056
am_max_uid=2097151 # 2^21 - 1
1057
am_max_gid=$am_max_uid
1058
# The $UID and $GID variables are not portable, so we need to resort
1059
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1060
# below are definitely unexpected, so allow the users to see them
1061
# (that is, avoid stderr redirection).
1062
am_uid=`id -u || echo unknown`
1063
am_gid=`id -g || echo unknown`
1064
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065
if test $am_uid -le $am_max_uid; then
1066
AC_MSG_RESULT([yes])
1071
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072
if test $am_gid -le $am_max_gid; then
1073
AC_MSG_RESULT([yes])
1082
[m4_fatal([Unknown tar format])])
1084
AC_MSG_CHECKING([how to create a $1 tar archive])
1086
# Go ahead even if we have the value already cached. We do so because we
1087
# need to set the values for the 'am__tar' and 'am__untar' variables.
1088
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090
for _am_tool in $_am_tools; do
1093
for _am_tar in tar gnutar gtar; do
1094
AM_RUN_LOG([$_am_tar --version]) && break
1096
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098
am__untar="$_am_tar -xf -"
1101
# Must skip GNU tar: if it does not support --format= it doesn't create
1102
# ustar tarball either.
1103
(tar --version) >/dev/null 2>&1 && continue
1104
am__tar='tar chf - "$$tardir"'
1105
am__tar_='tar chf - "$tardir"'
1106
am__untar='tar xf -'
1109
am__tar='pax -L -x $1 -w "$$tardir"'
1110
am__tar_='pax -L -x $1 -w "$tardir"'
1114
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116
am__untar='cpio -i -H $1 -d'
1125
# If the value was cached, stop now. We just wanted to have am__tar
1126
# and am__untar set.
1127
test -n "${am_cv_prog_tar_$1}" && break
1129
# tar/untar a dummy directory, and stop if the command works.
1132
echo GrepMe > conftest.dir/file
1133
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135
if test -s conftest.tar; then
1136
AM_RUN_LOG([$am__untar <conftest.tar])
1137
AM_RUN_LOG([cat conftest.dir/file])
1138
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1143
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1545
1146
AC_SUBST([am__tar])
1546
1147
AC_SUBST([am__untar])
1547
1148
]) # _AM_PROG_TAR
1150
# nls.m4 serial 5 (gettext-0.18)
1151
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
1153
dnl This file is free software; the Free Software Foundation
1154
dnl gives unlimited permission to copy and/or distribute it,
1155
dnl with or without modifications, as long as this notice is preserved.
1157
dnl This file can can be used in projects which are not available under
1158
dnl the GNU General Public License or the GNU Library General Public
1159
dnl License but which still want to provide support for the GNU gettext
1161
dnl Please note that the actual code of the GNU gettext library is covered
1162
dnl by the GNU Library General Public License, and the rest of the GNU
1163
dnl gettext package package is covered by the GNU General Public License.
1164
dnl They are *not* in the public domain.
1167
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1168
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1174
AC_MSG_CHECKING([whether NLS is requested])
1175
dnl Default is enabled NLS
1176
AC_ARG_ENABLE([nls],
1177
[ --disable-nls do not use Native Language Support],
1178
USE_NLS=$enableval, USE_NLS=yes)
1179
AC_MSG_RESULT([$USE_NLS])
1183
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1184
# serial 1 (pkg-config-0.24)
1186
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1188
# This program is free software; you can redistribute it and/or modify
1189
# it under the terms of the GNU General Public License as published by
1190
# the Free Software Foundation; either version 2 of the License, or
1191
# (at your option) any later version.
1193
# This program is distributed in the hope that it will be useful, but
1194
# WITHOUT ANY WARRANTY; without even the implied warranty of
1195
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1196
# General Public License for more details.
1198
# You should have received a copy of the GNU General Public License
1199
# along with this program; if not, write to the Free Software
1200
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1202
# As a special exception to the GNU General Public License, if you
1203
# distribute this file as part of a program that contains a
1204
# configuration script generated by Autoconf, you may include it under
1205
# the same distribution terms that you use for the rest of that program.
1207
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1208
# ----------------------------------
1209
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1210
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1211
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1212
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1213
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1214
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1215
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1217
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1218
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1220
if test -n "$PKG_CONFIG"; then
1221
_pkg_min_version=m4_default([$1], [0.9.0])
1222
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1223
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1224
AC_MSG_RESULT([yes])
1230
])# PKG_PROG_PKG_CONFIG
1232
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1234
# Check to see whether a particular set of modules exists. Similar
1235
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1237
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1238
# only at the first occurence in configure.ac, so if the first place
1239
# it's called might be skipped (such as if it is within an "if", you
1240
# have to call PKG_CHECK_EXISTS manually
1241
# --------------------------------------------------------------
1242
AC_DEFUN([PKG_CHECK_EXISTS],
1243
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1244
if test -n "$PKG_CONFIG" && \
1245
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1246
m4_default([$2], [:])
1247
m4_ifvaln([$3], [else
1251
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1252
# ---------------------------------------------
1253
m4_define([_PKG_CONFIG],
1254
[if test -n "$$1"; then
1256
elif test -n "$PKG_CONFIG"; then
1257
PKG_CHECK_EXISTS([$3],
1258
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1259
test "x$?" != "x0" && pkg_failed=yes ],
1266
# _PKG_SHORT_ERRORS_SUPPORTED
1267
# -----------------------------
1268
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1269
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1270
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1271
_pkg_short_errors_supported=yes
1273
_pkg_short_errors_supported=no
1275
])# _PKG_SHORT_ERRORS_SUPPORTED
1278
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1279
# [ACTION-IF-NOT-FOUND])
1282
# Note that if there is a possibility the first call to
1283
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1284
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1287
# --------------------------------------------------------------
1288
AC_DEFUN([PKG_CHECK_MODULES],
1289
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1290
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1291
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1294
AC_MSG_CHECKING([for $1])
1296
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1297
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1299
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1300
and $1[]_LIBS to avoid the need to call pkg-config.
1301
See the pkg-config man page for more details.])
1303
if test $pkg_failed = yes; then
1305
_PKG_SHORT_ERRORS_SUPPORTED
1306
if test $_pkg_short_errors_supported = yes; then
1307
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1309
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1311
# Put the nasty error message in config.log where it belongs
1312
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1314
m4_default([$4], [AC_MSG_ERROR(
1315
[Package requirements ($2) were not met:
1319
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1320
installed software in a non-standard prefix.
1324
elif test $pkg_failed = untried; then
1326
m4_default([$4], [AC_MSG_FAILURE(
1327
[The pkg-config script could not be found or is too old. Make sure it
1328
is in your PATH or set the PKG_CONFIG environment variable to the full
1333
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1336
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1337
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1338
AC_MSG_RESULT([yes])
1341
])# PKG_CHECK_MODULES
1344
# PKG_INSTALLDIR(DIRECTORY)
1345
# -------------------------
1346
# Substitutes the variable pkgconfigdir as the location where a module
1347
# should install pkg-config .pc files. By default the directory is
1348
# $libdir/pkgconfig, but the default can be changed by passing
1349
# DIRECTORY. The user can override through the --with-pkgconfigdir
1351
AC_DEFUN([PKG_INSTALLDIR],
1352
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1353
m4_pushdef([pkg_description],
1354
[pkg-config installation directory @<:@]pkg_default[@:>@])
1355
AC_ARG_WITH([pkgconfigdir],
1356
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1357
[with_pkgconfigdir=]pkg_default)
1358
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1359
m4_popdef([pkg_default])
1360
m4_popdef([pkg_description])
1361
]) dnl PKG_INSTALLDIR
1364
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1365
# -------------------------
1366
# Substitutes the variable noarch_pkgconfigdir as the location where a
1367
# module should install arch-independent pkg-config .pc files. By
1368
# default the directory is $datadir/pkgconfig, but the default can be
1369
# changed by passing DIRECTORY. The user can override through the
1370
# --with-noarch-pkgconfigdir parameter.
1371
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1372
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1373
m4_pushdef([pkg_description],
1374
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1375
AC_ARG_WITH([noarch-pkgconfigdir],
1376
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1377
[with_noarch_pkgconfigdir=]pkg_default)
1378
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1379
m4_popdef([pkg_default])
1380
m4_popdef([pkg_description])
1381
]) dnl PKG_NOARCH_INSTALLDIR
1384
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1385
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1386
# -------------------------------------------
1387
# Retrieves the value of the pkg-config variable for the given module.
1388
AC_DEFUN([PKG_CHECK_VAR],
1389
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1390
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1392
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1393
AS_VAR_COPY([$1], [pkg_cv_][$1])
1395
AS_VAR_IF([$1], [""], [$5], [$4])dnl
1399
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1400
dnl the schema should be compiled
1403
AC_DEFUN([GLIB_GSETTINGS],
1405
m4_pattern_allow([AM_V_GEN])
1406
AC_ARG_ENABLE(schemas-compile,
1407
AS_HELP_STRING([--disable-schemas-compile],
1408
[Disable regeneration of gschemas.compiled on install]),
1409
[case ${enableval} in
1410
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1411
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1412
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1414
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1415
PKG_PROG_PKG_CONFIG([0.16])
1416
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1417
if test x$cross_compiling != xyes; then
1418
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1420
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1422
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1423
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1424
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1426
ifelse([$1],,[:],[$1])
1430
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1432
mostlyclean-am: clean-gsettings-schemas
1434
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1436
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1437
$(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 [$]@
1439
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1440
uninstall-am: uninstall-gsettings-schemas
1441
install-data-am: install-gsettings-schemas
1443
.SECONDARY: $(gsettings_SCHEMAS)
1445
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1447
if test -n "$^"; then \
1448
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1449
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1450
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1453
uninstall-gsettings-schemas:
1454
@$(NORMAL_UNINSTALL)
1455
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1456
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1457
test -n "$$files" || exit 0; \
1458
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1459
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1460
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1462
clean-gsettings-schemas:
1463
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1465
ifdef gsettings_ENUM_NAMESPACE
1466
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1467
$(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 [$]@
1470
_GSETTINGS_SUBST(GSETTINGS_RULES)
1473
dnl _GSETTINGS_SUBST(VARIABLE)
1474
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1475
AC_DEFUN([_GSETTINGS_SUBST],
1478
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1482
AC_DEFUN([YELP_HELP_INIT],
1484
AC_REQUIRE([AC_PROG_LN_S])
1485
m4_pattern_allow([AM_V_at])
1486
m4_pattern_allow([AM_V_GEN])
1487
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
1488
AC_ARG_WITH([help-dir],
1489
AC_HELP_STRING([--with-help-dir=DIR],
1490
[path where help files are installed]),,
1491
[with_help_dir='${datadir}/help'])
1492
HELP_DIR="$with_help_dir"
1495
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
1496
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
1497
if test x"$ITSTOOL" = x; then
1498
AC_MSG_ERROR([itstool not found])
1501
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
1502
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
1503
if test x"$XMLLINT" = x; then
1504
AC_MSG_ERROR([xmllint not found])
1515
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
1516
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
1517
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
1518
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
1519
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
1520
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
1521
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
1522
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
1523
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
1525
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
1526
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
1527
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
1528
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
1529
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
1531
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
1534
pot: $(_HELP_POTFILE)
1535
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1536
$(AM_V_GEN)if test -d "C"; then d=; else d="$(srcdir)/"; fi; \
1537
$(ITSTOOL) -o "[$]@" $(foreach f,$(_HELP_C_FILES),"$${d}$(f)")
1540
repo: $(_HELP_POTFILE)
1541
$(AM_V_at)for po in $(_HELP_POFILES); do \
1542
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
1543
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
1547
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1548
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
1549
$(AM_V_GEN)if ! test -f "[$]@"; then \
1550
(cd "$(dir [$]@)" && \
1551
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1552
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
1554
(cd "$(dir [$]@)" && \
1555
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1556
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
1557
rm "$(notdir [$]@).tmp"); \
1560
$(_HELP_MOFILES): %.mo: %.po
1561
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1562
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
1564
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
1565
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
1566
$(_HELP_LC_STAMPS): %.stamp: %.mo
1567
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
1568
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1569
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
1570
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
1571
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
1572
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
1576
mostlyclean-am: $(if $(HELP_ID),clean-help)
1578
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
1581
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1582
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
1583
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
1584
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
1586
distdir: distdir-help-files
1588
@for lc in C $(HELP_LINGUAS); do \
1589
$(MKDIR_P) "$(distdir)/$$lc"; \
1590
for file in $(HELP_FILES); do \
1591
if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
1592
cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
1599
for lc in C $(_HELP_LINGUAS); do \
1600
if test -d "$$lc"; \
1605
xmlpath="$$lc:$(srcdir)/$$lc"; \
1607
for page in $(HELP_FILES); do \
1608
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
1609
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
1614
.PHONY: install-help
1615
install-data-am: $(if $(HELP_ID),install-help)
1617
@for lc in C $(_HELP_LINGUAS); do \
1618
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
1620
@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1621
if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
1622
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1623
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1624
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
1625
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
1627
@for f in $(_HELP_C_EXTRA); do \
1628
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1629
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
1630
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1631
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1632
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
1633
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
1635
@for f in $(HELP_MEDIA); do \
1636
for lc in C $(_HELP_LINGUAS); do \
1637
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
1638
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1639
mdir=`dirname "$$f"`; \
1640
if test "x$mdir" = "x."; then mdir=""; fi; \
1641
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
1642
if test -f "$$d$$lc/$$f"; then \
1643
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
1644
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
1645
elif test "x$$lc" != "xC"; then \
1646
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
1647
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
1652
.PHONY: uninstall-help
1653
uninstall-am: $(if $(HELP_ID),uninstall-help)
1655
for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1656
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1657
echo "rm -f $$helpdir`basename $$f`"; \
1658
rm -f "$$helpdir`basename $$f`"; \
1660
@for f in $(_HELP_C_EXTRA); do \
1661
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1662
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1663
echo "rm -f $$helpdir`basename $$f`"; \
1664
rm -f "$$helpdir`basename $$f`"; \
1666
@for f in $(HELP_MEDIA); do \
1667
for lc in C $(_HELP_LINGUAS); do \
1668
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1669
echo "rm -f $$helpdir$$f"; \
1670
rm -f "$$helpdir$$f"; \
1674
AC_SUBST([YELP_HELP_RULES])
1675
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
1549
1678
m4_include([m4/intltool.m4])
1550
1679
m4_include([m4/libtool.m4])
1551
1680
m4_include([m4/ltoptions.m4])