cannam@154
|
1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
|
cannam@154
|
2
|
cannam@154
|
3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
cannam@154
|
4
|
cannam@154
|
5 # This file is free software; the Free Software Foundation
|
cannam@154
|
6 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
7 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
8
|
cannam@154
|
9 # This program is distributed in the hope that it will be useful,
|
cannam@154
|
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
cannam@154
|
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
cannam@154
|
12 # PARTICULAR PURPOSE.
|
cannam@154
|
13
|
cannam@154
|
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
cannam@154
|
15 m4_ifndef([AC_AUTOCONF_VERSION],
|
cannam@154
|
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
cannam@154
|
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
cannam@154
|
18 [m4_warning([this file was generated for autoconf 2.69.
|
cannam@154
|
19 You have another version of autoconf. It may work, but is not guaranteed to.
|
cannam@154
|
20 If you have problems, you may need to regenerate the build system entirely.
|
cannam@154
|
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
cannam@154
|
22
|
cannam@154
|
23 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
cannam@154
|
24 # serial 11 (pkg-config-0.29.1)
|
cannam@154
|
25
|
cannam@154
|
26 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
cannam@154
|
27 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
cannam@154
|
28 dnl
|
cannam@154
|
29 dnl This program is free software; you can redistribute it and/or modify
|
cannam@154
|
30 dnl it under the terms of the GNU General Public License as published by
|
cannam@154
|
31 dnl the Free Software Foundation; either version 2 of the License, or
|
cannam@154
|
32 dnl (at your option) any later version.
|
cannam@154
|
33 dnl
|
cannam@154
|
34 dnl This program is distributed in the hope that it will be useful, but
|
cannam@154
|
35 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
cannam@154
|
36 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
cannam@154
|
37 dnl General Public License for more details.
|
cannam@154
|
38 dnl
|
cannam@154
|
39 dnl You should have received a copy of the GNU General Public License
|
cannam@154
|
40 dnl along with this program; if not, write to the Free Software
|
cannam@154
|
41 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
cannam@154
|
42 dnl 02111-1307, USA.
|
cannam@154
|
43 dnl
|
cannam@154
|
44 dnl As a special exception to the GNU General Public License, if you
|
cannam@154
|
45 dnl distribute this file as part of a program that contains a
|
cannam@154
|
46 dnl configuration script generated by Autoconf, you may include it under
|
cannam@154
|
47 dnl the same distribution terms that you use for the rest of that
|
cannam@154
|
48 dnl program.
|
cannam@154
|
49
|
cannam@154
|
50 dnl PKG_PREREQ(MIN-VERSION)
|
cannam@154
|
51 dnl -----------------------
|
cannam@154
|
52 dnl Since: 0.29
|
cannam@154
|
53 dnl
|
cannam@154
|
54 dnl Verify that the version of the pkg-config macros are at least
|
cannam@154
|
55 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
cannam@154
|
56 dnl installed version of pkg-config, this checks the developer's version
|
cannam@154
|
57 dnl of pkg.m4 when generating configure.
|
cannam@154
|
58 dnl
|
cannam@154
|
59 dnl To ensure that this macro is defined, also add:
|
cannam@154
|
60 dnl m4_ifndef([PKG_PREREQ],
|
cannam@154
|
61 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
cannam@154
|
62 dnl
|
cannam@154
|
63 dnl See the "Since" comment for each macro you use to see what version
|
cannam@154
|
64 dnl of the macros you require.
|
cannam@154
|
65 m4_defun([PKG_PREREQ],
|
cannam@154
|
66 [m4_define([PKG_MACROS_VERSION], [0.29.1])
|
cannam@154
|
67 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
cannam@154
|
68 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
cannam@154
|
69 ])dnl PKG_PREREQ
|
cannam@154
|
70
|
cannam@154
|
71 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
cannam@154
|
72 dnl ----------------------------------
|
cannam@154
|
73 dnl Since: 0.16
|
cannam@154
|
74 dnl
|
cannam@154
|
75 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
cannam@154
|
76 dnl first found in the path. Checks that the version of pkg-config found
|
cannam@154
|
77 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
cannam@154
|
78 dnl used since that's the first version where most current features of
|
cannam@154
|
79 dnl pkg-config existed.
|
cannam@154
|
80 AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
cannam@154
|
81 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
cannam@154
|
82 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
cannam@154
|
83 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
cannam@154
|
84 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
cannam@154
|
85 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
cannam@154
|
86 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
cannam@154
|
87
|
cannam@154
|
88 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
cannam@154
|
89 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
cannam@154
|
90 fi
|
cannam@154
|
91 if test -n "$PKG_CONFIG"; then
|
cannam@154
|
92 _pkg_min_version=m4_default([$1], [0.9.0])
|
cannam@154
|
93 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
cannam@154
|
94 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
cannam@154
|
95 AC_MSG_RESULT([yes])
|
cannam@154
|
96 else
|
cannam@154
|
97 AC_MSG_RESULT([no])
|
cannam@154
|
98 PKG_CONFIG=""
|
cannam@154
|
99 fi
|
cannam@154
|
100 fi[]dnl
|
cannam@154
|
101 ])dnl PKG_PROG_PKG_CONFIG
|
cannam@154
|
102
|
cannam@154
|
103 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
cannam@154
|
104 dnl -------------------------------------------------------------------
|
cannam@154
|
105 dnl Since: 0.18
|
cannam@154
|
106 dnl
|
cannam@154
|
107 dnl Check to see whether a particular set of modules exists. Similar to
|
cannam@154
|
108 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
cannam@154
|
109 dnl
|
cannam@154
|
110 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
cannam@154
|
111 dnl only at the first occurence in configure.ac, so if the first place
|
cannam@154
|
112 dnl it's called might be skipped (such as if it is within an "if", you
|
cannam@154
|
113 dnl have to call PKG_CHECK_EXISTS manually
|
cannam@154
|
114 AC_DEFUN([PKG_CHECK_EXISTS],
|
cannam@154
|
115 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
cannam@154
|
116 if test -n "$PKG_CONFIG" && \
|
cannam@154
|
117 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
cannam@154
|
118 m4_default([$2], [:])
|
cannam@154
|
119 m4_ifvaln([$3], [else
|
cannam@154
|
120 $3])dnl
|
cannam@154
|
121 fi])
|
cannam@154
|
122
|
cannam@154
|
123 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
cannam@154
|
124 dnl ---------------------------------------------
|
cannam@154
|
125 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
cannam@154
|
126 dnl pkg_failed based on the result.
|
cannam@154
|
127 m4_define([_PKG_CONFIG],
|
cannam@154
|
128 [if test -n "$$1"; then
|
cannam@154
|
129 pkg_cv_[]$1="$$1"
|
cannam@154
|
130 elif test -n "$PKG_CONFIG"; then
|
cannam@154
|
131 PKG_CHECK_EXISTS([$3],
|
cannam@154
|
132 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
cannam@154
|
133 test "x$?" != "x0" && pkg_failed=yes ],
|
cannam@154
|
134 [pkg_failed=yes])
|
cannam@154
|
135 else
|
cannam@154
|
136 pkg_failed=untried
|
cannam@154
|
137 fi[]dnl
|
cannam@154
|
138 ])dnl _PKG_CONFIG
|
cannam@154
|
139
|
cannam@154
|
140 dnl _PKG_SHORT_ERRORS_SUPPORTED
|
cannam@154
|
141 dnl ---------------------------
|
cannam@154
|
142 dnl Internal check to see if pkg-config supports short errors.
|
cannam@154
|
143 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
cannam@154
|
144 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
cannam@154
|
145 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
cannam@154
|
146 _pkg_short_errors_supported=yes
|
cannam@154
|
147 else
|
cannam@154
|
148 _pkg_short_errors_supported=no
|
cannam@154
|
149 fi[]dnl
|
cannam@154
|
150 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
cannam@154
|
151
|
cannam@154
|
152
|
cannam@154
|
153 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
cannam@154
|
154 dnl [ACTION-IF-NOT-FOUND])
|
cannam@154
|
155 dnl --------------------------------------------------------------
|
cannam@154
|
156 dnl Since: 0.4.0
|
cannam@154
|
157 dnl
|
cannam@154
|
158 dnl Note that if there is a possibility the first call to
|
cannam@154
|
159 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
cannam@154
|
160 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
cannam@154
|
161 AC_DEFUN([PKG_CHECK_MODULES],
|
cannam@154
|
162 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
cannam@154
|
163 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
cannam@154
|
164 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
cannam@154
|
165
|
cannam@154
|
166 pkg_failed=no
|
cannam@154
|
167 AC_MSG_CHECKING([for $1])
|
cannam@154
|
168
|
cannam@154
|
169 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
cannam@154
|
170 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
cannam@154
|
171
|
cannam@154
|
172 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
cannam@154
|
173 and $1[]_LIBS to avoid the need to call pkg-config.
|
cannam@154
|
174 See the pkg-config man page for more details.])
|
cannam@154
|
175
|
cannam@154
|
176 if test $pkg_failed = yes; then
|
cannam@154
|
177 AC_MSG_RESULT([no])
|
cannam@154
|
178 _PKG_SHORT_ERRORS_SUPPORTED
|
cannam@154
|
179 if test $_pkg_short_errors_supported = yes; then
|
cannam@154
|
180 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
cannam@154
|
181 else
|
cannam@154
|
182 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
cannam@154
|
183 fi
|
cannam@154
|
184 # Put the nasty error message in config.log where it belongs
|
cannam@154
|
185 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
cannam@154
|
186
|
cannam@154
|
187 m4_default([$4], [AC_MSG_ERROR(
|
cannam@154
|
188 [Package requirements ($2) were not met:
|
cannam@154
|
189
|
cannam@154
|
190 $$1_PKG_ERRORS
|
cannam@154
|
191
|
cannam@154
|
192 Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
cannam@154
|
193 installed software in a non-standard prefix.
|
cannam@154
|
194
|
cannam@154
|
195 _PKG_TEXT])[]dnl
|
cannam@154
|
196 ])
|
cannam@154
|
197 elif test $pkg_failed = untried; then
|
cannam@154
|
198 AC_MSG_RESULT([no])
|
cannam@154
|
199 m4_default([$4], [AC_MSG_FAILURE(
|
cannam@154
|
200 [The pkg-config script could not be found or is too old. Make sure it
|
cannam@154
|
201 is in your PATH or set the PKG_CONFIG environment variable to the full
|
cannam@154
|
202 path to pkg-config.
|
cannam@154
|
203
|
cannam@154
|
204 _PKG_TEXT
|
cannam@154
|
205
|
cannam@154
|
206 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
cannam@154
|
207 ])
|
cannam@154
|
208 else
|
cannam@154
|
209 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
cannam@154
|
210 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
cannam@154
|
211 AC_MSG_RESULT([yes])
|
cannam@154
|
212 $3
|
cannam@154
|
213 fi[]dnl
|
cannam@154
|
214 ])dnl PKG_CHECK_MODULES
|
cannam@154
|
215
|
cannam@154
|
216
|
cannam@154
|
217 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
cannam@154
|
218 dnl [ACTION-IF-NOT-FOUND])
|
cannam@154
|
219 dnl ---------------------------------------------------------------------
|
cannam@154
|
220 dnl Since: 0.29
|
cannam@154
|
221 dnl
|
cannam@154
|
222 dnl Checks for existence of MODULES and gathers its build flags with
|
cannam@154
|
223 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
cannam@154
|
224 dnl and VARIABLE-PREFIX_LIBS from --libs.
|
cannam@154
|
225 dnl
|
cannam@154
|
226 dnl Note that if there is a possibility the first call to
|
cannam@154
|
227 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
cannam@154
|
228 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
cannam@154
|
229 dnl configure.ac.
|
cannam@154
|
230 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
cannam@154
|
231 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
cannam@154
|
232 _save_PKG_CONFIG=$PKG_CONFIG
|
cannam@154
|
233 PKG_CONFIG="$PKG_CONFIG --static"
|
cannam@154
|
234 PKG_CHECK_MODULES($@)
|
cannam@154
|
235 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
cannam@154
|
236 ])dnl PKG_CHECK_MODULES_STATIC
|
cannam@154
|
237
|
cannam@154
|
238
|
cannam@154
|
239 dnl PKG_INSTALLDIR([DIRECTORY])
|
cannam@154
|
240 dnl -------------------------
|
cannam@154
|
241 dnl Since: 0.27
|
cannam@154
|
242 dnl
|
cannam@154
|
243 dnl Substitutes the variable pkgconfigdir as the location where a module
|
cannam@154
|
244 dnl should install pkg-config .pc files. By default the directory is
|
cannam@154
|
245 dnl $libdir/pkgconfig, but the default can be changed by passing
|
cannam@154
|
246 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
cannam@154
|
247 dnl parameter.
|
cannam@154
|
248 AC_DEFUN([PKG_INSTALLDIR],
|
cannam@154
|
249 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
cannam@154
|
250 m4_pushdef([pkg_description],
|
cannam@154
|
251 [pkg-config installation directory @<:@]pkg_default[@:>@])
|
cannam@154
|
252 AC_ARG_WITH([pkgconfigdir],
|
cannam@154
|
253 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
cannam@154
|
254 [with_pkgconfigdir=]pkg_default)
|
cannam@154
|
255 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
cannam@154
|
256 m4_popdef([pkg_default])
|
cannam@154
|
257 m4_popdef([pkg_description])
|
cannam@154
|
258 ])dnl PKG_INSTALLDIR
|
cannam@154
|
259
|
cannam@154
|
260
|
cannam@154
|
261 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
cannam@154
|
262 dnl --------------------------------
|
cannam@154
|
263 dnl Since: 0.27
|
cannam@154
|
264 dnl
|
cannam@154
|
265 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
cannam@154
|
266 dnl module should install arch-independent pkg-config .pc files. By
|
cannam@154
|
267 dnl default the directory is $datadir/pkgconfig, but the default can be
|
cannam@154
|
268 dnl changed by passing DIRECTORY. The user can override through the
|
cannam@154
|
269 dnl --with-noarch-pkgconfigdir parameter.
|
cannam@154
|
270 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
cannam@154
|
271 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
cannam@154
|
272 m4_pushdef([pkg_description],
|
cannam@154
|
273 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
cannam@154
|
274 AC_ARG_WITH([noarch-pkgconfigdir],
|
cannam@154
|
275 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
cannam@154
|
276 [with_noarch_pkgconfigdir=]pkg_default)
|
cannam@154
|
277 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
cannam@154
|
278 m4_popdef([pkg_default])
|
cannam@154
|
279 m4_popdef([pkg_description])
|
cannam@154
|
280 ])dnl PKG_NOARCH_INSTALLDIR
|
cannam@154
|
281
|
cannam@154
|
282
|
cannam@154
|
283 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
cannam@154
|
284 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
cannam@154
|
285 dnl -------------------------------------------
|
cannam@154
|
286 dnl Since: 0.28
|
cannam@154
|
287 dnl
|
cannam@154
|
288 dnl Retrieves the value of the pkg-config variable for the given module.
|
cannam@154
|
289 AC_DEFUN([PKG_CHECK_VAR],
|
cannam@154
|
290 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
cannam@154
|
291 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
cannam@154
|
292
|
cannam@154
|
293 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
cannam@154
|
294 AS_VAR_COPY([$1], [pkg_cv_][$1])
|
cannam@154
|
295
|
cannam@154
|
296 AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
cannam@154
|
297 ])dnl PKG_CHECK_VAR
|
cannam@154
|
298
|
cannam@154
|
299 dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
cannam@154
|
300 dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
|
cannam@154
|
301 dnl [DESCRIPTION], [DEFAULT])
|
cannam@154
|
302 dnl ------------------------------------------
|
cannam@154
|
303 dnl
|
cannam@154
|
304 dnl Prepare a "--with-" configure option using the lowercase
|
cannam@154
|
305 dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
|
cannam@154
|
306 dnl PKG_CHECK_MODULES in a single macro.
|
cannam@154
|
307 AC_DEFUN([PKG_WITH_MODULES],
|
cannam@154
|
308 [
|
cannam@154
|
309 m4_pushdef([with_arg], m4_tolower([$1]))
|
cannam@154
|
310
|
cannam@154
|
311 m4_pushdef([description],
|
cannam@154
|
312 [m4_default([$5], [build with ]with_arg[ support])])
|
cannam@154
|
313
|
cannam@154
|
314 m4_pushdef([def_arg], [m4_default([$6], [auto])])
|
cannam@154
|
315 m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
|
cannam@154
|
316 m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
|
cannam@154
|
317
|
cannam@154
|
318 m4_case(def_arg,
|
cannam@154
|
319 [yes],[m4_pushdef([with_without], [--without-]with_arg)],
|
cannam@154
|
320 [m4_pushdef([with_without],[--with-]with_arg)])
|
cannam@154
|
321
|
cannam@154
|
322 AC_ARG_WITH(with_arg,
|
cannam@154
|
323 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
|
cannam@154
|
324 [AS_TR_SH([with_]with_arg)=def_arg])
|
cannam@154
|
325
|
cannam@154
|
326 AS_CASE([$AS_TR_SH([with_]with_arg)],
|
cannam@154
|
327 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
|
cannam@154
|
328 [auto],[PKG_CHECK_MODULES([$1],[$2],
|
cannam@154
|
329 [m4_n([def_action_if_found]) $3],
|
cannam@154
|
330 [m4_n([def_action_if_not_found]) $4])])
|
cannam@154
|
331
|
cannam@154
|
332 m4_popdef([with_arg])
|
cannam@154
|
333 m4_popdef([description])
|
cannam@154
|
334 m4_popdef([def_arg])
|
cannam@154
|
335
|
cannam@154
|
336 ])dnl PKG_WITH_MODULES
|
cannam@154
|
337
|
cannam@154
|
338 dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
cannam@154
|
339 dnl [DESCRIPTION], [DEFAULT])
|
cannam@154
|
340 dnl -----------------------------------------------
|
cannam@154
|
341 dnl
|
cannam@154
|
342 dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
|
cannam@154
|
343 dnl check._[VARIABLE-PREFIX] is exported as make variable.
|
cannam@154
|
344 AC_DEFUN([PKG_HAVE_WITH_MODULES],
|
cannam@154
|
345 [
|
cannam@154
|
346 PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
|
cannam@154
|
347
|
cannam@154
|
348 AM_CONDITIONAL([HAVE_][$1],
|
cannam@154
|
349 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
|
cannam@154
|
350 ])dnl PKG_HAVE_WITH_MODULES
|
cannam@154
|
351
|
cannam@154
|
352 dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
cannam@154
|
353 dnl [DESCRIPTION], [DEFAULT])
|
cannam@154
|
354 dnl ------------------------------------------------------
|
cannam@154
|
355 dnl
|
cannam@154
|
356 dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
|
cannam@154
|
357 dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
|
cannam@154
|
358 dnl and preprocessor variable.
|
cannam@154
|
359 AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
|
cannam@154
|
360 [
|
cannam@154
|
361 PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
|
cannam@154
|
362
|
cannam@154
|
363 AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
|
cannam@154
|
364 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
|
cannam@154
|
365 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
|
cannam@154
|
366
|
cannam@154
|
367 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
|
cannam@154
|
368 #
|
cannam@154
|
369 # This file is free software; the Free Software Foundation
|
cannam@154
|
370 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
371 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
372
|
cannam@154
|
373 # AM_AUTOMAKE_VERSION(VERSION)
|
cannam@154
|
374 # ----------------------------
|
cannam@154
|
375 # Automake X.Y traces this macro to ensure aclocal.m4 has been
|
cannam@154
|
376 # generated from the m4 files accompanying Automake X.Y.
|
cannam@154
|
377 # (This private macro should not be called outside this file.)
|
cannam@154
|
378 AC_DEFUN([AM_AUTOMAKE_VERSION],
|
cannam@154
|
379 [am__api_version='1.15'
|
cannam@154
|
380 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
cannam@154
|
381 dnl require some minimum version. Point them to the right macro.
|
cannam@154
|
382 m4_if([$1], [1.15], [],
|
cannam@154
|
383 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
cannam@154
|
384 ])
|
cannam@154
|
385
|
cannam@154
|
386 # _AM_AUTOCONF_VERSION(VERSION)
|
cannam@154
|
387 # -----------------------------
|
cannam@154
|
388 # aclocal traces this macro to find the Autoconf version.
|
cannam@154
|
389 # This is a private macro too. Using m4_define simplifies
|
cannam@154
|
390 # the logic in aclocal, which can simply ignore this definition.
|
cannam@154
|
391 m4_define([_AM_AUTOCONF_VERSION], [])
|
cannam@154
|
392
|
cannam@154
|
393 # AM_SET_CURRENT_AUTOMAKE_VERSION
|
cannam@154
|
394 # -------------------------------
|
cannam@154
|
395 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
cannam@154
|
396 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
cannam@154
|
397 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
cannam@154
|
398 [AM_AUTOMAKE_VERSION([1.15])dnl
|
cannam@154
|
399 m4_ifndef([AC_AUTOCONF_VERSION],
|
cannam@154
|
400 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
cannam@154
|
401 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
cannam@154
|
402
|
cannam@154
|
403 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
cannam@154
|
404
|
cannam@154
|
405 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
406 #
|
cannam@154
|
407 # This file is free software; the Free Software Foundation
|
cannam@154
|
408 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
409 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
410
|
cannam@154
|
411 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
cannam@154
|
412 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
|
cannam@154
|
413 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
|
cannam@154
|
414 #
|
cannam@154
|
415 # Of course, Automake must honor this variable whenever it calls a
|
cannam@154
|
416 # tool from the auxiliary directory. The problem is that $srcdir (and
|
cannam@154
|
417 # therefore $ac_aux_dir as well) can be either absolute or relative,
|
cannam@154
|
418 # depending on how configure is run. This is pretty annoying, since
|
cannam@154
|
419 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
cannam@154
|
420 # source directory, any form will work fine, but in subdirectories a
|
cannam@154
|
421 # relative path needs to be adjusted first.
|
cannam@154
|
422 #
|
cannam@154
|
423 # $ac_aux_dir/missing
|
cannam@154
|
424 # fails when called from a subdirectory if $ac_aux_dir is relative
|
cannam@154
|
425 # $top_srcdir/$ac_aux_dir/missing
|
cannam@154
|
426 # fails if $ac_aux_dir is absolute,
|
cannam@154
|
427 # fails when called from a subdirectory in a VPATH build with
|
cannam@154
|
428 # a relative $ac_aux_dir
|
cannam@154
|
429 #
|
cannam@154
|
430 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
cannam@154
|
431 # are both prefixed by $srcdir. In an in-source build this is usually
|
cannam@154
|
432 # harmless because $srcdir is '.', but things will broke when you
|
cannam@154
|
433 # start a VPATH build or use an absolute $srcdir.
|
cannam@154
|
434 #
|
cannam@154
|
435 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
cannam@154
|
436 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
cannam@154
|
437 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
cannam@154
|
438 # and then we would define $MISSING as
|
cannam@154
|
439 # MISSING="\${SHELL} $am_aux_dir/missing"
|
cannam@154
|
440 # This will work as long as MISSING is not called from configure, because
|
cannam@154
|
441 # unfortunately $(top_srcdir) has no meaning in configure.
|
cannam@154
|
442 # However there are other variables, like CC, which are often used in
|
cannam@154
|
443 # configure, and could therefore not use this "fixed" $ac_aux_dir.
|
cannam@154
|
444 #
|
cannam@154
|
445 # Another solution, used here, is to always expand $ac_aux_dir to an
|
cannam@154
|
446 # absolute PATH. The drawback is that using absolute paths prevent a
|
cannam@154
|
447 # configured tree to be moved without reconfiguration.
|
cannam@154
|
448
|
cannam@154
|
449 AC_DEFUN([AM_AUX_DIR_EXPAND],
|
cannam@154
|
450 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
cannam@154
|
451 # Expand $ac_aux_dir to an absolute path.
|
cannam@154
|
452 am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
cannam@154
|
453 ])
|
cannam@154
|
454
|
cannam@154
|
455 # AM_COND_IF -*- Autoconf -*-
|
cannam@154
|
456
|
cannam@154
|
457 # Copyright (C) 2008-2014 Free Software Foundation, Inc.
|
cannam@154
|
458 #
|
cannam@154
|
459 # This file is free software; the Free Software Foundation
|
cannam@154
|
460 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
461 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
462
|
cannam@154
|
463 # _AM_COND_IF
|
cannam@154
|
464 # _AM_COND_ELSE
|
cannam@154
|
465 # _AM_COND_ENDIF
|
cannam@154
|
466 # --------------
|
cannam@154
|
467 # These macros are only used for tracing.
|
cannam@154
|
468 m4_define([_AM_COND_IF])
|
cannam@154
|
469 m4_define([_AM_COND_ELSE])
|
cannam@154
|
470 m4_define([_AM_COND_ENDIF])
|
cannam@154
|
471
|
cannam@154
|
472 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
|
cannam@154
|
473 # ---------------------------------------
|
cannam@154
|
474 # If the shell condition COND is true, execute IF-TRUE, otherwise execute
|
cannam@154
|
475 # IF-FALSE. Allow automake to learn about conditional instantiating macros
|
cannam@154
|
476 # (the AC_CONFIG_FOOS).
|
cannam@154
|
477 AC_DEFUN([AM_COND_IF],
|
cannam@154
|
478 [m4_ifndef([_AM_COND_VALUE_$1],
|
cannam@154
|
479 [m4_fatal([$0: no such condition "$1"])])dnl
|
cannam@154
|
480 _AM_COND_IF([$1])dnl
|
cannam@154
|
481 if test -z "$$1_TRUE"; then :
|
cannam@154
|
482 m4_n([$2])[]dnl
|
cannam@154
|
483 m4_ifval([$3],
|
cannam@154
|
484 [_AM_COND_ELSE([$1])dnl
|
cannam@154
|
485 else
|
cannam@154
|
486 $3
|
cannam@154
|
487 ])dnl
|
cannam@154
|
488 _AM_COND_ENDIF([$1])dnl
|
cannam@154
|
489 fi[]dnl
|
cannam@154
|
490 ])
|
cannam@154
|
491
|
cannam@154
|
492 # AM_CONDITIONAL -*- Autoconf -*-
|
cannam@154
|
493
|
cannam@154
|
494 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
cannam@154
|
495 #
|
cannam@154
|
496 # This file is free software; the Free Software Foundation
|
cannam@154
|
497 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
498 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
499
|
cannam@154
|
500 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
cannam@154
|
501 # -------------------------------------
|
cannam@154
|
502 # Define a conditional.
|
cannam@154
|
503 AC_DEFUN([AM_CONDITIONAL],
|
cannam@154
|
504 [AC_PREREQ([2.52])dnl
|
cannam@154
|
505 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
cannam@154
|
506 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
cannam@154
|
507 AC_SUBST([$1_TRUE])dnl
|
cannam@154
|
508 AC_SUBST([$1_FALSE])dnl
|
cannam@154
|
509 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
cannam@154
|
510 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
cannam@154
|
511 m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
cannam@154
|
512 if $2; then
|
cannam@154
|
513 $1_TRUE=
|
cannam@154
|
514 $1_FALSE='#'
|
cannam@154
|
515 else
|
cannam@154
|
516 $1_TRUE='#'
|
cannam@154
|
517 $1_FALSE=
|
cannam@154
|
518 fi
|
cannam@154
|
519 AC_CONFIG_COMMANDS_PRE(
|
cannam@154
|
520 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
cannam@154
|
521 AC_MSG_ERROR([[conditional "$1" was never defined.
|
cannam@154
|
522 Usually this means the macro was only invoked conditionally.]])
|
cannam@154
|
523 fi])])
|
cannam@154
|
524
|
cannam@154
|
525 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
cannam@154
|
526 #
|
cannam@154
|
527 # This file is free software; the Free Software Foundation
|
cannam@154
|
528 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
529 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
530
|
cannam@154
|
531
|
cannam@154
|
532 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
|
cannam@154
|
533 # written in clear, in which case automake, when reading aclocal.m4,
|
cannam@154
|
534 # will think it sees a *use*, and therefore will trigger all it's
|
cannam@154
|
535 # C support machinery. Also note that it means that autoscan, seeing
|
cannam@154
|
536 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
cannam@154
|
537
|
cannam@154
|
538
|
cannam@154
|
539 # _AM_DEPENDENCIES(NAME)
|
cannam@154
|
540 # ----------------------
|
cannam@154
|
541 # See how the compiler implements dependency checking.
|
cannam@154
|
542 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
|
cannam@154
|
543 # We try a few techniques and use that to set a single cache variable.
|
cannam@154
|
544 #
|
cannam@154
|
545 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
cannam@154
|
546 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
cannam@154
|
547 # dependency, and given that the user is not expected to run this macro,
|
cannam@154
|
548 # just rely on AC_PROG_CC.
|
cannam@154
|
549 AC_DEFUN([_AM_DEPENDENCIES],
|
cannam@154
|
550 [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
cannam@154
|
551 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
cannam@154
|
552 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
cannam@154
|
553 AC_REQUIRE([AM_DEP_TRACK])dnl
|
cannam@154
|
554
|
cannam@154
|
555 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
|
cannam@154
|
556 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
|
cannam@154
|
557 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
cannam@154
|
558 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
|
cannam@154
|
559 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
|
cannam@154
|
560 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
cannam@154
|
561 [depcc="$$1" am_compiler_list=])
|
cannam@154
|
562
|
cannam@154
|
563 AC_CACHE_CHECK([dependency style of $depcc],
|
cannam@154
|
564 [am_cv_$1_dependencies_compiler_type],
|
cannam@154
|
565 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
cannam@154
|
566 # We make a subdir and do the tests there. Otherwise we can end up
|
cannam@154
|
567 # making bogus files that we don't know about and never remove. For
|
cannam@154
|
568 # instance it was reported that on HP-UX the gcc test will end up
|
cannam@154
|
569 # making a dummy file named 'D' -- because '-MD' means "put the output
|
cannam@154
|
570 # in D".
|
cannam@154
|
571 rm -rf conftest.dir
|
cannam@154
|
572 mkdir conftest.dir
|
cannam@154
|
573 # Copy depcomp to subdir because otherwise we won't find it if we're
|
cannam@154
|
574 # using a relative directory.
|
cannam@154
|
575 cp "$am_depcomp" conftest.dir
|
cannam@154
|
576 cd conftest.dir
|
cannam@154
|
577 # We will build objects and dependencies in a subdirectory because
|
cannam@154
|
578 # it helps to detect inapplicable dependency modes. For instance
|
cannam@154
|
579 # both Tru64's cc and ICC support -MD to output dependencies as a
|
cannam@154
|
580 # side effect of compilation, but ICC will put the dependencies in
|
cannam@154
|
581 # the current directory while Tru64 will put them in the object
|
cannam@154
|
582 # directory.
|
cannam@154
|
583 mkdir sub
|
cannam@154
|
584
|
cannam@154
|
585 am_cv_$1_dependencies_compiler_type=none
|
cannam@154
|
586 if test "$am_compiler_list" = ""; then
|
cannam@154
|
587 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
cannam@154
|
588 fi
|
cannam@154
|
589 am__universal=false
|
cannam@154
|
590 m4_case([$1], [CC],
|
cannam@154
|
591 [case " $depcc " in #(
|
cannam@154
|
592 *\ -arch\ *\ -arch\ *) am__universal=true ;;
|
cannam@154
|
593 esac],
|
cannam@154
|
594 [CXX],
|
cannam@154
|
595 [case " $depcc " in #(
|
cannam@154
|
596 *\ -arch\ *\ -arch\ *) am__universal=true ;;
|
cannam@154
|
597 esac])
|
cannam@154
|
598
|
cannam@154
|
599 for depmode in $am_compiler_list; do
|
cannam@154
|
600 # Setup a source with many dependencies, because some compilers
|
cannam@154
|
601 # like to wrap large dependency lists on column 80 (with \), and
|
cannam@154
|
602 # we should not choose a depcomp mode which is confused by this.
|
cannam@154
|
603 #
|
cannam@154
|
604 # We need to recreate these files for each test, as the compiler may
|
cannam@154
|
605 # overwrite some of them when testing with obscure command lines.
|
cannam@154
|
606 # This happens at least with the AIX C compiler.
|
cannam@154
|
607 : > sub/conftest.c
|
cannam@154
|
608 for i in 1 2 3 4 5 6; do
|
cannam@154
|
609 echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
cannam@154
|
610 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
|
cannam@154
|
611 # Solaris 10 /bin/sh.
|
cannam@154
|
612 echo '/* dummy */' > sub/conftst$i.h
|
cannam@154
|
613 done
|
cannam@154
|
614 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
cannam@154
|
615
|
cannam@154
|
616 # We check with '-c' and '-o' for the sake of the "dashmstdout"
|
cannam@154
|
617 # mode. It turns out that the SunPro C++ compiler does not properly
|
cannam@154
|
618 # handle '-M -o', and we need to detect this. Also, some Intel
|
cannam@154
|
619 # versions had trouble with output in subdirs.
|
cannam@154
|
620 am__obj=sub/conftest.${OBJEXT-o}
|
cannam@154
|
621 am__minus_obj="-o $am__obj"
|
cannam@154
|
622 case $depmode in
|
cannam@154
|
623 gcc)
|
cannam@154
|
624 # This depmode causes a compiler race in universal mode.
|
cannam@154
|
625 test "$am__universal" = false || continue
|
cannam@154
|
626 ;;
|
cannam@154
|
627 nosideeffect)
|
cannam@154
|
628 # After this tag, mechanisms are not by side-effect, so they'll
|
cannam@154
|
629 # only be used when explicitly requested.
|
cannam@154
|
630 if test "x$enable_dependency_tracking" = xyes; then
|
cannam@154
|
631 continue
|
cannam@154
|
632 else
|
cannam@154
|
633 break
|
cannam@154
|
634 fi
|
cannam@154
|
635 ;;
|
cannam@154
|
636 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
cannam@154
|
637 # This compiler won't grok '-c -o', but also, the minuso test has
|
cannam@154
|
638 # not run yet. These depmodes are late enough in the game, and
|
cannam@154
|
639 # so weak that their functioning should not be impacted.
|
cannam@154
|
640 am__obj=conftest.${OBJEXT-o}
|
cannam@154
|
641 am__minus_obj=
|
cannam@154
|
642 ;;
|
cannam@154
|
643 none) break ;;
|
cannam@154
|
644 esac
|
cannam@154
|
645 if depmode=$depmode \
|
cannam@154
|
646 source=sub/conftest.c object=$am__obj \
|
cannam@154
|
647 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
cannam@154
|
648 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
cannam@154
|
649 >/dev/null 2>conftest.err &&
|
cannam@154
|
650 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
cannam@154
|
651 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
cannam@154
|
652 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
cannam@154
|
653 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
cannam@154
|
654 # icc doesn't choke on unknown options, it will just issue warnings
|
cannam@154
|
655 # or remarks (even with -Werror). So we grep stderr for any message
|
cannam@154
|
656 # that says an option was ignored or not supported.
|
cannam@154
|
657 # When given -MP, icc 7.0 and 7.1 complain thusly:
|
cannam@154
|
658 # icc: Command line warning: ignoring option '-M'; no argument required
|
cannam@154
|
659 # The diagnosis changed in icc 8.0:
|
cannam@154
|
660 # icc: Command line remark: option '-MP' not supported
|
cannam@154
|
661 if (grep 'ignoring option' conftest.err ||
|
cannam@154
|
662 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
cannam@154
|
663 am_cv_$1_dependencies_compiler_type=$depmode
|
cannam@154
|
664 break
|
cannam@154
|
665 fi
|
cannam@154
|
666 fi
|
cannam@154
|
667 done
|
cannam@154
|
668
|
cannam@154
|
669 cd ..
|
cannam@154
|
670 rm -rf conftest.dir
|
cannam@154
|
671 else
|
cannam@154
|
672 am_cv_$1_dependencies_compiler_type=none
|
cannam@154
|
673 fi
|
cannam@154
|
674 ])
|
cannam@154
|
675 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
cannam@154
|
676 AM_CONDITIONAL([am__fastdep$1], [
|
cannam@154
|
677 test "x$enable_dependency_tracking" != xno \
|
cannam@154
|
678 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
cannam@154
|
679 ])
|
cannam@154
|
680
|
cannam@154
|
681
|
cannam@154
|
682 # AM_SET_DEPDIR
|
cannam@154
|
683 # -------------
|
cannam@154
|
684 # Choose a directory name for dependency files.
|
cannam@154
|
685 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
|
cannam@154
|
686 AC_DEFUN([AM_SET_DEPDIR],
|
cannam@154
|
687 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
cannam@154
|
688 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
cannam@154
|
689 ])
|
cannam@154
|
690
|
cannam@154
|
691
|
cannam@154
|
692 # AM_DEP_TRACK
|
cannam@154
|
693 # ------------
|
cannam@154
|
694 AC_DEFUN([AM_DEP_TRACK],
|
cannam@154
|
695 [AC_ARG_ENABLE([dependency-tracking], [dnl
|
cannam@154
|
696 AS_HELP_STRING(
|
cannam@154
|
697 [--enable-dependency-tracking],
|
cannam@154
|
698 [do not reject slow dependency extractors])
|
cannam@154
|
699 AS_HELP_STRING(
|
cannam@154
|
700 [--disable-dependency-tracking],
|
cannam@154
|
701 [speeds up one-time build])])
|
cannam@154
|
702 if test "x$enable_dependency_tracking" != xno; then
|
cannam@154
|
703 am_depcomp="$ac_aux_dir/depcomp"
|
cannam@154
|
704 AMDEPBACKSLASH='\'
|
cannam@154
|
705 am__nodep='_no'
|
cannam@154
|
706 fi
|
cannam@154
|
707 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
cannam@154
|
708 AC_SUBST([AMDEPBACKSLASH])dnl
|
cannam@154
|
709 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
cannam@154
|
710 AC_SUBST([am__nodep])dnl
|
cannam@154
|
711 _AM_SUBST_NOTMAKE([am__nodep])dnl
|
cannam@154
|
712 ])
|
cannam@154
|
713
|
cannam@154
|
714 # Generate code to set up dependency tracking. -*- Autoconf -*-
|
cannam@154
|
715
|
cannam@154
|
716 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
cannam@154
|
717 #
|
cannam@154
|
718 # This file is free software; the Free Software Foundation
|
cannam@154
|
719 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
720 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
721
|
cannam@154
|
722
|
cannam@154
|
723 # _AM_OUTPUT_DEPENDENCY_COMMANDS
|
cannam@154
|
724 # ------------------------------
|
cannam@154
|
725 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
cannam@154
|
726 [{
|
cannam@154
|
727 # Older Autoconf quotes --file arguments for eval, but not when files
|
cannam@154
|
728 # are listed without --file. Let's play safe and only enable the eval
|
cannam@154
|
729 # if we detect the quoting.
|
cannam@154
|
730 case $CONFIG_FILES in
|
cannam@154
|
731 *\'*) eval set x "$CONFIG_FILES" ;;
|
cannam@154
|
732 *) set x $CONFIG_FILES ;;
|
cannam@154
|
733 esac
|
cannam@154
|
734 shift
|
cannam@154
|
735 for mf
|
cannam@154
|
736 do
|
cannam@154
|
737 # Strip MF so we end up with the name of the file.
|
cannam@154
|
738 mf=`echo "$mf" | sed -e 's/:.*$//'`
|
cannam@154
|
739 # Check whether this is an Automake generated Makefile or not.
|
cannam@154
|
740 # We used to match only the files named 'Makefile.in', but
|
cannam@154
|
741 # some people rename them; so instead we look at the file content.
|
cannam@154
|
742 # Grep'ing the first line is not enough: some people post-process
|
cannam@154
|
743 # each Makefile.in and add a new line on top of each file to say so.
|
cannam@154
|
744 # Grep'ing the whole file is not good either: AIX grep has a line
|
cannam@154
|
745 # limit of 2048, but all sed's we know have understand at least 4000.
|
cannam@154
|
746 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
cannam@154
|
747 dirpart=`AS_DIRNAME("$mf")`
|
cannam@154
|
748 else
|
cannam@154
|
749 continue
|
cannam@154
|
750 fi
|
cannam@154
|
751 # Extract the definition of DEPDIR, am__include, and am__quote
|
cannam@154
|
752 # from the Makefile without running 'make'.
|
cannam@154
|
753 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
cannam@154
|
754 test -z "$DEPDIR" && continue
|
cannam@154
|
755 am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
cannam@154
|
756 test -z "$am__include" && continue
|
cannam@154
|
757 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
cannam@154
|
758 # Find all dependency output files, they are included files with
|
cannam@154
|
759 # $(DEPDIR) in their names. We invoke sed twice because it is the
|
cannam@154
|
760 # simplest approach to changing $(DEPDIR) to its actual value in the
|
cannam@154
|
761 # expansion.
|
cannam@154
|
762 for file in `sed -n "
|
cannam@154
|
763 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
cannam@154
|
764 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
|
cannam@154
|
765 # Make sure the directory exists.
|
cannam@154
|
766 test -f "$dirpart/$file" && continue
|
cannam@154
|
767 fdir=`AS_DIRNAME(["$file"])`
|
cannam@154
|
768 AS_MKDIR_P([$dirpart/$fdir])
|
cannam@154
|
769 # echo "creating $dirpart/$file"
|
cannam@154
|
770 echo '# dummy' > "$dirpart/$file"
|
cannam@154
|
771 done
|
cannam@154
|
772 done
|
cannam@154
|
773 }
|
cannam@154
|
774 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
cannam@154
|
775
|
cannam@154
|
776
|
cannam@154
|
777 # AM_OUTPUT_DEPENDENCY_COMMANDS
|
cannam@154
|
778 # -----------------------------
|
cannam@154
|
779 # This macro should only be invoked once -- use via AC_REQUIRE.
|
cannam@154
|
780 #
|
cannam@154
|
781 # This code is only required when automatic dependency tracking
|
cannam@154
|
782 # is enabled. FIXME. This creates each '.P' file that we will
|
cannam@154
|
783 # need in order to bootstrap the dependency handling code.
|
cannam@154
|
784 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
cannam@154
|
785 [AC_CONFIG_COMMANDS([depfiles],
|
cannam@154
|
786 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
cannam@154
|
787 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
cannam@154
|
788 ])
|
cannam@154
|
789
|
cannam@154
|
790 # Do all the work for Automake. -*- Autoconf -*-
|
cannam@154
|
791
|
cannam@154
|
792 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
cannam@154
|
793 #
|
cannam@154
|
794 # This file is free software; the Free Software Foundation
|
cannam@154
|
795 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
796 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
797
|
cannam@154
|
798 # This macro actually does too much. Some checks are only needed if
|
cannam@154
|
799 # your package does certain things. But this isn't really a big deal.
|
cannam@154
|
800
|
cannam@154
|
801 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
cannam@154
|
802 m4_define([AC_PROG_CC],
|
cannam@154
|
803 m4_defn([AC_PROG_CC])
|
cannam@154
|
804 [_AM_PROG_CC_C_O
|
cannam@154
|
805 ])
|
cannam@154
|
806
|
cannam@154
|
807 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
cannam@154
|
808 # AM_INIT_AUTOMAKE([OPTIONS])
|
cannam@154
|
809 # -----------------------------------------------
|
cannam@154
|
810 # The call with PACKAGE and VERSION arguments is the old style
|
cannam@154
|
811 # call (pre autoconf-2.50), which is being phased out. PACKAGE
|
cannam@154
|
812 # and VERSION should now be passed to AC_INIT and removed from
|
cannam@154
|
813 # the call to AM_INIT_AUTOMAKE.
|
cannam@154
|
814 # We support both call styles for the transition. After
|
cannam@154
|
815 # the next Automake release, Autoconf can make the AC_INIT
|
cannam@154
|
816 # arguments mandatory, and then we can depend on a new Autoconf
|
cannam@154
|
817 # release and drop the old call support.
|
cannam@154
|
818 AC_DEFUN([AM_INIT_AUTOMAKE],
|
cannam@154
|
819 [AC_PREREQ([2.65])dnl
|
cannam@154
|
820 dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
cannam@154
|
821 dnl the ones we care about.
|
cannam@154
|
822 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
cannam@154
|
823 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
cannam@154
|
824 AC_REQUIRE([AC_PROG_INSTALL])dnl
|
cannam@154
|
825 if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
cannam@154
|
826 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
cannam@154
|
827 # is not polluted with repeated "-I."
|
cannam@154
|
828 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
cannam@154
|
829 # test to see if srcdir already configured
|
cannam@154
|
830 if test -f $srcdir/config.status; then
|
cannam@154
|
831 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
cannam@154
|
832 fi
|
cannam@154
|
833 fi
|
cannam@154
|
834
|
cannam@154
|
835 # test whether we have cygpath
|
cannam@154
|
836 if test -z "$CYGPATH_W"; then
|
cannam@154
|
837 if (cygpath --version) >/dev/null 2>/dev/null; then
|
cannam@154
|
838 CYGPATH_W='cygpath -w'
|
cannam@154
|
839 else
|
cannam@154
|
840 CYGPATH_W=echo
|
cannam@154
|
841 fi
|
cannam@154
|
842 fi
|
cannam@154
|
843 AC_SUBST([CYGPATH_W])
|
cannam@154
|
844
|
cannam@154
|
845 # Define the identity of the package.
|
cannam@154
|
846 dnl Distinguish between old-style and new-style calls.
|
cannam@154
|
847 m4_ifval([$2],
|
cannam@154
|
848 [AC_DIAGNOSE([obsolete],
|
cannam@154
|
849 [$0: two- and three-arguments forms are deprecated.])
|
cannam@154
|
850 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
cannam@154
|
851 AC_SUBST([PACKAGE], [$1])dnl
|
cannam@154
|
852 AC_SUBST([VERSION], [$2])],
|
cannam@154
|
853 [_AM_SET_OPTIONS([$1])dnl
|
cannam@154
|
854 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
cannam@154
|
855 m4_if(
|
cannam@154
|
856 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
cannam@154
|
857 [ok:ok],,
|
cannam@154
|
858 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
cannam@154
|
859 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
cannam@154
|
860 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
cannam@154
|
861
|
cannam@154
|
862 _AM_IF_OPTION([no-define],,
|
cannam@154
|
863 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
|
cannam@154
|
864 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
|
cannam@154
|
865
|
cannam@154
|
866 # Some tools Automake needs.
|
cannam@154
|
867 AC_REQUIRE([AM_SANITY_CHECK])dnl
|
cannam@154
|
868 AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
cannam@154
|
869 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
cannam@154
|
870 AM_MISSING_PROG([AUTOCONF], [autoconf])
|
cannam@154
|
871 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
cannam@154
|
872 AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
cannam@154
|
873 AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
cannam@154
|
874 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
cannam@154
|
875 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
cannam@154
|
876 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
cannam@154
|
877 # For better backward compatibility. To be removed once Automake 1.9.x
|
cannam@154
|
878 # dies out for good. For more background, see:
|
cannam@154
|
879 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
cannam@154
|
880 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
cannam@154
|
881 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
cannam@154
|
882 # We need awk for the "check" target (and possibly the TAP driver). The
|
cannam@154
|
883 # system "awk" is bad on some platforms.
|
cannam@154
|
884 AC_REQUIRE([AC_PROG_AWK])dnl
|
cannam@154
|
885 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
cannam@154
|
886 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
cannam@154
|
887 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
cannam@154
|
888 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
cannam@154
|
889 [_AM_PROG_TAR([v7])])])
|
cannam@154
|
890 _AM_IF_OPTION([no-dependencies],,
|
cannam@154
|
891 [AC_PROVIDE_IFELSE([AC_PROG_CC],
|
cannam@154
|
892 [_AM_DEPENDENCIES([CC])],
|
cannam@154
|
893 [m4_define([AC_PROG_CC],
|
cannam@154
|
894 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
|
cannam@154
|
895 AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
cannam@154
|
896 [_AM_DEPENDENCIES([CXX])],
|
cannam@154
|
897 [m4_define([AC_PROG_CXX],
|
cannam@154
|
898 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
|
cannam@154
|
899 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
cannam@154
|
900 [_AM_DEPENDENCIES([OBJC])],
|
cannam@154
|
901 [m4_define([AC_PROG_OBJC],
|
cannam@154
|
902 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
cannam@154
|
903 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
cannam@154
|
904 [_AM_DEPENDENCIES([OBJCXX])],
|
cannam@154
|
905 [m4_define([AC_PROG_OBJCXX],
|
cannam@154
|
906 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
cannam@154
|
907 ])
|
cannam@154
|
908 AC_REQUIRE([AM_SILENT_RULES])dnl
|
cannam@154
|
909 dnl The testsuite driver may need to know about EXEEXT, so add the
|
cannam@154
|
910 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
cannam@154
|
911 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
cannam@154
|
912 AC_CONFIG_COMMANDS_PRE(dnl
|
cannam@154
|
913 [m4_provide_if([_AM_COMPILER_EXEEXT],
|
cannam@154
|
914 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
cannam@154
|
915
|
cannam@154
|
916 # POSIX will say in a future version that running "rm -f" with no argument
|
cannam@154
|
917 # is OK; and we want to be able to make that assumption in our Makefile
|
cannam@154
|
918 # recipes. So use an aggressive probe to check that the usage we want is
|
cannam@154
|
919 # actually supported "in the wild" to an acceptable degree.
|
cannam@154
|
920 # See automake bug#10828.
|
cannam@154
|
921 # To make any issue more visible, cause the running configure to be aborted
|
cannam@154
|
922 # by default if the 'rm' program in use doesn't match our expectations; the
|
cannam@154
|
923 # user can still override this though.
|
cannam@154
|
924 if rm -f && rm -fr && rm -rf; then : OK; else
|
cannam@154
|
925 cat >&2 <<'END'
|
cannam@154
|
926 Oops!
|
cannam@154
|
927
|
cannam@154
|
928 Your 'rm' program seems unable to run without file operands specified
|
cannam@154
|
929 on the command line, even when the '-f' option is present. This is contrary
|
cannam@154
|
930 to the behaviour of most rm programs out there, and not conforming with
|
cannam@154
|
931 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
cannam@154
|
932
|
cannam@154
|
933 Please tell bug-automake@gnu.org about your system, including the value
|
cannam@154
|
934 of your $PATH and any error possibly output before this message. This
|
cannam@154
|
935 can help us improve future automake versions.
|
cannam@154
|
936
|
cannam@154
|
937 END
|
cannam@154
|
938 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
cannam@154
|
939 echo 'Configuration will proceed anyway, since you have set the' >&2
|
cannam@154
|
940 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
cannam@154
|
941 echo >&2
|
cannam@154
|
942 else
|
cannam@154
|
943 cat >&2 <<'END'
|
cannam@154
|
944 Aborting the configuration process, to ensure you take notice of the issue.
|
cannam@154
|
945
|
cannam@154
|
946 You can download and install GNU coreutils to get an 'rm' implementation
|
cannam@154
|
947 that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
cannam@154
|
948
|
cannam@154
|
949 If you want to complete the configuration process using your problematic
|
cannam@154
|
950 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
cannam@154
|
951 to "yes", and re-run configure.
|
cannam@154
|
952
|
cannam@154
|
953 END
|
cannam@154
|
954 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
cannam@154
|
955 fi
|
cannam@154
|
956 fi
|
cannam@154
|
957 dnl The trailing newline in this macro's definition is deliberate, for
|
cannam@154
|
958 dnl backward compatibility and to allow trailing 'dnl'-style comments
|
cannam@154
|
959 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
cannam@154
|
960 ])
|
cannam@154
|
961
|
cannam@154
|
962 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
cannam@154
|
963 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
cannam@154
|
964 dnl mangled by Autoconf and run in a shell conditional statement.
|
cannam@154
|
965 m4_define([_AC_COMPILER_EXEEXT],
|
cannam@154
|
966 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
cannam@154
|
967
|
cannam@154
|
968 # When config.status generates a header, we must update the stamp-h file.
|
cannam@154
|
969 # This file resides in the same directory as the config header
|
cannam@154
|
970 # that is generated. The stamp files are numbered to have different names.
|
cannam@154
|
971
|
cannam@154
|
972 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
cannam@154
|
973 # loop where config.status creates the headers, so we can generate
|
cannam@154
|
974 # our stamp files there.
|
cannam@154
|
975 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
cannam@154
|
976 [# Compute $1's index in $config_headers.
|
cannam@154
|
977 _am_arg=$1
|
cannam@154
|
978 _am_stamp_count=1
|
cannam@154
|
979 for _am_header in $config_headers :; do
|
cannam@154
|
980 case $_am_header in
|
cannam@154
|
981 $_am_arg | $_am_arg:* )
|
cannam@154
|
982 break ;;
|
cannam@154
|
983 * )
|
cannam@154
|
984 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
cannam@154
|
985 esac
|
cannam@154
|
986 done
|
cannam@154
|
987 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
cannam@154
|
988
|
cannam@154
|
989 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
990 #
|
cannam@154
|
991 # This file is free software; the Free Software Foundation
|
cannam@154
|
992 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
993 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
994
|
cannam@154
|
995 # AM_PROG_INSTALL_SH
|
cannam@154
|
996 # ------------------
|
cannam@154
|
997 # Define $install_sh.
|
cannam@154
|
998 AC_DEFUN([AM_PROG_INSTALL_SH],
|
cannam@154
|
999 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
cannam@154
|
1000 if test x"${install_sh+set}" != xset; then
|
cannam@154
|
1001 case $am_aux_dir in
|
cannam@154
|
1002 *\ * | *\ *)
|
cannam@154
|
1003 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
cannam@154
|
1004 *)
|
cannam@154
|
1005 install_sh="\${SHELL} $am_aux_dir/install-sh"
|
cannam@154
|
1006 esac
|
cannam@154
|
1007 fi
|
cannam@154
|
1008 AC_SUBST([install_sh])])
|
cannam@154
|
1009
|
cannam@154
|
1010 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
|
cannam@154
|
1011 #
|
cannam@154
|
1012 # This file is free software; the Free Software Foundation
|
cannam@154
|
1013 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1014 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1015
|
cannam@154
|
1016 # Check whether the underlying file-system supports filenames
|
cannam@154
|
1017 # with a leading dot. For instance MS-DOS doesn't.
|
cannam@154
|
1018 AC_DEFUN([AM_SET_LEADING_DOT],
|
cannam@154
|
1019 [rm -rf .tst 2>/dev/null
|
cannam@154
|
1020 mkdir .tst 2>/dev/null
|
cannam@154
|
1021 if test -d .tst; then
|
cannam@154
|
1022 am__leading_dot=.
|
cannam@154
|
1023 else
|
cannam@154
|
1024 am__leading_dot=_
|
cannam@154
|
1025 fi
|
cannam@154
|
1026 rmdir .tst 2>/dev/null
|
cannam@154
|
1027 AC_SUBST([am__leading_dot])])
|
cannam@154
|
1028
|
cannam@154
|
1029 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
cannam@154
|
1030 # From Jim Meyering
|
cannam@154
|
1031
|
cannam@154
|
1032 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
cannam@154
|
1033 #
|
cannam@154
|
1034 # This file is free software; the Free Software Foundation
|
cannam@154
|
1035 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1036 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1037
|
cannam@154
|
1038 # AM_MAINTAINER_MODE([DEFAULT-MODE])
|
cannam@154
|
1039 # ----------------------------------
|
cannam@154
|
1040 # Control maintainer-specific portions of Makefiles.
|
cannam@154
|
1041 # Default is to disable them, unless 'enable' is passed literally.
|
cannam@154
|
1042 # For symmetry, 'disable' may be passed as well. Anyway, the user
|
cannam@154
|
1043 # can override the default with the --enable/--disable switch.
|
cannam@154
|
1044 AC_DEFUN([AM_MAINTAINER_MODE],
|
cannam@154
|
1045 [m4_case(m4_default([$1], [disable]),
|
cannam@154
|
1046 [enable], [m4_define([am_maintainer_other], [disable])],
|
cannam@154
|
1047 [disable], [m4_define([am_maintainer_other], [enable])],
|
cannam@154
|
1048 [m4_define([am_maintainer_other], [enable])
|
cannam@154
|
1049 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
cannam@154
|
1050 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
cannam@154
|
1051 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
cannam@154
|
1052 AC_ARG_ENABLE([maintainer-mode],
|
cannam@154
|
1053 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
cannam@154
|
1054 am_maintainer_other[ make rules and dependencies not useful
|
cannam@154
|
1055 (and sometimes confusing) to the casual installer])],
|
cannam@154
|
1056 [USE_MAINTAINER_MODE=$enableval],
|
cannam@154
|
1057 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
cannam@154
|
1058 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
cannam@154
|
1059 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
cannam@154
|
1060 MAINT=$MAINTAINER_MODE_TRUE
|
cannam@154
|
1061 AC_SUBST([MAINT])dnl
|
cannam@154
|
1062 ]
|
cannam@154
|
1063 )
|
cannam@154
|
1064
|
cannam@154
|
1065 # Check to see how 'make' treats includes. -*- Autoconf -*-
|
cannam@154
|
1066
|
cannam@154
|
1067 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
1068 #
|
cannam@154
|
1069 # This file is free software; the Free Software Foundation
|
cannam@154
|
1070 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1071 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1072
|
cannam@154
|
1073 # AM_MAKE_INCLUDE()
|
cannam@154
|
1074 # -----------------
|
cannam@154
|
1075 # Check to see how make treats includes.
|
cannam@154
|
1076 AC_DEFUN([AM_MAKE_INCLUDE],
|
cannam@154
|
1077 [am_make=${MAKE-make}
|
cannam@154
|
1078 cat > confinc << 'END'
|
cannam@154
|
1079 am__doit:
|
cannam@154
|
1080 @echo this is the am__doit target
|
cannam@154
|
1081 .PHONY: am__doit
|
cannam@154
|
1082 END
|
cannam@154
|
1083 # If we don't find an include directive, just comment out the code.
|
cannam@154
|
1084 AC_MSG_CHECKING([for style of include used by $am_make])
|
cannam@154
|
1085 am__include="#"
|
cannam@154
|
1086 am__quote=
|
cannam@154
|
1087 _am_result=none
|
cannam@154
|
1088 # First try GNU make style include.
|
cannam@154
|
1089 echo "include confinc" > confmf
|
cannam@154
|
1090 # Ignore all kinds of additional output from 'make'.
|
cannam@154
|
1091 case `$am_make -s -f confmf 2> /dev/null` in #(
|
cannam@154
|
1092 *the\ am__doit\ target*)
|
cannam@154
|
1093 am__include=include
|
cannam@154
|
1094 am__quote=
|
cannam@154
|
1095 _am_result=GNU
|
cannam@154
|
1096 ;;
|
cannam@154
|
1097 esac
|
cannam@154
|
1098 # Now try BSD make style include.
|
cannam@154
|
1099 if test "$am__include" = "#"; then
|
cannam@154
|
1100 echo '.include "confinc"' > confmf
|
cannam@154
|
1101 case `$am_make -s -f confmf 2> /dev/null` in #(
|
cannam@154
|
1102 *the\ am__doit\ target*)
|
cannam@154
|
1103 am__include=.include
|
cannam@154
|
1104 am__quote="\""
|
cannam@154
|
1105 _am_result=BSD
|
cannam@154
|
1106 ;;
|
cannam@154
|
1107 esac
|
cannam@154
|
1108 fi
|
cannam@154
|
1109 AC_SUBST([am__include])
|
cannam@154
|
1110 AC_SUBST([am__quote])
|
cannam@154
|
1111 AC_MSG_RESULT([$_am_result])
|
cannam@154
|
1112 rm -f confinc confmf
|
cannam@154
|
1113 ])
|
cannam@154
|
1114
|
cannam@154
|
1115 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
cannam@154
|
1116
|
cannam@154
|
1117 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
cannam@154
|
1118 #
|
cannam@154
|
1119 # This file is free software; the Free Software Foundation
|
cannam@154
|
1120 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1121 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1122
|
cannam@154
|
1123 # AM_MISSING_PROG(NAME, PROGRAM)
|
cannam@154
|
1124 # ------------------------------
|
cannam@154
|
1125 AC_DEFUN([AM_MISSING_PROG],
|
cannam@154
|
1126 [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
cannam@154
|
1127 $1=${$1-"${am_missing_run}$2"}
|
cannam@154
|
1128 AC_SUBST($1)])
|
cannam@154
|
1129
|
cannam@154
|
1130 # AM_MISSING_HAS_RUN
|
cannam@154
|
1131 # ------------------
|
cannam@154
|
1132 # Define MISSING if not defined so far and test if it is modern enough.
|
cannam@154
|
1133 # If it is, set am_missing_run to use it, otherwise, to nothing.
|
cannam@154
|
1134 AC_DEFUN([AM_MISSING_HAS_RUN],
|
cannam@154
|
1135 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
cannam@154
|
1136 AC_REQUIRE_AUX_FILE([missing])dnl
|
cannam@154
|
1137 if test x"${MISSING+set}" != xset; then
|
cannam@154
|
1138 case $am_aux_dir in
|
cannam@154
|
1139 *\ * | *\ *)
|
cannam@154
|
1140 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
cannam@154
|
1141 *)
|
cannam@154
|
1142 MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
cannam@154
|
1143 esac
|
cannam@154
|
1144 fi
|
cannam@154
|
1145 # Use eval to expand $SHELL
|
cannam@154
|
1146 if eval "$MISSING --is-lightweight"; then
|
cannam@154
|
1147 am_missing_run="$MISSING "
|
cannam@154
|
1148 else
|
cannam@154
|
1149 am_missing_run=
|
cannam@154
|
1150 AC_MSG_WARN(['missing' script is too old or missing])
|
cannam@154
|
1151 fi
|
cannam@154
|
1152 ])
|
cannam@154
|
1153
|
cannam@154
|
1154 # Helper functions for option handling. -*- Autoconf -*-
|
cannam@154
|
1155
|
cannam@154
|
1156 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
1157 #
|
cannam@154
|
1158 # This file is free software; the Free Software Foundation
|
cannam@154
|
1159 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1160 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1161
|
cannam@154
|
1162 # _AM_MANGLE_OPTION(NAME)
|
cannam@154
|
1163 # -----------------------
|
cannam@154
|
1164 AC_DEFUN([_AM_MANGLE_OPTION],
|
cannam@154
|
1165 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
cannam@154
|
1166
|
cannam@154
|
1167 # _AM_SET_OPTION(NAME)
|
cannam@154
|
1168 # --------------------
|
cannam@154
|
1169 # Set option NAME. Presently that only means defining a flag for this option.
|
cannam@154
|
1170 AC_DEFUN([_AM_SET_OPTION],
|
cannam@154
|
1171 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
|
cannam@154
|
1172
|
cannam@154
|
1173 # _AM_SET_OPTIONS(OPTIONS)
|
cannam@154
|
1174 # ------------------------
|
cannam@154
|
1175 # OPTIONS is a space-separated list of Automake options.
|
cannam@154
|
1176 AC_DEFUN([_AM_SET_OPTIONS],
|
cannam@154
|
1177 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
cannam@154
|
1178
|
cannam@154
|
1179 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
cannam@154
|
1180 # -------------------------------------------
|
cannam@154
|
1181 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
cannam@154
|
1182 AC_DEFUN([_AM_IF_OPTION],
|
cannam@154
|
1183 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
cannam@154
|
1184
|
cannam@154
|
1185 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
cannam@154
|
1186 #
|
cannam@154
|
1187 # This file is free software; the Free Software Foundation
|
cannam@154
|
1188 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1189 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1190
|
cannam@154
|
1191 # _AM_PROG_CC_C_O
|
cannam@154
|
1192 # ---------------
|
cannam@154
|
1193 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
cannam@154
|
1194 # to automatically call this.
|
cannam@154
|
1195 AC_DEFUN([_AM_PROG_CC_C_O],
|
cannam@154
|
1196 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
cannam@154
|
1197 AC_REQUIRE_AUX_FILE([compile])dnl
|
cannam@154
|
1198 AC_LANG_PUSH([C])dnl
|
cannam@154
|
1199 AC_CACHE_CHECK(
|
cannam@154
|
1200 [whether $CC understands -c and -o together],
|
cannam@154
|
1201 [am_cv_prog_cc_c_o],
|
cannam@154
|
1202 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
cannam@154
|
1203 # Make sure it works both with $CC and with simple cc.
|
cannam@154
|
1204 # Following AC_PROG_CC_C_O, we do the test twice because some
|
cannam@154
|
1205 # compilers refuse to overwrite an existing .o file with -o,
|
cannam@154
|
1206 # though they will create one.
|
cannam@154
|
1207 am_cv_prog_cc_c_o=yes
|
cannam@154
|
1208 for am_i in 1 2; do
|
cannam@154
|
1209 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
cannam@154
|
1210 && test -f conftest2.$ac_objext; then
|
cannam@154
|
1211 : OK
|
cannam@154
|
1212 else
|
cannam@154
|
1213 am_cv_prog_cc_c_o=no
|
cannam@154
|
1214 break
|
cannam@154
|
1215 fi
|
cannam@154
|
1216 done
|
cannam@154
|
1217 rm -f core conftest*
|
cannam@154
|
1218 unset am_i])
|
cannam@154
|
1219 if test "$am_cv_prog_cc_c_o" != yes; then
|
cannam@154
|
1220 # Losing compiler, so override with the script.
|
cannam@154
|
1221 # FIXME: It is wrong to rewrite CC.
|
cannam@154
|
1222 # But if we don't then we get into trouble of one sort or another.
|
cannam@154
|
1223 # A longer-term fix would be to have automake use am__CC in this case,
|
cannam@154
|
1224 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
cannam@154
|
1225 CC="$am_aux_dir/compile $CC"
|
cannam@154
|
1226 fi
|
cannam@154
|
1227 AC_LANG_POP([C])])
|
cannam@154
|
1228
|
cannam@154
|
1229 # For backward compatibility.
|
cannam@154
|
1230 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
cannam@154
|
1231
|
cannam@154
|
1232 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
1233 #
|
cannam@154
|
1234 # This file is free software; the Free Software Foundation
|
cannam@154
|
1235 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1236 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1237
|
cannam@154
|
1238 # AM_RUN_LOG(COMMAND)
|
cannam@154
|
1239 # -------------------
|
cannam@154
|
1240 # Run COMMAND, save the exit status in ac_status, and log it.
|
cannam@154
|
1241 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
cannam@154
|
1242 AC_DEFUN([AM_RUN_LOG],
|
cannam@154
|
1243 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
cannam@154
|
1244 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
cannam@154
|
1245 ac_status=$?
|
cannam@154
|
1246 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
cannam@154
|
1247 (exit $ac_status); }])
|
cannam@154
|
1248
|
cannam@154
|
1249 # Check to make sure that the build environment is sane. -*- Autoconf -*-
|
cannam@154
|
1250
|
cannam@154
|
1251 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
cannam@154
|
1252 #
|
cannam@154
|
1253 # This file is free software; the Free Software Foundation
|
cannam@154
|
1254 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1255 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1256
|
cannam@154
|
1257 # AM_SANITY_CHECK
|
cannam@154
|
1258 # ---------------
|
cannam@154
|
1259 AC_DEFUN([AM_SANITY_CHECK],
|
cannam@154
|
1260 [AC_MSG_CHECKING([whether build environment is sane])
|
cannam@154
|
1261 # Reject unsafe characters in $srcdir or the absolute working directory
|
cannam@154
|
1262 # name. Accept space and tab only in the latter.
|
cannam@154
|
1263 am_lf='
|
cannam@154
|
1264 '
|
cannam@154
|
1265 case `pwd` in
|
cannam@154
|
1266 *[[\\\"\#\$\&\'\`$am_lf]]*)
|
cannam@154
|
1267 AC_MSG_ERROR([unsafe absolute working directory name]);;
|
cannam@154
|
1268 esac
|
cannam@154
|
1269 case $srcdir in
|
cannam@154
|
1270 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
cannam@154
|
1271 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
cannam@154
|
1272 esac
|
cannam@154
|
1273
|
cannam@154
|
1274 # Do 'set' in a subshell so we don't clobber the current shell's
|
cannam@154
|
1275 # arguments. Must try -L first in case configure is actually a
|
cannam@154
|
1276 # symlink; some systems play weird games with the mod time of symlinks
|
cannam@154
|
1277 # (eg FreeBSD returns the mod time of the symlink's containing
|
cannam@154
|
1278 # directory).
|
cannam@154
|
1279 if (
|
cannam@154
|
1280 am_has_slept=no
|
cannam@154
|
1281 for am_try in 1 2; do
|
cannam@154
|
1282 echo "timestamp, slept: $am_has_slept" > conftest.file
|
cannam@154
|
1283 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
cannam@154
|
1284 if test "$[*]" = "X"; then
|
cannam@154
|
1285 # -L didn't work.
|
cannam@154
|
1286 set X `ls -t "$srcdir/configure" conftest.file`
|
cannam@154
|
1287 fi
|
cannam@154
|
1288 if test "$[*]" != "X $srcdir/configure conftest.file" \
|
cannam@154
|
1289 && test "$[*]" != "X conftest.file $srcdir/configure"; then
|
cannam@154
|
1290
|
cannam@154
|
1291 # If neither matched, then we have a broken ls. This can happen
|
cannam@154
|
1292 # if, for instance, CONFIG_SHELL is bash and it inherits a
|
cannam@154
|
1293 # broken ls alias from the environment. This has actually
|
cannam@154
|
1294 # happened. Such a system could not be considered "sane".
|
cannam@154
|
1295 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
cannam@154
|
1296 alias in your environment])
|
cannam@154
|
1297 fi
|
cannam@154
|
1298 if test "$[2]" = conftest.file || test $am_try -eq 2; then
|
cannam@154
|
1299 break
|
cannam@154
|
1300 fi
|
cannam@154
|
1301 # Just in case.
|
cannam@154
|
1302 sleep 1
|
cannam@154
|
1303 am_has_slept=yes
|
cannam@154
|
1304 done
|
cannam@154
|
1305 test "$[2]" = conftest.file
|
cannam@154
|
1306 )
|
cannam@154
|
1307 then
|
cannam@154
|
1308 # Ok.
|
cannam@154
|
1309 :
|
cannam@154
|
1310 else
|
cannam@154
|
1311 AC_MSG_ERROR([newly created file is older than distributed files!
|
cannam@154
|
1312 Check your system clock])
|
cannam@154
|
1313 fi
|
cannam@154
|
1314 AC_MSG_RESULT([yes])
|
cannam@154
|
1315 # If we didn't sleep, we still need to ensure time stamps of config.status and
|
cannam@154
|
1316 # generated files are strictly newer.
|
cannam@154
|
1317 am_sleep_pid=
|
cannam@154
|
1318 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
|
cannam@154
|
1319 ( sleep 1 ) &
|
cannam@154
|
1320 am_sleep_pid=$!
|
cannam@154
|
1321 fi
|
cannam@154
|
1322 AC_CONFIG_COMMANDS_PRE(
|
cannam@154
|
1323 [AC_MSG_CHECKING([that generated files are newer than configure])
|
cannam@154
|
1324 if test -n "$am_sleep_pid"; then
|
cannam@154
|
1325 # Hide warnings about reused PIDs.
|
cannam@154
|
1326 wait $am_sleep_pid 2>/dev/null
|
cannam@154
|
1327 fi
|
cannam@154
|
1328 AC_MSG_RESULT([done])])
|
cannam@154
|
1329 rm -f conftest.file
|
cannam@154
|
1330 ])
|
cannam@154
|
1331
|
cannam@154
|
1332 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
|
cannam@154
|
1333 #
|
cannam@154
|
1334 # This file is free software; the Free Software Foundation
|
cannam@154
|
1335 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1336 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1337
|
cannam@154
|
1338 # AM_SILENT_RULES([DEFAULT])
|
cannam@154
|
1339 # --------------------------
|
cannam@154
|
1340 # Enable less verbose build rules; with the default set to DEFAULT
|
cannam@154
|
1341 # ("yes" being less verbose, "no" or empty being verbose).
|
cannam@154
|
1342 AC_DEFUN([AM_SILENT_RULES],
|
cannam@154
|
1343 [AC_ARG_ENABLE([silent-rules], [dnl
|
cannam@154
|
1344 AS_HELP_STRING(
|
cannam@154
|
1345 [--enable-silent-rules],
|
cannam@154
|
1346 [less verbose build output (undo: "make V=1")])
|
cannam@154
|
1347 AS_HELP_STRING(
|
cannam@154
|
1348 [--disable-silent-rules],
|
cannam@154
|
1349 [verbose build output (undo: "make V=0")])dnl
|
cannam@154
|
1350 ])
|
cannam@154
|
1351 case $enable_silent_rules in @%:@ (((
|
cannam@154
|
1352 yes) AM_DEFAULT_VERBOSITY=0;;
|
cannam@154
|
1353 no) AM_DEFAULT_VERBOSITY=1;;
|
cannam@154
|
1354 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
cannam@154
|
1355 esac
|
cannam@154
|
1356 dnl
|
cannam@154
|
1357 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
cannam@154
|
1358 dnl do not support nested variable expansions.
|
cannam@154
|
1359 dnl See automake bug#9928 and bug#10237.
|
cannam@154
|
1360 am_make=${MAKE-make}
|
cannam@154
|
1361 AC_CACHE_CHECK([whether $am_make supports nested variables],
|
cannam@154
|
1362 [am_cv_make_support_nested_variables],
|
cannam@154
|
1363 [if AS_ECHO([['TRUE=$(BAR$(V))
|
cannam@154
|
1364 BAR0=false
|
cannam@154
|
1365 BAR1=true
|
cannam@154
|
1366 V=1
|
cannam@154
|
1367 am__doit:
|
cannam@154
|
1368 @$(TRUE)
|
cannam@154
|
1369 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
|
cannam@154
|
1370 am_cv_make_support_nested_variables=yes
|
cannam@154
|
1371 else
|
cannam@154
|
1372 am_cv_make_support_nested_variables=no
|
cannam@154
|
1373 fi])
|
cannam@154
|
1374 if test $am_cv_make_support_nested_variables = yes; then
|
cannam@154
|
1375 dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
cannam@154
|
1376 AM_V='$(V)'
|
cannam@154
|
1377 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
cannam@154
|
1378 else
|
cannam@154
|
1379 AM_V=$AM_DEFAULT_VERBOSITY
|
cannam@154
|
1380 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
cannam@154
|
1381 fi
|
cannam@154
|
1382 AC_SUBST([AM_V])dnl
|
cannam@154
|
1383 AM_SUBST_NOTMAKE([AM_V])dnl
|
cannam@154
|
1384 AC_SUBST([AM_DEFAULT_V])dnl
|
cannam@154
|
1385 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
|
cannam@154
|
1386 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
cannam@154
|
1387 AM_BACKSLASH='\'
|
cannam@154
|
1388 AC_SUBST([AM_BACKSLASH])dnl
|
cannam@154
|
1389 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
cannam@154
|
1390 ])
|
cannam@154
|
1391
|
cannam@154
|
1392 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
cannam@154
|
1393 #
|
cannam@154
|
1394 # This file is free software; the Free Software Foundation
|
cannam@154
|
1395 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1396 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1397
|
cannam@154
|
1398 # AM_PROG_INSTALL_STRIP
|
cannam@154
|
1399 # ---------------------
|
cannam@154
|
1400 # One issue with vendor 'install' (even GNU) is that you can't
|
cannam@154
|
1401 # specify the program used to strip binaries. This is especially
|
cannam@154
|
1402 # annoying in cross-compiling environments, where the build's strip
|
cannam@154
|
1403 # is unlikely to handle the host's binaries.
|
cannam@154
|
1404 # Fortunately install-sh will honor a STRIPPROG variable, so we
|
cannam@154
|
1405 # always use install-sh in "make install-strip", and initialize
|
cannam@154
|
1406 # STRIPPROG with the value of the STRIP variable (set by the user).
|
cannam@154
|
1407 AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
cannam@154
|
1408 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
cannam@154
|
1409 # Installed binaries are usually stripped using 'strip' when the user
|
cannam@154
|
1410 # run "make install-strip". However 'strip' might not be the right
|
cannam@154
|
1411 # tool to use in cross-compilation environments, therefore Automake
|
cannam@154
|
1412 # will honor the 'STRIP' environment variable to overrule this program.
|
cannam@154
|
1413 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
|
cannam@154
|
1414 if test "$cross_compiling" != no; then
|
cannam@154
|
1415 AC_CHECK_TOOL([STRIP], [strip], :)
|
cannam@154
|
1416 fi
|
cannam@154
|
1417 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
cannam@154
|
1418 AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
cannam@154
|
1419
|
cannam@154
|
1420 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
|
cannam@154
|
1421 #
|
cannam@154
|
1422 # This file is free software; the Free Software Foundation
|
cannam@154
|
1423 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1424 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1425
|
cannam@154
|
1426 # _AM_SUBST_NOTMAKE(VARIABLE)
|
cannam@154
|
1427 # ---------------------------
|
cannam@154
|
1428 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
cannam@154
|
1429 # This macro is traced by Automake.
|
cannam@154
|
1430 AC_DEFUN([_AM_SUBST_NOTMAKE])
|
cannam@154
|
1431
|
cannam@154
|
1432 # AM_SUBST_NOTMAKE(VARIABLE)
|
cannam@154
|
1433 # --------------------------
|
cannam@154
|
1434 # Public sister of _AM_SUBST_NOTMAKE.
|
cannam@154
|
1435 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
cannam@154
|
1436
|
cannam@154
|
1437 # Check how to create a tarball. -*- Autoconf -*-
|
cannam@154
|
1438
|
cannam@154
|
1439 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
|
cannam@154
|
1440 #
|
cannam@154
|
1441 # This file is free software; the Free Software Foundation
|
cannam@154
|
1442 # gives unlimited permission to copy and/or distribute it,
|
cannam@154
|
1443 # with or without modifications, as long as this notice is preserved.
|
cannam@154
|
1444
|
cannam@154
|
1445 # _AM_PROG_TAR(FORMAT)
|
cannam@154
|
1446 # --------------------
|
cannam@154
|
1447 # Check how to create a tarball in format FORMAT.
|
cannam@154
|
1448 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
|
cannam@154
|
1449 #
|
cannam@154
|
1450 # Substitute a variable $(am__tar) that is a command
|
cannam@154
|
1451 # writing to stdout a FORMAT-tarball containing the directory
|
cannam@154
|
1452 # $tardir.
|
cannam@154
|
1453 # tardir=directory && $(am__tar) > result.tar
|
cannam@154
|
1454 #
|
cannam@154
|
1455 # Substitute a variable $(am__untar) that extract such
|
cannam@154
|
1456 # a tarball read from stdin.
|
cannam@154
|
1457 # $(am__untar) < result.tar
|
cannam@154
|
1458 #
|
cannam@154
|
1459 AC_DEFUN([_AM_PROG_TAR],
|
cannam@154
|
1460 [# Always define AMTAR for backward compatibility. Yes, it's still used
|
cannam@154
|
1461 # in the wild :-( We should find a proper way to deprecate it ...
|
cannam@154
|
1462 AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
cannam@154
|
1463
|
cannam@154
|
1464 # We'll loop over all known methods to create a tar archive until one works.
|
cannam@154
|
1465 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
cannam@154
|
1466
|
cannam@154
|
1467 m4_if([$1], [v7],
|
cannam@154
|
1468 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
cannam@154
|
1469
|
cannam@154
|
1470 [m4_case([$1],
|
cannam@154
|
1471 [ustar],
|
cannam@154
|
1472 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
|
cannam@154
|
1473 # There is notably a 21 bits limit for the UID and the GID. In fact,
|
cannam@154
|
1474 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
|
cannam@154
|
1475 # and bug#13588).
|
cannam@154
|
1476 am_max_uid=2097151 # 2^21 - 1
|
cannam@154
|
1477 am_max_gid=$am_max_uid
|
cannam@154
|
1478 # The $UID and $GID variables are not portable, so we need to resort
|
cannam@154
|
1479 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
|
cannam@154
|
1480 # below are definitely unexpected, so allow the users to see them
|
cannam@154
|
1481 # (that is, avoid stderr redirection).
|
cannam@154
|
1482 am_uid=`id -u || echo unknown`
|
cannam@154
|
1483 am_gid=`id -g || echo unknown`
|
cannam@154
|
1484 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
cannam@154
|
1485 if test $am_uid -le $am_max_uid; then
|
cannam@154
|
1486 AC_MSG_RESULT([yes])
|
cannam@154
|
1487 else
|
cannam@154
|
1488 AC_MSG_RESULT([no])
|
cannam@154
|
1489 _am_tools=none
|
cannam@154
|
1490 fi
|
cannam@154
|
1491 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
cannam@154
|
1492 if test $am_gid -le $am_max_gid; then
|
cannam@154
|
1493 AC_MSG_RESULT([yes])
|
cannam@154
|
1494 else
|
cannam@154
|
1495 AC_MSG_RESULT([no])
|
cannam@154
|
1496 _am_tools=none
|
cannam@154
|
1497 fi],
|
cannam@154
|
1498
|
cannam@154
|
1499 [pax],
|
cannam@154
|
1500 [],
|
cannam@154
|
1501
|
cannam@154
|
1502 [m4_fatal([Unknown tar format])])
|
cannam@154
|
1503
|
cannam@154
|
1504 AC_MSG_CHECKING([how to create a $1 tar archive])
|
cannam@154
|
1505
|
cannam@154
|
1506 # Go ahead even if we have the value already cached. We do so because we
|
cannam@154
|
1507 # need to set the values for the 'am__tar' and 'am__untar' variables.
|
cannam@154
|
1508 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
cannam@154
|
1509
|
cannam@154
|
1510 for _am_tool in $_am_tools; do
|
cannam@154
|
1511 case $_am_tool in
|
cannam@154
|
1512 gnutar)
|
cannam@154
|
1513 for _am_tar in tar gnutar gtar; do
|
cannam@154
|
1514 AM_RUN_LOG([$_am_tar --version]) && break
|
cannam@154
|
1515 done
|
cannam@154
|
1516 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
cannam@154
|
1517 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
cannam@154
|
1518 am__untar="$_am_tar -xf -"
|
cannam@154
|
1519 ;;
|
cannam@154
|
1520 plaintar)
|
cannam@154
|
1521 # Must skip GNU tar: if it does not support --format= it doesn't create
|
cannam@154
|
1522 # ustar tarball either.
|
cannam@154
|
1523 (tar --version) >/dev/null 2>&1 && continue
|
cannam@154
|
1524 am__tar='tar chf - "$$tardir"'
|
cannam@154
|
1525 am__tar_='tar chf - "$tardir"'
|
cannam@154
|
1526 am__untar='tar xf -'
|
cannam@154
|
1527 ;;
|
cannam@154
|
1528 pax)
|
cannam@154
|
1529 am__tar='pax -L -x $1 -w "$$tardir"'
|
cannam@154
|
1530 am__tar_='pax -L -x $1 -w "$tardir"'
|
cannam@154
|
1531 am__untar='pax -r'
|
cannam@154
|
1532 ;;
|
cannam@154
|
1533 cpio)
|
cannam@154
|
1534 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
cannam@154
|
1535 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
cannam@154
|
1536 am__untar='cpio -i -H $1 -d'
|
cannam@154
|
1537 ;;
|
cannam@154
|
1538 none)
|
cannam@154
|
1539 am__tar=false
|
cannam@154
|
1540 am__tar_=false
|
cannam@154
|
1541 am__untar=false
|
cannam@154
|
1542 ;;
|
cannam@154
|
1543 esac
|
cannam@154
|
1544
|
cannam@154
|
1545 # If the value was cached, stop now. We just wanted to have am__tar
|
cannam@154
|
1546 # and am__untar set.
|
cannam@154
|
1547 test -n "${am_cv_prog_tar_$1}" && break
|
cannam@154
|
1548
|
cannam@154
|
1549 # tar/untar a dummy directory, and stop if the command works.
|
cannam@154
|
1550 rm -rf conftest.dir
|
cannam@154
|
1551 mkdir conftest.dir
|
cannam@154
|
1552 echo GrepMe > conftest.dir/file
|
cannam@154
|
1553 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
cannam@154
|
1554 rm -rf conftest.dir
|
cannam@154
|
1555 if test -s conftest.tar; then
|
cannam@154
|
1556 AM_RUN_LOG([$am__untar <conftest.tar])
|
cannam@154
|
1557 AM_RUN_LOG([cat conftest.dir/file])
|
cannam@154
|
1558 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
cannam@154
|
1559 fi
|
cannam@154
|
1560 done
|
cannam@154
|
1561 rm -rf conftest.dir
|
cannam@154
|
1562
|
cannam@154
|
1563 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
cannam@154
|
1564 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
cannam@154
|
1565
|
cannam@154
|
1566 AC_SUBST([am__tar])
|
cannam@154
|
1567 AC_SUBST([am__untar])
|
cannam@154
|
1568 ]) # _AM_PROG_TAR
|
cannam@154
|
1569
|
cannam@154
|
1570 m4_include([m4/attributes.m4])
|
cannam@154
|
1571 m4_include([m4/libtool.m4])
|
cannam@154
|
1572 m4_include([m4/ltoptions.m4])
|
cannam@154
|
1573 m4_include([m4/ltsugar.m4])
|
cannam@154
|
1574 m4_include([m4/ltversion.m4])
|
cannam@154
|
1575 m4_include([m4/lt~obsolete.m4])
|