blob: 040cdfa35c1ee0aca9e1e54cff412e5fed8bf695
1 | # generated automatically by aclocal 1.11.1 -*- Autoconf -*- |
2 | |
3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
4 | # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
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 | |
14 | m4_ifndef([AC_AUTOCONF_VERSION], |
15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, |
17 | [m4_warning([this file was generated for autoconf 2.67. |
18 | You have another version of autoconf. It may work, but is not guaranteed to. |
19 | If you have problems, you may need to regenerate the build system entirely. |
20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
21 | |
22 | dnl Autoconf macros for libgcrypt |
23 | dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. |
24 | dnl |
25 | dnl This file is free software; as a special exception the author gives |
26 | dnl unlimited permission to copy and/or distribute it, with or without |
27 | dnl modifications, as long as this notice is preserved. |
28 | dnl |
29 | dnl This file is distributed in the hope that it will be useful, but |
30 | dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the |
31 | dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
32 | |
33 | |
34 | dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, |
35 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
36 | dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. |
37 | dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed |
38 | dnl with the API version to also check the API compatibility. Example: |
39 | dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed |
40 | dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using |
41 | dnl this features allows to prevent build against newer versions of libgcrypt |
42 | dnl with a changed API. |
43 | dnl |
44 | AC_DEFUN([AM_PATH_LIBGCRYPT], |
45 | [ AC_ARG_WITH(libgcrypt-prefix, |
46 | AC_HELP_STRING([--with-libgcrypt-prefix=PFX], |
47 | [prefix where LIBGCRYPT is installed (optional)]), |
48 | libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") |
49 | if test x$libgcrypt_config_prefix != x ; then |
50 | if test x${LIBGCRYPT_CONFIG+set} != xset ; then |
51 | LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config |
52 | fi |
53 | fi |
54 | |
55 | AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) |
56 | tmp=ifelse([$1], ,1:1.2.0,$1) |
57 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
58 | req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
59 | min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
60 | else |
61 | req_libgcrypt_api=0 |
62 | min_libgcrypt_version="$tmp" |
63 | fi |
64 | |
65 | AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version) |
66 | ok=no |
67 | if test "$LIBGCRYPT_CONFIG" != "no" ; then |
68 | req_major=`echo $min_libgcrypt_version | \ |
69 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
70 | req_minor=`echo $min_libgcrypt_version | \ |
71 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
72 | req_micro=`echo $min_libgcrypt_version | \ |
73 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
74 | libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` |
75 | major=`echo $libgcrypt_config_version | \ |
76 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
77 | minor=`echo $libgcrypt_config_version | \ |
78 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
79 | micro=`echo $libgcrypt_config_version | \ |
80 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` |
81 | if test "$major" -gt "$req_major"; then |
82 | ok=yes |
83 | else |
84 | if test "$major" -eq "$req_major"; then |
85 | if test "$minor" -gt "$req_minor"; then |
86 | ok=yes |
87 | else |
88 | if test "$minor" -eq "$req_minor"; then |
89 | if test "$micro" -ge "$req_micro"; then |
90 | ok=yes |
91 | fi |
92 | fi |
93 | fi |
94 | fi |
95 | fi |
96 | fi |
97 | if test $ok = yes; then |
98 | AC_MSG_RESULT([yes ($libgcrypt_config_version)]) |
99 | else |
100 | AC_MSG_RESULT(no) |
101 | fi |
102 | if test $ok = yes; then |
103 | # If we have a recent libgcrypt, we should also check that the |
104 | # API is compatible |
105 | if test "$req_libgcrypt_api" -gt 0 ; then |
106 | tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` |
107 | if test "$tmp" -gt 0 ; then |
108 | AC_MSG_CHECKING([LIBGCRYPT API version]) |
109 | if test "$req_libgcrypt_api" -eq "$tmp" ; then |
110 | AC_MSG_RESULT([okay]) |
111 | else |
112 | ok=no |
113 | AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp]) |
114 | fi |
115 | fi |
116 | fi |
117 | fi |
118 | if test $ok = yes; then |
119 | LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` |
120 | LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` |
121 | ifelse([$2], , :, [$2]) |
122 | else |
123 | LIBGCRYPT_CFLAGS="" |
124 | LIBGCRYPT_LIBS="" |
125 | ifelse([$3], , :, [$3]) |
126 | fi |
127 | AC_SUBST(LIBGCRYPT_CFLAGS) |
128 | AC_SUBST(LIBGCRYPT_LIBS) |
129 | ]) |
130 | |
131 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
132 | # serial 1 (pkg-config-0.24) |
133 | # |
134 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
135 | # |
136 | # This program is free software; you can redistribute it and/or modify |
137 | # it under the terms of the GNU General Public License as published by |
138 | # the Free Software Foundation; either version 2 of the License, or |
139 | # (at your option) any later version. |
140 | # |
141 | # This program is distributed in the hope that it will be useful, but |
142 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
143 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
144 | # General Public License for more details. |
145 | # |
146 | # You should have received a copy of the GNU General Public License |
147 | # along with this program; if not, write to the Free Software |
148 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
149 | # |
150 | # As a special exception to the GNU General Public License, if you |
151 | # distribute this file as part of a program that contains a |
152 | # configuration script generated by Autoconf, you may include it under |
153 | # the same distribution terms that you use for the rest of that program. |
154 | |
155 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
156 | # ---------------------------------- |
157 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
158 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
159 | m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
160 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
161 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
162 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
163 | |
164 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
165 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
166 | fi |
167 | if test -n "$PKG_CONFIG"; then |
168 | _pkg_min_version=m4_default([$1], [0.9.0]) |
169 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
170 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
171 | AC_MSG_RESULT([yes]) |
172 | else |
173 | AC_MSG_RESULT([no]) |
174 | PKG_CONFIG="" |
175 | fi |
176 | fi[]dnl |
177 | ])# PKG_PROG_PKG_CONFIG |
178 | |
179 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
180 | # |
181 | # Check to see whether a particular set of modules exists. Similar |
182 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
183 | # |
184 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
185 | # only at the first occurence in configure.ac, so if the first place |
186 | # it's called might be skipped (such as if it is within an "if", you |
187 | # have to call PKG_CHECK_EXISTS manually |
188 | # -------------------------------------------------------------- |
189 | AC_DEFUN([PKG_CHECK_EXISTS], |
190 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
191 | if test -n "$PKG_CONFIG" && \ |
192 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
193 | m4_default([$2], [:]) |
194 | m4_ifvaln([$3], [else |
195 | $3])dnl |
196 | fi]) |
197 | |
198 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
199 | # --------------------------------------------- |
200 | m4_define([_PKG_CONFIG], |
201 | [if test -n "$$1"; then |
202 | pkg_cv_[]$1="$$1" |
203 | elif test -n "$PKG_CONFIG"; then |
204 | PKG_CHECK_EXISTS([$3], |
205 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
206 | [pkg_failed=yes]) |
207 | else |
208 | pkg_failed=untried |
209 | fi[]dnl |
210 | ])# _PKG_CONFIG |
211 | |
212 | # _PKG_SHORT_ERRORS_SUPPORTED |
213 | # ----------------------------- |
214 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
215 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
216 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
217 | _pkg_short_errors_supported=yes |
218 | else |
219 | _pkg_short_errors_supported=no |
220 | fi[]dnl |
221 | ])# _PKG_SHORT_ERRORS_SUPPORTED |
222 | |
223 | |
224 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
225 | # [ACTION-IF-NOT-FOUND]) |
226 | # |
227 | # |
228 | # Note that if there is a possibility the first call to |
229 | # PKG_CHECK_MODULES might not happen, you should be sure to include an |
230 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
231 | # |
232 | # |
233 | # -------------------------------------------------------------- |
234 | AC_DEFUN([PKG_CHECK_MODULES], |
235 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
236 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
237 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
238 | |
239 | pkg_failed=no |
240 | AC_MSG_CHECKING([for $1]) |
241 | |
242 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
243 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
244 | |
245 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
246 | and $1[]_LIBS to avoid the need to call pkg-config. |
247 | See the pkg-config man page for more details.]) |
248 | |
249 | if test $pkg_failed = yes; then |
250 | AC_MSG_RESULT([no]) |
251 | _PKG_SHORT_ERRORS_SUPPORTED |
252 | if test $_pkg_short_errors_supported = yes; then |
253 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` |
254 | else |
255 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` |
256 | fi |
257 | # Put the nasty error message in config.log where it belongs |
258 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
259 | |
260 | m4_default([$4], [AC_MSG_ERROR( |
261 | [Package requirements ($2) were not met: |
262 | |
263 | $$1_PKG_ERRORS |
264 | |
265 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
266 | installed software in a non-standard prefix. |
267 | |
268 | _PKG_TEXT])[]dnl |
269 | ]) |
270 | elif test $pkg_failed = untried; then |
271 | AC_MSG_RESULT([no]) |
272 | m4_default([$4], [AC_MSG_FAILURE( |
273 | [The pkg-config script could not be found or is too old. Make sure it |
274 | is in your PATH or set the PKG_CONFIG environment variable to the full |
275 | path to pkg-config. |
276 | |
277 | _PKG_TEXT |
278 | |
279 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
280 | ]) |
281 | else |
282 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
283 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
284 | AC_MSG_RESULT([yes]) |
285 | $3 |
286 | fi[]dnl |
287 | ])# PKG_CHECK_MODULES |
288 | |
289 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
290 | # |
291 | # This file is free software; the Free Software Foundation |
292 | # gives unlimited permission to copy and/or distribute it, |
293 | # with or without modifications, as long as this notice is preserved. |
294 | |
295 | # AM_AUTOMAKE_VERSION(VERSION) |
296 | # ---------------------------- |
297 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
298 | # generated from the m4 files accompanying Automake X.Y. |
299 | # (This private macro should not be called outside this file.) |
300 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
301 | [am__api_version='1.11' |
302 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
303 | dnl require some minimum version. Point them to the right macro. |
304 | m4_if([$1], [1.11.1], [], |
305 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
306 | ]) |
307 | |
308 | # _AM_AUTOCONF_VERSION(VERSION) |
309 | # ----------------------------- |
310 | # aclocal traces this macro to find the Autoconf version. |
311 | # This is a private macro too. Using m4_define simplifies |
312 | # the logic in aclocal, which can simply ignore this definition. |
313 | m4_define([_AM_AUTOCONF_VERSION], []) |
314 | |
315 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
316 | # ------------------------------- |
317 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
318 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
319 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
320 | [AM_AUTOMAKE_VERSION([1.11.1])dnl |
321 | m4_ifndef([AC_AUTOCONF_VERSION], |
322 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
323 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
324 | |
325 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
326 | |
327 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
328 | # |
329 | # This file is free software; the Free Software Foundation |
330 | # gives unlimited permission to copy and/or distribute it, |
331 | # with or without modifications, as long as this notice is preserved. |
332 | |
333 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
334 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
335 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
336 | # |
337 | # Of course, Automake must honor this variable whenever it calls a |
338 | # tool from the auxiliary directory. The problem is that $srcdir (and |
339 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
340 | # depending on how configure is run. This is pretty annoying, since |
341 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
342 | # source directory, any form will work fine, but in subdirectories a |
343 | # relative path needs to be adjusted first. |
344 | # |
345 | # $ac_aux_dir/missing |
346 | # fails when called from a subdirectory if $ac_aux_dir is relative |
347 | # $top_srcdir/$ac_aux_dir/missing |
348 | # fails if $ac_aux_dir is absolute, |
349 | # fails when called from a subdirectory in a VPATH build with |
350 | # a relative $ac_aux_dir |
351 | # |
352 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
353 | # are both prefixed by $srcdir. In an in-source build this is usually |
354 | # harmless because $srcdir is `.', but things will broke when you |
355 | # start a VPATH build or use an absolute $srcdir. |
356 | # |
357 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
358 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
359 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
360 | # and then we would define $MISSING as |
361 | # MISSING="\${SHELL} $am_aux_dir/missing" |
362 | # This will work as long as MISSING is not called from configure, because |
363 | # unfortunately $(top_srcdir) has no meaning in configure. |
364 | # However there are other variables, like CC, which are often used in |
365 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
366 | # |
367 | # Another solution, used here, is to always expand $ac_aux_dir to an |
368 | # absolute PATH. The drawback is that using absolute paths prevent a |
369 | # configured tree to be moved without reconfiguration. |
370 | |
371 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
372 | [dnl Rely on autoconf to set up CDPATH properly. |
373 | AC_PREREQ([2.50])dnl |
374 | # expand $ac_aux_dir to an absolute path |
375 | am_aux_dir=`cd $ac_aux_dir && pwd` |
376 | ]) |
377 | |
378 | # AM_CONDITIONAL -*- Autoconf -*- |
379 | |
380 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 |
381 | # Free Software Foundation, Inc. |
382 | # |
383 | # This file is free software; the Free Software Foundation |
384 | # gives unlimited permission to copy and/or distribute it, |
385 | # with or without modifications, as long as this notice is preserved. |
386 | |
387 | # serial 9 |
388 | |
389 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
390 | # ------------------------------------- |
391 | # Define a conditional. |
392 | AC_DEFUN([AM_CONDITIONAL], |
393 | [AC_PREREQ(2.52)dnl |
394 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
395 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
396 | AC_SUBST([$1_TRUE])dnl |
397 | AC_SUBST([$1_FALSE])dnl |
398 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl |
399 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl |
400 | m4_define([_AM_COND_VALUE_$1], [$2])dnl |
401 | if $2; then |
402 | $1_TRUE= |
403 | $1_FALSE='#' |
404 | else |
405 | $1_TRUE='#' |
406 | $1_FALSE= |
407 | fi |
408 | AC_CONFIG_COMMANDS_PRE( |
409 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
410 | AC_MSG_ERROR([[conditional "$1" was never defined. |
411 | Usually this means the macro was only invoked conditionally.]]) |
412 | fi])]) |
413 | |
414 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 |
415 | # Free Software Foundation, Inc. |
416 | # |
417 | # This file is free software; the Free Software Foundation |
418 | # gives unlimited permission to copy and/or distribute it, |
419 | # with or without modifications, as long as this notice is preserved. |
420 | |
421 | # serial 10 |
422 | |
423 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
424 | # written in clear, in which case automake, when reading aclocal.m4, |
425 | # will think it sees a *use*, and therefore will trigger all it's |
426 | # C support machinery. Also note that it means that autoscan, seeing |
427 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
428 | |
429 | |
430 | # _AM_DEPENDENCIES(NAME) |
431 | # ---------------------- |
432 | # See how the compiler implements dependency checking. |
433 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
434 | # We try a few techniques and use that to set a single cache variable. |
435 | # |
436 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
437 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
438 | # dependency, and given that the user is not expected to run this macro, |
439 | # just rely on AC_PROG_CC. |
440 | AC_DEFUN([_AM_DEPENDENCIES], |
441 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
442 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
443 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
444 | AC_REQUIRE([AM_DEP_TRACK])dnl |
445 | |
446 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
447 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
448 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
449 | [$1], UPC, [depcc="$UPC" am_compiler_list=], |
450 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
451 | [depcc="$$1" am_compiler_list=]) |
452 | |
453 | AC_CACHE_CHECK([dependency style of $depcc], |
454 | [am_cv_$1_dependencies_compiler_type], |
455 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
456 | # We make a subdir and do the tests there. Otherwise we can end up |
457 | # making bogus files that we don't know about and never remove. For |
458 | # instance it was reported that on HP-UX the gcc test will end up |
459 | # making a dummy file named `D' -- because `-MD' means `put the output |
460 | # in D'. |
461 | mkdir conftest.dir |
462 | # Copy depcomp to subdir because otherwise we won't find it if we're |
463 | # using a relative directory. |
464 | cp "$am_depcomp" conftest.dir |
465 | cd conftest.dir |
466 | # We will build objects and dependencies in a subdirectory because |
467 | # it helps to detect inapplicable dependency modes. For instance |
468 | # both Tru64's cc and ICC support -MD to output dependencies as a |
469 | # side effect of compilation, but ICC will put the dependencies in |
470 | # the current directory while Tru64 will put them in the object |
471 | # directory. |
472 | mkdir sub |
473 | |
474 | am_cv_$1_dependencies_compiler_type=none |
475 | if test "$am_compiler_list" = ""; then |
476 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
477 | fi |
478 | am__universal=false |
479 | m4_case([$1], [CC], |
480 | [case " $depcc " in #( |
481 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
482 | esac], |
483 | [CXX], |
484 | [case " $depcc " in #( |
485 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
486 | esac]) |
487 | |
488 | for depmode in $am_compiler_list; do |
489 | # Setup a source with many dependencies, because some compilers |
490 | # like to wrap large dependency lists on column 80 (with \), and |
491 | # we should not choose a depcomp mode which is confused by this. |
492 | # |
493 | # We need to recreate these files for each test, as the compiler may |
494 | # overwrite some of them when testing with obscure command lines. |
495 | # This happens at least with the AIX C compiler. |
496 | : > sub/conftest.c |
497 | for i in 1 2 3 4 5 6; do |
498 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
499 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
500 | # Solaris 8's {/usr,}/bin/sh. |
501 | touch sub/conftst$i.h |
502 | done |
503 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
504 | |
505 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
506 | # mode. It turns out that the SunPro C++ compiler does not properly |
507 | # handle `-M -o', and we need to detect this. Also, some Intel |
508 | # versions had trouble with output in subdirs |
509 | am__obj=sub/conftest.${OBJEXT-o} |
510 | am__minus_obj="-o $am__obj" |
511 | case $depmode in |
512 | gcc) |
513 | # This depmode causes a compiler race in universal mode. |
514 | test "$am__universal" = false || continue |
515 | ;; |
516 | nosideeffect) |
517 | # after this tag, mechanisms are not by side-effect, so they'll |
518 | # only be used when explicitly requested |
519 | if test "x$enable_dependency_tracking" = xyes; then |
520 | continue |
521 | else |
522 | break |
523 | fi |
524 | ;; |
525 | msvisualcpp | msvcmsys) |
526 | # This compiler won't grok `-c -o', but also, the minuso test has |
527 | # not run yet. These depmodes are late enough in the game, and |
528 | # so weak that their functioning should not be impacted. |
529 | am__obj=conftest.${OBJEXT-o} |
530 | am__minus_obj= |
531 | ;; |
532 | none) break ;; |
533 | esac |
534 | if depmode=$depmode \ |
535 | source=sub/conftest.c object=$am__obj \ |
536 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
537 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
538 | >/dev/null 2>conftest.err && |
539 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
540 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
541 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
542 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
543 | # icc doesn't choke on unknown options, it will just issue warnings |
544 | # or remarks (even with -Werror). So we grep stderr for any message |
545 | # that says an option was ignored or not supported. |
546 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
547 | # icc: Command line warning: ignoring option '-M'; no argument required |
548 | # The diagnosis changed in icc 8.0: |
549 | # icc: Command line remark: option '-MP' not supported |
550 | if (grep 'ignoring option' conftest.err || |
551 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
552 | am_cv_$1_dependencies_compiler_type=$depmode |
553 | break |
554 | fi |
555 | fi |
556 | done |
557 | |
558 | cd .. |
559 | rm -rf conftest.dir |
560 | else |
561 | am_cv_$1_dependencies_compiler_type=none |
562 | fi |
563 | ]) |
564 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
565 | AM_CONDITIONAL([am__fastdep$1], [ |
566 | test "x$enable_dependency_tracking" != xno \ |
567 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
568 | ]) |
569 | |
570 | |
571 | # AM_SET_DEPDIR |
572 | # ------------- |
573 | # Choose a directory name for dependency files. |
574 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
575 | AC_DEFUN([AM_SET_DEPDIR], |
576 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
577 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
578 | ]) |
579 | |
580 | |
581 | # AM_DEP_TRACK |
582 | # ------------ |
583 | AC_DEFUN([AM_DEP_TRACK], |
584 | [AC_ARG_ENABLE(dependency-tracking, |
585 | [ --disable-dependency-tracking speeds up one-time build |
586 | --enable-dependency-tracking do not reject slow dependency extractors]) |
587 | if test "x$enable_dependency_tracking" != xno; then |
588 | am_depcomp="$ac_aux_dir/depcomp" |
589 | AMDEPBACKSLASH='\' |
590 | fi |
591 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
592 | AC_SUBST([AMDEPBACKSLASH])dnl |
593 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
594 | ]) |
595 | |
596 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
597 | |
598 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
599 | # Free Software Foundation, Inc. |
600 | # |
601 | # This file is free software; the Free Software Foundation |
602 | # gives unlimited permission to copy and/or distribute it, |
603 | # with or without modifications, as long as this notice is preserved. |
604 | |
605 | #serial 5 |
606 | |
607 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
608 | # ------------------------------ |
609 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
610 | [{ |
611 | # Autoconf 2.62 quotes --file arguments for eval, but not when files |
612 | # are listed without --file. Let's play safe and only enable the eval |
613 | # if we detect the quoting. |
614 | case $CONFIG_FILES in |
615 | *\'*) eval set x "$CONFIG_FILES" ;; |
616 | *) set x $CONFIG_FILES ;; |
617 | esac |
618 | shift |
619 | for mf |
620 | do |
621 | # Strip MF so we end up with the name of the file. |
622 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
623 | # Check whether this is an Automake generated Makefile or not. |
624 | # We used to match only the files named `Makefile.in', but |
625 | # some people rename them; so instead we look at the file content. |
626 | # Grep'ing the first line is not enough: some people post-process |
627 | # each Makefile.in and add a new line on top of each file to say so. |
628 | # Grep'ing the whole file is not good either: AIX grep has a line |
629 | # limit of 2048, but all sed's we know have understand at least 4000. |
630 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then |
631 | dirpart=`AS_DIRNAME("$mf")` |
632 | else |
633 | continue |
634 | fi |
635 | # Extract the definition of DEPDIR, am__include, and am__quote |
636 | # from the Makefile without running `make'. |
637 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
638 | test -z "$DEPDIR" && continue |
639 | am__include=`sed -n 's/^am__include = //p' < "$mf"` |
640 | test -z "am__include" && continue |
641 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
642 | # When using ansi2knr, U may be empty or an underscore; expand it |
643 | U=`sed -n 's/^U = //p' < "$mf"` |
644 | # Find all dependency output files, they are included files with |
645 | # $(DEPDIR) in their names. We invoke sed twice because it is the |
646 | # simplest approach to changing $(DEPDIR) to its actual value in the |
647 | # expansion. |
648 | for file in `sed -n " |
649 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ |
650 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
651 | # Make sure the directory exists. |
652 | test -f "$dirpart/$file" && continue |
653 | fdir=`AS_DIRNAME(["$file"])` |
654 | AS_MKDIR_P([$dirpart/$fdir]) |
655 | # echo "creating $dirpart/$file" |
656 | echo '# dummy' > "$dirpart/$file" |
657 | done |
658 | done |
659 | } |
660 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
661 | |
662 | |
663 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
664 | # ----------------------------- |
665 | # This macro should only be invoked once -- use via AC_REQUIRE. |
666 | # |
667 | # This code is only required when automatic dependency tracking |
668 | # is enabled. FIXME. This creates each `.P' file that we will |
669 | # need in order to bootstrap the dependency handling code. |
670 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
671 | [AC_CONFIG_COMMANDS([depfiles], |
672 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
673 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
674 | ]) |
675 | |
676 | # Do all the work for Automake. -*- Autoconf -*- |
677 | |
678 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
679 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. |
680 | # |
681 | # This file is free software; the Free Software Foundation |
682 | # gives unlimited permission to copy and/or distribute it, |
683 | # with or without modifications, as long as this notice is preserved. |
684 | |
685 | # serial 16 |
686 | |
687 | # This macro actually does too much. Some checks are only needed if |
688 | # your package does certain things. But this isn't really a big deal. |
689 | |
690 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
691 | # AM_INIT_AUTOMAKE([OPTIONS]) |
692 | # ----------------------------------------------- |
693 | # The call with PACKAGE and VERSION arguments is the old style |
694 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
695 | # and VERSION should now be passed to AC_INIT and removed from |
696 | # the call to AM_INIT_AUTOMAKE. |
697 | # We support both call styles for the transition. After |
698 | # the next Automake release, Autoconf can make the AC_INIT |
699 | # arguments mandatory, and then we can depend on a new Autoconf |
700 | # release and drop the old call support. |
701 | AC_DEFUN([AM_INIT_AUTOMAKE], |
702 | [AC_PREREQ([2.62])dnl |
703 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
704 | dnl the ones we care about. |
705 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
706 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
707 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
708 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
709 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
710 | # is not polluted with repeated "-I." |
711 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
712 | # test to see if srcdir already configured |
713 | if test -f $srcdir/config.status; then |
714 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
715 | fi |
716 | fi |
717 | |
718 | # test whether we have cygpath |
719 | if test -z "$CYGPATH_W"; then |
720 | if (cygpath --version) >/dev/null 2>/dev/null; then |
721 | CYGPATH_W='cygpath -w' |
722 | else |
723 | CYGPATH_W=echo |
724 | fi |
725 | fi |
726 | AC_SUBST([CYGPATH_W]) |
727 | |
728 | # Define the identity of the package. |
729 | dnl Distinguish between old-style and new-style calls. |
730 | m4_ifval([$2], |
731 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
732 | AC_SUBST([PACKAGE], [$1])dnl |
733 | AC_SUBST([VERSION], [$2])], |
734 | [_AM_SET_OPTIONS([$1])dnl |
735 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
736 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, |
737 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
738 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
739 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
740 | |
741 | _AM_IF_OPTION([no-define],, |
742 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
743 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
744 | |
745 | # Some tools Automake needs. |
746 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
747 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
748 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
749 | AM_MISSING_PROG(AUTOCONF, autoconf) |
750 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
751 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
752 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
753 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
754 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
755 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
756 | # We need awk for the "check" target. The system "awk" is bad on |
757 | # some platforms. |
758 | AC_REQUIRE([AC_PROG_AWK])dnl |
759 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
760 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
761 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
762 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
763 | [_AM_PROG_TAR([v7])])]) |
764 | _AM_IF_OPTION([no-dependencies],, |
765 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
766 | [_AM_DEPENDENCIES(CC)], |
767 | [define([AC_PROG_CC], |
768 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
769 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
770 | [_AM_DEPENDENCIES(CXX)], |
771 | [define([AC_PROG_CXX], |
772 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
773 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
774 | [_AM_DEPENDENCIES(OBJC)], |
775 | [define([AC_PROG_OBJC], |
776 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl |
777 | ]) |
778 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl |
779 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the |
780 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro |
781 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. |
782 | AC_CONFIG_COMMANDS_PRE(dnl |
783 | [m4_provide_if([_AM_COMPILER_EXEEXT], |
784 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
785 | ]) |
786 | |
787 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
788 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
789 | dnl mangled by Autoconf and run in a shell conditional statement. |
790 | m4_define([_AC_COMPILER_EXEEXT], |
791 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
792 | |
793 | |
794 | # When config.status generates a header, we must update the stamp-h file. |
795 | # This file resides in the same directory as the config header |
796 | # that is generated. The stamp files are numbered to have different names. |
797 | |
798 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
799 | # loop where config.status creates the headers, so we can generate |
800 | # our stamp files there. |
801 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
802 | [# Compute $1's index in $config_headers. |
803 | _am_arg=$1 |
804 | _am_stamp_count=1 |
805 | for _am_header in $config_headers :; do |
806 | case $_am_header in |
807 | $_am_arg | $_am_arg:* ) |
808 | break ;; |
809 | * ) |
810 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
811 | esac |
812 | done |
813 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
814 | |
815 | # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. |
816 | # |
817 | # This file is free software; the Free Software Foundation |
818 | # gives unlimited permission to copy and/or distribute it, |
819 | # with or without modifications, as long as this notice is preserved. |
820 | |
821 | # AM_PROG_INSTALL_SH |
822 | # ------------------ |
823 | # Define $install_sh. |
824 | AC_DEFUN([AM_PROG_INSTALL_SH], |
825 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
826 | if test x"${install_sh}" != xset; then |
827 | case $am_aux_dir in |
828 | *\ * | *\ *) |
829 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
830 | *) |
831 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
832 | esac |
833 | fi |
834 | AC_SUBST(install_sh)]) |
835 | |
836 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
837 | # |
838 | # This file is free software; the Free Software Foundation |
839 | # gives unlimited permission to copy and/or distribute it, |
840 | # with or without modifications, as long as this notice is preserved. |
841 | |
842 | # serial 2 |
843 | |
844 | # Check whether the underlying file-system supports filenames |
845 | # with a leading dot. For instance MS-DOS doesn't. |
846 | AC_DEFUN([AM_SET_LEADING_DOT], |
847 | [rm -rf .tst 2>/dev/null |
848 | mkdir .tst 2>/dev/null |
849 | if test -d .tst; then |
850 | am__leading_dot=. |
851 | else |
852 | am__leading_dot=_ |
853 | fi |
854 | rmdir .tst 2>/dev/null |
855 | AC_SUBST([am__leading_dot])]) |
856 | |
857 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
858 | # From Jim Meyering |
859 | |
860 | # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
861 | # Free Software Foundation, Inc. |
862 | # |
863 | # This file is free software; the Free Software Foundation |
864 | # gives unlimited permission to copy and/or distribute it, |
865 | # with or without modifications, as long as this notice is preserved. |
866 | |
867 | # serial 5 |
868 | |
869 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) |
870 | # ---------------------------------- |
871 | # Control maintainer-specific portions of Makefiles. |
872 | # Default is to disable them, unless `enable' is passed literally. |
873 | # For symmetry, `disable' may be passed as well. Anyway, the user |
874 | # can override the default with the --enable/--disable switch. |
875 | AC_DEFUN([AM_MAINTAINER_MODE], |
876 | [m4_case(m4_default([$1], [disable]), |
877 | [enable], [m4_define([am_maintainer_other], [disable])], |
878 | [disable], [m4_define([am_maintainer_other], [enable])], |
879 | [m4_define([am_maintainer_other], [enable]) |
880 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) |
881 | AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) |
882 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed |
883 | AC_ARG_ENABLE([maintainer-mode], |
884 | [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful |
885 | (and sometimes confusing) to the casual installer], |
886 | [USE_MAINTAINER_MODE=$enableval], |
887 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) |
888 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
889 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) |
890 | MAINT=$MAINTAINER_MODE_TRUE |
891 | AC_SUBST([MAINT])dnl |
892 | ] |
893 | ) |
894 | |
895 | AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) |
896 | |
897 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
898 | |
899 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. |
900 | # |
901 | # This file is free software; the Free Software Foundation |
902 | # gives unlimited permission to copy and/or distribute it, |
903 | # with or without modifications, as long as this notice is preserved. |
904 | |
905 | # serial 4 |
906 | |
907 | # AM_MAKE_INCLUDE() |
908 | # ----------------- |
909 | # Check to see how make treats includes. |
910 | AC_DEFUN([AM_MAKE_INCLUDE], |
911 | [am_make=${MAKE-make} |
912 | cat > confinc << 'END' |
913 | am__doit: |
914 | @echo this is the am__doit target |
915 | .PHONY: am__doit |
916 | END |
917 | # If we don't find an include directive, just comment out the code. |
918 | AC_MSG_CHECKING([for style of include used by $am_make]) |
919 | am__include="#" |
920 | am__quote= |
921 | _am_result=none |
922 | # First try GNU make style include. |
923 | echo "include confinc" > confmf |
924 | # Ignore all kinds of additional output from `make'. |
925 | case `$am_make -s -f confmf 2> /dev/null` in #( |
926 | *the\ am__doit\ target*) |
927 | am__include=include |
928 | am__quote= |
929 | _am_result=GNU |
930 | ;; |
931 | esac |
932 | # Now try BSD make style include. |
933 | if test "$am__include" = "#"; then |
934 | echo '.include "confinc"' > confmf |
935 | case `$am_make -s -f confmf 2> /dev/null` in #( |
936 | *the\ am__doit\ target*) |
937 | am__include=.include |
938 | am__quote="\"" |
939 | _am_result=BSD |
940 | ;; |
941 | esac |
942 | fi |
943 | AC_SUBST([am__include]) |
944 | AC_SUBST([am__quote]) |
945 | AC_MSG_RESULT([$_am_result]) |
946 | rm -f confinc confmf |
947 | ]) |
948 | |
949 | # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
950 | # Free Software Foundation, Inc. |
951 | # |
952 | # This file is free software; the Free Software Foundation |
953 | # gives unlimited permission to copy and/or distribute it, |
954 | # with or without modifications, as long as this notice is preserved. |
955 | |
956 | # serial 6 |
957 | |
958 | # AM_PROG_CC_C_O |
959 | # -------------- |
960 | # Like AC_PROG_CC_C_O, but changed for automake. |
961 | AC_DEFUN([AM_PROG_CC_C_O], |
962 | [AC_REQUIRE([AC_PROG_CC_C_O])dnl |
963 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
964 | AC_REQUIRE_AUX_FILE([compile])dnl |
965 | # FIXME: we rely on the cache variable name because |
966 | # there is no other way. |
967 | set dummy $CC |
968 | am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` |
969 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o |
970 | if test "$am_t" != yes; then |
971 | # Losing compiler, so override with the script. |
972 | # FIXME: It is wrong to rewrite CC. |
973 | # But if we don't then we get into trouble of one sort or another. |
974 | # A longer-term fix would be to have automake use am__CC in this case, |
975 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" |
976 | CC="$am_aux_dir/compile $CC" |
977 | fi |
978 | dnl Make sure AC_PROG_CC is never called again, or it will override our |
979 | dnl setting of CC. |
980 | m4_define([AC_PROG_CC], |
981 | [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) |
982 | ]) |
983 | |
984 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
985 | |
986 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
987 | # Free Software Foundation, Inc. |
988 | # |
989 | # This file is free software; the Free Software Foundation |
990 | # gives unlimited permission to copy and/or distribute it, |
991 | # with or without modifications, as long as this notice is preserved. |
992 | |
993 | # serial 6 |
994 | |
995 | # AM_MISSING_PROG(NAME, PROGRAM) |
996 | # ------------------------------ |
997 | AC_DEFUN([AM_MISSING_PROG], |
998 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
999 | $1=${$1-"${am_missing_run}$2"} |
1000 | AC_SUBST($1)]) |
1001 | |
1002 | |
1003 | # AM_MISSING_HAS_RUN |
1004 | # ------------------ |
1005 | # Define MISSING if not defined so far and test if it supports --run. |
1006 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
1007 | AC_DEFUN([AM_MISSING_HAS_RUN], |
1008 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
1009 | AC_REQUIRE_AUX_FILE([missing])dnl |
1010 | if test x"${MISSING+set}" != xset; then |
1011 | case $am_aux_dir in |
1012 | *\ * | *\ *) |
1013 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; |
1014 | *) |
1015 | MISSING="\${SHELL} $am_aux_dir/missing" ;; |
1016 | esac |
1017 | fi |
1018 | # Use eval to expand $SHELL |
1019 | if eval "$MISSING --run true"; then |
1020 | am_missing_run="$MISSING --run " |
1021 | else |
1022 | am_missing_run= |
1023 | AC_MSG_WARN([`missing' script is too old or missing]) |
1024 | fi |
1025 | ]) |
1026 | |
1027 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
1028 | # |
1029 | # This file is free software; the Free Software Foundation |
1030 | # gives unlimited permission to copy and/or distribute it, |
1031 | # with or without modifications, as long as this notice is preserved. |
1032 | |
1033 | # AM_PROG_MKDIR_P |
1034 | # --------------- |
1035 | # Check for `mkdir -p'. |
1036 | AC_DEFUN([AM_PROG_MKDIR_P], |
1037 | [AC_PREREQ([2.60])dnl |
1038 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
1039 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, |
1040 | dnl while keeping a definition of mkdir_p for backward compatibility. |
1041 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. |
1042 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of |
1043 | dnl Makefile.ins that do not define MKDIR_P, so we do our own |
1044 | dnl adjustment using top_builddir (which is defined more often than |
1045 | dnl MKDIR_P). |
1046 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl |
1047 | case $mkdir_p in |
1048 | [[\\/$]]* | ?:[[\\/]]*) ;; |
1049 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; |
1050 | esac |
1051 | ]) |
1052 | |
1053 | # Helper functions for option handling. -*- Autoconf -*- |
1054 | |
1055 | # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. |
1056 | # |
1057 | # This file is free software; the Free Software Foundation |
1058 | # gives unlimited permission to copy and/or distribute it, |
1059 | # with or without modifications, as long as this notice is preserved. |
1060 | |
1061 | # serial 4 |
1062 | |
1063 | # _AM_MANGLE_OPTION(NAME) |
1064 | # ----------------------- |
1065 | AC_DEFUN([_AM_MANGLE_OPTION], |
1066 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
1067 | |
1068 | # _AM_SET_OPTION(NAME) |
1069 | # ------------------------------ |
1070 | # Set option NAME. Presently that only means defining a flag for this option. |
1071 | AC_DEFUN([_AM_SET_OPTION], |
1072 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
1073 | |
1074 | # _AM_SET_OPTIONS(OPTIONS) |
1075 | # ---------------------------------- |
1076 | # OPTIONS is a space-separated list of Automake options. |
1077 | AC_DEFUN([_AM_SET_OPTIONS], |
1078 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
1079 | |
1080 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
1081 | # ------------------------------------------- |
1082 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
1083 | AC_DEFUN([_AM_IF_OPTION], |
1084 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
1085 | |
1086 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
1087 | |
1088 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 |
1089 | # Free Software Foundation, Inc. |
1090 | # |
1091 | # This file is free software; the Free Software Foundation |
1092 | # gives unlimited permission to copy and/or distribute it, |
1093 | # with or without modifications, as long as this notice is preserved. |
1094 | |
1095 | # serial 5 |
1096 | |
1097 | # AM_SANITY_CHECK |
1098 | # --------------- |
1099 | AC_DEFUN([AM_SANITY_CHECK], |
1100 | [AC_MSG_CHECKING([whether build environment is sane]) |
1101 | # Just in case |
1102 | sleep 1 |
1103 | echo timestamp > conftest.file |
1104 | # Reject unsafe characters in $srcdir or the absolute working directory |
1105 | # name. Accept space and tab only in the latter. |
1106 | am_lf=' |
1107 | ' |
1108 | case `pwd` in |
1109 | *[[\\\"\#\$\&\'\`$am_lf]]*) |
1110 | AC_MSG_ERROR([unsafe absolute working directory name]);; |
1111 | esac |
1112 | case $srcdir in |
1113 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
1114 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; |
1115 | esac |
1116 | |
1117 | # Do `set' in a subshell so we don't clobber the current shell's |
1118 | # arguments. Must try -L first in case configure is actually a |
1119 | # symlink; some systems play weird games with the mod time of symlinks |
1120 | # (eg FreeBSD returns the mod time of the symlink's containing |
1121 | # directory). |
1122 | if ( |
1123 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
1124 | if test "$[*]" = "X"; then |
1125 | # -L didn't work. |
1126 | set X `ls -t "$srcdir/configure" conftest.file` |
1127 | fi |
1128 | rm -f conftest.file |
1129 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
1130 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
1131 | |
1132 | # If neither matched, then we have a broken ls. This can happen |
1133 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
1134 | # broken ls alias from the environment. This has actually |
1135 | # happened. Such a system could not be considered "sane". |
1136 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
1137 | alias in your environment]) |
1138 | fi |
1139 | |
1140 | test "$[2]" = conftest.file |
1141 | ) |
1142 | then |
1143 | # Ok. |
1144 | : |
1145 | else |
1146 | AC_MSG_ERROR([newly created file is older than distributed files! |
1147 | Check your system clock]) |
1148 | fi |
1149 | AC_MSG_RESULT(yes)]) |
1150 | |
1151 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
1152 | # |
1153 | # This file is free software; the Free Software Foundation |
1154 | # gives unlimited permission to copy and/or distribute it, |
1155 | # with or without modifications, as long as this notice is preserved. |
1156 | |
1157 | # AM_PROG_INSTALL_STRIP |
1158 | # --------------------- |
1159 | # One issue with vendor `install' (even GNU) is that you can't |
1160 | # specify the program used to strip binaries. This is especially |
1161 | # annoying in cross-compiling environments, where the build's strip |
1162 | # is unlikely to handle the host's binaries. |
1163 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
1164 | # always use install-sh in `make install-strip', and initialize |
1165 | # STRIPPROG with the value of the STRIP variable (set by the user). |
1166 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
1167 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
1168 | # Installed binaries are usually stripped using `strip' when the user |
1169 | # run `make install-strip'. However `strip' might not be the right |
1170 | # tool to use in cross-compilation environments, therefore Automake |
1171 | # will honor the `STRIP' environment variable to overrule this program. |
1172 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
1173 | if test "$cross_compiling" != no; then |
1174 | AC_CHECK_TOOL([STRIP], [strip], :) |
1175 | fi |
1176 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1177 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1178 | |
1179 | # Copyright (C) 2006, 2008 Free Software Foundation, Inc. |
1180 | # |
1181 | # This file is free software; the Free Software Foundation |
1182 | # gives unlimited permission to copy and/or distribute it, |
1183 | # with or without modifications, as long as this notice is preserved. |
1184 | |
1185 | # serial 2 |
1186 | |
1187 | # _AM_SUBST_NOTMAKE(VARIABLE) |
1188 | # --------------------------- |
1189 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
1190 | # This macro is traced by Automake. |
1191 | AC_DEFUN([_AM_SUBST_NOTMAKE]) |
1192 | |
1193 | # AM_SUBST_NOTMAKE(VARIABLE) |
1194 | # --------------------------- |
1195 | # Public sister of _AM_SUBST_NOTMAKE. |
1196 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
1197 | |
1198 | # Check how to create a tarball. -*- Autoconf -*- |
1199 | |
1200 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
1201 | # |
1202 | # This file is free software; the Free Software Foundation |
1203 | # gives unlimited permission to copy and/or distribute it, |
1204 | # with or without modifications, as long as this notice is preserved. |
1205 | |
1206 | # serial 2 |
1207 | |
1208 | # _AM_PROG_TAR(FORMAT) |
1209 | # -------------------- |
1210 | # Check how to create a tarball in format FORMAT. |
1211 | # FORMAT should be one of `v7', `ustar', or `pax'. |
1212 | # |
1213 | # Substitute a variable $(am__tar) that is a command |
1214 | # writing to stdout a FORMAT-tarball containing the directory |
1215 | # $tardir. |
1216 | # tardir=directory && $(am__tar) > result.tar |
1217 | # |
1218 | # Substitute a variable $(am__untar) that extract such |
1219 | # a tarball read from stdin. |
1220 | # $(am__untar) < result.tar |
1221 | AC_DEFUN([_AM_PROG_TAR], |
1222 | [# Always define AMTAR for backward compatibility. |
1223 | AM_MISSING_PROG([AMTAR], [tar]) |
1224 | m4_if([$1], [v7], |
1225 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], |
1226 | [m4_case([$1], [ustar],, [pax],, |
1227 | [m4_fatal([Unknown tar format])]) |
1228 | AC_MSG_CHECKING([how to create a $1 tar archive]) |
1229 | # Loop over all known methods to create a tar archive until one works. |
1230 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
1231 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} |
1232 | # Do not fold the above two line into one, because Tru64 sh and |
1233 | # Solaris sh will not grok spaces in the rhs of `-'. |
1234 | for _am_tool in $_am_tools |
1235 | do |
1236 | case $_am_tool in |
1237 | gnutar) |
1238 | for _am_tar in tar gnutar gtar; |
1239 | do |
1240 | AM_RUN_LOG([$_am_tar --version]) && break |
1241 | done |
1242 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
1243 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
1244 | am__untar="$_am_tar -xf -" |
1245 | ;; |
1246 | plaintar) |
1247 | # Must skip GNU tar: if it does not support --format= it doesn't create |
1248 | # ustar tarball either. |
1249 | (tar --version) >/dev/null 2>&1 && continue |
1250 | am__tar='tar chf - "$$tardir"' |
1251 | am__tar_='tar chf - "$tardir"' |
1252 | am__untar='tar xf -' |
1253 | ;; |
1254 | pax) |
1255 | am__tar='pax -L -x $1 -w "$$tardir"' |
1256 | am__tar_='pax -L -x $1 -w "$tardir"' |
1257 | am__untar='pax -r' |
1258 | ;; |
1259 | cpio) |
1260 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
1261 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
1262 | am__untar='cpio -i -H $1 -d' |
1263 | ;; |
1264 | none) |
1265 | am__tar=false |
1266 | am__tar_=false |
1267 | am__untar=false |
1268 | ;; |
1269 | esac |
1270 | |
1271 | # If the value was cached, stop now. We just wanted to have am__tar |
1272 | # and am__untar set. |
1273 | test -n "${am_cv_prog_tar_$1}" && break |
1274 | |
1275 | # tar/untar a dummy directory, and stop if the command works |
1276 | rm -rf conftest.dir |
1277 | mkdir conftest.dir |
1278 | echo GrepMe > conftest.dir/file |
1279 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
1280 | rm -rf conftest.dir |
1281 | if test -s conftest.tar; then |
1282 | AM_RUN_LOG([$am__untar <conftest.tar]) |
1283 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
1284 | fi |
1285 | done |
1286 | rm -rf conftest.dir |
1287 | |
1288 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
1289 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
1290 | AC_SUBST([am__tar]) |
1291 | AC_SUBST([am__untar]) |
1292 | ]) # _AM_PROG_TAR |
1293 | |
1294 | m4_include([m4/libtool.m4]) |
1295 | m4_include([m4/ltoptions.m4]) |
1296 | m4_include([m4/ltsugar.m4]) |
1297 | m4_include([m4/ltversion.m4]) |
1298 | m4_include([m4/lt~obsolete.m4]) |
1299 |