1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
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.
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
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'.])])
22 # Helper functions for option handling. -*- Autoconf -*-
24 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
25 # Written by Gary V. Vaughan, 2004
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
31 # serial 6 ltoptions.m4
33 # This is to help aclocal find these macros, as it can't see m4_define.
34 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
37 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
38 # ------------------------------------------
39 m4_define([_LT_MANGLE_OPTION],
40 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
43 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
44 # ---------------------------------------
45 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
46 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
48 m4_define([_LT_SET_OPTION],
49 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
50 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
51 _LT_MANGLE_DEFUN([$1], [$2]),
52 [m4_warning([Unknown $1 option `$2'])])[]dnl
56 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
57 # ------------------------------------------------------------
58 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
59 m4_define([_LT_IF_OPTION],
60 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
63 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
64 # -------------------------------------------------------
65 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
67 m4_define([_LT_UNLESS_OPTIONS],
68 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
69 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
70 [m4_define([$0_found])])])[]dnl
71 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
76 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
77 # ----------------------------------------
78 # OPTION-LIST is a space-separated list of Libtool options associated
79 # with MACRO-NAME. If any OPTION has a matching handler declared with
80 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
81 # the unknown option and exit.
82 m4_defun([_LT_SET_OPTIONS],
84 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
85 [_LT_SET_OPTION([$1], _LT_Option)])
87 m4_if([$1],[LT_INIT],[
89 dnl Simply set some default values (i.e off) if boolean options were not
91 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
93 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
96 dnl If no reference was made to various pairs of opposing options, then
97 dnl we run the default mode handler for the pair. For example, if neither
98 dnl `shared' nor `disable-shared' was passed, we enable building of shared
99 dnl archives by default:
100 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
101 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
102 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
103 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
104 [_LT_ENABLE_FAST_INSTALL])
110 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
111 # -----------------------------------------
112 m4_define([_LT_MANGLE_DEFUN],
113 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
116 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
117 # -----------------------------------------------
118 m4_define([LT_OPTION_DEFINE],
119 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
125 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
128 AU_DEFUN([AC_LIBTOOL_DLOPEN],
129 [_LT_SET_OPTION([LT_INIT], [dlopen])
130 AC_DIAGNOSE([obsolete],
131 [$0: Remove this warning and the call to _LT_SET_OPTION when you
132 put the `dlopen' option into LT_INIT's first parameter.])
135 dnl aclocal-1.4 backwards compatibility:
136 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
141 # Declare package support for building win32 dll's.
142 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
143 [enable_win32_dll=yes
146 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
147 AC_CHECK_TOOL(AS, as, false)
148 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
149 AC_CHECK_TOOL(OBJDUMP, objdump, false)
153 test -z "$AS" && AS=as
154 _LT_DECL([], [AS], [0], [Assembler program])dnl
156 test -z "$DLLTOOL" && DLLTOOL=dlltool
157 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
159 test -z "$OBJDUMP" && OBJDUMP=objdump
160 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
163 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
164 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
165 _LT_SET_OPTION([LT_INIT], [win32-dll])
166 AC_DIAGNOSE([obsolete],
167 [$0: Remove this warning and the call to _LT_SET_OPTION when you
168 put the `win32-dll' option into LT_INIT's first parameter.])
171 dnl aclocal-1.4 backwards compatibility:
172 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
175 # _LT_ENABLE_SHARED([DEFAULT])
176 # ----------------------------
177 # implement the --enable-shared flag, and supports the `shared' and
178 # `disable-shared' LT_INIT options.
179 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
180 m4_define([_LT_ENABLE_SHARED],
181 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
182 AC_ARG_ENABLE([shared],
183 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
184 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
185 [p=${PACKAGE-default}
187 yes) enable_shared=yes ;;
188 no) enable_shared=no ;;
191 # Look at the argument we got. We use all the common list separators.
192 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
193 for pkg in $enableval; do
195 if test "X$pkg" = "X$p"; then
202 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
204 _LT_DECL([build_libtool_libs], [enable_shared], [0],
205 [Whether or not to build shared libraries])
206 ])# _LT_ENABLE_SHARED
208 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
209 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
212 AC_DEFUN([AC_ENABLE_SHARED],
213 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
216 AC_DEFUN([AC_DISABLE_SHARED],
217 [_LT_SET_OPTION([LT_INIT], [disable-shared])
220 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
221 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
223 dnl aclocal-1.4 backwards compatibility:
224 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
225 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
229 # _LT_ENABLE_STATIC([DEFAULT])
230 # ----------------------------
231 # implement the --enable-static flag, and support the `static' and
232 # `disable-static' LT_INIT options.
233 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
234 m4_define([_LT_ENABLE_STATIC],
235 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
236 AC_ARG_ENABLE([static],
237 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
238 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
239 [p=${PACKAGE-default}
241 yes) enable_static=yes ;;
242 no) enable_static=no ;;
245 # Look at the argument we got. We use all the common list separators.
246 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
247 for pkg in $enableval; do
249 if test "X$pkg" = "X$p"; then
256 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
258 _LT_DECL([build_old_libs], [enable_static], [0],
259 [Whether or not to build static libraries])
260 ])# _LT_ENABLE_STATIC
262 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
263 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
266 AC_DEFUN([AC_ENABLE_STATIC],
267 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
270 AC_DEFUN([AC_DISABLE_STATIC],
271 [_LT_SET_OPTION([LT_INIT], [disable-static])
274 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
275 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
277 dnl aclocal-1.4 backwards compatibility:
278 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
279 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
283 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
284 # ----------------------------------
285 # implement the --enable-fast-install flag, and support the `fast-install'
286 # and `disable-fast-install' LT_INIT options.
287 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
288 m4_define([_LT_ENABLE_FAST_INSTALL],
289 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
290 AC_ARG_ENABLE([fast-install],
291 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
292 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
293 [p=${PACKAGE-default}
295 yes) enable_fast_install=yes ;;
296 no) enable_fast_install=no ;;
298 enable_fast_install=no
299 # Look at the argument we got. We use all the common list separators.
300 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
301 for pkg in $enableval; do
303 if test "X$pkg" = "X$p"; then
304 enable_fast_install=yes
310 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
312 _LT_DECL([fast_install], [enable_fast_install], [0],
313 [Whether or not to optimize for fast installation])dnl
314 ])# _LT_ENABLE_FAST_INSTALL
316 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
317 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
320 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
321 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
322 AC_DIAGNOSE([obsolete],
323 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
324 the `fast-install' option into LT_INIT's first parameter.])
327 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
328 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
329 AC_DIAGNOSE([obsolete],
330 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
331 the `disable-fast-install' option into LT_INIT's first parameter.])
334 dnl aclocal-1.4 backwards compatibility:
335 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
336 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
339 # _LT_WITH_PIC([MODE])
340 # --------------------
341 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
343 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
344 m4_define([_LT_WITH_PIC],
346 [AS_HELP_STRING([--with-pic],
347 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
348 [pic_mode="$withval"],
351 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
353 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
356 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
357 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
360 AU_DEFUN([AC_LIBTOOL_PICMODE],
361 [_LT_SET_OPTION([LT_INIT], [pic-only])
362 AC_DIAGNOSE([obsolete],
363 [$0: Remove this warning and the call to _LT_SET_OPTION when you
364 put the `pic-only' option into LT_INIT's first parameter.])
367 dnl aclocal-1.4 backwards compatibility:
368 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
371 m4_define([_LTDL_MODE], [])
372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
373 [m4_define([_LTDL_MODE], [nonrecursive])])
374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
375 [m4_define([_LTDL_MODE], [recursive])])
376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
377 [m4_define([_LTDL_MODE], [subproject])])
379 m4_define([_LTDL_TYPE], [])
380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
381 [m4_define([_LTDL_TYPE], [installable])])
382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
383 [m4_define([_LTDL_TYPE], [convenience])])
385 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
387 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
388 # Written by Gary V. Vaughan, 2004
390 # This file is free software; the Free Software Foundation gives
391 # unlimited permission to copy and/or distribute it, with or without
392 # modifications, as long as this notice is preserved.
394 # serial 6 ltsugar.m4
396 # This is to help aclocal find these macros, as it can't see m4_define.
397 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
400 # lt_join(SEP, ARG1, [ARG2...])
401 # -----------------------------
402 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
403 # associated separator.
404 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
405 # versions in m4sugar had bugs.
407 [m4_if([$#], [1], [],
409 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
410 m4_define([_lt_join],
411 [m4_if([$#$2], [2], [],
412 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
418 # Manipulate m4 lists.
419 # These macros are necessary as long as will still need to support
420 # Autoconf-2.59 which quotes differently.
421 m4_define([lt_car], [[$1]])
423 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
425 [m4_dquote(m4_shift($@))])])
426 m4_define([lt_unquote], $1)
429 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
430 # ------------------------------------------
431 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
432 # Note that neither SEPARATOR nor STRING are expanded; they are appended
433 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
434 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
435 # than defined and empty).
437 # This macro is needed until we can rely on Autoconf 2.62, since earlier
438 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
439 m4_define([lt_append],
441 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
445 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
446 # ----------------------------------------------------------
447 # Produce a SEP delimited list of all paired combinations of elements of
448 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
449 # has the form PREFIXmINFIXSUFFIXn.
450 # Needed until we can rely on m4_combine added in Autoconf 2.62.
451 m4_define([lt_combine],
452 [m4_if(m4_eval([$# > 3]), [1],
453 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
454 [[m4_foreach([_Lt_prefix], [$2],
455 [m4_foreach([_Lt_suffix],
456 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
457 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
460 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
461 # -----------------------------------------------------------------------
462 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
463 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
464 m4_define([lt_if_append_uniq],
466 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
467 [lt_append([$1], [$2], [$3])$4],
469 [lt_append([$1], [$2], [$3])$4])])
472 # lt_dict_add(DICT, KEY, VALUE)
473 # -----------------------------
474 m4_define([lt_dict_add],
475 [m4_define([$1($2)], [$3])])
478 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
479 # --------------------------------------------
480 m4_define([lt_dict_add_subkey],
481 [m4_define([$1($2:$3)], [$4])])
484 # lt_dict_fetch(DICT, KEY, [SUBKEY])
485 # ----------------------------------
486 m4_define([lt_dict_fetch],
488 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
489 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
492 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
493 # -----------------------------------------------------------------
494 m4_define([lt_if_dict_fetch],
495 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
500 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
501 # --------------------------------------------------------------
502 m4_define([lt_dict_filter],
504 [lt_join(m4_quote(m4_default([$4], [[, ]])),
505 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
506 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
509 # ltversion.m4 -- version numbers -*- Autoconf -*-
511 # Copyright (C) 2004 Free Software Foundation, Inc.
512 # Written by Scott James Remnant, 2004
514 # This file is free software; the Free Software Foundation gives
515 # unlimited permission to copy and/or distribute it, with or without
516 # modifications, as long as this notice is preserved.
518 # Generated from ltversion.in.
520 # serial 3017 ltversion.m4
521 # This file is part of GNU Libtool
523 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
524 m4_define([LT_PACKAGE_REVISION], [1.3017])
526 AC_DEFUN([LTVERSION_VERSION],
527 [macro_version='2.2.6b'
528 macro_revision='1.3017'
529 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
530 _LT_DECL(, macro_revision, 0)
533 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
535 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
536 # Written by Scott James Remnant, 2004.
538 # This file is free software; the Free Software Foundation gives
539 # unlimited permission to copy and/or distribute it, with or without
540 # modifications, as long as this notice is preserved.
542 # serial 4 lt~obsolete.m4
544 # These exist entirely to fool aclocal when bootstrapping libtool.
546 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
547 # which have later been changed to m4_define as they aren't part of the
548 # exported API, or moved to Autoconf or Automake where they belong.
550 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
551 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
552 # using a macro with the same name in our local m4/libtool.m4 it'll
553 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
554 # and doesn't know about Autoconf macros at all.)
556 # So we provide this file, which has a silly filename so it's always
557 # included after everything else. This provides aclocal with the
558 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
559 # because those macros already exist, or will be overwritten later.
560 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
562 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
563 # Yes, that means every name once taken will need to remain here until
564 # we give up compatibility with versions before 1.7, at which point
565 # we need to keep only those names which we still refer to.
567 # This is to help aclocal find these macros, as it can't see m4_define.
568 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
570 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
571 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
572 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
573 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
574 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
575 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
576 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
577 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
578 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
579 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
580 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
581 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
582 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
583 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
584 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
585 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
586 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
587 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
588 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
589 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
590 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
591 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
592 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
593 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
594 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
595 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
596 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
597 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
598 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
599 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
600 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
601 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
602 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
603 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
604 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
605 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
606 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
607 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
608 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
609 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
610 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
611 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
612 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
613 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
614 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
615 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
616 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
617 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
618 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
619 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
620 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
621 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
622 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
623 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
624 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
626 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
627 # serial 1 (pkg-config-0.24)
629 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
631 # This program is free software; you can redistribute it and/or modify
632 # it under the terms of the GNU General Public License as published by
633 # the Free Software Foundation; either version 2 of the License, or
634 # (at your option) any later version.
636 # This program is distributed in the hope that it will be useful, but
637 # WITHOUT ANY WARRANTY; without even the implied warranty of
638 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
639 # General Public License for more details.
641 # You should have received a copy of the GNU General Public License
642 # along with this program; if not, write to the Free Software
643 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
645 # As a special exception to the GNU General Public License, if you
646 # distribute this file as part of a program that contains a
647 # configuration script generated by Autoconf, you may include it under
648 # the same distribution terms that you use for the rest of that program.
650 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
651 # ----------------------------------
652 AC_DEFUN([PKG_PROG_PKG_CONFIG],
653 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
654 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
655 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
656 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
657 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
659 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
660 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
662 if test -n "$PKG_CONFIG"; then
663 _pkg_min_version=m4_default([$1], [0.9.0])
664 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
665 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
672 ])# PKG_PROG_PKG_CONFIG
674 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
676 # Check to see whether a particular set of modules exists. Similar
677 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
679 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
680 # only at the first occurence in configure.ac, so if the first place
681 # it's called might be skipped (such as if it is within an "if", you
682 # have to call PKG_CHECK_EXISTS manually
683 # --------------------------------------------------------------
684 AC_DEFUN([PKG_CHECK_EXISTS],
685 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
686 if test -n "$PKG_CONFIG" && \
687 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
688 m4_default([$2], [:])
689 m4_ifvaln([$3], [else
693 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
694 # ---------------------------------------------
695 m4_define([_PKG_CONFIG],
696 [if test -n "$$1"; then
698 elif test -n "$PKG_CONFIG"; then
699 PKG_CHECK_EXISTS([$3],
700 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
707 # _PKG_SHORT_ERRORS_SUPPORTED
708 # -----------------------------
709 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
710 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
711 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
712 _pkg_short_errors_supported=yes
714 _pkg_short_errors_supported=no
716 ])# _PKG_SHORT_ERRORS_SUPPORTED
719 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
720 # [ACTION-IF-NOT-FOUND])
723 # Note that if there is a possibility the first call to
724 # PKG_CHECK_MODULES might not happen, you should be sure to include an
725 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
728 # --------------------------------------------------------------
729 AC_DEFUN([PKG_CHECK_MODULES],
730 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
731 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
732 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
735 AC_MSG_CHECKING([for $1])
737 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
738 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
740 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
741 and $1[]_LIBS to avoid the need to call pkg-config.
742 See the pkg-config man page for more details.])
744 if test $pkg_failed = yes; then
746 _PKG_SHORT_ERRORS_SUPPORTED
747 if test $_pkg_short_errors_supported = yes; then
748 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
750 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
752 # Put the nasty error message in config.log where it belongs
753 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
755 m4_default([$4], [AC_MSG_ERROR(
756 [Package requirements ($2) were not met:
760 Consider adjusting the PKG_CONFIG_PATH environment variable if you
761 installed software in a non-standard prefix.
765 elif test $pkg_failed = untried; then
767 m4_default([$4], [AC_MSG_FAILURE(
768 [The pkg-config script could not be found or is too old. Make sure it
769 is in your PATH or set the PKG_CONFIG environment variable to the full
774 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
777 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
778 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
782 ])# PKG_CHECK_MODULES
784 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
786 # This file is free software; the Free Software Foundation
787 # gives unlimited permission to copy and/or distribute it,
788 # with or without modifications, as long as this notice is preserved.
790 # AM_AUTOMAKE_VERSION(VERSION)
791 # ----------------------------
792 # Automake X.Y traces this macro to ensure aclocal.m4 has been
793 # generated from the m4 files accompanying Automake X.Y.
794 # (This private macro should not be called outside this file.)
795 AC_DEFUN([AM_AUTOMAKE_VERSION],
796 [am__api_version='1.11'
797 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
798 dnl require some minimum version. Point them to the right macro.
799 m4_if([$1], [1.11.1], [],
800 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
803 # _AM_AUTOCONF_VERSION(VERSION)
804 # -----------------------------
805 # aclocal traces this macro to find the Autoconf version.
806 # This is a private macro too. Using m4_define simplifies
807 # the logic in aclocal, which can simply ignore this definition.
808 m4_define([_AM_AUTOCONF_VERSION], [])
810 # AM_SET_CURRENT_AUTOMAKE_VERSION
811 # -------------------------------
812 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
813 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
814 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
815 [AM_AUTOMAKE_VERSION([1.11.1])dnl
816 m4_ifndef([AC_AUTOCONF_VERSION],
817 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
818 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
820 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
822 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
824 # This file is free software; the Free Software Foundation
825 # gives unlimited permission to copy and/or distribute it,
826 # with or without modifications, as long as this notice is preserved.
828 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
829 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
830 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
832 # Of course, Automake must honor this variable whenever it calls a
833 # tool from the auxiliary directory. The problem is that $srcdir (and
834 # therefore $ac_aux_dir as well) can be either absolute or relative,
835 # depending on how configure is run. This is pretty annoying, since
836 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
837 # source directory, any form will work fine, but in subdirectories a
838 # relative path needs to be adjusted first.
840 # $ac_aux_dir/missing
841 # fails when called from a subdirectory if $ac_aux_dir is relative
842 # $top_srcdir/$ac_aux_dir/missing
843 # fails if $ac_aux_dir is absolute,
844 # fails when called from a subdirectory in a VPATH build with
845 # a relative $ac_aux_dir
847 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
848 # are both prefixed by $srcdir. In an in-source build this is usually
849 # harmless because $srcdir is `.', but things will broke when you
850 # start a VPATH build or use an absolute $srcdir.
852 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
853 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
854 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
855 # and then we would define $MISSING as
856 # MISSING="\${SHELL} $am_aux_dir/missing"
857 # This will work as long as MISSING is not called from configure, because
858 # unfortunately $(top_srcdir) has no meaning in configure.
859 # However there are other variables, like CC, which are often used in
860 # configure, and could therefore not use this "fixed" $ac_aux_dir.
862 # Another solution, used here, is to always expand $ac_aux_dir to an
863 # absolute PATH. The drawback is that using absolute paths prevent a
864 # configured tree to be moved without reconfiguration.
866 AC_DEFUN([AM_AUX_DIR_EXPAND],
867 [dnl Rely on autoconf to set up CDPATH properly.
869 # expand $ac_aux_dir to an absolute path
870 am_aux_dir=`cd $ac_aux_dir && pwd`
873 # AM_CONDITIONAL -*- Autoconf -*-
875 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
876 # Free Software Foundation, Inc.
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
884 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
885 # -------------------------------------
886 # Define a conditional.
887 AC_DEFUN([AM_CONDITIONAL],
889 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
890 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
891 AC_SUBST([$1_TRUE])dnl
892 AC_SUBST([$1_FALSE])dnl
893 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
894 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
895 m4_define([_AM_COND_VALUE_$1], [$2])dnl
903 AC_CONFIG_COMMANDS_PRE(
904 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
905 AC_MSG_ERROR([[conditional "$1" was never defined.
906 Usually this means the macro was only invoked conditionally.]])
909 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
910 # Free Software Foundation, Inc.
912 # This file is free software; the Free Software Foundation
913 # gives unlimited permission to copy and/or distribute it,
914 # with or without modifications, as long as this notice is preserved.
918 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
919 # written in clear, in which case automake, when reading aclocal.m4,
920 # will think it sees a *use*, and therefore will trigger all it's
921 # C support machinery. Also note that it means that autoscan, seeing
922 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
925 # _AM_DEPENDENCIES(NAME)
926 # ----------------------
927 # See how the compiler implements dependency checking.
928 # NAME is "CC", "CXX", "GCJ", or "OBJC".
929 # We try a few techniques and use that to set a single cache variable.
931 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
932 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
933 # dependency, and given that the user is not expected to run this macro,
934 # just rely on AC_PROG_CC.
935 AC_DEFUN([_AM_DEPENDENCIES],
936 [AC_REQUIRE([AM_SET_DEPDIR])dnl
937 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
938 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
939 AC_REQUIRE([AM_DEP_TRACK])dnl
941 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
942 [$1], CXX, [depcc="$CXX" am_compiler_list=],
943 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
944 [$1], UPC, [depcc="$UPC" am_compiler_list=],
945 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
946 [depcc="$$1" am_compiler_list=])
948 AC_CACHE_CHECK([dependency style of $depcc],
949 [am_cv_$1_dependencies_compiler_type],
950 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
951 # We make a subdir and do the tests there. Otherwise we can end up
952 # making bogus files that we don't know about and never remove. For
953 # instance it was reported that on HP-UX the gcc test will end up
954 # making a dummy file named `D' -- because `-MD' means `put the output
957 # Copy depcomp to subdir because otherwise we won't find it if we're
958 # using a relative directory.
959 cp "$am_depcomp" conftest.dir
961 # We will build objects and dependencies in a subdirectory because
962 # it helps to detect inapplicable dependency modes. For instance
963 # both Tru64's cc and ICC support -MD to output dependencies as a
964 # side effect of compilation, but ICC will put the dependencies in
965 # the current directory while Tru64 will put them in the object
969 am_cv_$1_dependencies_compiler_type=none
970 if test "$am_compiler_list" = ""; then
971 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
975 [case " $depcc " in #(
976 *\ -arch\ *\ -arch\ *) am__universal=true ;;
979 [case " $depcc " in #(
980 *\ -arch\ *\ -arch\ *) am__universal=true ;;
983 for depmode in $am_compiler_list; do
984 # Setup a source with many dependencies, because some compilers
985 # like to wrap large dependency lists on column 80 (with \), and
986 # we should not choose a depcomp mode which is confused by this.
988 # We need to recreate these files for each test, as the compiler may
989 # overwrite some of them when testing with obscure command lines.
990 # This happens at least with the AIX C compiler.
992 for i in 1 2 3 4 5 6; do
993 echo '#include "conftst'$i'.h"' >> sub/conftest.c
994 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
995 # Solaris 8's {/usr,}/bin/sh.
996 touch sub/conftst$i.h
998 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1000 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1001 # mode. It turns out that the SunPro C++ compiler does not properly
1002 # handle `-M -o', and we need to detect this. Also, some Intel
1003 # versions had trouble with output in subdirs
1004 am__obj=sub/conftest.${OBJEXT-o}
1005 am__minus_obj="-o $am__obj"
1008 # This depmode causes a compiler race in universal mode.
1009 test "$am__universal" = false || continue
1012 # after this tag, mechanisms are not by side-effect, so they'll
1013 # only be used when explicitly requested
1014 if test "x$enable_dependency_tracking" = xyes; then
1020 msvisualcpp | msvcmsys)
1021 # This compiler won't grok `-c -o', but also, the minuso test has
1022 # not run yet. These depmodes are late enough in the game, and
1023 # so weak that their functioning should not be impacted.
1024 am__obj=conftest.${OBJEXT-o}
1029 if depmode=$depmode \
1030 source=sub/conftest.c object=$am__obj \
1031 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1032 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1033 >/dev/null 2>conftest.err &&
1034 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1035 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1036 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1037 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1038 # icc doesn't choke on unknown options, it will just issue warnings
1039 # or remarks (even with -Werror). So we grep stderr for any message
1040 # that says an option was ignored or not supported.
1041 # When given -MP, icc 7.0 and 7.1 complain thusly:
1042 # icc: Command line warning: ignoring option '-M'; no argument required
1043 # The diagnosis changed in icc 8.0:
1044 # icc: Command line remark: option '-MP' not supported
1045 if (grep 'ignoring option' conftest.err ||
1046 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1047 am_cv_$1_dependencies_compiler_type=$depmode
1056 am_cv_$1_dependencies_compiler_type=none
1059 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1060 AM_CONDITIONAL([am__fastdep$1], [
1061 test "x$enable_dependency_tracking" != xno \
1062 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1068 # Choose a directory name for dependency files.
1069 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1070 AC_DEFUN([AM_SET_DEPDIR],
1071 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1072 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1078 AC_DEFUN([AM_DEP_TRACK],
1079 [AC_ARG_ENABLE(dependency-tracking,
1080 [ --disable-dependency-tracking speeds up one-time build
1081 --enable-dependency-tracking do not reject slow dependency extractors])
1082 if test "x$enable_dependency_tracking" != xno; then
1083 am_depcomp="$ac_aux_dir/depcomp"
1086 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1087 AC_SUBST([AMDEPBACKSLASH])dnl
1088 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1091 # Generate code to set up dependency tracking. -*- Autoconf -*-
1093 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1094 # Free Software Foundation, Inc.
1096 # This file is free software; the Free Software Foundation
1097 # gives unlimited permission to copy and/or distribute it,
1098 # with or without modifications, as long as this notice is preserved.
1102 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1103 # ------------------------------
1104 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1106 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1107 # are listed without --file. Let's play safe and only enable the eval
1108 # if we detect the quoting.
1109 case $CONFIG_FILES in
1110 *\'*) eval set x "$CONFIG_FILES" ;;
1111 *) set x $CONFIG_FILES ;;
1116 # Strip MF so we end up with the name of the file.
1117 mf=`echo "$mf" | sed -e 's/:.*$//'`
1118 # Check whether this is an Automake generated Makefile or not.
1119 # We used to match only the files named `Makefile.in', but
1120 # some people rename them; so instead we look at the file content.
1121 # Grep'ing the first line is not enough: some people post-process
1122 # each Makefile.in and add a new line on top of each file to say so.
1123 # Grep'ing the whole file is not good either: AIX grep has a line
1124 # limit of 2048, but all sed's we know have understand at least 4000.
1125 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1126 dirpart=`AS_DIRNAME("$mf")`
1130 # Extract the definition of DEPDIR, am__include, and am__quote
1131 # from the Makefile without running `make'.
1132 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1133 test -z "$DEPDIR" && continue
1134 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1135 test -z "am__include" && continue
1136 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1137 # When using ansi2knr, U may be empty or an underscore; expand it
1138 U=`sed -n 's/^U = //p' < "$mf"`
1139 # Find all dependency output files, they are included files with
1140 # $(DEPDIR) in their names. We invoke sed twice because it is the
1141 # simplest approach to changing $(DEPDIR) to its actual value in the
1143 for file in `sed -n "
1144 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1145 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1146 # Make sure the directory exists.
1147 test -f "$dirpart/$file" && continue
1148 fdir=`AS_DIRNAME(["$file"])`
1149 AS_MKDIR_P([$dirpart/$fdir])
1150 # echo "creating $dirpart/$file"
1151 echo '# dummy' > "$dirpart/$file"
1155 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1158 # AM_OUTPUT_DEPENDENCY_COMMANDS
1159 # -----------------------------
1160 # This macro should only be invoked once -- use via AC_REQUIRE.
1162 # This code is only required when automatic dependency tracking
1163 # is enabled. FIXME. This creates each `.P' file that we will
1164 # need in order to bootstrap the dependency handling code.
1165 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1166 [AC_CONFIG_COMMANDS([depfiles],
1167 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1168 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1171 # Do all the work for Automake. -*- Autoconf -*-
1173 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1174 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1176 # This file is free software; the Free Software Foundation
1177 # gives unlimited permission to copy and/or distribute it,
1178 # with or without modifications, as long as this notice is preserved.
1182 # This macro actually does too much. Some checks are only needed if
1183 # your package does certain things. But this isn't really a big deal.
1185 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1186 # AM_INIT_AUTOMAKE([OPTIONS])
1187 # -----------------------------------------------
1188 # The call with PACKAGE and VERSION arguments is the old style
1189 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1190 # and VERSION should now be passed to AC_INIT and removed from
1191 # the call to AM_INIT_AUTOMAKE.
1192 # We support both call styles for the transition. After
1193 # the next Automake release, Autoconf can make the AC_INIT
1194 # arguments mandatory, and then we can depend on a new Autoconf
1195 # release and drop the old call support.
1196 AC_DEFUN([AM_INIT_AUTOMAKE],
1197 [AC_PREREQ([2.62])dnl
1198 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1199 dnl the ones we care about.
1200 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1201 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1202 AC_REQUIRE([AC_PROG_INSTALL])dnl
1203 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1204 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1205 # is not polluted with repeated "-I."
1206 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1207 # test to see if srcdir already configured
1208 if test -f $srcdir/config.status; then
1209 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1213 # test whether we have cygpath
1214 if test -z "$CYGPATH_W"; then
1215 if (cygpath --version) >/dev/null 2>/dev/null; then
1216 CYGPATH_W='cygpath -w'
1221 AC_SUBST([CYGPATH_W])
1223 # Define the identity of the package.
1224 dnl Distinguish between old-style and new-style calls.
1226 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1227 AC_SUBST([PACKAGE], [$1])dnl
1228 AC_SUBST([VERSION], [$2])],
1229 [_AM_SET_OPTIONS([$1])dnl
1230 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1231 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1232 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1233 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1234 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1236 _AM_IF_OPTION([no-define],,
1237 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1238 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1240 # Some tools Automake needs.
1241 AC_REQUIRE([AM_SANITY_CHECK])dnl
1242 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1243 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1244 AM_MISSING_PROG(AUTOCONF, autoconf)
1245 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1246 AM_MISSING_PROG(AUTOHEADER, autoheader)
1247 AM_MISSING_PROG(MAKEINFO, makeinfo)
1248 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1249 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1250 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1251 # We need awk for the "check" target. The system "awk" is bad on
1253 AC_REQUIRE([AC_PROG_AWK])dnl
1254 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1255 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1256 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1257 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1258 [_AM_PROG_TAR([v7])])])
1259 _AM_IF_OPTION([no-dependencies],,
1260 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1261 [_AM_DEPENDENCIES(CC)],
1262 [define([AC_PROG_CC],
1263 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1264 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1265 [_AM_DEPENDENCIES(CXX)],
1266 [define([AC_PROG_CXX],
1267 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1268 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1269 [_AM_DEPENDENCIES(OBJC)],
1270 [define([AC_PROG_OBJC],
1271 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1273 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1274 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1275 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1276 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1277 AC_CONFIG_COMMANDS_PRE(dnl
1278 [m4_provide_if([_AM_COMPILER_EXEEXT],
1279 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1282 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1283 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1284 dnl mangled by Autoconf and run in a shell conditional statement.
1285 m4_define([_AC_COMPILER_EXEEXT],
1286 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1289 # When config.status generates a header, we must update the stamp-h file.
1290 # This file resides in the same directory as the config header
1291 # that is generated. The stamp files are numbered to have different names.
1293 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1294 # loop where config.status creates the headers, so we can generate
1295 # our stamp files there.
1296 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1297 [# Compute $1's index in $config_headers.
1300 for _am_header in $config_headers :; do
1302 $_am_arg | $_am_arg:* )
1305 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1308 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1310 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1312 # This file is free software; the Free Software Foundation
1313 # gives unlimited permission to copy and/or distribute it,
1314 # with or without modifications, as long as this notice is preserved.
1316 # AM_PROG_INSTALL_SH
1317 # ------------------
1318 # Define $install_sh.
1319 AC_DEFUN([AM_PROG_INSTALL_SH],
1320 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1321 if test x"${install_sh}" != xset; then
1324 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1326 install_sh="\${SHELL} $am_aux_dir/install-sh"
1329 AC_SUBST(install_sh)])
1331 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1333 # This file is free software; the Free Software Foundation
1334 # gives unlimited permission to copy and/or distribute it,
1335 # with or without modifications, as long as this notice is preserved.
1339 # Check whether the underlying file-system supports filenames
1340 # with a leading dot. For instance MS-DOS doesn't.
1341 AC_DEFUN([AM_SET_LEADING_DOT],
1342 [rm -rf .tst 2>/dev/null
1343 mkdir .tst 2>/dev/null
1344 if test -d .tst; then
1349 rmdir .tst 2>/dev/null
1350 AC_SUBST([am__leading_dot])])
1352 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1355 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1356 # Free Software Foundation, Inc.
1358 # This file is free software; the Free Software Foundation
1359 # gives unlimited permission to copy and/or distribute it,
1360 # with or without modifications, as long as this notice is preserved.
1364 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1365 # ----------------------------------
1366 # Control maintainer-specific portions of Makefiles.
1367 # Default is to disable them, unless `enable' is passed literally.
1368 # For symmetry, `disable' may be passed as well. Anyway, the user
1369 # can override the default with the --enable/--disable switch.
1370 AC_DEFUN([AM_MAINTAINER_MODE],
1371 [m4_case(m4_default([$1], [disable]),
1372 [enable], [m4_define([am_maintainer_other], [disable])],
1373 [disable], [m4_define([am_maintainer_other], [enable])],
1374 [m4_define([am_maintainer_other], [enable])
1375 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1376 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1377 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1378 AC_ARG_ENABLE([maintainer-mode],
1379 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1380 (and sometimes confusing) to the casual installer],
1381 [USE_MAINTAINER_MODE=$enableval],
1382 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1383 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1384 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1385 MAINT=$MAINTAINER_MODE_TRUE
1386 AC_SUBST([MAINT])dnl
1390 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1392 # Check to see how 'make' treats includes. -*- Autoconf -*-
1394 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1396 # This file is free software; the Free Software Foundation
1397 # gives unlimited permission to copy and/or distribute it,
1398 # with or without modifications, as long as this notice is preserved.
1404 # Check to see how make treats includes.
1405 AC_DEFUN([AM_MAKE_INCLUDE],
1406 [am_make=${MAKE-make}
1407 cat > confinc << 'END'
1409 @echo this is the am__doit target
1412 # If we don't find an include directive, just comment out the code.
1413 AC_MSG_CHECKING([for style of include used by $am_make])
1417 # First try GNU make style include.
1418 echo "include confinc" > confmf
1419 # Ignore all kinds of additional output from `make'.
1420 case `$am_make -s -f confmf 2> /dev/null` in #(
1421 *the\ am__doit\ target*)
1427 # Now try BSD make style include.
1428 if test "$am__include" = "#"; then
1429 echo '.include "confinc"' > confmf
1430 case `$am_make -s -f confmf 2> /dev/null` in #(
1431 *the\ am__doit\ target*)
1432 am__include=.include
1438 AC_SUBST([am__include])
1439 AC_SUBST([am__quote])
1440 AC_MSG_RESULT([$_am_result])
1441 rm -f confinc confmf
1444 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1445 # Free Software Foundation, Inc.
1447 # This file is free software; the Free Software Foundation
1448 # gives unlimited permission to copy and/or distribute it,
1449 # with or without modifications, as long as this notice is preserved.
1455 # Like AC_PROG_CC_C_O, but changed for automake.
1456 AC_DEFUN([AM_PROG_CC_C_O],
1457 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1458 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1459 AC_REQUIRE_AUX_FILE([compile])dnl
1460 # FIXME: we rely on the cache variable name because
1461 # there is no other way.
1463 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1464 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1465 if test "$am_t" != yes; then
1466 # Losing compiler, so override with the script.
1467 # FIXME: It is wrong to rewrite CC.
1468 # But if we don't then we get into trouble of one sort or another.
1469 # A longer-term fix would be to have automake use am__CC in this case,
1470 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1471 CC="$am_aux_dir/compile $CC"
1473 dnl Make sure AC_PROG_CC is never called again, or it will override our
1475 m4_define([AC_PROG_CC],
1476 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1479 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1481 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1482 # Free Software Foundation, Inc.
1484 # This file is free software; the Free Software Foundation
1485 # gives unlimited permission to copy and/or distribute it,
1486 # with or without modifications, as long as this notice is preserved.
1490 # AM_MISSING_PROG(NAME, PROGRAM)
1491 # ------------------------------
1492 AC_DEFUN([AM_MISSING_PROG],
1493 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1494 $1=${$1-"${am_missing_run}$2"}
1498 # AM_MISSING_HAS_RUN
1499 # ------------------
1500 # Define MISSING if not defined so far and test if it supports --run.
1501 # If it does, set am_missing_run to use it, otherwise, to nothing.
1502 AC_DEFUN([AM_MISSING_HAS_RUN],
1503 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1504 AC_REQUIRE_AUX_FILE([missing])dnl
1505 if test x"${MISSING+set}" != xset; then
1508 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1510 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1513 # Use eval to expand $SHELL
1514 if eval "$MISSING --run true"; then
1515 am_missing_run="$MISSING --run "
1518 AC_MSG_WARN([`missing' script is too old or missing])
1522 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1524 # This file is free software; the Free Software Foundation
1525 # gives unlimited permission to copy and/or distribute it,
1526 # with or without modifications, as long as this notice is preserved.
1530 # Check for `mkdir -p'.
1531 AC_DEFUN([AM_PROG_MKDIR_P],
1532 [AC_PREREQ([2.60])dnl
1533 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1534 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1535 dnl while keeping a definition of mkdir_p for backward compatibility.
1536 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1537 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1538 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1539 dnl adjustment using top_builddir (which is defined more often than
1541 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1543 [[\\/$]]* | ?:[[\\/]]*) ;;
1544 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1548 # Helper functions for option handling. -*- Autoconf -*-
1550 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1552 # This file is free software; the Free Software Foundation
1553 # gives unlimited permission to copy and/or distribute it,
1554 # with or without modifications, as long as this notice is preserved.
1558 # _AM_MANGLE_OPTION(NAME)
1559 # -----------------------
1560 AC_DEFUN([_AM_MANGLE_OPTION],
1561 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1563 # _AM_SET_OPTION(NAME)
1564 # ------------------------------
1565 # Set option NAME. Presently that only means defining a flag for this option.
1566 AC_DEFUN([_AM_SET_OPTION],
1567 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1569 # _AM_SET_OPTIONS(OPTIONS)
1570 # ----------------------------------
1571 # OPTIONS is a space-separated list of Automake options.
1572 AC_DEFUN([_AM_SET_OPTIONS],
1573 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1575 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1576 # -------------------------------------------
1577 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1578 AC_DEFUN([_AM_IF_OPTION],
1579 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1581 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1583 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1584 # Free Software Foundation, Inc.
1586 # This file is free software; the Free Software Foundation
1587 # gives unlimited permission to copy and/or distribute it,
1588 # with or without modifications, as long as this notice is preserved.
1594 AC_DEFUN([AM_SANITY_CHECK],
1595 [AC_MSG_CHECKING([whether build environment is sane])
1598 echo timestamp > conftest.file
1599 # Reject unsafe characters in $srcdir or the absolute working directory
1600 # name. Accept space and tab only in the latter.
1604 *[[\\\"\#\$\&\'\`$am_lf]]*)
1605 AC_MSG_ERROR([unsafe absolute working directory name]);;
1608 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1609 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1612 # Do `set' in a subshell so we don't clobber the current shell's
1613 # arguments. Must try -L first in case configure is actually a
1614 # symlink; some systems play weird games with the mod time of symlinks
1615 # (eg FreeBSD returns the mod time of the symlink's containing
1618 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1619 if test "$[*]" = "X"; then
1621 set X `ls -t "$srcdir/configure" conftest.file`
1624 if test "$[*]" != "X $srcdir/configure conftest.file" \
1625 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1627 # If neither matched, then we have a broken ls. This can happen
1628 # if, for instance, CONFIG_SHELL is bash and it inherits a
1629 # broken ls alias from the environment. This has actually
1630 # happened. Such a system could not be considered "sane".
1631 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1632 alias in your environment])
1635 test "$[2]" = conftest.file
1641 AC_MSG_ERROR([newly created file is older than distributed files!
1642 Check your system clock])
1644 AC_MSG_RESULT(yes)])
1646 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1648 # This file is free software; the Free Software Foundation
1649 # gives unlimited permission to copy and/or distribute it,
1650 # with or without modifications, as long as this notice is preserved.
1652 # AM_PROG_INSTALL_STRIP
1653 # ---------------------
1654 # One issue with vendor `install' (even GNU) is that you can't
1655 # specify the program used to strip binaries. This is especially
1656 # annoying in cross-compiling environments, where the build's strip
1657 # is unlikely to handle the host's binaries.
1658 # Fortunately install-sh will honor a STRIPPROG variable, so we
1659 # always use install-sh in `make install-strip', and initialize
1660 # STRIPPROG with the value of the STRIP variable (set by the user).
1661 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1662 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1663 # Installed binaries are usually stripped using `strip' when the user
1664 # run `make install-strip'. However `strip' might not be the right
1665 # tool to use in cross-compilation environments, therefore Automake
1666 # will honor the `STRIP' environment variable to overrule this program.
1667 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1668 if test "$cross_compiling" != no; then
1669 AC_CHECK_TOOL([STRIP], [strip], :)
1671 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1672 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1674 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1676 # This file is free software; the Free Software Foundation
1677 # gives unlimited permission to copy and/or distribute it,
1678 # with or without modifications, as long as this notice is preserved.
1682 # _AM_SUBST_NOTMAKE(VARIABLE)
1683 # ---------------------------
1684 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1685 # This macro is traced by Automake.
1686 AC_DEFUN([_AM_SUBST_NOTMAKE])
1688 # AM_SUBST_NOTMAKE(VARIABLE)
1689 # ---------------------------
1690 # Public sister of _AM_SUBST_NOTMAKE.
1691 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1693 # Check how to create a tarball. -*- Autoconf -*-
1695 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1697 # This file is free software; the Free Software Foundation
1698 # gives unlimited permission to copy and/or distribute it,
1699 # with or without modifications, as long as this notice is preserved.
1703 # _AM_PROG_TAR(FORMAT)
1704 # --------------------
1705 # Check how to create a tarball in format FORMAT.
1706 # FORMAT should be one of `v7', `ustar', or `pax'.
1708 # Substitute a variable $(am__tar) that is a command
1709 # writing to stdout a FORMAT-tarball containing the directory
1711 # tardir=directory && $(am__tar) > result.tar
1713 # Substitute a variable $(am__untar) that extract such
1714 # a tarball read from stdin.
1715 # $(am__untar) < result.tar
1716 AC_DEFUN([_AM_PROG_TAR],
1717 [# Always define AMTAR for backward compatibility.
1718 AM_MISSING_PROG([AMTAR], [tar])
1720 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1721 [m4_case([$1], [ustar],, [pax],,
1722 [m4_fatal([Unknown tar format])])
1723 AC_MSG_CHECKING([how to create a $1 tar archive])
1724 # Loop over all known methods to create a tar archive until one works.
1725 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1726 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1727 # Do not fold the above two line into one, because Tru64 sh and
1728 # Solaris sh will not grok spaces in the rhs of `-'.
1729 for _am_tool in $_am_tools
1733 for _am_tar in tar gnutar gtar;
1735 AM_RUN_LOG([$_am_tar --version]) && break
1737 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1738 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1739 am__untar="$_am_tar -xf -"
1742 # Must skip GNU tar: if it does not support --format= it doesn't create
1743 # ustar tarball either.
1744 (tar --version) >/dev/null 2>&1 && continue
1745 am__tar='tar chf - "$$tardir"'
1746 am__tar_='tar chf - "$tardir"'
1747 am__untar='tar xf -'
1750 am__tar='pax -L -x $1 -w "$$tardir"'
1751 am__tar_='pax -L -x $1 -w "$tardir"'
1755 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1756 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1757 am__untar='cpio -i -H $1 -d'
1766 # If the value was cached, stop now. We just wanted to have am__tar
1767 # and am__untar set.
1768 test -n "${am_cv_prog_tar_$1}" && break
1770 # tar/untar a dummy directory, and stop if the command works
1773 echo GrepMe > conftest.dir/file
1774 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1776 if test -s conftest.tar; then
1777 AM_RUN_LOG([$am__untar <conftest.tar])
1778 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1783 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1784 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1786 AC_SUBST([am__untar])
1789 m4_include([acinclude.m4])