179
181
])# PKG_CHECK_MODULES
181
# 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.
183
240
# This file is free software; the Free Software Foundation
184
241
# gives unlimited permission to copy and/or distribute it,
185
242
# with or without modifications, as long as this notice is preserved.
189
244
# AM_AUTOMAKE_VERSION(VERSION)
190
245
# ----------------------------
191
246
# Automake X.Y traces this macro to ensure aclocal.m4 has been
192
247
# generated from the m4 files accompanying Automake X.Y.
193
248
# (This private macro should not be called outside this file.)
194
249
AC_DEFUN([AM_AUTOMAKE_VERSION],
195
[am__api_version='1.11a'
250
[am__api_version='1.14'
196
251
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
197
252
dnl require some minimum version. Point them to the right macro.
198
m4_if([$1], [1.11a], [],
253
m4_if([$1], [1.14.1], [],
199
254
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
211
266
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
212
267
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
213
268
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
214
[AM_AUTOMAKE_VERSION([1.11a])dnl
269
[AM_AUTOMAKE_VERSION([1.14.1])dnl
215
270
m4_ifndef([AC_AUTOCONF_VERSION],
216
271
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
217
272
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
219
274
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
221
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
276
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
223
278
# This file is free software; the Free Software Foundation
224
279
# gives unlimited permission to copy and/or distribute it,
225
280
# with or without modifications, as long as this notice is preserved.
229
282
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
230
283
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
231
284
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
664
725
_AM_IF_OPTION([no-dependencies],,
665
726
[AC_PROVIDE_IFELSE([AC_PROG_CC],
666
727
[_AM_DEPENDENCIES([CC])],
667
[define([AC_PROG_CC],
668
defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
728
[m4_define([AC_PROG_CC],
729
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
669
730
AC_PROVIDE_IFELSE([AC_PROG_CXX],
670
731
[_AM_DEPENDENCIES([CXX])],
671
[define([AC_PROG_CXX],
672
defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
732
[m4_define([AC_PROG_CXX],
733
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
673
734
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
674
735
[_AM_DEPENDENCIES([OBJC])],
675
[define([AC_PROG_OBJC],
676
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
736
[m4_define([AC_PROG_OBJC],
737
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
738
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
739
[_AM_DEPENDENCIES([OBJCXX])],
740
[m4_define([AC_PROG_OBJCXX],
741
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
678
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
679
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
680
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
681
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.
682
747
AC_CONFIG_COMMANDS_PRE(dnl
683
748
[m4_provide_if([_AM_COMPILER_EXEEXT],
684
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.])
687
793
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
688
794
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
808
907
rm -f confinc confmf
811
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
813
# This file is free software; the Free Software Foundation
814
# gives unlimited permission to copy and/or distribute it,
815
# with or without modifications, as long as this notice is preserved.
821
# Like AC_PROG_CC_C_O, but changed for automake.
822
AC_DEFUN([AM_PROG_CC_C_O],
823
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
824
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
825
AC_REQUIRE_AUX_FILE([compile])dnl
826
# FIXME: we rely on the cache variable name because
827
# there is no other way.
829
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
830
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
831
if test "$am_t" != yes; then
832
# Losing compiler, so override with the script.
833
# FIXME: It is wrong to rewrite CC.
834
# But if we don't then we get into trouble of one sort or another.
835
# A longer-term fix would be to have automake use am__CC in this case,
836
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
837
CC="$am_aux_dir/compile $CC"
839
dnl Make sure AC_PROG_CC is never called again, or it will override our
841
m4_define([AC_PROG_CC],
842
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
845
910
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
847
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
912
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
849
914
# This file is free software; the Free Software Foundation
850
915
# gives unlimited permission to copy and/or distribute it,
851
916
# with or without modifications, as long as this notice is preserved.
855
918
# AM_MISSING_PROG(NAME, PROGRAM)
856
919
# ------------------------------
857
920
AC_DEFUN([AM_MISSING_PROG],
878
940
# Use eval to expand $SHELL
879
if eval "$MISSING --run true"; then
880
am_missing_run="$MISSING --run "
941
if eval "$MISSING --is-lightweight"; then
942
am_missing_run="$MISSING "
883
945
AC_MSG_WARN(['missing' script is too old or missing])
887
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
949
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
889
951
# This file is free software; the Free Software Foundation
890
952
# gives unlimited permission to copy and/or distribute it,
891
953
# with or without modifications, as long as this notice is preserved.
895
955
# AM_PROG_MKDIR_P
896
956
# ---------------
897
957
# Check for 'mkdir -p'.
898
958
AC_DEFUN([AM_PROG_MKDIR_P],
899
959
[AC_PREREQ([2.60])dnl
900
960
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
961
dnl FIXME we are no longer going to remove this! adjust warning
962
dnl FIXME message accordingly.
963
AC_DIAGNOSE([obsolete],
964
[$0: this macro is deprecated, and will soon be removed.
965
You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
966
and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.])
901
967
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
902
968
dnl while keeping a definition of mkdir_p for backward compatibility.
903
969
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
945
1009
AC_DEFUN([_AM_IF_OPTION],
946
1010
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1012
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1014
# This file is free software; the Free Software Foundation
1015
# gives unlimited permission to copy and/or distribute it,
1016
# with or without modifications, as long as this notice is preserved.
1020
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1021
# to automatically call this.
1022
AC_DEFUN([_AM_PROG_CC_C_O],
1023
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1024
AC_REQUIRE_AUX_FILE([compile])dnl
1025
AC_LANG_PUSH([C])dnl
1027
[whether $CC understands -c and -o together],
1028
[am_cv_prog_cc_c_o],
1029
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1030
# Make sure it works both with $CC and with simple cc.
1031
# Following AC_PROG_CC_C_O, we do the test twice because some
1032
# compilers refuse to overwrite an existing .o file with -o,
1033
# though they will create one.
1034
am_cv_prog_cc_c_o=yes
1036
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1037
&& test -f conftest2.$ac_objext; then
1040
am_cv_prog_cc_c_o=no
1044
rm -f core conftest*
1046
if test "$am_cv_prog_cc_c_o" != yes; then
1047
# Losing compiler, so override with the script.
1048
# FIXME: It is wrong to rewrite CC.
1049
# But if we don't then we get into trouble of one sort or another.
1050
# A longer-term fix would be to have automake use am__CC in this case,
1051
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1052
CC="$am_aux_dir/compile $CC"
1056
# For backward compatibility.
1057
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1059
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
1061
# This file is free software; the Free Software Foundation
1062
# gives unlimited permission to copy and/or distribute it,
1063
# with or without modifications, as long as this notice is preserved.
1065
# AM_RUN_LOG(COMMAND)
1066
# -------------------
1067
# Run COMMAND, save the exit status in ac_status, and log it.
1068
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1069
AC_DEFUN([AM_RUN_LOG],
1070
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1071
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1073
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1074
(exit $ac_status); }])
948
1076
# Check to make sure that the build environment is sane. -*- Autoconf -*-
950
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
1078
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
952
1080
# This file is free software; the Free Software Foundation
953
1081
# gives unlimited permission to copy and/or distribute it,
954
1082
# with or without modifications, as long as this notice is preserved.
958
1084
# AM_SANITY_CHECK
959
1085
# ---------------
960
1086
AC_DEFUN([AM_SANITY_CHECK],
1164
1282
# Substitute a variable $(am__untar) that extract such
1165
1283
# a tarball read from stdin.
1166
1284
# $(am__untar) < result.tar
1167
1286
AC_DEFUN([_AM_PROG_TAR],
1168
1287
[# Always define AMTAR for backward compatibility. Yes, it's still used
1169
1288
# in the wild :-( We should find a proper way to deprecate it ...
1170
1289
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1291
# We'll loop over all known methods to create a tar archive until one works.
1292
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1171
1294
m4_if([$1], [v7],
1172
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1173
[m4_case([$1], [ustar],, [pax],,
1174
[m4_fatal([Unknown tar format])])
1175
AC_MSG_CHECKING([how to create a $1 tar archive])
1176
# Loop over all known methods to create a tar archive until one works.
1177
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1178
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1179
# Do not fold the above two line into one, because Tru64 sh and
1180
# Solaris sh will not grok spaces in the rhs of '-'.
1181
for _am_tool in $_am_tools
1185
for _am_tar in tar gnutar gtar;
1187
AM_RUN_LOG([$_am_tar --version]) && break
1189
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1190
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1191
am__untar="$_am_tar -xf -"
1194
# Must skip GNU tar: if it does not support --format= it doesn't create
1195
# ustar tarball either.
1196
(tar --version) >/dev/null 2>&1 && continue
1197
am__tar='tar chf - "$$tardir"'
1198
am__tar_='tar chf - "$tardir"'
1199
am__untar='tar xf -'
1202
am__tar='pax -L -x $1 -w "$$tardir"'
1203
am__tar_='pax -L -x $1 -w "$tardir"'
1207
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1208
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1209
am__untar='cpio -i -H $1 -d'
1218
# If the value was cached, stop now. We just wanted to have am__tar
1219
# and am__untar set.
1220
test -n "${am_cv_prog_tar_$1}" && break
1222
# tar/untar a dummy directory, and stop if the command works
1225
echo GrepMe > conftest.dir/file
1226
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1228
if test -s conftest.tar; then
1229
AM_RUN_LOG([$am__untar <conftest.tar])
1230
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1235
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1236
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1295
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1299
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1300
# There is notably a 21 bits limit for the UID and the GID. In fact,
1301
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1303
am_max_uid=2097151 # 2^21 - 1
1304
am_max_gid=$am_max_uid
1305
# The $UID and $GID variables are not portable, so we need to resort
1306
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1307
# below are definitely unexpected, so allow the users to see them
1308
# (that is, avoid stderr redirection).
1309
am_uid=`id -u || echo unknown`
1310
am_gid=`id -g || echo unknown`
1311
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1312
if test $am_uid -le $am_max_uid; then
1313
AC_MSG_RESULT([yes])
1318
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1319
if test $am_gid -le $am_max_gid; then
1320
AC_MSG_RESULT([yes])
1329
[m4_fatal([Unknown tar format])])
1331
AC_MSG_CHECKING([how to create a $1 tar archive])
1333
# Go ahead even if we have the value already cached. We do so because we
1334
# need to set the values for the 'am__tar' and 'am__untar' variables.
1335
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1337
for _am_tool in $_am_tools; do
1340
for _am_tar in tar gnutar gtar; do
1341
AM_RUN_LOG([$_am_tar --version]) && break
1343
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1344
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1345
am__untar="$_am_tar -xf -"
1348
# Must skip GNU tar: if it does not support --format= it doesn't create
1349
# ustar tarball either.
1350
(tar --version) >/dev/null 2>&1 && continue
1351
am__tar='tar chf - "$$tardir"'
1352
am__tar_='tar chf - "$tardir"'
1353
am__untar='tar xf -'
1356
am__tar='pax -L -x $1 -w "$$tardir"'
1357
am__tar_='pax -L -x $1 -w "$tardir"'
1361
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1362
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1363
am__untar='cpio -i -H $1 -d'
1372
# If the value was cached, stop now. We just wanted to have am__tar
1373
# and am__untar set.
1374
test -n "${am_cv_prog_tar_$1}" && break
1376
# tar/untar a dummy directory, and stop if the command works.
1379
echo GrepMe > conftest.dir/file
1380
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1382
if test -s conftest.tar; then
1383
AM_RUN_LOG([$am__untar <conftest.tar])
1384
AM_RUN_LOG([cat conftest.dir/file])
1385
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1390
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1391
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1237
1393
AC_SUBST([am__tar])
1238
1394
AC_SUBST([am__untar])
1239
1395
]) # _AM_PROG_TAR
1241
1397
m4_include([m4/00gnulib.m4])
1398
m4_include([m4/absolute-header.m4])
1242
1399
m4_include([m4/alloca.m4])
1243
1400
m4_include([m4/assert.m4])
1244
1401
m4_include([m4/btowc.m4])