Commit | Line | Data |
---|---|---|
d0ac1c44 SM |
1 | # generated automatically by aclocal 1.15.1 -*- Autoconf -*- |
2 | ||
3 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
ef016f83 | 4 | |
ef016f83 MF |
5 | # This file is free software; the Free Software Foundation |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
d0ac1c44 SM |
14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
15 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | |
16 | # serial 11 (pkg-config-0.29.1) | |
17 | ||
18 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | |
19 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> | |
20 | dnl | |
21 | dnl This program is free software; you can redistribute it and/or modify | |
22 | dnl it under the terms of the GNU General Public License as published by | |
23 | dnl the Free Software Foundation; either version 2 of the License, or | |
24 | dnl (at your option) any later version. | |
25 | dnl | |
26 | dnl This program is distributed in the hope that it will be useful, but | |
27 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of | |
28 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
29 | dnl General Public License for more details. | |
30 | dnl | |
31 | dnl You should have received a copy of the GNU General Public License | |
32 | dnl along with this program; if not, write to the Free Software | |
33 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
34 | dnl 02111-1307, USA. | |
35 | dnl | |
36 | dnl As a special exception to the GNU General Public License, if you | |
37 | dnl distribute this file as part of a program that contains a | |
38 | dnl configuration script generated by Autoconf, you may include it under | |
39 | dnl the same distribution terms that you use for the rest of that | |
40 | dnl program. | |
41 | ||
42 | dnl PKG_PREREQ(MIN-VERSION) | |
43 | dnl ----------------------- | |
44 | dnl Since: 0.29 | |
45 | dnl | |
46 | dnl Verify that the version of the pkg-config macros are at least | |
47 | dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's | |
48 | dnl installed version of pkg-config, this checks the developer's version | |
49 | dnl of pkg.m4 when generating configure. | |
50 | dnl | |
51 | dnl To ensure that this macro is defined, also add: | |
52 | dnl m4_ifndef([PKG_PREREQ], | |
53 | dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) | |
54 | dnl | |
55 | dnl See the "Since" comment for each macro you use to see what version | |
56 | dnl of the macros you require. | |
57 | m4_defun([PKG_PREREQ], | |
58 | [m4_define([PKG_MACROS_VERSION], [0.29.1]) | |
59 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | |
60 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | |
61 | ])dnl PKG_PREREQ | |
62 | ||
63 | dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) | |
64 | dnl ---------------------------------- | |
65 | dnl Since: 0.16 | |
66 | dnl | |
67 | dnl Search for the pkg-config tool and set the PKG_CONFIG variable to | |
68 | dnl first found in the path. Checks that the version of pkg-config found | |
69 | dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is | |
70 | dnl used since that's the first version where most current features of | |
71 | dnl pkg-config existed. | |
ef016f83 MF |
72 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
73 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | |
9c082ca8 MF |
74 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
75 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | |
ef016f83 MF |
76 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
77 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | |
78 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | |
79 | ||
80 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
81 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | |
82 | fi | |
83 | if test -n "$PKG_CONFIG"; then | |
84 | _pkg_min_version=m4_default([$1], [0.9.0]) | |
85 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | |
86 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
87 | AC_MSG_RESULT([yes]) | |
88 | else | |
89 | AC_MSG_RESULT([no]) | |
90 | PKG_CONFIG="" | |
91 | fi | |
92 | fi[]dnl | |
d0ac1c44 SM |
93 | ])dnl PKG_PROG_PKG_CONFIG |
94 | ||
95 | dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
96 | dnl ------------------------------------------------------------------- | |
97 | dnl Since: 0.18 | |
98 | dnl | |
99 | dnl Check to see whether a particular set of modules exists. Similar to | |
100 | dnl PKG_CHECK_MODULES(), but does not set variables or print errors. | |
101 | dnl | |
102 | dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
103 | dnl only at the first occurence in configure.ac, so if the first place | |
104 | dnl it's called might be skipped (such as if it is within an "if", you | |
105 | dnl have to call PKG_CHECK_EXISTS manually | |
ef016f83 MF |
106 | AC_DEFUN([PKG_CHECK_EXISTS], |
107 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
108 | if test -n "$PKG_CONFIG" && \ | |
109 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | |
110 | m4_default([$2], [:]) | |
111 | m4_ifvaln([$3], [else | |
112 | $3])dnl | |
113 | fi]) | |
114 | ||
d0ac1c44 SM |
115 | dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
116 | dnl --------------------------------------------- | |
117 | dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting | |
118 | dnl pkg_failed based on the result. | |
ef016f83 MF |
119 | m4_define([_PKG_CONFIG], |
120 | [if test -n "$$1"; then | |
121 | pkg_cv_[]$1="$$1" | |
122 | elif test -n "$PKG_CONFIG"; then | |
123 | PKG_CHECK_EXISTS([$3], | |
9c082ca8 MF |
124 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
125 | test "x$?" != "x0" && pkg_failed=yes ], | |
ef016f83 MF |
126 | [pkg_failed=yes]) |
127 | else | |
128 | pkg_failed=untried | |
129 | fi[]dnl | |
d0ac1c44 | 130 | ])dnl _PKG_CONFIG |
ef016f83 | 131 | |
d0ac1c44 SM |
132 | dnl _PKG_SHORT_ERRORS_SUPPORTED |
133 | dnl --------------------------- | |
134 | dnl Internal check to see if pkg-config supports short errors. | |
ef016f83 MF |
135 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
136 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
137 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
138 | _pkg_short_errors_supported=yes | |
139 | else | |
140 | _pkg_short_errors_supported=no | |
141 | fi[]dnl | |
d0ac1c44 | 142 | ])dnl _PKG_SHORT_ERRORS_SUPPORTED |
ef016f83 MF |
143 | |
144 | ||
d0ac1c44 SM |
145 | dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
146 | dnl [ACTION-IF-NOT-FOUND]) | |
147 | dnl -------------------------------------------------------------- | |
148 | dnl Since: 0.4.0 | |
149 | dnl | |
150 | dnl Note that if there is a possibility the first call to | |
151 | dnl PKG_CHECK_MODULES might not happen, you should be sure to include an | |
152 | dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | |
ef016f83 MF |
153 | AC_DEFUN([PKG_CHECK_MODULES], |
154 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
155 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | |
156 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | |
157 | ||
158 | pkg_failed=no | |
159 | AC_MSG_CHECKING([for $1]) | |
160 | ||
161 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | |
162 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | |
163 | ||
164 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | |
165 | and $1[]_LIBS to avoid the need to call pkg-config. | |
166 | See the pkg-config man page for more details.]) | |
167 | ||
168 | if test $pkg_failed = yes; then | |
169 | AC_MSG_RESULT([no]) | |
170 | _PKG_SHORT_ERRORS_SUPPORTED | |
171 | if test $_pkg_short_errors_supported = yes; then | |
9c082ca8 | 172 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
ef016f83 | 173 | else |
9c082ca8 | 174 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
ef016f83 MF |
175 | fi |
176 | # Put the nasty error message in config.log where it belongs | |
177 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | |
178 | ||
179 | m4_default([$4], [AC_MSG_ERROR( | |
180 | [Package requirements ($2) were not met: | |
181 | ||
182 | $$1_PKG_ERRORS | |
183 | ||
184 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
185 | installed software in a non-standard prefix. | |
186 | ||
187 | _PKG_TEXT])[]dnl | |
188 | ]) | |
189 | elif test $pkg_failed = untried; then | |
190 | AC_MSG_RESULT([no]) | |
191 | m4_default([$4], [AC_MSG_FAILURE( | |
192 | [The pkg-config script could not be found or is too old. Make sure it | |
193 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
194 | path to pkg-config. | |
195 | ||
196 | _PKG_TEXT | |
197 | ||
9c082ca8 | 198 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
ef016f83 MF |
199 | ]) |
200 | else | |
201 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | |
202 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | |
203 | AC_MSG_RESULT([yes]) | |
204 | $3 | |
205 | fi[]dnl | |
d0ac1c44 SM |
206 | ])dnl PKG_CHECK_MODULES |
207 | ||
208 | ||
209 | dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | |
210 | dnl [ACTION-IF-NOT-FOUND]) | |
211 | dnl --------------------------------------------------------------------- | |
212 | dnl Since: 0.29 | |
213 | dnl | |
214 | dnl Checks for existence of MODULES and gathers its build flags with | |
215 | dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags | |
216 | dnl and VARIABLE-PREFIX_LIBS from --libs. | |
217 | dnl | |
218 | dnl Note that if there is a possibility the first call to | |
219 | dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to | |
220 | dnl include an explicit call to PKG_PROG_PKG_CONFIG in your | |
221 | dnl configure.ac. | |
222 | AC_DEFUN([PKG_CHECK_MODULES_STATIC], | |
223 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
224 | _save_PKG_CONFIG=$PKG_CONFIG | |
225 | PKG_CONFIG="$PKG_CONFIG --static" | |
226 | PKG_CHECK_MODULES($@) | |
227 | PKG_CONFIG=$_save_PKG_CONFIG[]dnl | |
228 | ])dnl PKG_CHECK_MODULES_STATIC | |
229 | ||
230 | ||
231 | dnl PKG_INSTALLDIR([DIRECTORY]) | |
232 | dnl ------------------------- | |
233 | dnl Since: 0.27 | |
234 | dnl | |
235 | dnl Substitutes the variable pkgconfigdir as the location where a module | |
236 | dnl should install pkg-config .pc files. By default the directory is | |
237 | dnl $libdir/pkgconfig, but the default can be changed by passing | |
238 | dnl DIRECTORY. The user can override through the --with-pkgconfigdir | |
239 | dnl parameter. | |
1517bd27 MF |
240 | AC_DEFUN([PKG_INSTALLDIR], |
241 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | |
242 | m4_pushdef([pkg_description], | |
243 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | |
244 | AC_ARG_WITH([pkgconfigdir], | |
245 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | |
246 | [with_pkgconfigdir=]pkg_default) | |
247 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | |
248 | m4_popdef([pkg_default]) | |
249 | m4_popdef([pkg_description]) | |
d0ac1c44 SM |
250 | ])dnl PKG_INSTALLDIR |
251 | ||
252 | ||
253 | dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) | |
254 | dnl -------------------------------- | |
255 | dnl Since: 0.27 | |
256 | dnl | |
257 | dnl Substitutes the variable noarch_pkgconfigdir as the location where a | |
258 | dnl module should install arch-independent pkg-config .pc files. By | |
259 | dnl default the directory is $datadir/pkgconfig, but the default can be | |
260 | dnl changed by passing DIRECTORY. The user can override through the | |
261 | dnl --with-noarch-pkgconfigdir parameter. | |
1517bd27 MF |
262 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], |
263 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | |
264 | m4_pushdef([pkg_description], | |
265 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | |
266 | AC_ARG_WITH([noarch-pkgconfigdir], | |
267 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | |
268 | [with_noarch_pkgconfigdir=]pkg_default) | |
269 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | |
270 | m4_popdef([pkg_default]) | |
271 | m4_popdef([pkg_description]) | |
d0ac1c44 | 272 | ])dnl PKG_NOARCH_INSTALLDIR |
1517bd27 MF |
273 | |
274 | ||
d0ac1c44 SM |
275 | dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, |
276 | dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
277 | dnl ------------------------------------------- | |
278 | dnl Since: 0.28 | |
279 | dnl | |
280 | dnl Retrieves the value of the pkg-config variable for the given module. | |
1517bd27 MF |
281 | AC_DEFUN([PKG_CHECK_VAR], |
282 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
283 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | |
284 | ||
285 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | |
286 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | |
287 | ||
288 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | |
d0ac1c44 SM |
289 | ])dnl PKG_CHECK_VAR |
290 | ||
291 | dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
292 | dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], | |
293 | dnl [DESCRIPTION], [DEFAULT]) | |
294 | dnl ------------------------------------------ | |
295 | dnl | |
296 | dnl Prepare a "--with-" configure option using the lowercase | |
297 | dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and | |
298 | dnl PKG_CHECK_MODULES in a single macro. | |
299 | AC_DEFUN([PKG_WITH_MODULES], | |
300 | [ | |
301 | m4_pushdef([with_arg], m4_tolower([$1])) | |
302 | ||
303 | m4_pushdef([description], | |
304 | [m4_default([$5], [build with ]with_arg[ support])]) | |
305 | ||
306 | m4_pushdef([def_arg], [m4_default([$6], [auto])]) | |
307 | m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) | |
308 | m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) | |
309 | ||
310 | m4_case(def_arg, | |
311 | [yes],[m4_pushdef([with_without], [--without-]with_arg)], | |
312 | [m4_pushdef([with_without],[--with-]with_arg)]) | |
313 | ||
314 | AC_ARG_WITH(with_arg, | |
315 | AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, | |
316 | [AS_TR_SH([with_]with_arg)=def_arg]) | |
317 | ||
318 | AS_CASE([$AS_TR_SH([with_]with_arg)], | |
319 | [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], | |
320 | [auto],[PKG_CHECK_MODULES([$1],[$2], | |
321 | [m4_n([def_action_if_found]) $3], | |
322 | [m4_n([def_action_if_not_found]) $4])]) | |
323 | ||
324 | m4_popdef([with_arg]) | |
325 | m4_popdef([description]) | |
326 | m4_popdef([def_arg]) | |
327 | ||
328 | ])dnl PKG_WITH_MODULES | |
329 | ||
330 | dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
331 | dnl [DESCRIPTION], [DEFAULT]) | |
332 | dnl ----------------------------------------------- | |
333 | dnl | |
334 | dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES | |
335 | dnl check._[VARIABLE-PREFIX] is exported as make variable. | |
336 | AC_DEFUN([PKG_HAVE_WITH_MODULES], | |
337 | [ | |
338 | PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) | |
339 | ||
340 | AM_CONDITIONAL([HAVE_][$1], | |
341 | [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) | |
342 | ])dnl PKG_HAVE_WITH_MODULES | |
343 | ||
344 | dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
345 | dnl [DESCRIPTION], [DEFAULT]) | |
346 | dnl ------------------------------------------------------ | |
347 | dnl | |
348 | dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after | |
349 | dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make | |
350 | dnl and preprocessor variable. | |
351 | AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], | |
352 | [ | |
353 | PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) | |
354 | ||
355 | AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], | |
356 | [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) | |
357 | ])dnl PKG_HAVE_DEFINE_WITH_MODULES | |
1517bd27 | 358 | |
db2e4d67 MF |
359 | # AM_CONDITIONAL -*- Autoconf -*- |
360 | ||
d0ac1c44 | 361 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. |
db2e4d67 MF |
362 | # |
363 | # This file is free software; the Free Software Foundation | |
364 | # gives unlimited permission to copy and/or distribute it, | |
365 | # with or without modifications, as long as this notice is preserved. | |
366 | ||
db2e4d67 MF |
367 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
368 | # ------------------------------------- | |
369 | # Define a conditional. | |
370 | AC_DEFUN([AM_CONDITIONAL], | |
d0ac1c44 SM |
371 | [AC_PREREQ([2.52])dnl |
372 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
373 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
db2e4d67 MF |
374 | AC_SUBST([$1_TRUE])dnl |
375 | AC_SUBST([$1_FALSE])dnl | |
376 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
377 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
378 | m4_define([_AM_COND_VALUE_$1], [$2])dnl | |
379 | if $2; then | |
380 | $1_TRUE= | |
381 | $1_FALSE='#' | |
382 | else | |
383 | $1_TRUE='#' | |
384 | $1_FALSE= | |
385 | fi | |
386 | AC_CONFIG_COMMANDS_PRE( | |
387 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
388 | AC_MSG_ERROR([[conditional "$1" was never defined. | |
389 | Usually this means the macro was only invoked conditionally.]]) | |
390 | fi])]) | |
391 | ||
d0ac1c44 | 392 | # Copyright (C) 2003-2017 Free Software Foundation, Inc. |
db2e4d67 MF |
393 | # |
394 | # This file is free software; the Free Software Foundation | |
395 | # gives unlimited permission to copy and/or distribute it, | |
396 | # with or without modifications, as long as this notice is preserved. | |
397 | ||
db2e4d67 MF |
398 | # Check whether the underlying file-system supports filenames |
399 | # with a leading dot. For instance MS-DOS doesn't. | |
400 | AC_DEFUN([AM_SET_LEADING_DOT], | |
401 | [rm -rf .tst 2>/dev/null | |
402 | mkdir .tst 2>/dev/null | |
403 | if test -d .tst; then | |
404 | am__leading_dot=. | |
405 | else | |
406 | am__leading_dot=_ | |
407 | fi | |
408 | rmdir .tst 2>/dev/null | |
409 | AC_SUBST([am__leading_dot])]) | |
410 | ||
31e6ad7d MF |
411 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
412 | # From Jim Meyering | |
413 | ||
d0ac1c44 | 414 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. |
31e6ad7d MF |
415 | # |
416 | # This file is free software; the Free Software Foundation | |
417 | # gives unlimited permission to copy and/or distribute it, | |
418 | # with or without modifications, as long as this notice is preserved. | |
419 | ||
31e6ad7d MF |
420 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) |
421 | # ---------------------------------- | |
422 | # Control maintainer-specific portions of Makefiles. | |
d0ac1c44 SM |
423 | # Default is to disable them, unless 'enable' is passed literally. |
424 | # For symmetry, 'disable' may be passed as well. Anyway, the user | |
31e6ad7d MF |
425 | # can override the default with the --enable/--disable switch. |
426 | AC_DEFUN([AM_MAINTAINER_MODE], | |
427 | [m4_case(m4_default([$1], [disable]), | |
428 | [enable], [m4_define([am_maintainer_other], [disable])], | |
429 | [disable], [m4_define([am_maintainer_other], [enable])], | |
430 | [m4_define([am_maintainer_other], [enable]) | |
431 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) | |
d0ac1c44 | 432 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
31e6ad7d MF |
433 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed |
434 | AC_ARG_ENABLE([maintainer-mode], | |
d0ac1c44 SM |
435 | [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], |
436 | am_maintainer_other[ make rules and dependencies not useful | |
437 | (and sometimes confusing) to the casual installer])], | |
438 | [USE_MAINTAINER_MODE=$enableval], | |
439 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) | |
31e6ad7d MF |
440 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
441 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) | |
442 | MAINT=$MAINTAINER_MODE_TRUE | |
443 | AC_SUBST([MAINT])dnl | |
444 | ] | |
445 | ) | |
446 | ||
d0ac1c44 | 447 | # Copyright (C) 2006-2017 Free Software Foundation, Inc. |
db2e4d67 MF |
448 | # |
449 | # This file is free software; the Free Software Foundation | |
450 | # gives unlimited permission to copy and/or distribute it, | |
451 | # with or without modifications, as long as this notice is preserved. | |
452 | ||
db2e4d67 MF |
453 | # _AM_SUBST_NOTMAKE(VARIABLE) |
454 | # --------------------------- | |
455 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | |
456 | # This macro is traced by Automake. | |
457 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
458 | ||
459 | # AM_SUBST_NOTMAKE(VARIABLE) | |
d0ac1c44 | 460 | # -------------------------- |
db2e4d67 MF |
461 | # Public sister of _AM_SUBST_NOTMAKE. |
462 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
463 |