471
468
# Define the identity of the package.
472
469
dnl Distinguish between old-style and new-style calls.
474
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
471
[AC_DIAGNOSE([obsolete],
472
[$0: two- and three-arguments forms are deprecated. For more info, see:
473
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
474
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
475
475
AC_SUBST([PACKAGE], [$1])dnl
476
476
AC_SUBST([VERSION], [$2])],
477
477
[_AM_SET_OPTIONS([$1])dnl
478
478
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
479
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
480
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
480
482
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
481
483
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
482
484
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
484
486
_AM_IF_OPTION([no-define],,
485
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
486
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
487
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
488
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
488
490
# Some tools Automake needs.
489
491
AC_REQUIRE([AM_SANITY_CHECK])dnl
490
492
AC_REQUIRE([AC_ARG_PROGRAM])dnl
491
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
492
AM_MISSING_PROG(AUTOCONF, autoconf)
493
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
494
AM_MISSING_PROG(AUTOHEADER, autoheader)
495
AM_MISSING_PROG(MAKEINFO, makeinfo)
493
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
494
AM_MISSING_PROG([AUTOCONF], [autoconf])
495
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
496
AM_MISSING_PROG([AUTOHEADER], [autoheader])
497
AM_MISSING_PROG([MAKEINFO], [makeinfo])
496
498
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
497
499
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
498
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
500
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
501
# For better backward compatibility. To be removed once Automake 1.9.x
502
# dies out for good. For more background, see:
503
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
504
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
505
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
499
506
# We need awk for the "check" target. The system "awk" is bad on
500
507
# some platforms.
501
508
AC_REQUIRE([AC_PROG_AWK])dnl
506
513
[_AM_PROG_TAR([v7])])])
507
514
_AM_IF_OPTION([no-dependencies],,
508
515
[AC_PROVIDE_IFELSE([AC_PROG_CC],
509
[_AM_DEPENDENCIES(CC)],
510
[define([AC_PROG_CC],
511
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
516
[_AM_DEPENDENCIES([CC])],
517
[m4_define([AC_PROG_CC],
518
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
512
519
AC_PROVIDE_IFELSE([AC_PROG_CXX],
513
[_AM_DEPENDENCIES(CXX)],
514
[define([AC_PROG_CXX],
515
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
520
[_AM_DEPENDENCIES([CXX])],
521
[m4_define([AC_PROG_CXX],
522
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
516
523
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
517
[_AM_DEPENDENCIES(OBJC)],
518
[define([AC_PROG_OBJC],
519
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
524
[_AM_DEPENDENCIES([OBJC])],
525
[m4_define([AC_PROG_OBJC],
526
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
527
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
528
dnl but we still cater to Autoconf 2.62.
529
m4_ifdef([AC_PROG_OBJCXX],
530
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
531
[_AM_DEPENDENCIES([OBJCXX])],
532
[m4_define([AC_PROG_OBJCXX],
533
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
521
535
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
522
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
523
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
536
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
537
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
524
538
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
525
539
AC_CONFIG_COMMANDS_PRE(dnl
526
540
[m4_provide_if([_AM_COMPILER_EXEEXT],
527
541
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
544
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
531
545
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
532
546
dnl mangled by Autoconf and run in a shell conditional statement.
533
547
m4_define([_AC_COMPILER_EXEEXT],
731
743
am_missing_run="$MISSING --run "
734
AC_MSG_WARN([`missing' script is too old or missing])
746
AC_MSG_WARN(['missing' script is too old or missing])
738
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
741
# This file is free software; the Free Software Foundation
742
# gives unlimited permission to copy and/or distribute it,
743
# with or without modifications, as long as this notice is preserved.
749
# Check for `mkdir -p'.
750
AC_DEFUN([AM_PROG_MKDIR_P],
751
[AC_PREREQ([2.60])dnl
752
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
753
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
754
dnl while keeping a definition of mkdir_p for backward compatibility.
755
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
756
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
757
dnl Makefile.ins that do not define MKDIR_P, so we do our own
758
dnl adjustment using top_builddir (which is defined more often than
760
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
762
[[\\/$]]* | ?:[[\\/]]*) ;;
763
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
767
750
# Helper functions for option handling. -*- Autoconf -*-
769
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
752
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
772
754
# This file is free software; the Free Software Foundation
773
755
# gives unlimited permission to copy and/or distribute it,
774
756
# with or without modifications, as long as this notice is preserved.
778
760
# _AM_MANGLE_OPTION(NAME)
779
761
# -----------------------
828
806
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
829
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
807
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
832
# Do `set' in a subshell so we don't clobber the current shell's
810
# Do 'set' in a subshell so we don't clobber the current shell's
833
811
# arguments. Must try -L first in case configure is actually a
834
812
# symlink; some systems play weird games with the mod time of symlinks
835
813
# (eg FreeBSD returns the mod time of the symlink's containing
838
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
839
if test "$[*]" = "X"; then
841
set X `ls -t "$srcdir/configure" conftest.file`
844
if test "$[*]" != "X $srcdir/configure conftest.file" \
845
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
847
# If neither matched, then we have a broken ls. This can happen
848
# if, for instance, CONFIG_SHELL is bash and it inherits a
849
# broken ls alias from the environment. This has actually
850
# happened. Such a system could not be considered "sane".
851
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
852
alias in your environment])
817
for am_try in 1 2; do
818
echo "timestamp, slept: $am_has_slept" > conftest.file
819
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
820
if test "$[*]" = "X"; then
822
set X `ls -t "$srcdir/configure" conftest.file`
824
if test "$[*]" != "X $srcdir/configure conftest.file" \
825
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
827
# If neither matched, then we have a broken ls. This can happen
828
# if, for instance, CONFIG_SHELL is bash and it inherits a
829
# broken ls alias from the environment. This has actually
830
# happened. Such a system could not be considered "sane".
831
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
832
alias in your environment])
834
if test "$[2]" = conftest.file || test $am_try -eq 2; then
855
841
test "$[2]" = conftest.file
861
847
AC_MSG_ERROR([newly created file is older than distributed files!
862
848
Check your system clock])
851
# If we didn't sleep, we still need to ensure time stamps of config.status and
852
# generated files are strictly newer.
854
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
858
AC_CONFIG_COMMANDS_PRE(
859
[AC_MSG_CHECKING([that generated files are newer than configure])
860
if test -n "$am_sleep_pid"; then
861
# Hide warnings about reused PIDs.
862
wait $am_sleep_pid 2>/dev/null
864
AC_MSG_RESULT([done])])
866
# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
868
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
868
870
# This file is free software; the Free Software Foundation
869
871
# gives unlimited permission to copy and/or distribute it,
870
872
# with or without modifications, as long as this notice is preserved.
874
876
# AM_SILENT_RULES([DEFAULT])
875
877
# --------------------------
876
878
# Enable less verbose build rules; with the default set to DEFAULT
877
# (`yes' being less verbose, `no' or empty being verbose).
879
# ("yes" being less verbose, "no" or empty being verbose).
878
880
AC_DEFUN([AM_SILENT_RULES],
879
[AC_ARG_ENABLE([silent-rules],
880
[ --enable-silent-rules less verbose build output (undo: `make V=1')
881
--disable-silent-rules verbose build output (undo: `make V=0')])
882
case $enable_silent_rules in
883
yes) AM_DEFAULT_VERBOSITY=0;;
884
no) AM_DEFAULT_VERBOSITY=1;;
885
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881
[AC_ARG_ENABLE([silent-rules], [dnl
883
[--enable-silent-rules],
884
[less verbose build output (undo: "make V=1")])
886
[--disable-silent-rules],
887
[verbose build output (undo: "make V=0")])dnl
889
case $enable_silent_rules in @%:@ (((
890
yes) AM_DEFAULT_VERBOSITY=0;;
891
no) AM_DEFAULT_VERBOSITY=1;;
892
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
888
dnl A few `make' implementations (e.g., NonStop OS and NextStep)
895
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
889
896
dnl do not support nested variable expansions.
890
897
dnl See automake bug#9928 and bug#10237.
891
898
am_make=${MAKE-make}
920
927
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
923
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
930
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
925
932
# This file is free software; the Free Software Foundation
926
933
# gives unlimited permission to copy and/or distribute it,
927
934
# with or without modifications, as long as this notice is preserved.
931
938
# AM_PROG_INSTALL_STRIP
932
939
# ---------------------
933
# One issue with vendor `install' (even GNU) is that you can't
940
# One issue with vendor 'install' (even GNU) is that you can't
934
941
# specify the program used to strip binaries. This is especially
935
942
# annoying in cross-compiling environments, where the build's strip
936
943
# is unlikely to handle the host's binaries.
937
944
# Fortunately install-sh will honor a STRIPPROG variable, so we
938
# always use install-sh in `make install-strip', and initialize
945
# always use install-sh in "make install-strip", and initialize
939
946
# STRIPPROG with the value of the STRIP variable (set by the user).
940
947
AC_DEFUN([AM_PROG_INSTALL_STRIP],
941
948
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
942
# Installed binaries are usually stripped using `strip' when the user
943
# run `make install-strip'. However `strip' might not be the right
949
# Installed binaries are usually stripped using 'strip' when the user
950
# run "make install-strip". However 'strip' might not be the right
944
951
# tool to use in cross-compilation environments, therefore Automake
945
# will honor the `STRIP' environment variable to overrule this program.
946
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
952
# will honor the 'STRIP' environment variable to overrule this program.
953
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
947
954
if test "$cross_compiling" != no; then
948
955
AC_CHECK_TOOL([STRIP], [strip], :)
950
957
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
951
958
AC_SUBST([INSTALL_STRIP_PROGRAM])])
953
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
960
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
955
962
# This file is free software; the Free Software Foundation
956
963
# gives unlimited permission to copy and/or distribute it,
1258
1267
])# PKG_CHECK_MODULES
1270
# PKG_INSTALLDIR(DIRECTORY)
1271
# -------------------------
1272
# Substitutes the variable pkgconfigdir as the location where a module
1273
# should install pkg-config .pc files. By default the directory is
1274
# $libdir/pkgconfig, but the default can be changed by passing
1275
# DIRECTORY. The user can override through the --with-pkgconfigdir
1277
AC_DEFUN([PKG_INSTALLDIR],
1278
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1279
m4_pushdef([pkg_description],
1280
[pkg-config installation directory @<:@]pkg_default[@:>@])
1281
AC_ARG_WITH([pkgconfigdir],
1282
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1283
[with_pkgconfigdir=]pkg_default)
1284
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1285
m4_popdef([pkg_default])
1286
m4_popdef([pkg_description])
1287
]) dnl PKG_INSTALLDIR
1290
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1291
# -------------------------
1292
# Substitutes the variable noarch_pkgconfigdir as the location where a
1293
# module should install arch-independent pkg-config .pc files. By
1294
# default the directory is $datadir/pkgconfig, but the default can be
1295
# changed by passing DIRECTORY. The user can override through the
1296
# --with-noarch-pkgconfigdir parameter.
1297
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1298
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1299
m4_pushdef([pkg_description],
1300
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1301
AC_ARG_WITH([noarch-pkgconfigdir],
1302
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1303
[with_noarch_pkgconfigdir=]pkg_default)
1304
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1305
m4_popdef([pkg_default])
1306
m4_popdef([pkg_description])
1307
]) dnl PKG_NOARCH_INSTALLDIR
1309
AC_DEFUN([YELP_HELP_INIT],
1311
AC_REQUIRE([AC_PROG_LN_S])
1312
m4_pattern_allow([AM_V_at])
1313
m4_pattern_allow([AM_V_GEN])
1314
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
1315
AC_ARG_WITH([help-dir],
1316
AC_HELP_STRING([--with-help-dir=DIR],
1317
[path where help files are installed]),,
1318
[with_help_dir='${datadir}/help'])
1319
HELP_DIR="$with_help_dir"
1322
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
1323
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
1324
if test x"$ITSTOOL" = x; then
1325
AC_MSG_ERROR([itstool not found])
1328
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
1329
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
1330
if test x"$XMLLINT" = x; then
1331
AC_MSG_ERROR([xmllint not found])
1342
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
1343
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
1344
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
1345
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
1346
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
1347
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
1348
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
1349
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
1350
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
1352
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
1353
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
1354
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
1355
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
1356
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
1358
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
1361
pot: $(_HELP_POTFILE)
1362
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1363
$(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
1366
repo: $(_HELP_POTFILE)
1367
$(AM_V_at)for po in $(_HELP_POFILES); do \
1368
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
1369
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
1373
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1374
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
1375
$(AM_V_GEN)if ! test -f "[$]@"; then \
1376
(cd "$(dir [$]@)" && \
1377
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1378
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
1380
(cd "$(dir [$]@)" && \
1381
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1382
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
1383
rm "$(notdir [$]@).tmp"); \
1386
$(_HELP_MOFILES): %.mo: %.po
1387
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1388
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
1390
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
1391
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
1392
$(_HELP_LC_STAMPS): %.stamp: %.mo
1393
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
1394
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1395
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
1396
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
1397
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
1398
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
1402
mostlyclean-am: $(if $(HELP_ID),clean-help)
1404
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
1407
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1408
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
1409
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
1410
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
1412
distdir: distdir-help-files
1414
@for lc in C $(HELP_LINGUAS); do \
1415
$(MKDIR_P) "$(distdir)/$$lc"; \
1416
for file in $(HELP_FILES); do \
1417
if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
1418
cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
1425
for lc in C $(_HELP_LINGUAS); do \
1426
if test -d "$$lc"; \
1431
xmlpath="$$lc:$(srcdir)/$$lc"; \
1433
for page in $(HELP_FILES); do \
1434
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
1435
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
1440
.PHONY: install-help
1441
install-data-am: $(if $(HELP_ID),install-help)
1443
@for lc in C $(_HELP_LINGUAS); do \
1444
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
1446
@for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1447
if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
1448
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1449
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1450
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
1451
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
1453
@for f in $(_HELP_C_EXTRA); do \
1454
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1455
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
1456
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1457
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1458
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
1459
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
1461
@for f in $(HELP_MEDIA); do \
1462
for lc in C $(_HELP_LINGUAS); do \
1463
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
1464
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1465
mdir=`dirname "$$f"`; \
1466
if test "x$mdir" = "x."; then mdir=""; fi; \
1467
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
1468
if test -f "$$d$$lc/$$f"; then \
1469
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
1470
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
1471
elif test "x$$lc" != "xC"; then \
1472
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
1473
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
1478
.PHONY: uninstall-help
1479
uninstall-am: $(if $(HELP_ID),uninstall-help)
1481
for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1482
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1483
echo "rm -f $$helpdir`basename $$f`"; \
1484
rm -f "$$helpdir`basename $$f`"; \
1486
@for f in $(_HELP_C_EXTRA); do \
1487
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1488
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1489
echo "rm -f $$helpdir`basename $$f`"; \
1490
rm -f "$$helpdir`basename $$f`"; \
1492
@for f in $(HELP_MEDIA); do \
1493
for lc in C $(_HELP_LINGUAS); do \
1494
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1495
echo "rm -f $$helpdir$$f"; \
1496
rm -f "$$helpdir$$f"; \
1500
AC_SUBST([YELP_HELP_RULES])
1501
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
1260
1504
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1261
1505
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1781
AC_DEFUN([YELP_HELP_INIT],
1783
AC_REQUIRE([AC_PROG_LN_S])
1784
m4_pattern_allow([AM_V_at])
1785
m4_pattern_allow([AM_V_GEN])
1786
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
1787
AC_ARG_WITH([help-dir],
1788
AC_HELP_STRING([--with-help-dir=DIR],
1789
[path where help files are installed]),,
1790
[with_help_dir='${datadir}/help'])
1791
HELP_DIR="$with_help_dir"
1794
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
1795
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
1796
if test x"$ITSTOOL" = x; then
1797
AC_MSG_ERROR([itstool not found])
1800
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
1801
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
1802
if test x"$XMLLINT" = x; then
1803
AC_MSG_ERROR([xmllint not found])
1814
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
1815
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
1816
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
1817
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
1818
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
1819
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
1820
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
1821
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
1822
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
1824
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
1825
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
1826
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
1827
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
1828
_HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
1830
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
1833
pot: $(_HELP_POTFILE)
1834
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1835
$(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
1838
repo: $(_HELP_POTFILE)
1839
$(AM_V_at)for po in $(_HELP_POFILES); do \
1840
if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
1841
msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
1845
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1846
$(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
1847
$(AM_V_GEN)if ! test -f "[$]@"; then \
1848
(cd "$(dir [$]@)" && \
1849
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1850
mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
1852
(cd "$(dir [$]@)" && \
1853
$(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1854
msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
1855
rm "$(notdir [$]@).tmp"); \
1858
$(_HELP_MOFILES): %.mo: %.po
1859
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1860
$(AM_V_GEN)msgfmt -o "[$]@" "$<"
1862
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
1863
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
1864
$(_HELP_LC_STAMPS): %.stamp: %.mo
1865
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
1866
$(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1867
$(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
1868
mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
1869
if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
1870
(cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
1874
mostlyclean-am: $(if $(HELP_ID),clean-help)
1876
rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
1879
EXTRA_DIST += $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_POFILES)
1880
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(_HELP_LINGUAS),$(wildcard $(lc)/$(f))))
1885
for lc in C $(_HELP_LINGUAS); do \
1886
if test -d "$$lc"; \
1891
xmlpath="$$lc:$(srcdir)/$$lc"; \
1893
for page in $(HELP_FILES); do \
1894
echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
1895
$(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
1900
.PHONY: install-help
1901
install-data-am: $(if $(HELP_ID),install-help)
1903
@for lc in C $(_HELP_LINGUAS); do \
1904
$(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
1906
@for f in $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_C_EXTRA); do \
1907
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1908
if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
1909
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1910
if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1911
echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
1912
$(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
1914
@for f in $(HELP_MEDIA); do \
1915
for lc in C $(_HELP_LINGUAS); do \
1916
if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
1917
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1918
mdir=`dirname "$$f"`; \
1919
if test "x$mdir" = "x."; then mdir=""; fi; \
1920
if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
1921
if test -f "$$d$$lc/$$f"; then \
1922
echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
1923
$(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
1924
elif test "x$$lc" != "xC"; then \
1925
echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
1926
$(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
1931
.PHONY: uninstall-help
1932
uninstall-am: $(if $(HELP_ID),uninstall-help)
1934
@for f in $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_C_EXTRA); do \
1935
lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1936
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1937
echo "rm -f $$helpdir`basename $$f`"; \
1938
rm -f "$$helpdir`basename $$f`"; \
1940
@for f in $(HELP_MEDIA); do \
1941
for lc in C $(_HELP_LINGUAS); do \
1942
helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1943
echo "rm -f $$helpdir$$f"; \
1944
rm -f "$$helpdir$$f"; \
1948
AC_SUBST([YELP_HELP_RULES])
1949
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
1952
2025
m4_include([m4/intltool.m4])
1953
2026
m4_include([m4/libtool.m4])
1954
2027
m4_include([m4/ltoptions.m4])