219
220
m4_popdef([pkg_description])
220
221
]) dnl PKG_NOARCH_INSTALLDIR
222
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
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.
224
240
# This file is free software; the Free Software Foundation
225
241
# gives unlimited permission to copy and/or distribute it,
226
242
# with or without modifications, as long as this notice is preserved.
230
244
# AM_AUTOMAKE_VERSION(VERSION)
231
245
# ----------------------------
232
246
# Automake X.Y traces this macro to ensure aclocal.m4 has been
233
247
# generated from the m4 files accompanying Automake X.Y.
234
248
# (This private macro should not be called outside this file.)
235
249
AC_DEFUN([AM_AUTOMAKE_VERSION],
236
[am__api_version='1.12'
250
[am__api_version='1.13'
237
251
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
238
252
dnl require some minimum version. Point them to the right macro.
239
m4_if([$1], [1.12.1], [],
253
m4_if([$1], [1.13.4], [],
240
254
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
252
266
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
253
267
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
254
268
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
255
[AM_AUTOMAKE_VERSION([1.12.1])dnl
269
[AM_AUTOMAKE_VERSION([1.13.4])dnl
256
270
m4_ifndef([AC_AUTOCONF_VERSION],
257
271
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
258
272
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
260
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
274
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
262
276
# This file is free software; the Free Software Foundation
263
277
# gives unlimited permission to copy and/or distribute it,
264
278
# with or without modifications, as long as this notice is preserved.
268
280
# AM_PROG_AR([ACT-IF-FAIL])
269
281
# -------------------------
270
282
# Try to determine the archiver interface, and trigger the ar-lib wrapper
781
788
[_AM_DEPENDENCIES([OBJC])],
782
789
[m4_define([AC_PROG_OBJC],
783
790
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
784
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
785
dnl but we still cater to Autoconf 2.62.
786
m4_ifdef([AC_PROG_OBJCXX],
787
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
791
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
788
792
[_AM_DEPENDENCIES([OBJCXX])],
789
793
[m4_define([AC_PROG_OBJCXX],
790
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
794
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
792
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
793
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
794
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
795
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
796
AC_REQUIRE([AM_SILENT_RULES])dnl
797
dnl The testsuite driver may need to know about EXEEXT, so add the
798
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
799
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
796
800
AC_CONFIG_COMMANDS_PRE(dnl
797
801
[m4_provide_if([_AM_COMPILER_EXEEXT],
798
802
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1216
1199
# Substitute a variable $(am__untar) that extract such
1217
1200
# a tarball read from stdin.
1218
1201
# $(am__untar) < result.tar
1219
1203
AC_DEFUN([_AM_PROG_TAR],
1220
1204
[# Always define AMTAR for backward compatibility. Yes, it's still used
1221
1205
# in the wild :-( We should find a proper way to deprecate it ...
1222
1206
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1208
# We'll loop over all known methods to create a tar archive until one works.
1209
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1223
1211
m4_if([$1], [v7],
1224
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1225
[m4_case([$1], [ustar],, [pax],,
1226
[m4_fatal([Unknown tar format])])
1227
AC_MSG_CHECKING([how to create a $1 tar archive])
1228
# Loop over all known methods to create a tar archive until one works.
1229
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1230
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1231
# Do not fold the above two line into one, because Tru64 sh and
1232
# Solaris sh will not grok spaces in the rhs of '-'.
1233
for _am_tool in $_am_tools
1237
for _am_tar in tar gnutar gtar;
1239
AM_RUN_LOG([$_am_tar --version]) && break
1241
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1242
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1243
am__untar="$_am_tar -xf -"
1246
# Must skip GNU tar: if it does not support --format= it doesn't create
1247
# ustar tarball either.
1248
(tar --version) >/dev/null 2>&1 && continue
1249
am__tar='tar chf - "$$tardir"'
1250
am__tar_='tar chf - "$tardir"'
1251
am__untar='tar xf -'
1254
am__tar='pax -L -x $1 -w "$$tardir"'
1255
am__tar_='pax -L -x $1 -w "$tardir"'
1259
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1260
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1261
am__untar='cpio -i -H $1 -d'
1270
# If the value was cached, stop now. We just wanted to have am__tar
1271
# and am__untar set.
1272
test -n "${am_cv_prog_tar_$1}" && break
1274
# tar/untar a dummy directory, and stop if the command works
1277
echo GrepMe > conftest.dir/file
1278
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1280
if test -s conftest.tar; then
1281
AM_RUN_LOG([$am__untar <conftest.tar])
1282
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1287
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1288
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1212
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1216
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1217
# There is notably a 21 bits limit for the UID and the GID. In fact,
1218
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1220
am_max_uid=2097151 # 2^21 - 1
1221
am_max_gid=$am_max_uid
1222
# The $UID and $GID variables are not portable, so we need to resort
1223
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1224
# below are definitely unexpected, so allow the users to see them
1225
# (that is, avoid stderr redirection).
1226
am_uid=`id -u || echo unknown`
1227
am_gid=`id -g || echo unknown`
1228
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1229
if test $am_uid -le $am_max_uid; then
1230
AC_MSG_RESULT([yes])
1235
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1236
if test $am_gid -le $am_max_gid; then
1237
AC_MSG_RESULT([yes])
1246
[m4_fatal([Unknown tar format])])
1248
AC_MSG_CHECKING([how to create a $1 tar archive])
1250
# Go ahead even if we have the value already cached. We do so because we
1251
# need to set the values for the 'am__tar' and 'am__untar' variables.
1252
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1254
for _am_tool in $_am_tools; do
1257
for _am_tar in tar gnutar gtar; do
1258
AM_RUN_LOG([$_am_tar --version]) && break
1260
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1261
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1262
am__untar="$_am_tar -xf -"
1265
# Must skip GNU tar: if it does not support --format= it doesn't create
1266
# ustar tarball either.
1267
(tar --version) >/dev/null 2>&1 && continue
1268
am__tar='tar chf - "$$tardir"'
1269
am__tar_='tar chf - "$tardir"'
1270
am__untar='tar xf -'
1273
am__tar='pax -L -x $1 -w "$$tardir"'
1274
am__tar_='pax -L -x $1 -w "$tardir"'
1278
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1279
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1280
am__untar='cpio -i -H $1 -d'
1289
# If the value was cached, stop now. We just wanted to have am__tar
1290
# and am__untar set.
1291
test -n "${am_cv_prog_tar_$1}" && break
1293
# tar/untar a dummy directory, and stop if the command works.
1296
echo GrepMe > conftest.dir/file
1297
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1299
if test -s conftest.tar; then
1300
AM_RUN_LOG([$am__untar <conftest.tar])
1301
AM_RUN_LOG([cat conftest.dir/file])
1302
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1307
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1308
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1289
1310
AC_SUBST([am__tar])
1290
1311
AC_SUBST([am__untar])
1291
1312
]) # _AM_PROG_TAR