180
181
])# PKG_CHECK_MODULES
182
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
184
# PKG_INSTALLDIR(DIRECTORY)
185
# -------------------------
186
# Substitutes the variable pkgconfigdir as the location where a module
187
# should install pkg-config .pc files. By default the directory is
188
# $libdir/pkgconfig, but the default can be changed by passing
189
# DIRECTORY. The user can override through the --with-pkgconfigdir
191
AC_DEFUN([PKG_INSTALLDIR],
192
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
193
m4_pushdef([pkg_description],
194
[pkg-config installation directory @<:@]pkg_default[@:>@])
195
AC_ARG_WITH([pkgconfigdir],
196
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
197
[with_pkgconfigdir=]pkg_default)
198
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
199
m4_popdef([pkg_default])
200
m4_popdef([pkg_description])
201
]) dnl PKG_INSTALLDIR
204
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
205
# -------------------------
206
# Substitutes the variable noarch_pkgconfigdir as the location where a
207
# module should install arch-independent pkg-config .pc files. By
208
# default the directory is $datadir/pkgconfig, but the default can be
209
# changed by passing DIRECTORY. The user can override through the
210
# --with-noarch-pkgconfigdir parameter.
211
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
212
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
213
m4_pushdef([pkg_description],
214
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
215
AC_ARG_WITH([noarch-pkgconfigdir],
216
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
217
[with_noarch_pkgconfigdir=]pkg_default)
218
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
219
m4_popdef([pkg_default])
220
m4_popdef([pkg_description])
221
]) dnl PKG_NOARCH_INSTALLDIR
224
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
225
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
226
# -------------------------------------------
227
# Retrieves the value of the pkg-config variable for the given module.
228
AC_DEFUN([PKG_CHECK_VAR],
229
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
230
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
232
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
233
AS_VAR_COPY([$1], [pkg_cv_][$1])
235
AS_VAR_IF([$1], [""], [$5], [$4])dnl
238
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
184
240
# This file is free software; the Free Software Foundation
185
241
# gives unlimited permission to copy and/or distribute it,
621
674
# Define the identity of the package.
622
675
dnl Distinguish between old-style and new-style calls.
624
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
677
[AC_DIAGNOSE([obsolete],
678
[$0: two- and three-arguments forms are deprecated.])
679
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
625
680
AC_SUBST([PACKAGE], [$1])dnl
626
681
AC_SUBST([VERSION], [$2])],
627
682
[_AM_SET_OPTIONS([$1])dnl
628
683
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
629
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
685
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
630
687
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
631
688
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
632
689
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
634
691
_AM_IF_OPTION([no-define],,
635
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
636
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
692
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
693
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
638
695
# Some tools Automake needs.
639
696
AC_REQUIRE([AM_SANITY_CHECK])dnl
640
697
AC_REQUIRE([AC_ARG_PROGRAM])dnl
641
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
642
AM_MISSING_PROG(AUTOCONF, autoconf)
643
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
644
AM_MISSING_PROG(AUTOHEADER, autoheader)
645
AM_MISSING_PROG(MAKEINFO, makeinfo)
698
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
699
AM_MISSING_PROG([AUTOCONF], [autoconf])
700
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
701
AM_MISSING_PROG([AUTOHEADER], [autoheader])
702
AM_MISSING_PROG([MAKEINFO], [makeinfo])
646
703
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
647
704
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
648
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
705
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
706
# For better backward compatibility. To be removed once Automake 1.9.x
707
# dies out for good. For more background, see:
708
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
709
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
710
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
649
711
# We need awk for the "check" target. The system "awk" is bad on
650
712
# some platforms.
651
713
AC_REQUIRE([AC_PROG_AWK])dnl
656
718
[_AM_PROG_TAR([v7])])])
657
719
_AM_IF_OPTION([no-dependencies],,
658
720
[AC_PROVIDE_IFELSE([AC_PROG_CC],
659
[_AM_DEPENDENCIES(CC)],
660
[define([AC_PROG_CC],
661
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
721
[_AM_DEPENDENCIES([CC])],
722
[m4_define([AC_PROG_CC],
723
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
662
724
AC_PROVIDE_IFELSE([AC_PROG_CXX],
663
[_AM_DEPENDENCIES(CXX)],
664
[define([AC_PROG_CXX],
665
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
725
[_AM_DEPENDENCIES([CXX])],
726
[m4_define([AC_PROG_CXX],
727
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
666
728
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
667
[_AM_DEPENDENCIES(OBJC)],
668
[define([AC_PROG_OBJC],
669
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
729
[_AM_DEPENDENCIES([OBJC])],
730
[m4_define([AC_PROG_OBJC],
731
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
732
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
733
[_AM_DEPENDENCIES([OBJCXX])],
734
[m4_define([AC_PROG_OBJCXX],
735
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
671
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
672
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
673
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
674
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
737
AC_REQUIRE([AM_SILENT_RULES])dnl
738
dnl The testsuite driver may need to know about EXEEXT, so add the
739
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
740
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
675
741
AC_CONFIG_COMMANDS_PRE(dnl
676
742
[m4_provide_if([_AM_COMPILER_EXEEXT],
677
743
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
680
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
746
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
681
747
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
682
748
dnl mangled by Autoconf and run in a shell conditional statement.
683
749
m4_define([_AC_COMPILER_EXEEXT],
871
926
# Use eval to expand $SHELL
872
if eval "$MISSING --run true"; then
873
am_missing_run="$MISSING --run "
927
if eval "$MISSING --is-lightweight"; then
928
am_missing_run="$MISSING "
876
AC_MSG_WARN([`missing' script is too old or missing])
931
AC_MSG_WARN(['missing' script is too old or missing])
880
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
882
# This file is free software; the Free Software Foundation
883
# gives unlimited permission to copy and/or distribute it,
884
# with or without modifications, as long as this notice is preserved.
888
# Check for `mkdir -p'.
889
AC_DEFUN([AM_PROG_MKDIR_P],
890
[AC_PREREQ([2.60])dnl
891
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
892
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
893
dnl while keeping a definition of mkdir_p for backward compatibility.
894
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
895
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
896
dnl Makefile.ins that do not define MKDIR_P, so we do our own
897
dnl adjustment using top_builddir (which is defined more often than
899
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
901
[[\\/$]]* | ?:[[\\/]]*) ;;
902
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
906
935
# Helper functions for option handling. -*- Autoconf -*-
908
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
937
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
910
939
# This file is free software; the Free Software Foundation
911
940
# gives unlimited permission to copy and/or distribute it,
912
941
# with or without modifications, as long as this notice is preserved.
916
943
# _AM_MANGLE_OPTION(NAME)
917
944
# -----------------------
918
945
AC_DEFUN([_AM_MANGLE_OPTION],
919
946
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
921
948
# _AM_SET_OPTION(NAME)
922
# ------------------------------
949
# --------------------
923
950
# Set option NAME. Presently that only means defining a flag for this option.
924
951
AC_DEFUN([_AM_SET_OPTION],
925
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
952
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
927
954
# _AM_SET_OPTIONS(OPTIONS)
928
# ----------------------------------
955
# ------------------------
929
956
# OPTIONS is a space-separated list of Automake options.
930
957
AC_DEFUN([_AM_SET_OPTIONS],
931
958
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
936
963
AC_DEFUN([_AM_IF_OPTION],
937
964
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
966
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
968
# This file is free software; the Free Software Foundation
969
# gives unlimited permission to copy and/or distribute it,
970
# with or without modifications, as long as this notice is preserved.
973
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
974
# ---------------------------------------------------------------------------
975
# Adds support for distributing Python modules and packages. To
976
# install modules, copy them to $(pythondir), using the python_PYTHON
977
# automake variable. To install a package with the same name as the
978
# automake package, install to $(pkgpythondir), or use the
979
# pkgpython_PYTHON automake variable.
981
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
982
# locations to install python extension modules (shared libraries).
983
# Another macro is required to find the appropriate flags to compile
986
# If your package is configured with a different prefix to python,
987
# users will have to add the install directory to the PYTHONPATH
988
# environment variable, or create a .pth file (see the python
989
# documentation for details).
991
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
992
# cause an error if the version of python installed on the system
993
# doesn't meet the requirement. MINIMUM-VERSION should consist of
994
# numbers and dots only.
995
AC_DEFUN([AM_PATH_PYTHON],
997
dnl Find a Python interpreter. Python versions prior to 2.0 are not
998
dnl supported. (2.0 was released on October 16, 2000).
999
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1000
[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1001
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1003
AC_ARG_VAR([PYTHON], [the Python interpreter])
1006
dnl No version check is needed.
1007
# Find any Python interpreter.
1008
if test -z "$PYTHON"; then
1009
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1011
am_display_PYTHON=python
1013
dnl A version check is needed.
1014
if test -n "$PYTHON"; then
1015
# If the user set $PYTHON, use it and don't search something else.
1016
AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1017
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1018
[AC_MSG_RESULT([yes])],
1019
[AC_MSG_RESULT([no])
1020
AC_MSG_ERROR([Python interpreter is too old])])
1021
am_display_PYTHON=$PYTHON
1023
# Otherwise, try each interpreter until we find one that satisfies
1025
AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1026
[am_cv_pathless_PYTHON],[
1027
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1028
test "$am_cv_pathless_PYTHON" = none && break
1029
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1031
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1032
if test "$am_cv_pathless_PYTHON" = none; then
1035
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1037
am_display_PYTHON=$am_cv_pathless_PYTHON
1041
if test "$PYTHON" = :; then
1042
dnl Run any user-specified action, or abort.
1043
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1046
dnl Query Python for its version number. Getting [:3] seems to be
1047
dnl the best way to do this; it's what "site.py" does in the standard
1050
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1051
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1052
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1054
dnl Use the values of $prefix and $exec_prefix for the corresponding
1055
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1056
dnl distinct variables so they can be overridden if need be. However,
1057
dnl general consensus is that you shouldn't need this ability.
1059
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1060
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1062
dnl At times (like when building shared libraries) you may want
1063
dnl to know which OS platform Python thinks this is.
1065
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1066
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1067
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1069
# Just factor out some code duplication.
1070
am_python_setup_sysconfig="\
1072
# Prefer sysconfig over distutils.sysconfig, for better compatibility
1073
# with python 3.x. See automake bug#10227.
1077
can_use_sysconfig = 0
1079
can_use_sysconfig = 1
1080
# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1081
# <https://github.com/pypa/virtualenv/issues/118>
1083
from platform import python_implementation
1084
if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1085
can_use_sysconfig = 0
1089
dnl Set up 4 directories:
1091
dnl pythondir -- where to install python scripts. This is the
1092
dnl site-packages directory, not the python standard library
1093
dnl directory like in previous automake betas. This behavior
1094
dnl is more consistent with lispdir.m4 for example.
1095
dnl Query distutils for this directory.
1096
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1097
[am_cv_python_pythondir],
1098
[if test "x$prefix" = xNONE
1100
am_py_prefix=$ac_default_prefix
1102
am_py_prefix=$prefix
1104
am_cv_python_pythondir=`$PYTHON -c "
1105
$am_python_setup_sysconfig
1106
if can_use_sysconfig:
1107
sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1109
from distutils import sysconfig
1110
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1111
sys.stdout.write(sitedir)"`
1112
case $am_cv_python_pythondir in
1114
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1115
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1118
case $am_py_prefix in
1121
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1127
AC_SUBST([pythondir], [$am_cv_python_pythondir])
1129
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1130
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1131
dnl more consistent with the rest of automake.
1133
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1135
dnl pyexecdir -- directory for installing python extension modules
1136
dnl (shared libraries)
1137
dnl Query distutils for this directory.
1138
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1139
[am_cv_python_pyexecdir],
1140
[if test "x$exec_prefix" = xNONE
1142
am_py_exec_prefix=$am_py_prefix
1144
am_py_exec_prefix=$exec_prefix
1146
am_cv_python_pyexecdir=`$PYTHON -c "
1147
$am_python_setup_sysconfig
1148
if can_use_sysconfig:
1149
sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1151
from distutils import sysconfig
1152
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1153
sys.stdout.write(sitedir)"`
1154
case $am_cv_python_pyexecdir in
1155
$am_py_exec_prefix*)
1156
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1157
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1160
case $am_py_exec_prefix in
1163
am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1169
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1171
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1173
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1175
dnl Run any user-specified action.
1182
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1183
# ---------------------------------------------------------------------------
1184
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1185
# Run ACTION-IF-FALSE otherwise.
1186
# This test uses sys.hexversion instead of the string equivalent (first
1187
# word of sys.version), in order to cope with versions such as 2.2c1.
1188
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1189
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1191
# split strings by '.' and convert to numeric. Append some zeros
1192
# because we need at least 4 digits for the hex conversion.
1193
# map returns an iterator in Python 3.0 and a list in 2.x
1194
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1196
# xrange is not present in Python 3.0 and range returns an iterator
1197
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1198
sys.exit(sys.hexversion < minverhex)"
1199
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1201
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1203
# This file is free software; the Free Software Foundation
1204
# gives unlimited permission to copy and/or distribute it,
1205
# with or without modifications, as long as this notice is preserved.
1207
# AM_RUN_LOG(COMMAND)
1208
# -------------------
1209
# Run COMMAND, save the exit status in ac_status, and log it.
1210
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1211
AC_DEFUN([AM_RUN_LOG],
1212
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1213
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1215
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1216
(exit $ac_status); }])
939
1218
# Check to make sure that the build environment is sane. -*- Autoconf -*-
941
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
942
# Free Software Foundation, Inc.
1220
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
944
1222
# This file is free software; the Free Software Foundation
945
1223
# gives unlimited permission to copy and/or distribute it,
946
1224
# with or without modifications, as long as this notice is preserved.
950
1226
# AM_SANITY_CHECK
951
1227
# ---------------
952
1228
AC_DEFUN([AM_SANITY_CHECK],
953
1229
[AC_MSG_CHECKING([whether build environment is sane])
956
echo timestamp > conftest.file
957
1230
# Reject unsafe characters in $srcdir or the absolute working directory
958
1231
# name. Accept space and tab only in the latter.
999
1280
AC_MSG_ERROR([newly created file is older than distributed files!
1000
1281
Check your system clock])
1002
AC_MSG_RESULT(yes)])
1283
AC_MSG_RESULT([yes])
1284
# If we didn't sleep, we still need to ensure time stamps of config.status and
1285
# generated files are strictly newer.
1287
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1291
AC_CONFIG_COMMANDS_PRE(
1292
[AC_MSG_CHECKING([that generated files are newer than configure])
1293
if test -n "$am_sleep_pid"; then
1294
# Hide warnings about reused PIDs.
1295
wait $am_sleep_pid 2>/dev/null
1297
AC_MSG_RESULT([done])])
1004
# Copyright (C) 2009 Free Software Foundation, Inc.
1301
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
1006
1303
# This file is free software; the Free Software Foundation
1007
1304
# gives unlimited permission to copy and/or distribute it,
1008
1305
# with or without modifications, as long as this notice is preserved.
1012
1307
# AM_SILENT_RULES([DEFAULT])
1013
1308
# --------------------------
1014
1309
# Enable less verbose build rules; with the default set to DEFAULT
1015
# (`yes' being less verbose, `no' or empty being verbose).
1310
# ("yes" being less verbose, "no" or empty being verbose).
1016
1311
AC_DEFUN([AM_SILENT_RULES],
1017
[AC_ARG_ENABLE([silent-rules],
1018
[ --enable-silent-rules less verbose build output (undo: `make V=1')
1019
--disable-silent-rules verbose build output (undo: `make V=0')])
1020
case $enable_silent_rules in
1021
yes) AM_DEFAULT_VERBOSITY=0;;
1022
no) AM_DEFAULT_VERBOSITY=1;;
1023
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1312
[AC_ARG_ENABLE([silent-rules], [dnl
1314
[--enable-silent-rules],
1315
[less verbose build output (undo: "make V=1")])
1317
[--disable-silent-rules],
1318
[verbose build output (undo: "make V=0")])dnl
1320
case $enable_silent_rules in @%:@ (((
1321
yes) AM_DEFAULT_VERBOSITY=0;;
1322
no) AM_DEFAULT_VERBOSITY=1;;
1323
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1326
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1327
dnl do not support nested variable expansions.
1328
dnl See automake bug#9928 and bug#10237.
1329
am_make=${MAKE-make}
1330
AC_CACHE_CHECK([whether $am_make supports nested variables],
1331
[am_cv_make_support_nested_variables],
1332
[if AS_ECHO([['TRUE=$(BAR$(V))
1338
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1339
am_cv_make_support_nested_variables=yes
1341
am_cv_make_support_nested_variables=no
1343
if test $am_cv_make_support_nested_variables = yes; then
1344
dnl Using '$V' instead of '$(V)' breaks IRIX make.
1346
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1348
AM_V=$AM_DEFAULT_VERBOSITY
1349
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1352
AM_SUBST_NOTMAKE([AM_V])dnl
1353
AC_SUBST([AM_DEFAULT_V])dnl
1354
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1025
1355
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1026
1356
AM_BACKSLASH='\'
1027
1357
AC_SUBST([AM_BACKSLASH])dnl
1028
1358
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1031
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1361
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1033
1363
# This file is free software; the Free Software Foundation
1034
1364
# gives unlimited permission to copy and/or distribute it,
1037
1367
# AM_PROG_INSTALL_STRIP
1038
1368
# ---------------------
1039
# One issue with vendor `install' (even GNU) is that you can't
1369
# One issue with vendor 'install' (even GNU) is that you can't
1040
1370
# specify the program used to strip binaries. This is especially
1041
1371
# annoying in cross-compiling environments, where the build's strip
1042
1372
# is unlikely to handle the host's binaries.
1043
1373
# Fortunately install-sh will honor a STRIPPROG variable, so we
1044
# always use install-sh in `make install-strip', and initialize
1374
# always use install-sh in "make install-strip", and initialize
1045
1375
# STRIPPROG with the value of the STRIP variable (set by the user).
1046
1376
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1047
1377
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1048
# Installed binaries are usually stripped using `strip' when the user
1049
# run `make install-strip'. However `strip' might not be the right
1378
# Installed binaries are usually stripped using 'strip' when the user
1379
# run "make install-strip". However 'strip' might not be the right
1050
1380
# tool to use in cross-compilation environments, therefore Automake
1051
# will honor the `STRIP' environment variable to overrule this program.
1052
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1381
# will honor the 'STRIP' environment variable to overrule this program.
1382
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1053
1383
if test "$cross_compiling" != no; then
1054
1384
AC_CHECK_TOOL([STRIP], [strip], :)
1056
1386
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1057
1387
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1059
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1389
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
1061
1391
# This file is free software; the Free Software Foundation
1062
1392
# gives unlimited permission to copy and/or distribute it,
1063
1393
# with or without modifications, as long as this notice is preserved.
1067
1395
# _AM_SUBST_NOTMAKE(VARIABLE)
1068
1396
# ---------------------------
1069
1397
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1098
1424
# Substitute a variable $(am__untar) that extract such
1099
1425
# a tarball read from stdin.
1100
1426
# $(am__untar) < result.tar
1101
1428
AC_DEFUN([_AM_PROG_TAR],
1102
[# Always define AMTAR for backward compatibility.
1103
AM_MISSING_PROG([AMTAR], [tar])
1429
[# Always define AMTAR for backward compatibility. Yes, it's still used
1430
# in the wild :-( We should find a proper way to deprecate it ...
1431
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1433
# We'll loop over all known methods to create a tar archive until one works.
1434
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1104
1436
m4_if([$1], [v7],
1105
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1106
[m4_case([$1], [ustar],, [pax],,
1107
[m4_fatal([Unknown tar format])])
1108
AC_MSG_CHECKING([how to create a $1 tar archive])
1109
# Loop over all known methods to create a tar archive until one works.
1110
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1111
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1112
# Do not fold the above two line into one, because Tru64 sh and
1113
# Solaris sh will not grok spaces in the rhs of `-'.
1114
for _am_tool in $_am_tools
1118
for _am_tar in tar gnutar gtar;
1120
AM_RUN_LOG([$_am_tar --version]) && break
1122
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1123
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1124
am__untar="$_am_tar -xf -"
1127
# Must skip GNU tar: if it does not support --format= it doesn't create
1128
# ustar tarball either.
1129
(tar --version) >/dev/null 2>&1 && continue
1130
am__tar='tar chf - "$$tardir"'
1131
am__tar_='tar chf - "$tardir"'
1132
am__untar='tar xf -'
1135
am__tar='pax -L -x $1 -w "$$tardir"'
1136
am__tar_='pax -L -x $1 -w "$tardir"'
1140
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1141
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1142
am__untar='cpio -i -H $1 -d'
1151
# If the value was cached, stop now. We just wanted to have am__tar
1152
# and am__untar set.
1153
test -n "${am_cv_prog_tar_$1}" && break
1155
# tar/untar a dummy directory, and stop if the command works
1158
echo GrepMe > conftest.dir/file
1159
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1161
if test -s conftest.tar; then
1162
AM_RUN_LOG([$am__untar <conftest.tar])
1163
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1168
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1169
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1437
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1441
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1442
# There is notably a 21 bits limit for the UID and the GID. In fact,
1443
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1445
am_max_uid=2097151 # 2^21 - 1
1446
am_max_gid=$am_max_uid
1447
# The $UID and $GID variables are not portable, so we need to resort
1448
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1449
# below are definitely unexpected, so allow the users to see them
1450
# (that is, avoid stderr redirection).
1451
am_uid=`id -u || echo unknown`
1452
am_gid=`id -g || echo unknown`
1453
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1454
if test $am_uid -le $am_max_uid; then
1455
AC_MSG_RESULT([yes])
1460
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1461
if test $am_gid -le $am_max_gid; then
1462
AC_MSG_RESULT([yes])
1471
[m4_fatal([Unknown tar format])])
1473
AC_MSG_CHECKING([how to create a $1 tar archive])
1475
# Go ahead even if we have the value already cached. We do so because we
1476
# need to set the values for the 'am__tar' and 'am__untar' variables.
1477
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1479
for _am_tool in $_am_tools; do
1482
for _am_tar in tar gnutar gtar; do
1483
AM_RUN_LOG([$_am_tar --version]) && break
1485
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1486
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1487
am__untar="$_am_tar -xf -"
1490
# Must skip GNU tar: if it does not support --format= it doesn't create
1491
# ustar tarball either.
1492
(tar --version) >/dev/null 2>&1 && continue
1493
am__tar='tar chf - "$$tardir"'
1494
am__tar_='tar chf - "$tardir"'
1495
am__untar='tar xf -'
1498
am__tar='pax -L -x $1 -w "$$tardir"'
1499
am__tar_='pax -L -x $1 -w "$tardir"'
1503
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1504
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1505
am__untar='cpio -i -H $1 -d'
1514
# If the value was cached, stop now. We just wanted to have am__tar
1515
# and am__untar set.
1516
test -n "${am_cv_prog_tar_$1}" && break
1518
# tar/untar a dummy directory, and stop if the command works.
1521
echo GrepMe > conftest.dir/file
1522
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1524
if test -s conftest.tar; then
1525
AM_RUN_LOG([$am__untar <conftest.tar])
1526
AM_RUN_LOG([cat conftest.dir/file])
1527
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1532
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1533
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1170
1535
AC_SUBST([am__tar])
1171
1536
AC_SUBST([am__untar])
1172
1537
]) # _AM_PROG_TAR
1539
m4_include([m4/compiler.m4])
1174
1540
m4_include([m4/gettext.m4])
1175
1541
m4_include([m4/gtk-doc.m4])
1176
1542
m4_include([m4/iconv.m4])
1543
m4_include([m4/intlmacosx.m4])
1177
1544
m4_include([m4/lib-ld.m4])
1178
1545
m4_include([m4/lib-link.m4])
1179
1546
m4_include([m4/lib-prefix.m4])