180
181
])# PKG_CHECK_MODULES
182
# Copyright (C) 2002-2012 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,
186
242
# with or without modifications, as long as this notice is preserved.
190
244
# AM_AUTOMAKE_VERSION(VERSION)
191
245
# ----------------------------
192
246
# Automake X.Y traces this macro to ensure aclocal.m4 has been
193
247
# generated from the m4 files accompanying Automake X.Y.
194
248
# (This private macro should not be called outside this file.)
195
249
AC_DEFUN([AM_AUTOMAKE_VERSION],
196
[am__api_version='1.12'
250
[am__api_version='1.14'
197
251
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
198
252
dnl require some minimum version. Point them to the right macro.
199
m4_if([$1], [1.12.1], [],
253
m4_if([$1], [1.14], [],
200
254
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
212
266
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
213
267
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
214
268
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
215
[AM_AUTOMAKE_VERSION([1.12.1])dnl
269
[AM_AUTOMAKE_VERSION([1.14])dnl
216
270
m4_ifndef([AC_AUTOCONF_VERSION],
217
271
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
218
272
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
220
274
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
222
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
276
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
224
278
# This file is free software; the Free Software Foundation
225
279
# gives unlimited permission to copy and/or distribute it,
226
280
# with or without modifications, as long as this notice is preserved.
230
282
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
231
283
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
232
284
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
679
735
[_AM_DEPENDENCIES([OBJC])],
680
736
[m4_define([AC_PROG_OBJC],
681
737
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
682
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
683
dnl but we still cater to Autoconf 2.62.
684
m4_ifdef([AC_PROG_OBJCXX],
685
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
738
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
686
739
[_AM_DEPENDENCIES([OBJCXX])],
687
740
[m4_define([AC_PROG_OBJCXX],
688
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
741
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
690
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
691
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
692
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
693
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
743
AC_REQUIRE([AM_SILENT_RULES])dnl
744
dnl The testsuite driver may need to know about EXEEXT, so add the
745
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
746
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
694
747
AC_CONFIG_COMMANDS_PRE(dnl
695
748
[m4_provide_if([_AM_COMPILER_EXEEXT],
696
749
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
751
# POSIX will say in a future version that running "rm -f" with no argument
752
# is OK; and we want to be able to make that assumption in our Makefile
753
# recipes. So use an aggressive probe to check that the usage we want is
754
# actually supported "in the wild" to an acceptable degree.
755
# See automake bug#10828.
756
# To make any issue more visible, cause the running configure to be aborted
757
# by default if the 'rm' program in use doesn't match our expectations; the
758
# user can still override this though.
759
if rm -f && rm -fr && rm -rf; then : OK; else
763
Your 'rm' program seems unable to run without file operands specified
764
on the command line, even when the '-f' option is present. This is contrary
765
to the behaviour of most rm programs out there, and not conforming with
766
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
768
Please tell bug-automake@gnu.org about your system, including the value
769
of your $PATH and any error possibly output before this message. This
770
can help us improve future automake versions.
773
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
774
echo 'Configuration will proceed anyway, since you have set the' >&2
775
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
779
Aborting the configuration process, to ensure you take notice of the issue.
781
You can download and install GNU coreutils to get an 'rm' implementation
782
that behaves properly: <http://www.gnu.org/software/coreutils/>.
784
If you want to complete the configuration process using your problematic
785
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
786
to "yes", and re-run configure.
789
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
699
793
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
700
794
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
820
907
rm -f confinc confmf
823
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
825
# This file is free software; the Free Software Foundation
826
# gives unlimited permission to copy and/or distribute it,
827
# with or without modifications, as long as this notice is preserved.
833
# Like AC_PROG_CC_C_O, but changed for automake.
834
AC_DEFUN([AM_PROG_CC_C_O],
835
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
836
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
837
AC_REQUIRE_AUX_FILE([compile])dnl
838
# FIXME: we rely on the cache variable name because
839
# there is no other way.
841
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
842
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
843
if test "$am_t" != yes; then
844
# Losing compiler, so override with the script.
845
# FIXME: It is wrong to rewrite CC.
846
# But if we don't then we get into trouble of one sort or another.
847
# A longer-term fix would be to have automake use am__CC in this case,
848
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
849
CC="$am_aux_dir/compile $CC"
851
dnl Make sure AC_PROG_CC is never called again, or it will override our
853
m4_define([AC_PROG_CC],
854
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
857
910
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
859
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
912
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
861
914
# This file is free software; the Free Software Foundation
862
915
# gives unlimited permission to copy and/or distribute it,
863
916
# with or without modifications, as long as this notice is preserved.
867
918
# AM_MISSING_PROG(NAME, PROGRAM)
868
919
# ------------------------------
869
920
AC_DEFUN([AM_MISSING_PROG],
929
977
AC_DEFUN([_AM_IF_OPTION],
930
978
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
932
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
934
# This file is free software; the Free Software Foundation
935
# gives unlimited permission to copy and/or distribute it,
936
# with or without modifications, as long as this notice is preserved.
980
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
982
# This file is free software; the Free Software Foundation
983
# gives unlimited permission to copy and/or distribute it,
984
# with or without modifications, as long as this notice is preserved.
988
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
989
# to automatically call this.
990
AC_DEFUN([_AM_PROG_CC_C_O],
991
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
992
AC_REQUIRE_AUX_FILE([compile])dnl
995
[whether $CC understands -c and -o together],
997
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
998
# Make sure it works both with $CC and with simple cc.
999
# Following AC_PROG_CC_C_O, we do the test twice because some
1000
# compilers refuse to overwrite an existing .o file with -o,
1001
# though they will create one.
1002
am_cv_prog_cc_c_o=yes
1004
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1005
&& test -f conftest2.$ac_objext; then
1008
am_cv_prog_cc_c_o=no
1012
rm -f core conftest*
1014
if test "$am_cv_prog_cc_c_o" != yes; then
1015
# Losing compiler, so override with the script.
1016
# FIXME: It is wrong to rewrite CC.
1017
# But if we don't then we get into trouble of one sort or another.
1018
# A longer-term fix would be to have automake use am__CC in this case,
1019
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1020
CC="$am_aux_dir/compile $CC"
1024
# For backward compatibility.
1025
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1027
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1029
# This file is free software; the Free Software Foundation
1030
# gives unlimited permission to copy and/or distribute it,
1031
# with or without modifications, as long as this notice is preserved.
940
1033
# AM_RUN_LOG(COMMAND)
941
1034
# -------------------
1167
1250
# Substitute a variable $(am__untar) that extract such
1168
1251
# a tarball read from stdin.
1169
1252
# $(am__untar) < result.tar
1170
1254
AC_DEFUN([_AM_PROG_TAR],
1171
1255
[# Always define AMTAR for backward compatibility. Yes, it's still used
1172
1256
# in the wild :-( We should find a proper way to deprecate it ...
1173
1257
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1259
# We'll loop over all known methods to create a tar archive until one works.
1260
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1174
1262
m4_if([$1], [v7],
1175
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1176
[m4_case([$1], [ustar],, [pax],,
1177
[m4_fatal([Unknown tar format])])
1178
AC_MSG_CHECKING([how to create a $1 tar archive])
1179
# Loop over all known methods to create a tar archive until one works.
1180
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1181
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1182
# Do not fold the above two line into one, because Tru64 sh and
1183
# Solaris sh will not grok spaces in the rhs of '-'.
1184
for _am_tool in $_am_tools
1188
for _am_tar in tar gnutar gtar;
1190
AM_RUN_LOG([$_am_tar --version]) && break
1192
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1193
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1194
am__untar="$_am_tar -xf -"
1197
# Must skip GNU tar: if it does not support --format= it doesn't create
1198
# ustar tarball either.
1199
(tar --version) >/dev/null 2>&1 && continue
1200
am__tar='tar chf - "$$tardir"'
1201
am__tar_='tar chf - "$tardir"'
1202
am__untar='tar xf -'
1205
am__tar='pax -L -x $1 -w "$$tardir"'
1206
am__tar_='pax -L -x $1 -w "$tardir"'
1210
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1211
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1212
am__untar='cpio -i -H $1 -d'
1221
# If the value was cached, stop now. We just wanted to have am__tar
1222
# and am__untar set.
1223
test -n "${am_cv_prog_tar_$1}" && break
1225
# tar/untar a dummy directory, and stop if the command works
1228
echo GrepMe > conftest.dir/file
1229
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1231
if test -s conftest.tar; then
1232
AM_RUN_LOG([$am__untar <conftest.tar])
1233
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1238
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1239
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1263
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1267
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1268
# There is notably a 21 bits limit for the UID and the GID. In fact,
1269
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1271
am_max_uid=2097151 # 2^21 - 1
1272
am_max_gid=$am_max_uid
1273
# The $UID and $GID variables are not portable, so we need to resort
1274
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1275
# below are definitely unexpected, so allow the users to see them
1276
# (that is, avoid stderr redirection).
1277
am_uid=`id -u || echo unknown`
1278
am_gid=`id -g || echo unknown`
1279
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1280
if test $am_uid -le $am_max_uid; then
1281
AC_MSG_RESULT([yes])
1286
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1287
if test $am_gid -le $am_max_gid; then
1288
AC_MSG_RESULT([yes])
1297
[m4_fatal([Unknown tar format])])
1299
AC_MSG_CHECKING([how to create a $1 tar archive])
1301
# Go ahead even if we have the value already cached. We do so because we
1302
# need to set the values for the 'am__tar' and 'am__untar' variables.
1303
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1305
for _am_tool in $_am_tools; do
1308
for _am_tar in tar gnutar gtar; do
1309
AM_RUN_LOG([$_am_tar --version]) && break
1311
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1312
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1313
am__untar="$_am_tar -xf -"
1316
# Must skip GNU tar: if it does not support --format= it doesn't create
1317
# ustar tarball either.
1318
(tar --version) >/dev/null 2>&1 && continue
1319
am__tar='tar chf - "$$tardir"'
1320
am__tar_='tar chf - "$tardir"'
1321
am__untar='tar xf -'
1324
am__tar='pax -L -x $1 -w "$$tardir"'
1325
am__tar_='pax -L -x $1 -w "$tardir"'
1329
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1330
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1331
am__untar='cpio -i -H $1 -d'
1340
# If the value was cached, stop now. We just wanted to have am__tar
1341
# and am__untar set.
1342
test -n "${am_cv_prog_tar_$1}" && break
1344
# tar/untar a dummy directory, and stop if the command works.
1347
echo GrepMe > conftest.dir/file
1348
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1350
if test -s conftest.tar; then
1351
AM_RUN_LOG([$am__untar <conftest.tar])
1352
AM_RUN_LOG([cat conftest.dir/file])
1353
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1358
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1359
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1240
1361
AC_SUBST([am__tar])
1241
1362
AC_SUBST([am__untar])
1242
1363
]) # _AM_PROG_TAR