14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17
[m4_warning([this file was generated for autoconf 2.69.
18
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
22
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
24
24
# This file is free software; the Free Software Foundation
25
25
# gives unlimited permission to copy and/or distribute it,
26
26
# with or without modifications, as long as this notice is preserved.
28
30
# AM_AUTOMAKE_VERSION(VERSION)
29
31
# ----------------------------
30
32
# Automake X.Y traces this macro to ensure aclocal.m4 has been
31
33
# generated from the m4 files accompanying Automake X.Y.
32
34
# (This private macro should not be called outside this file.)
33
35
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
[am__api_version='1.11'
36
[am__api_version='1.12'
35
37
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
38
dnl require some minimum version. Point them to the right macro.
37
m4_if([$1], [1.11.1], [],
39
m4_if([$1], [1.12.2], [],
38
40
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
50
52
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
53
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
54
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
[AM_AUTOMAKE_VERSION([1.11.1])dnl
55
[AM_AUTOMAKE_VERSION([1.12.2])dnl
54
56
m4_ifndef([AC_AUTOCONF_VERSION],
55
57
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
58
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
60
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
62
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
62
64
# This file is free software; the Free Software Foundation
63
65
# gives unlimited permission to copy and/or distribute it,
64
66
# with or without modifications, as long as this notice is preserved.
66
70
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
68
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
71
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
72
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70
74
# Of course, Automake must honor this variable whenever it calls a
71
75
# tool from the auxiliary directory. The problem is that $srcdir (and
176
178
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
179
AC_REQUIRE([AM_DEP_TRACK])dnl
179
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
180
[$1], CXX, [depcc="$CXX" am_compiler_list=],
181
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
[$1], UPC, [depcc="$UPC" am_compiler_list=],
183
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
184
[depcc="$$1" am_compiler_list=])
181
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
182
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
183
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
184
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
185
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
186
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
187
[depcc="$$1" am_compiler_list=])
186
189
AC_CACHE_CHECK([dependency style of $depcc],
187
190
[am_cv_$1_dependencies_compiler_type],
316
320
AC_DEFUN([AM_DEP_TRACK],
317
[AC_ARG_ENABLE(dependency-tracking,
318
[ --disable-dependency-tracking speeds up one-time build
319
--enable-dependency-tracking do not reject slow dependency extractors])
321
[AC_ARG_ENABLE([dependency-tracking], [dnl
323
[--enable-dependency-tracking],
324
[do not reject slow dependency extractors])
326
[--disable-dependency-tracking],
327
[speeds up one-time build])])
320
328
if test "x$enable_dependency_tracking" != xno; then
321
329
am_depcomp="$ac_aux_dir/depcomp"
322
330
AMDEPBACKSLASH='\'
324
333
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
334
AC_SUBST([AMDEPBACKSLASH])dnl
326
335
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
336
AC_SUBST([am__nodep])dnl
337
_AM_SUBST_NOTMAKE([am__nodep])dnl
329
340
# Generate code to set up dependency tracking. -*- Autoconf -*-
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
# Free Software Foundation, Inc.
342
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
334
344
# This file is free software; the Free Software Foundation
335
345
# gives unlimited permission to copy and/or distribute it,
336
346
# with or without modifications, as long as this notice is preserved.
340
350
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
351
# ------------------------------
461
468
# Define the identity of the package.
462
469
dnl Distinguish between old-style and new-style calls.
464
[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
465
475
AC_SUBST([PACKAGE], [$1])dnl
466
476
AC_SUBST([VERSION], [$2])],
467
477
[_AM_SET_OPTIONS([$1])dnl
468
478
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
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]),
470
482
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
483
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
484
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474
486
_AM_IF_OPTION([no-define],,
475
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
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
478
490
# Some tools Automake needs.
479
491
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
492
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
AM_MISSING_PROG(AUTOCONF, autoconf)
483
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
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])
486
498
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
499
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
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)'])
489
506
# We need awk for the "check" target. The system "awk" is bad on
490
507
# some platforms.
491
508
AC_REQUIRE([AC_PROG_AWK])dnl
496
513
[_AM_PROG_TAR([v7])])])
497
514
_AM_IF_OPTION([no-dependencies],,
498
515
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
[_AM_DEPENDENCIES(CC)],
500
[define([AC_PROG_CC],
501
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
502
519
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
[_AM_DEPENDENCIES(CXX)],
504
[define([AC_PROG_CXX],
505
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
506
523
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
[_AM_DEPENDENCIES(OBJC)],
508
[define([AC_PROG_OBJC],
509
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
511
535
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
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
514
538
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
539
AC_CONFIG_COMMANDS_PRE(dnl
516
540
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
541
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
520
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
521
545
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
546
dnl mangled by Autoconf and run in a shell conditional statement.
523
547
m4_define([_AC_COMPILER_EXEEXT],
753
777
am_missing_run="$MISSING --run "
756
AC_MSG_WARN([`missing' script is too old or missing])
780
AC_MSG_WARN(['missing' script is too old or missing])
760
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
762
# This file is free software; the Free Software Foundation
763
# gives unlimited permission to copy and/or distribute it,
764
# with or without modifications, as long as this notice is preserved.
768
# Check for `mkdir -p'.
769
AC_DEFUN([AM_PROG_MKDIR_P],
770
[AC_PREREQ([2.60])dnl
771
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
772
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
773
dnl while keeping a definition of mkdir_p for backward compatibility.
774
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
775
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
776
dnl Makefile.ins that do not define MKDIR_P, so we do our own
777
dnl adjustment using top_builddir (which is defined more often than
779
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
781
[[\\/$]]* | ?:[[\\/]]*) ;;
782
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
786
784
# Helper functions for option handling. -*- Autoconf -*-
788
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
786
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
790
788
# This file is free software; the Free Software Foundation
791
789
# gives unlimited permission to copy and/or distribute it,
792
790
# with or without modifications, as long as this notice is preserved.
796
794
# _AM_MANGLE_OPTION(NAME)
797
795
# -----------------------
846
840
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
847
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
841
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
850
# Do `set' in a subshell so we don't clobber the current shell's
844
# Do 'set' in a subshell so we don't clobber the current shell's
851
845
# arguments. Must try -L first in case configure is actually a
852
846
# symlink; some systems play weird games with the mod time of symlinks
853
847
# (eg FreeBSD returns the mod time of the symlink's containing
856
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
857
if test "$[*]" = "X"; then
859
set X `ls -t "$srcdir/configure" conftest.file`
862
if test "$[*]" != "X $srcdir/configure conftest.file" \
863
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
865
# If neither matched, then we have a broken ls. This can happen
866
# if, for instance, CONFIG_SHELL is bash and it inherits a
867
# broken ls alias from the environment. This has actually
868
# happened. Such a system could not be considered "sane".
869
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
870
alias in your environment])
851
for am_try in 1 2; do
852
echo "timestamp, slept: $am_has_slept" > conftest.file
853
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
854
if test "$[*]" = "X"; then
856
set X `ls -t "$srcdir/configure" conftest.file`
858
if test "$[*]" != "X $srcdir/configure conftest.file" \
859
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
861
# If neither matched, then we have a broken ls. This can happen
862
# if, for instance, CONFIG_SHELL is bash and it inherits a
863
# broken ls alias from the environment. This has actually
864
# happened. Such a system could not be considered "sane".
865
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
866
alias in your environment])
868
if test "$[2]" = conftest.file || test $am_try -eq 2; then
873
875
test "$[2]" = conftest.file
879
881
AC_MSG_ERROR([newly created file is older than distributed files!
880
882
Check your system clock])
885
# If we didn't sleep, we still need to ensure time stamps of config.status and
886
# generated files are strictly newer.
888
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
892
AC_CONFIG_COMMANDS_PRE(
893
[AC_MSG_CHECKING([that generated files are newer than configure])
894
if test -n "$am_sleep_pid"; then
895
# Hide warnings about reused PIDs.
896
wait $am_sleep_pid 2>/dev/null
898
AC_MSG_RESULT([done])])
884
# Copyright (C) 2009 Free Software Foundation, Inc.
902
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
886
904
# This file is free software; the Free Software Foundation
887
905
# gives unlimited permission to copy and/or distribute it,
888
906
# with or without modifications, as long as this notice is preserved.
892
910
# AM_SILENT_RULES([DEFAULT])
893
911
# --------------------------
894
912
# Enable less verbose build rules; with the default set to DEFAULT
895
# (`yes' being less verbose, `no' or empty being verbose).
913
# ("yes" being less verbose, "no" or empty being verbose).
896
914
AC_DEFUN([AM_SILENT_RULES],
897
[AC_ARG_ENABLE([silent-rules],
898
[ --enable-silent-rules less verbose build output (undo: `make V=1')
899
--disable-silent-rules verbose build output (undo: `make V=0')])
900
case $enable_silent_rules in
901
yes) AM_DEFAULT_VERBOSITY=0;;
902
no) AM_DEFAULT_VERBOSITY=1;;
903
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
915
[AC_ARG_ENABLE([silent-rules], [dnl
917
[--enable-silent-rules],
918
[less verbose build output (undo: "make V=1")])
920
[--disable-silent-rules],
921
[verbose build output (undo: "make V=0")])dnl
923
case $enable_silent_rules in @%:@ (((
924
yes) AM_DEFAULT_VERBOSITY=0;;
925
no) AM_DEFAULT_VERBOSITY=1;;
926
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
929
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
930
dnl do not support nested variable expansions.
931
dnl See automake bug#9928 and bug#10237.
933
AC_CACHE_CHECK([whether $am_make supports nested variables],
934
[am_cv_make_support_nested_variables],
935
[if AS_ECHO([['TRUE=$(BAR$(V))
941
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
942
am_cv_make_support_nested_variables=yes
944
am_cv_make_support_nested_variables=no
946
if test $am_cv_make_support_nested_variables = yes; then
947
dnl Using '$V' instead of '$(V)' breaks IRIX make.
949
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
951
AM_V=$AM_DEFAULT_VERBOSITY
952
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
955
AM_SUBST_NOTMAKE([AM_V])dnl
956
AC_SUBST([AM_DEFAULT_V])dnl
957
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
905
958
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
907
960
AC_SUBST([AM_BACKSLASH])dnl
908
961
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
911
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
964
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
913
966
# This file is free software; the Free Software Foundation
914
967
# gives unlimited permission to copy and/or distribute it,
915
968
# with or without modifications, as long as this notice is preserved.
917
972
# AM_PROG_INSTALL_STRIP
918
973
# ---------------------
919
# One issue with vendor `install' (even GNU) is that you can't
974
# One issue with vendor 'install' (even GNU) is that you can't
920
975
# specify the program used to strip binaries. This is especially
921
976
# annoying in cross-compiling environments, where the build's strip
922
977
# is unlikely to handle the host's binaries.
923
978
# Fortunately install-sh will honor a STRIPPROG variable, so we
924
# always use install-sh in `make install-strip', and initialize
979
# always use install-sh in "make install-strip", and initialize
925
980
# STRIPPROG with the value of the STRIP variable (set by the user).
926
981
AC_DEFUN([AM_PROG_INSTALL_STRIP],
927
982
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
928
# Installed binaries are usually stripped using `strip' when the user
929
# run `make install-strip'. However `strip' might not be the right
983
# Installed binaries are usually stripped using 'strip' when the user
984
# run "make install-strip". However 'strip' might not be the right
930
985
# tool to use in cross-compilation environments, therefore Automake
931
# will honor the `STRIP' environment variable to overrule this program.
932
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
986
# will honor the 'STRIP' environment variable to overrule this program.
987
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
933
988
if test "$cross_compiling" != no; then
934
989
AC_CHECK_TOOL([STRIP], [strip], :)
936
991
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
937
992
AC_SUBST([INSTALL_STRIP_PROGRAM])])
939
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
994
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
941
996
# This file is free software; the Free Software Foundation
942
997
# gives unlimited permission to copy and/or distribute it,
943
998
# with or without modifications, as long as this notice is preserved.
947
1002
# _AM_SUBST_NOTMAKE(VARIABLE)
948
1003
# ---------------------------
1051
1107
AC_SUBST([am__untar])
1052
1108
]) # _AM_PROG_TAR
1111
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1112
# serial 42 IT_PROG_INTLTOOL
1113
AC_DEFUN([IT_PROG_INTLTOOL], [
1114
AC_PREREQ([2.50])dnl
1115
AC_REQUIRE([AM_NLS])dnl
1117
case "$am__api_version" in
1119
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1125
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1126
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1127
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1128
if test -n "$1"; then
1129
AC_MSG_CHECKING([for intltool >= $1])
1130
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1131
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1132
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1135
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1136
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1137
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1138
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1139
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1142
if test -z "$AM_DEFAULT_VERBOSITY"; then
1143
AM_DEFAULT_VERBOSITY=1
1145
AC_SUBST([AM_DEFAULT_VERBOSITY])
1147
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1148
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1149
INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
1150
AC_SUBST(INTLTOOL_V_MERGE)
1151
AC_SUBST(INTLTOOL__v_MERGE_)
1152
AC_SUBST(INTLTOOL__v_MERGE_0)
1154
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1155
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1156
intltool__v_merge_options_0='-q'
1157
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1158
AC_SUBST(intltool__v_merge_options_)
1159
AC_SUBST(intltool__v_merge_options_0)
1161
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 $< [$]@'
1162
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 $< [$]@'
1163
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 $< [$]@'
1164
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 $< [$]@'
1165
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 $< [$]@'
1166
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 $< [$]@'
1167
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 $< [$]@'
1168
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 $< [$]@'
1169
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 $< [$]@'
1170
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 $< [$]@'
1171
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 $< [$]@'
1172
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1173
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 $< [$]@'
1175
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'
1177
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 $< [$]@'
1178
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 $< [$]@'
1179
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 $< [$]@'
1180
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 $< [$]@'
1181
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 $< [$]@'
1182
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 $< [$]@'
1183
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 $< [$]@'
1185
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1186
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1187
_IT_SUBST(INTLTOOL_KEYS_RULE)
1188
_IT_SUBST(INTLTOOL_PROP_RULE)
1189
_IT_SUBST(INTLTOOL_OAF_RULE)
1190
_IT_SUBST(INTLTOOL_PONG_RULE)
1191
_IT_SUBST(INTLTOOL_SERVER_RULE)
1192
_IT_SUBST(INTLTOOL_SHEET_RULE)
1193
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1194
_IT_SUBST(INTLTOOL_UI_RULE)
1195
_IT_SUBST(INTLTOOL_XAM_RULE)
1196
_IT_SUBST(INTLTOOL_KBD_RULE)
1197
_IT_SUBST(INTLTOOL_XML_RULE)
1198
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1199
_IT_SUBST(INTLTOOL_CAVES_RULE)
1200
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1201
_IT_SUBST(INTLTOOL_THEME_RULE)
1202
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1203
_IT_SUBST(INTLTOOL_POLICY_RULE)
1205
# Check the gettext tools to make sure they are GNU
1206
AC_PATH_PROG(XGETTEXT, xgettext)
1207
AC_PATH_PROG(MSGMERGE, msgmerge)
1208
AC_PATH_PROG(MSGFMT, msgfmt)
1209
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1210
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1211
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1213
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1214
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1215
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1216
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1217
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1220
AC_PATH_PROG(INTLTOOL_PERL, perl)
1221
if test -z "$INTLTOOL_PERL"; then
1222
AC_MSG_ERROR([perl not found])
1224
AC_MSG_CHECKING([for perl >= 5.8.1])
1225
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1226
if test $? -ne 0; then
1227
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1229
IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1230
AC_MSG_RESULT([$IT_PERL_VERSION])
1232
if test "x$2" != "xno-xml"; then
1233
AC_MSG_CHECKING([for XML::Parser])
1234
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1237
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1241
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1242
AC_SUBST(ALL_LINGUAS)
1244
# Set DATADIRNAME correctly if it is not set yet
1245
# (copied from glib-gettext.m4)
1246
if test -z "$DATADIRNAME"; then
1248
[AC_LANG_PROGRAM([[]],
1249
[[extern int _nl_msg_cat_cntr;
1250
return _nl_msg_cat_cntr]])],
1251
[DATADIRNAME=share],
1254
dnl On Solaris, if bind_textdomain_codeset is in libc,
1255
dnl GNU format message catalog is always supported,
1256
dnl since both are added to the libc all together.
1257
dnl Hence, we'd like to go with DATADIRNAME=share
1259
AC_CHECK_FUNC(bind_textdomain_codeset,
1260
[DATADIRNAME=share], [DATADIRNAME=lib])
1267
AC_SUBST(DATADIRNAME)
1274
# IT_PO_SUBDIR(DIRNAME)
1275
# ---------------------
1276
# All po subdirs have to be declared with this macro; the subdir "po" is
1277
# declared by IT_PROG_INTLTOOL.
1279
AC_DEFUN([IT_PO_SUBDIR],
1280
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1282
dnl The following CONFIG_COMMANDS should be executed at the very end
1283
dnl of config.status.
1284
AC_CONFIG_COMMANDS_PRE([
1285
AC_CONFIG_COMMANDS([$1/stamp-it], [
1286
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1287
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1289
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1294
'"s|^| $ac_top_srcdir/|" \
1295
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1297
[sed '/^POTFILES =/,/[^\\]$/ {
1301
' "$1/Makefile.in" >"$1/Makefile"]
1302
rm -f "$1/Makefile.tmp"
1303
mv "$1/stamp-it.tmp" "$1/stamp-it"
1308
# _IT_SUBST(VARIABLE)
1309
# -------------------
1310
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1312
AC_DEFUN([_IT_SUBST],
1315
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1320
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1321
# A hint is needed for aclocal from Automake <= 1.9.4:
1322
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1054
1325
dnl Autoconf macros for libgcrypt
1055
1326
dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
5498
5829
case `$CC -V 2>&1 | sed 5q` in
5499
*Sun\ F* | *Sun*Fortran*)
5830
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5500
5831
# Sun Fortran 8.3 passes all unrecognized flags to the linker
5501
5832
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5502
5833
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5503
5834
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5836
*Sun\ F* | *Sun*Fortran*)
5837
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5838
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5839
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5507
5843
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5508
5844
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5509
5845
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5847
*Intel*\ [[CF]]*Compiler*)
5848
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5849
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5850
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5853
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5854
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5855
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8587
8929
])# _LT_LANG_GCJ_CONFIG
8932
# _LT_LANG_GO_CONFIG([TAG])
8933
# --------------------------
8934
# Ensure that the configuration variables for the GNU Go compiler
8935
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8936
# to write the compiler configuration to `libtool'.
8937
m4_defun([_LT_LANG_GO_CONFIG],
8938
[AC_REQUIRE([LT_PROG_GO])dnl
8941
# Source file extension for Go test sources.
8944
# Object file extension for compiled Go test sources.
8946
_LT_TAGVAR(objext, $1)=$objext
8948
# Code to be used in simple compile tests
8949
lt_simple_compile_test_code="package main; func main() { }"
8951
# Code to be used in simple link tests
8952
lt_simple_link_test_code='package main; func main() { }'
8954
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8957
# save warnings/boilerplate of simple test code
8958
_LT_COMPILER_BOILERPLATE
8959
_LT_LINKER_BOILERPLATE
8961
# Allow CC to be a program name with arguments.
8963
lt_save_CFLAGS=$CFLAGS
8969
_LT_TAGVAR(compiler, $1)=$CC
8970
_LT_TAGVAR(LD, $1)="$LD"
8971
_LT_CC_BASENAME([$compiler])
8973
# Go did not exist at the time GCC didn't implicitly link libc in.
8974
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8976
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8977
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8978
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8980
if test -n "$compiler"; then
8981
_LT_COMPILER_NO_RTTI($1)
8982
_LT_COMPILER_PIC($1)
8983
_LT_COMPILER_C_O($1)
8984
_LT_COMPILER_FILE_LOCKS($1)
8985
_LT_LINKER_SHLIBS($1)
8986
_LT_LINKER_HARDCODE_LIBPATH($1)
8995
CFLAGS=$lt_save_CFLAGS
8996
])# _LT_LANG_GO_CONFIG
8590
8999
# _LT_LANG_RC_CONFIG([TAG])
8591
9000
# -------------------------
8592
9001
# Ensure that the configuration variables for the Windows resource compiler
9798
10231
])# PKG_CHECK_MODULES
10234
# PKG_INSTALLDIR(DIRECTORY)
10235
# -------------------------
10236
# Substitutes the variable pkgconfigdir as the location where a module
10237
# should install pkg-config .pc files. By default the directory is
10238
# $libdir/pkgconfig, but the default can be changed by passing
10239
# DIRECTORY. The user can override through the --with-pkgconfigdir
10241
AC_DEFUN([PKG_INSTALLDIR],
10242
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
10243
m4_pushdef([pkg_description],
10244
[pkg-config installation directory @<:@]pkg_default[@:>@])
10245
AC_ARG_WITH([pkgconfigdir],
10246
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
10247
[with_pkgconfigdir=]pkg_default)
10248
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
10249
m4_popdef([pkg_default])
10250
m4_popdef([pkg_description])
10251
]) dnl PKG_INSTALLDIR
10254
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
10255
# -------------------------
10256
# Substitutes the variable noarch_pkgconfigdir as the location where a
10257
# module should install arch-independent pkg-config .pc files. By
10258
# default the directory is $datadir/pkgconfig, but the default can be
10259
# changed by passing DIRECTORY. The user can override through the
10260
# --with-noarch-pkgconfigdir parameter.
10261
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
10262
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
10263
m4_pushdef([pkg_description],
10264
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
10265
AC_ARG_WITH([noarch-pkgconfigdir],
10266
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
10267
[with_noarch_pkgconfigdir=]pkg_default)
10268
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
10269
m4_popdef([pkg_default])
10270
m4_popdef([pkg_description])
10271
]) dnl PKG_NOARCH_INSTALLDIR
10273
dnl GNOME_CODE_COVERAGE
10275
dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
10276
dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
10277
dnl (program or library) which should be built with code coverage support.
10278
dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
10279
dnl Makefile; and $enable_code_coverage which can be used in subsequent
10280
dnl configure output.
10282
dnl Note that all optimisation flags in CFLAGS must be disabled when code
10283
dnl coverage is enabled.
10285
dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
10286
dnl This file is licenced under GPLv3. For the full gnome-common licence
10287
dnl (GPLv3), see the COPYING file.
10291
dnl GNOME_CODE_COVERAGE
10294
dnl @GNOME_CODE_COVERAGE_RULES@
10295
dnl my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
10296
dnl my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
10298
dnl This results in a “check-code-coverage” rule being added to any Makefile.am
10299
dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
10300
dnl configured with --enable-code-coverage). Running `make check-code-coverage`
10301
dnl in that directory will run the module’s test suite (`make check`) and build
10302
dnl a code coverage report detailing the code which was touched, then print the
10303
dnl URI for the report.
10305
AC_DEFUN([GNOME_CODE_COVERAGE],[
10306
dnl Check for --enable-code-coverage
10307
AC_MSG_CHECKING([whether to build with code coverage support])
10308
AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
10309
AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
10310
AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
10311
AC_MSG_RESULT($enable_code_coverage)
10313
AS_IF([ test "$enable_code_coverage" = "yes" ], [
10314
dnl Check if gcc is being used
10315
AS_IF([ test "$GCC" = "no" ], [
10316
AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
10319
# List of supported lcov versions.
10320
lcov_version_list="1.6 1.7 1.8 1.9"
10322
AC_CHECK_PROG([LCOV], [lcov], [lcov])
10323
AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
10325
AS_IF([ test "$LCOV" ], [
10326
AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
10327
gnome_cv_lcov_version=invalid
10328
lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
10329
for lcov_check_version in $lcov_version_list; do
10330
if test "$lcov_version" = "$lcov_check_version"; then
10331
gnome_cv_lcov_version="$lcov_check_version (ok)"
10336
lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
10337
AC_MSG_ERROR([$lcov_msg])
10340
case $gnome_cv_lcov_version in
10342
lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
10343
AC_MSG_ERROR([$lcov_msg])
10348
AS_IF([ test -z "$GENHTML" ], [
10349
AC_MSG_ERROR([Could not find genhtml from the lcov package])
10352
dnl Build the code coverage flags
10353
CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
10354
CODE_COVERAGE_LDFLAGS="-lgcov"
10356
AC_SUBST([CODE_COVERAGE_CFLAGS])
10357
AC_SUBST([CODE_COVERAGE_LDFLAGS])
10360
GNOME_CODE_COVERAGE_RULES='
10364
# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
10365
# (Default: $(top_builddir))
10366
# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
10367
# by lcov for code coverage. (Default:
10368
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
10369
# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
10370
# reports to be created. (Default:
10371
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
10372
# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
10374
# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
10375
# instance. (Default: empty)
10377
# The generated report will be titled using the $(PACKAGE_NAME) and
10378
# $(PACKAGE_VERSION). In order to add the current git hash to the title,
10379
# use the git-version-gen script, available online.
10381
# Optional variables
10382
CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
10383
CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
10384
CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
10385
CODE_COVERAGE_LCOV_OPTIONS ?=
10386
CODE_COVERAGE_GENHTML_OPTIONS ?=
10388
# Use recursive makes in order to ignore errors during check
10389
check-code-coverage:
10390
ifdef CODE_COVERAGE_ENABLED
10391
-$(MAKE) $(AM_MAKEFLAGS) -k check
10392
$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
10394
@echo "Need to reconfigure with --enable-code-coverage"
10397
# Capture code coverage data
10398
code-coverage-capture: code-coverage-capture-hook
10399
ifdef CODE_COVERAGE_ENABLED
10400
$(LCOV) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
10401
$(LCOV) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
10402
-rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
10403
LANG=C $(GENHTML) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
10404
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
10406
@echo "Need to reconfigure with --enable-code-coverage"
10409
# Hook rule executed before code-coverage-capture, overridable by the user
10410
code-coverage-capture-hook:
10412
clean: code-coverage-clean
10413
code-coverage-clean:
10414
-$(LCOV) --directory $(top_builddir) -z
10415
-rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10416
-find . -name "*.gcda" -o -name "*.gcov" -delete
10419
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10421
DISTCHECK_CONFIGURE_FLAGS ?=
10422
DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
10424
.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
10427
AC_SUBST([GNOME_CODE_COVERAGE_RULES])
10428
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
9800
10431
# gnome-common.m4
10063
10694
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
10067
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
10068
# serial 40 IT_PROG_INTLTOOL
10069
AC_DEFUN([IT_PROG_INTLTOOL], [
10070
AC_PREREQ([2.50])dnl
10071
AC_REQUIRE([AM_NLS])dnl
10073
case "$am__api_version" in
10075
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
10081
if test -n "$1"; then
10082
AC_MSG_CHECKING([for intltool >= $1])
10084
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
10085
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
10086
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
10088
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
10089
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
10090
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
10093
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
10094
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
10095
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
10096
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
10097
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
10100
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10101
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10102
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10103
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10104
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
10105
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10106
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10107
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10108
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10109
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10110
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10111
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
10112
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10113
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10114
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10115
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10116
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10117
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10118
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10120
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
10121
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
10122
_IT_SUBST(INTLTOOL_KEYS_RULE)
10123
_IT_SUBST(INTLTOOL_PROP_RULE)
10124
_IT_SUBST(INTLTOOL_OAF_RULE)
10125
_IT_SUBST(INTLTOOL_PONG_RULE)
10126
_IT_SUBST(INTLTOOL_SERVER_RULE)
10127
_IT_SUBST(INTLTOOL_SHEET_RULE)
10128
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
10129
_IT_SUBST(INTLTOOL_UI_RULE)
10130
_IT_SUBST(INTLTOOL_XAM_RULE)
10131
_IT_SUBST(INTLTOOL_KBD_RULE)
10132
_IT_SUBST(INTLTOOL_XML_RULE)
10133
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
10134
_IT_SUBST(INTLTOOL_CAVES_RULE)
10135
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
10136
_IT_SUBST(INTLTOOL_THEME_RULE)
10137
_IT_SUBST(INTLTOOL_SERVICE_RULE)
10138
_IT_SUBST(INTLTOOL_POLICY_RULE)
10140
# Check the gettext tools to make sure they are GNU
10141
AC_PATH_PROG(XGETTEXT, xgettext)
10142
AC_PATH_PROG(MSGMERGE, msgmerge)
10143
AC_PATH_PROG(MSGFMT, msgfmt)
10144
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
10145
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
10146
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10148
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
10149
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
10150
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
10151
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
10152
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10155
AC_PATH_PROG(INTLTOOL_PERL, perl)
10156
if test -z "$INTLTOOL_PERL"; then
10157
AC_MSG_ERROR([perl not found])
10159
AC_MSG_CHECKING([for perl >= 5.8.1])
10160
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
10161
if test $? -ne 0; then
10162
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
10164
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
10165
AC_MSG_RESULT([$IT_PERL_VERSION])
10167
if test "x$2" != "xno-xml"; then
10168
AC_MSG_CHECKING([for XML::Parser])
10169
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
10170
AC_MSG_RESULT([ok])
10172
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
10176
# Substitute ALL_LINGUAS so we can use it in po/Makefile
10177
AC_SUBST(ALL_LINGUAS)
10179
# Set DATADIRNAME correctly if it is not set yet
10180
# (copied from glib-gettext.m4)
10181
if test -z "$DATADIRNAME"; then
10183
[AC_LANG_PROGRAM([[]],
10184
[[extern int _nl_msg_cat_cntr;
10185
return _nl_msg_cat_cntr]])],
10186
[DATADIRNAME=share],
10189
dnl On Solaris, if bind_textdomain_codeset is in libc,
10190
dnl GNU format message catalog is always supported,
10191
dnl since both are added to the libc all together.
10192
dnl Hence, we'd like to go with DATADIRNAME=share
10194
AC_CHECK_FUNC(bind_textdomain_codeset,
10195
[DATADIRNAME=share], [DATADIRNAME=lib])
10202
AC_SUBST(DATADIRNAME)
10209
# IT_PO_SUBDIR(DIRNAME)
10210
# ---------------------
10211
# All po subdirs have to be declared with this macro; the subdir "po" is
10212
# declared by IT_PROG_INTLTOOL.
10214
AC_DEFUN([IT_PO_SUBDIR],
10215
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
10217
dnl The following CONFIG_COMMANDS should be executed at the very end
10218
dnl of config.status.
10219
AC_CONFIG_COMMANDS_PRE([
10220
AC_CONFIG_COMMANDS([$1/stamp-it], [
10221
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
10222
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
10224
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
10229
'"s|^| $ac_top_srcdir/|" \
10230
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
10232
[sed '/^POTFILES =/,/[^\\]$/ {
10236
' "$1/Makefile.in" >"$1/Makefile"]
10237
rm -f "$1/Makefile.tmp"
10238
mv "$1/stamp-it.tmp" "$1/stamp-it"
10243
# _IT_SUBST(VARIABLE)
10244
# -------------------
10245
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
10247
AC_DEFUN([_IT_SUBST],
10250
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
10254
# deprecated macros
10255
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
10256
# A hint is needed for aclocal from Automake <= 1.9.4:
10257
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
10260
10697
dnl -*- mode: autoconf -*-
10261
10698
dnl Copyright 2009 Johan Dahlin