1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
25 # Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
26 # Written by Thomas Tanner, 1999
28 # This file is free software; the Free Software Foundation gives
29 # unlimited permission to copy and/or distribute it, with or without
30 # modifications, as long as this notice is preserved.
34 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
35 # ------------------------------------------
36 # DIRECTORY contains the libltdl sources. It is okay to call this
37 # function multiple times, as long as the same DIRECTORY is always given.
38 AC_DEFUN([LT_CONFIG_LTDL_DIR],
39 [AC_BEFORE([$0], [LTDL_INIT])
41 ])# LT_CONFIG_LTDL_DIR
43 # We break this out into a separate macro, so that we can call it safely
44 # internally without being caught accidentally by the sed scan in libtoolize.
45 m4_defun([_LT_CONFIG_LTDL_DIR],
46 [dnl remove trailing slashes
47 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
49 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
52 [m4_define([_LTDL_DIR], _ARG_DIR)
53 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
54 [m4_if(_ARG_DIR, _LTDL_DIR,
56 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
58 ])# _LT_CONFIG_LTDL_DIR
61 m4_define([_LTDL_DIR], [])
66 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
67 # to `${top_builddir}/'.
68 m4_define([_LT_BUILD_PREFIX],
69 [m4_ifdef([AC_AUTOCONF_VERSION],
70 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
71 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
72 [${top_build_prefix}],
74 [${top_build_prefix}])],
75 [${top_builddir}/])[]dnl
81 # sets LIBLTDL to the link flags for the libltdl convenience library and
82 # LTDLINCL to the include flags for the libltdl header and adds
83 # --enable-ltdl-convenience to the configure arguments. Note that
84 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
85 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
86 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
87 # quotes!). If your package is not flat and you're not using automake,
88 # define top_build_prefix, top_builddir, and top_srcdir appropriately
90 AC_DEFUN([LTDL_CONVENIENCE],
91 [AC_BEFORE([$0], [LTDL_INIT])dnl
92 dnl Although the argument is deprecated and no longer documented,
93 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
94 dnl here make sure it is the same as any other declaration of libltdl's
95 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
96 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
97 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
101 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
102 # now we have LT_CONFIG_LTDL_DIR:
103 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
104 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
107 dnl aclocal-1.4 backwards compatibility:
108 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
113 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
114 m4_defun([_LTDL_CONVENIENCE],
115 [case $enable_ltdl_convenience in
116 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
117 "") enable_ltdl_convenience=yes
118 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
120 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
122 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
128 # For backwards non-gettext consistent compatibility...
131 ])# _LTDL_CONVENIENCE
136 # sets LIBLTDL to the link flags for the libltdl installable library
137 # and LTDLINCL to the include flags for the libltdl header and adds
138 # --enable-ltdl-install to the configure arguments. Note that
139 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
140 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
141 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
142 # prefixed with '${top_srcdir}/' (note the single quotes!). If your
143 # package is not flat and you're not using automake, define top_build_prefix,
144 # top_builddir, and top_srcdir appropriately in your Makefiles.
145 # In the future, this macro may have to be called after LT_INIT.
146 AC_DEFUN([LTDL_INSTALLABLE],
147 [AC_BEFORE([$0], [LTDL_INIT])dnl
148 dnl Although the argument is deprecated and no longer documented,
149 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
150 dnl here make sure it is the same as any other declaration of libltdl's
151 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
152 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
153 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
157 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
158 # now we have LT_CONFIG_LTDL_DIR:
159 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
160 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
163 dnl aclocal-1.4 backwards compatibility:
164 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
169 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
170 m4_defun([_LTDL_INSTALLABLE],
171 [if test -f $prefix/lib/libltdl.la; then
172 lt_save_LDFLAGS="$LDFLAGS"
173 LDFLAGS="-L$prefix/lib $LDFLAGS"
174 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
175 LDFLAGS="$lt_save_LDFLAGS"
176 if test x"${lt_lib_ltdl-no}" = xyes; then
177 if test x"$enable_ltdl_install" != xyes; then
178 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
179 AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
180 enable_ltdl_install=no
182 elif test x"$enable_ltdl_install" = xno; then
183 AC_MSG_WARN([libltdl not installed, but installation disabled])
187 # If configure.ac declared an installable ltdl, and the user didn't override
188 # with --disable-ltdl-install, we will install the shipped libltdl.
189 case $enable_ltdl_install in
190 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
195 *) enable_ltdl_install=yes
196 ac_configure_args="$ac_configure_args --enable-ltdl-install"
197 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
199 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
207 # For backwards non-gettext consistent compatibility...
213 # _LTDL_MODE_DISPATCH
214 # -------------------
215 m4_define([_LTDL_MODE_DISPATCH],
216 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
219 dnl if _LTDL_MODE was not set already, the default value is `subproject':
220 [m4_case(m4_default(_LTDL_MODE, [subproject]),
221 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
222 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
223 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
225 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
226 dnl Be careful not to expand twice:
228 ])# _LTDL_MODE_DISPATCH
231 # _LT_LIBOBJ(MODULE_NAME)
232 # -----------------------
233 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
235 AC_DEFUN([_LT_LIBOBJ], [
236 m4_pattern_allow([^_LT_LIBOBJS$])
237 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
241 # LTDL_INIT([OPTIONS])
242 # --------------------
243 # Clients of libltdl can use this macro to allow the installer to
244 # choose between a shipped copy of the ltdl sources or a preinstalled
245 # version of the library. If the shipped ltdl sources are not in a
246 # subdirectory named libltdl, the directory name must be given by
247 # LT_CONFIG_LTDL_DIR.
248 AC_DEFUN([LTDL_INIT],
250 _LT_SET_OPTIONS([$0], [$1])
252 dnl We need to keep our own list of libobjs separate from our parent project,
253 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
254 dnl we look for our own LIBOBJs.
255 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
256 m4_pushdef([AC_LIBSOURCES])
258 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
259 m4_if(_LTDL_MODE, [],
260 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
261 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
262 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
264 AC_ARG_WITH([included_ltdl],
265 [AS_HELP_STRING([--with-included-ltdl],
266 [use the GNU ltdl sources included here])])
268 if test "x$with_included_ltdl" != xyes; then
269 # We are not being forced to use the included libltdl sources, so
270 # decide whether there is a useful installed version we can use.
271 AC_CHECK_HEADER([ltdl.h],
272 [AC_CHECK_DECL([lt_dlinterface_register],
273 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
274 [with_included_ltdl=no],
275 [with_included_ltdl=yes])],
276 [with_included_ltdl=yes],
278 #include <ltdl.h>])],
279 [with_included_ltdl=yes],
280 [AC_INCLUDES_DEFAULT]
284 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
285 dnl was called yet, then for old times' sake, we assume libltdl is in an
286 dnl eponymous directory:
287 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
289 AC_ARG_WITH([ltdl_include],
290 [AS_HELP_STRING([--with-ltdl-include=DIR],
291 [use the ltdl headers installed in DIR])])
293 if test -n "$with_ltdl_include"; then
294 if test -f "$with_ltdl_include/ltdl.h"; then :
296 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
302 AC_ARG_WITH([ltdl_lib],
303 [AS_HELP_STRING([--with-ltdl-lib=DIR],
304 [use the libltdl.la installed in DIR])])
306 if test -n "$with_ltdl_lib"; then
307 if test -f "$with_ltdl_lib/libltdl.la"; then :
309 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
315 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
317 m4_case(m4_default(_LTDL_TYPE, [convenience]),
318 [convenience], [_LTDL_CONVENIENCE],
319 [installable], [_LTDL_INSTALLABLE],
320 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
323 # If the included ltdl is not to be used, then use the
324 # preinstalled libltdl we found.
325 AC_DEFINE([HAVE_LTDL], [1],
326 [Define this if a modern libltdl is already installed])
332 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
334 *) with_included_ltdl=no
335 LIBLTDL="-L$with_ltdl_lib -lltdl"
337 LTDLINCL="-I$with_ltdl_include"
342 # Report our decision...
343 AC_MSG_CHECKING([where to find libltdl headers])
344 AC_MSG_RESULT([$LTDLINCL])
345 AC_MSG_CHECKING([where to find libltdl library])
346 AC_MSG_RESULT([$LIBLTDL])
350 dnl restore autoconf definition.
351 m4_popdef([AC_LIBOBJ])
352 m4_popdef([AC_LIBSOURCES])
354 AC_CONFIG_COMMANDS_PRE([
357 if test -n "$_LT_LIBOBJS"; then
358 # Remove the extension.
359 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
360 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
361 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
362 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
365 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
366 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
370 m4_define([LTDL_INIT])
374 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
375 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
376 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
377 dnl aclocal-1.4 backwards compatibility:
378 dnl AC_DEFUN([AC_LIB_LTDL], [])
379 dnl AC_DEFUN([AC_WITH_LTDL], [])
380 dnl AC_DEFUN([LT_WITH_LTDL], [])
385 # Perform all the checks necessary for compilation of the ltdl objects
386 # -- including compiler checks and header checks. This is a public
387 # interface mainly for the benefit of libltdl's own configure.ac, most
388 # other users should call LTDL_INIT instead.
389 AC_DEFUN([_LTDL_SETUP],
390 [AC_REQUIRE([AC_PROG_CC])dnl
391 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
392 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
393 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
394 AC_REQUIRE([LT_LIB_DLLOAD])dnl
395 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
396 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
397 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
398 AC_REQUIRE([gl_FUNC_ARGZ])dnl
400 m4_require([_LT_CHECK_OBJDIR])dnl
401 m4_require([_LT_HEADER_DLFCN])dnl
402 m4_require([_LT_CHECK_DLPREOPEN])dnl
403 m4_require([_LT_DECL_SED])dnl
405 dnl Don't require this, or it will be expanded earlier than the code
406 dnl that sets the variables it relies on:
409 dnl _LTDL_MODE specific code must be called at least once:
412 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
413 # the user used. This is so that ltdl.h can pick up the parent projects
414 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
415 # definitions required by ltdl.c.
416 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
417 AC_CONFIG_COMMANDS_PRE([dnl
418 m4_pattern_allow([^LT_CONFIG_H$])dnl
419 m4_ifset([AH_HEADER],
420 [LT_CONFIG_H=AH_HEADER],
421 [m4_ifset([AC_LIST_HEADERS],
422 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
424 AC_SUBST([LT_CONFIG_H])
426 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
427 [], [], [AC_INCLUDES_DEFAULT])
429 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
430 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
432 m4_pattern_allow([LT_LIBEXT])dnl
433 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
436 eval "lt_libprefix=\"$libname_spec\""
437 m4_pattern_allow([LT_LIBPREFIX])dnl
438 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
441 eval "LTDLOPEN=\"$libname_spec\""
448 m4_define([_LT_ENABLE_INSTALL],
449 [AC_ARG_ENABLE([ltdl-install],
450 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
452 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
454 *) enable_ltdl_convenience=yes ;;
457 m4_ifdef([AM_CONDITIONAL],
458 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
459 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
460 ])# _LT_ENABLE_INSTALL
463 # LT_SYS_DLOPEN_DEPLIBS
464 # ---------------------
465 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
466 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
467 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
468 [lt_cv_sys_dlopen_deplibs],
469 [# PORTME does your system automatically load deplibs for dlopen?
470 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
471 # For now, we just catch OSes we know something about -- in the
472 # future, we'll try test this programmatically.
473 lt_cv_sys_dlopen_deplibs=unknown
475 aix3*|aix4.1.*|aix4.2.*)
476 # Unknown whether this is true for these versions of AIX, but
477 # we want this `case' here to explicitly catch those versions.
478 lt_cv_sys_dlopen_deplibs=unknown
481 lt_cv_sys_dlopen_deplibs=yes
486 lt_cv_sys_dlopen_deplibs=no
491 # Assuming the user has installed a libdl from somewhere, this is true
492 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
493 lt_cv_sys_dlopen_deplibs=yes
495 freebsd* | dragonfly*)
496 lt_cv_sys_dlopen_deplibs=yes
498 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
499 # GNU and its variants, using gnu ld.so (Glibc)
500 lt_cv_sys_dlopen_deplibs=yes
503 lt_cv_sys_dlopen_deplibs=yes
506 lt_cv_sys_dlopen_deplibs=yes
508 irix[[12345]]*|irix6.[[01]]*)
509 # Catch all versions of IRIX before 6.2, and indicate that we don't
510 # know how it worked for any of those versions.
511 lt_cv_sys_dlopen_deplibs=unknown
514 # The case above catches anything before 6.2, and it's known that
515 # at 6.2 and later dlopen does load deplibs.
516 lt_cv_sys_dlopen_deplibs=yes
518 netbsd* | netbsdelf*-gnu)
519 lt_cv_sys_dlopen_deplibs=yes
522 lt_cv_sys_dlopen_deplibs=yes
525 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
526 # it did *not* use an RPATH in a shared library to find objects the
527 # library depends on, so we explicitly say `no'.
528 lt_cv_sys_dlopen_deplibs=no
530 osf5.0|osf5.0a|osf5.1)
531 # dlopen *does* load deplibs and with the right loader patch applied
532 # it even uses RPATH in a shared library to search for shared objects
533 # that the library depends on, but there's no easy way to know if that
534 # patch is installed. Since this is the case, all we can really
535 # say is unknown -- it depends on the patch being installed. If
536 # it is, this changes to `yes'. Without it, it would be `no'.
537 lt_cv_sys_dlopen_deplibs=unknown
540 # the two cases above should catch all versions of osf <= 5.1. Read
541 # the comments above for what we know about them.
542 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
543 # is used to find them so we can finally say `yes'.
544 lt_cv_sys_dlopen_deplibs=yes
547 lt_cv_sys_dlopen_deplibs=yes
550 lt_cv_sys_dlopen_deplibs=yes
552 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
553 libltdl_cv_sys_dlopen_deplibs=yes
557 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
558 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
559 [Define if the OS needs help to load dependent libraries for dlopen().])
561 ])# LT_SYS_DLOPEN_DEPLIBS
564 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
565 dnl aclocal-1.4 backwards compatibility:
566 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
571 AC_DEFUN([LT_SYS_MODULE_EXT],
572 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
573 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
574 [libltdl_cv_shlibext],
577 eval libltdl_cv_shlibext=$shrext_cmds
579 eval libltdl_cv_shrext=$shrext_cmds
581 if test -n "$libltdl_cv_shlibext"; then
582 m4_pattern_allow([LT_MODULE_EXT])dnl
583 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
584 [Define to the extension used for runtime loadable modules, say, ".so".])
586 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
587 m4_pattern_allow([LT_SHARED_EXT])dnl
588 AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
589 [Define to the shared library suffix, say, ".dylib".])
591 ])# LT_SYS_MODULE_EXT
594 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
595 dnl aclocal-1.4 backwards compatibility:
596 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
601 AC_DEFUN([LT_SYS_MODULE_PATH],
602 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
603 AC_CACHE_CHECK([which variable specifies run-time module search path],
604 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
605 if test -n "$lt_cv_module_path_var"; then
606 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
607 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
608 [Define to the name of the environment variable that determines the run-time module search path.])
610 ])# LT_SYS_MODULE_PATH
613 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
614 dnl aclocal-1.4 backwards compatibility:
615 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
618 # LT_SYS_DLSEARCH_PATH
619 # --------------------
620 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
621 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
622 AC_CACHE_CHECK([for the default library search path],
623 [lt_cv_sys_dlsearch_path],
624 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
625 if test -n "$lt_cv_sys_dlsearch_path"; then
627 for dir in $lt_cv_sys_dlsearch_path; do
628 if test -z "$sys_dlsearch_path"; then
629 sys_dlsearch_path="$dir"
631 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
634 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
635 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
636 [Define to the system default library search path.])
638 ])# LT_SYS_DLSEARCH_PATH
641 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
642 dnl aclocal-1.4 backwards compatibility:
643 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
646 # _LT_CHECK_DLPREOPEN
647 # -------------------
648 m4_defun([_LT_CHECK_DLPREOPEN],
649 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
650 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
651 [libltdl_cv_preloaded_symbols],
652 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
653 libltdl_cv_preloaded_symbols=yes
655 libltdl_cv_preloaded_symbols=no
658 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
659 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
660 [Define if libtool can extract symbol lists from object files.])
662 ])# _LT_CHECK_DLPREOPEN
667 AC_DEFUN([LT_LIB_DLLOAD],
668 [m4_pattern_allow([^LT_DLLOADERS$])
670 AC_SUBST([LT_DLLOADERS])
675 AC_SEARCH_LIBS([dlopen], [dl],
676 [AC_DEFINE([HAVE_LIBDL], [1],
677 [Define if you have the libdl library or equivalent.])
678 if test "$ac_cv_search_dlopen" != "none required" ; then
681 libltdl_cv_lib_dl_dlopen="yes"
682 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
683 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
686 ]], [[dlopen(0, 0);]])],
687 [AC_DEFINE([HAVE_LIBDL], [1],
688 [Define if you have the libdl library or equivalent.])
689 libltdl_cv_func_dlopen="yes"
690 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
691 [AC_CHECK_LIB([svld], [dlopen],
692 [AC_DEFINE([HAVE_LIBDL], [1],
693 [Define if you have the libdl library or equivalent.])
694 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
695 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
696 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
699 LIBS="$LIBS $LIBADD_DLOPEN"
700 AC_CHECK_FUNCS([dlerror])
703 AC_SUBST([LIBADD_DLOPEN])
706 AC_CHECK_FUNC([shl_load],
707 [AC_DEFINE([HAVE_SHL_LOAD], [1],
708 [Define if you have the shl_load function.])
709 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
710 [AC_CHECK_LIB([dld], [shl_load],
711 [AC_DEFINE([HAVE_SHL_LOAD], [1],
712 [Define if you have the shl_load function.])
713 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
714 LIBADD_SHL_LOAD="-ldld"])])
715 AC_SUBST([LIBADD_SHL_LOAD])
719 # We only want this for pre-Mac OS X 10.4.
720 AC_CHECK_FUNC([_dyld_func_lookup],
721 [AC_DEFINE([HAVE_DYLD], [1],
722 [Define if you have the _dyld_func_lookup function.])
723 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
726 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
728 cygwin* | mingw* | os2* | pw32*)
729 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
730 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
734 AC_CHECK_LIB([dld], [dld_link],
735 [AC_DEFINE([HAVE_DLD], [1],
736 [Define if you have the GNU dld library.])
737 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
738 AC_SUBST([LIBADD_DLD_LINK])
740 m4_pattern_allow([^LT_DLPREOPEN$])
742 if test -n "$LT_DLLOADERS"
744 for lt_loader in $LT_DLLOADERS; do
745 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
747 AC_DEFINE([HAVE_LIBDLLOADER], [1],
748 [Define if libdlloader will be built on this platform])
750 AC_SUBST([LT_DLPREOPEN])
752 dnl This isn't used anymore, but set it for backwards compatibility
753 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
754 AC_SUBST([LIBADD_DL])
760 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
761 dnl aclocal-1.4 backwards compatibility:
762 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
765 # LT_SYS_SYMBOL_USCORE
766 # --------------------
767 # does the compiler prefix global symbols with an underscore?
768 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
769 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
770 AC_CACHE_CHECK([for _ prefix in compiled symbols],
771 [lt_cv_sys_symbol_underscore],
772 [lt_cv_sys_symbol_underscore=no
773 cat > conftest.$ac_ext <<_LT_EOF
774 void nm_test_func(){}
775 int main(){nm_test_func;return 0;}
777 if AC_TRY_EVAL(ac_compile); then
778 # Now try to grab the symbols.
780 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
781 # See whether the symbols have a leading underscore.
782 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
783 lt_cv_sys_symbol_underscore=yes
785 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
788 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
792 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
795 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
796 cat conftest.c >&AS_MESSAGE_LOG_FD
800 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
801 AC_SUBST([sys_symbol_underscore])
802 ])# LT_SYS_SYMBOL_USCORE
805 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
806 dnl aclocal-1.4 backwards compatibility:
807 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
810 # LT_FUNC_DLSYM_USCORE
811 # --------------------
812 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
813 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
814 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
815 if test x"$libltdl_cv_func_dlopen" = xyes ||
816 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
817 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
818 [libltdl_cv_need_uscore],
819 [libltdl_cv_need_uscore=unknown
821 LIBS="$LIBS $LIBADD_DLOPEN"
823 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
824 [], [libltdl_cv_need_uscore=cross])
830 if test x"$libltdl_cv_need_uscore" = xyes; then
831 AC_DEFINE([NEED_USCORE], [1],
832 [Define if dlsym() requires a leading underscore in symbol names.])
834 ])# LT_FUNC_DLSYM_USCORE
837 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
838 dnl aclocal-1.4 backwards compatibility:
839 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
841 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
844 # This file is free software; the Free Software Foundation
845 # gives unlimited permission to copy and/or distribute it,
846 # with or without modifications, as long as this notice is preserved.
850 # AM_AUTOMAKE_VERSION(VERSION)
851 # ----------------------------
852 # Automake X.Y traces this macro to ensure aclocal.m4 has been
853 # generated from the m4 files accompanying Automake X.Y.
854 # (This private macro should not be called outside this file.)
855 AC_DEFUN([AM_AUTOMAKE_VERSION],
856 [am__api_version='1.11'
857 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
858 dnl require some minimum version. Point them to the right macro.
859 m4_if([$1], [1.11.6], [],
860 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
863 # _AM_AUTOCONF_VERSION(VERSION)
864 # -----------------------------
865 # aclocal traces this macro to find the Autoconf version.
866 # This is a private macro too. Using m4_define simplifies
867 # the logic in aclocal, which can simply ignore this definition.
868 m4_define([_AM_AUTOCONF_VERSION], [])
870 # AM_SET_CURRENT_AUTOMAKE_VERSION
871 # -------------------------------
872 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
873 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
874 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
875 [AM_AUTOMAKE_VERSION([1.11.6])dnl
876 m4_ifndef([AC_AUTOCONF_VERSION],
877 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
878 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
880 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
882 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
884 # This file is free software; the Free Software Foundation
885 # gives unlimited permission to copy and/or distribute it,
886 # with or without modifications, as long as this notice is preserved.
890 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
891 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
892 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
894 # Of course, Automake must honor this variable whenever it calls a
895 # tool from the auxiliary directory. The problem is that $srcdir (and
896 # therefore $ac_aux_dir as well) can be either absolute or relative,
897 # depending on how configure is run. This is pretty annoying, since
898 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
899 # source directory, any form will work fine, but in subdirectories a
900 # relative path needs to be adjusted first.
902 # $ac_aux_dir/missing
903 # fails when called from a subdirectory if $ac_aux_dir is relative
904 # $top_srcdir/$ac_aux_dir/missing
905 # fails if $ac_aux_dir is absolute,
906 # fails when called from a subdirectory in a VPATH build with
907 # a relative $ac_aux_dir
909 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
910 # are both prefixed by $srcdir. In an in-source build this is usually
911 # harmless because $srcdir is `.', but things will broke when you
912 # start a VPATH build or use an absolute $srcdir.
914 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
915 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
916 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
917 # and then we would define $MISSING as
918 # MISSING="\${SHELL} $am_aux_dir/missing"
919 # This will work as long as MISSING is not called from configure, because
920 # unfortunately $(top_srcdir) has no meaning in configure.
921 # However there are other variables, like CC, which are often used in
922 # configure, and could therefore not use this "fixed" $ac_aux_dir.
924 # Another solution, used here, is to always expand $ac_aux_dir to an
925 # absolute PATH. The drawback is that using absolute paths prevent a
926 # configured tree to be moved without reconfiguration.
928 AC_DEFUN([AM_AUX_DIR_EXPAND],
929 [dnl Rely on autoconf to set up CDPATH properly.
931 # expand $ac_aux_dir to an absolute path
932 am_aux_dir=`cd $ac_aux_dir && pwd`
935 # AM_CONDITIONAL -*- Autoconf -*-
937 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
938 # Free Software Foundation, Inc.
940 # This file is free software; the Free Software Foundation
941 # gives unlimited permission to copy and/or distribute it,
942 # with or without modifications, as long as this notice is preserved.
946 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
947 # -------------------------------------
948 # Define a conditional.
949 AC_DEFUN([AM_CONDITIONAL],
951 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
952 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
953 AC_SUBST([$1_TRUE])dnl
954 AC_SUBST([$1_FALSE])dnl
955 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
956 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
957 m4_define([_AM_COND_VALUE_$1], [$2])dnl
965 AC_CONFIG_COMMANDS_PRE(
966 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
967 AC_MSG_ERROR([[conditional "$1" was never defined.
968 Usually this means the macro was only invoked conditionally.]])
971 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
972 # 2010, 2011 Free Software Foundation, Inc.
974 # This file is free software; the Free Software Foundation
975 # gives unlimited permission to copy and/or distribute it,
976 # with or without modifications, as long as this notice is preserved.
980 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
981 # written in clear, in which case automake, when reading aclocal.m4,
982 # will think it sees a *use*, and therefore will trigger all it's
983 # C support machinery. Also note that it means that autoscan, seeing
984 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
987 # _AM_DEPENDENCIES(NAME)
988 # ----------------------
989 # See how the compiler implements dependency checking.
990 # NAME is "CC", "CXX", "GCJ", or "OBJC".
991 # We try a few techniques and use that to set a single cache variable.
993 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
994 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
995 # dependency, and given that the user is not expected to run this macro,
996 # just rely on AC_PROG_CC.
997 AC_DEFUN([_AM_DEPENDENCIES],
998 [AC_REQUIRE([AM_SET_DEPDIR])dnl
999 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1000 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1001 AC_REQUIRE([AM_DEP_TRACK])dnl
1003 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1004 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1005 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1006 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1007 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1008 [depcc="$$1" am_compiler_list=])
1010 AC_CACHE_CHECK([dependency style of $depcc],
1011 [am_cv_$1_dependencies_compiler_type],
1012 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1013 # We make a subdir and do the tests there. Otherwise we can end up
1014 # making bogus files that we don't know about and never remove. For
1015 # instance it was reported that on HP-UX the gcc test will end up
1016 # making a dummy file named `D' -- because `-MD' means `put the output
1020 # Copy depcomp to subdir because otherwise we won't find it if we're
1021 # using a relative directory.
1022 cp "$am_depcomp" conftest.dir
1024 # We will build objects and dependencies in a subdirectory because
1025 # it helps to detect inapplicable dependency modes. For instance
1026 # both Tru64's cc and ICC support -MD to output dependencies as a
1027 # side effect of compilation, but ICC will put the dependencies in
1028 # the current directory while Tru64 will put them in the object
1032 am_cv_$1_dependencies_compiler_type=none
1033 if test "$am_compiler_list" = ""; then
1034 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1038 [case " $depcc " in #(
1039 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1042 [case " $depcc " in #(
1043 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1046 for depmode in $am_compiler_list; do
1047 # Setup a source with many dependencies, because some compilers
1048 # like to wrap large dependency lists on column 80 (with \), and
1049 # we should not choose a depcomp mode which is confused by this.
1051 # We need to recreate these files for each test, as the compiler may
1052 # overwrite some of them when testing with obscure command lines.
1053 # This happens at least with the AIX C compiler.
1055 for i in 1 2 3 4 5 6; do
1056 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1057 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1058 # Solaris 8's {/usr,}/bin/sh.
1059 touch sub/conftst$i.h
1061 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1063 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1064 # mode. It turns out that the SunPro C++ compiler does not properly
1065 # handle `-M -o', and we need to detect this. Also, some Intel
1066 # versions had trouble with output in subdirs
1067 am__obj=sub/conftest.${OBJEXT-o}
1068 am__minus_obj="-o $am__obj"
1071 # This depmode causes a compiler race in universal mode.
1072 test "$am__universal" = false || continue
1075 # after this tag, mechanisms are not by side-effect, so they'll
1076 # only be used when explicitly requested
1077 if test "x$enable_dependency_tracking" = xyes; then
1083 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1084 # This compiler won't grok `-c -o', but also, the minuso test has
1085 # not run yet. These depmodes are late enough in the game, and
1086 # so weak that their functioning should not be impacted.
1087 am__obj=conftest.${OBJEXT-o}
1092 if depmode=$depmode \
1093 source=sub/conftest.c object=$am__obj \
1094 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1095 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1096 >/dev/null 2>conftest.err &&
1097 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1098 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1099 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1100 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1101 # icc doesn't choke on unknown options, it will just issue warnings
1102 # or remarks (even with -Werror). So we grep stderr for any message
1103 # that says an option was ignored or not supported.
1104 # When given -MP, icc 7.0 and 7.1 complain thusly:
1105 # icc: Command line warning: ignoring option '-M'; no argument required
1106 # The diagnosis changed in icc 8.0:
1107 # icc: Command line remark: option '-MP' not supported
1108 if (grep 'ignoring option' conftest.err ||
1109 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1110 am_cv_$1_dependencies_compiler_type=$depmode
1119 am_cv_$1_dependencies_compiler_type=none
1122 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1123 AM_CONDITIONAL([am__fastdep$1], [
1124 test "x$enable_dependency_tracking" != xno \
1125 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1131 # Choose a directory name for dependency files.
1132 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1133 AC_DEFUN([AM_SET_DEPDIR],
1134 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1135 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1141 AC_DEFUN([AM_DEP_TRACK],
1142 [AC_ARG_ENABLE(dependency-tracking,
1143 [ --disable-dependency-tracking speeds up one-time build
1144 --enable-dependency-tracking do not reject slow dependency extractors])
1145 if test "x$enable_dependency_tracking" != xno; then
1146 am_depcomp="$ac_aux_dir/depcomp"
1150 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1151 AC_SUBST([AMDEPBACKSLASH])dnl
1152 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1153 AC_SUBST([am__nodep])dnl
1154 _AM_SUBST_NOTMAKE([am__nodep])dnl
1157 # Generate code to set up dependency tracking. -*- Autoconf -*-
1159 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1160 # Free Software Foundation, Inc.
1162 # This file is free software; the Free Software Foundation
1163 # gives unlimited permission to copy and/or distribute it,
1164 # with or without modifications, as long as this notice is preserved.
1168 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1169 # ------------------------------
1170 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1172 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1173 # are listed without --file. Let's play safe and only enable the eval
1174 # if we detect the quoting.
1175 case $CONFIG_FILES in
1176 *\'*) eval set x "$CONFIG_FILES" ;;
1177 *) set x $CONFIG_FILES ;;
1182 # Strip MF so we end up with the name of the file.
1183 mf=`echo "$mf" | sed -e 's/:.*$//'`
1184 # Check whether this is an Automake generated Makefile or not.
1185 # We used to match only the files named `Makefile.in', but
1186 # some people rename them; so instead we look at the file content.
1187 # Grep'ing the first line is not enough: some people post-process
1188 # each Makefile.in and add a new line on top of each file to say so.
1189 # Grep'ing the whole file is not good either: AIX grep has a line
1190 # limit of 2048, but all sed's we know have understand at least 4000.
1191 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1192 dirpart=`AS_DIRNAME("$mf")`
1196 # Extract the definition of DEPDIR, am__include, and am__quote
1197 # from the Makefile without running `make'.
1198 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1199 test -z "$DEPDIR" && continue
1200 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1201 test -z "am__include" && continue
1202 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1203 # When using ansi2knr, U may be empty or an underscore; expand it
1204 U=`sed -n 's/^U = //p' < "$mf"`
1205 # Find all dependency output files, they are included files with
1206 # $(DEPDIR) in their names. We invoke sed twice because it is the
1207 # simplest approach to changing $(DEPDIR) to its actual value in the
1209 for file in `sed -n "
1210 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1211 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1212 # Make sure the directory exists.
1213 test -f "$dirpart/$file" && continue
1214 fdir=`AS_DIRNAME(["$file"])`
1215 AS_MKDIR_P([$dirpart/$fdir])
1216 # echo "creating $dirpart/$file"
1217 echo '# dummy' > "$dirpart/$file"
1221 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1224 # AM_OUTPUT_DEPENDENCY_COMMANDS
1225 # -----------------------------
1226 # This macro should only be invoked once -- use via AC_REQUIRE.
1228 # This code is only required when automatic dependency tracking
1229 # is enabled. FIXME. This creates each `.P' file that we will
1230 # need in order to bootstrap the dependency handling code.
1231 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1232 [AC_CONFIG_COMMANDS([depfiles],
1233 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1234 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1237 # Do all the work for Automake. -*- Autoconf -*-
1239 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1240 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1242 # This file is free software; the Free Software Foundation
1243 # gives unlimited permission to copy and/or distribute it,
1244 # with or without modifications, as long as this notice is preserved.
1248 # This macro actually does too much. Some checks are only needed if
1249 # your package does certain things. But this isn't really a big deal.
1251 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1252 # AM_INIT_AUTOMAKE([OPTIONS])
1253 # -----------------------------------------------
1254 # The call with PACKAGE and VERSION arguments is the old style
1255 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1256 # and VERSION should now be passed to AC_INIT and removed from
1257 # the call to AM_INIT_AUTOMAKE.
1258 # We support both call styles for the transition. After
1259 # the next Automake release, Autoconf can make the AC_INIT
1260 # arguments mandatory, and then we can depend on a new Autoconf
1261 # release and drop the old call support.
1262 AC_DEFUN([AM_INIT_AUTOMAKE],
1263 [AC_PREREQ([2.62])dnl
1264 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1265 dnl the ones we care about.
1266 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1267 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1268 AC_REQUIRE([AC_PROG_INSTALL])dnl
1269 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1270 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1271 # is not polluted with repeated "-I."
1272 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1273 # test to see if srcdir already configured
1274 if test -f $srcdir/config.status; then
1275 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1279 # test whether we have cygpath
1280 if test -z "$CYGPATH_W"; then
1281 if (cygpath --version) >/dev/null 2>/dev/null; then
1282 CYGPATH_W='cygpath -w'
1287 AC_SUBST([CYGPATH_W])
1289 # Define the identity of the package.
1290 dnl Distinguish between old-style and new-style calls.
1292 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1293 AC_SUBST([PACKAGE], [$1])dnl
1294 AC_SUBST([VERSION], [$2])],
1295 [_AM_SET_OPTIONS([$1])dnl
1296 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1297 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1298 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1299 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1300 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1302 _AM_IF_OPTION([no-define],,
1303 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1304 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1306 # Some tools Automake needs.
1307 AC_REQUIRE([AM_SANITY_CHECK])dnl
1308 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1309 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1310 AM_MISSING_PROG(AUTOCONF, autoconf)
1311 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1312 AM_MISSING_PROG(AUTOHEADER, autoheader)
1313 AM_MISSING_PROG(MAKEINFO, makeinfo)
1314 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1315 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1316 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1317 # We need awk for the "check" target. The system "awk" is bad on
1319 AC_REQUIRE([AC_PROG_AWK])dnl
1320 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1321 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1322 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1323 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1324 [_AM_PROG_TAR([v7])])])
1325 _AM_IF_OPTION([no-dependencies],,
1326 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1327 [_AM_DEPENDENCIES(CC)],
1328 [define([AC_PROG_CC],
1329 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1330 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1331 [_AM_DEPENDENCIES(CXX)],
1332 [define([AC_PROG_CXX],
1333 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1334 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1335 [_AM_DEPENDENCIES(OBJC)],
1336 [define([AC_PROG_OBJC],
1337 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1339 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1340 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1341 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1342 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1343 AC_CONFIG_COMMANDS_PRE(dnl
1344 [m4_provide_if([_AM_COMPILER_EXEEXT],
1345 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1348 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1349 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1350 dnl mangled by Autoconf and run in a shell conditional statement.
1351 m4_define([_AC_COMPILER_EXEEXT],
1352 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1355 # When config.status generates a header, we must update the stamp-h file.
1356 # This file resides in the same directory as the config header
1357 # that is generated. The stamp files are numbered to have different names.
1359 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1360 # loop where config.status creates the headers, so we can generate
1361 # our stamp files there.
1362 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1363 [# Compute $1's index in $config_headers.
1366 for _am_header in $config_headers :; do
1368 $_am_arg | $_am_arg:* )
1371 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1374 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1376 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1379 # This file is free software; the Free Software Foundation
1380 # gives unlimited permission to copy and/or distribute it,
1381 # with or without modifications, as long as this notice is preserved.
1385 # AM_PROG_INSTALL_SH
1386 # ------------------
1387 # Define $install_sh.
1388 AC_DEFUN([AM_PROG_INSTALL_SH],
1389 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1390 if test x"${install_sh}" != xset; then
1393 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1395 install_sh="\${SHELL} $am_aux_dir/install-sh"
1398 AC_SUBST(install_sh)])
1400 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1402 # This file is free software; the Free Software Foundation
1403 # gives unlimited permission to copy and/or distribute it,
1404 # with or without modifications, as long as this notice is preserved.
1408 # Check whether the underlying file-system supports filenames
1409 # with a leading dot. For instance MS-DOS doesn't.
1410 AC_DEFUN([AM_SET_LEADING_DOT],
1411 [rm -rf .tst 2>/dev/null
1412 mkdir .tst 2>/dev/null
1413 if test -d .tst; then
1418 rmdir .tst 2>/dev/null
1419 AC_SUBST([am__leading_dot])])
1421 # Check to see how 'make' treats includes. -*- Autoconf -*-
1423 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1425 # This file is free software; the Free Software Foundation
1426 # gives unlimited permission to copy and/or distribute it,
1427 # with or without modifications, as long as this notice is preserved.
1433 # Check to see how make treats includes.
1434 AC_DEFUN([AM_MAKE_INCLUDE],
1435 [am_make=${MAKE-make}
1436 cat > confinc << 'END'
1438 @echo this is the am__doit target
1441 # If we don't find an include directive, just comment out the code.
1442 AC_MSG_CHECKING([for style of include used by $am_make])
1446 # First try GNU make style include.
1447 echo "include confinc" > confmf
1448 # Ignore all kinds of additional output from `make'.
1449 case `$am_make -s -f confmf 2> /dev/null` in #(
1450 *the\ am__doit\ target*)
1456 # Now try BSD make style include.
1457 if test "$am__include" = "#"; then
1458 echo '.include "confinc"' > confmf
1459 case `$am_make -s -f confmf 2> /dev/null` in #(
1460 *the\ am__doit\ target*)
1461 am__include=.include
1467 AC_SUBST([am__include])
1468 AC_SUBST([am__quote])
1469 AC_MSG_RESULT([$_am_result])
1470 rm -f confinc confmf
1473 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1475 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1476 # Free Software Foundation, Inc.
1478 # This file is free software; the Free Software Foundation
1479 # gives unlimited permission to copy and/or distribute it,
1480 # with or without modifications, as long as this notice is preserved.
1484 # AM_MISSING_PROG(NAME, PROGRAM)
1485 # ------------------------------
1486 AC_DEFUN([AM_MISSING_PROG],
1487 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1488 $1=${$1-"${am_missing_run}$2"}
1492 # AM_MISSING_HAS_RUN
1493 # ------------------
1494 # Define MISSING if not defined so far and test if it supports --run.
1495 # If it does, set am_missing_run to use it, otherwise, to nothing.
1496 AC_DEFUN([AM_MISSING_HAS_RUN],
1497 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1498 AC_REQUIRE_AUX_FILE([missing])dnl
1499 if test x"${MISSING+set}" != xset; then
1502 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1504 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1507 # Use eval to expand $SHELL
1508 if eval "$MISSING --run true"; then
1509 am_missing_run="$MISSING --run "
1512 AC_MSG_WARN([`missing' script is too old or missing])
1516 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1519 # This file is free software; the Free Software Foundation
1520 # gives unlimited permission to copy and/or distribute it,
1521 # with or without modifications, as long as this notice is preserved.
1527 # Check for `mkdir -p'.
1528 AC_DEFUN([AM_PROG_MKDIR_P],
1529 [AC_PREREQ([2.60])dnl
1530 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1531 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1532 dnl while keeping a definition of mkdir_p for backward compatibility.
1533 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1534 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1535 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1536 dnl adjustment using top_builddir (which is defined more often than
1538 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1540 [[\\/$]]* | ?:[[\\/]]*) ;;
1541 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1545 # Helper functions for option handling. -*- Autoconf -*-
1547 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
1550 # This file is free software; the Free Software Foundation
1551 # gives unlimited permission to copy and/or distribute it,
1552 # with or without modifications, as long as this notice is preserved.
1556 # _AM_MANGLE_OPTION(NAME)
1557 # -----------------------
1558 AC_DEFUN([_AM_MANGLE_OPTION],
1559 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1561 # _AM_SET_OPTION(NAME)
1562 # --------------------
1563 # Set option NAME. Presently that only means defining a flag for this option.
1564 AC_DEFUN([_AM_SET_OPTION],
1565 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1567 # _AM_SET_OPTIONS(OPTIONS)
1568 # ------------------------
1569 # OPTIONS is a space-separated list of Automake options.
1570 AC_DEFUN([_AM_SET_OPTIONS],
1571 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1573 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1574 # -------------------------------------------
1575 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1576 AC_DEFUN([_AM_IF_OPTION],
1577 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1579 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1581 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1582 # Free Software Foundation, Inc.
1584 # This file is free software; the Free Software Foundation
1585 # gives unlimited permission to copy and/or distribute it,
1586 # with or without modifications, as long as this notice is preserved.
1592 AC_DEFUN([AM_SANITY_CHECK],
1593 [AC_MSG_CHECKING([whether build environment is sane])
1596 echo timestamp > conftest.file
1597 # Reject unsafe characters in $srcdir or the absolute working directory
1598 # name. Accept space and tab only in the latter.
1602 *[[\\\"\#\$\&\'\`$am_lf]]*)
1603 AC_MSG_ERROR([unsafe absolute working directory name]);;
1606 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1607 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1610 # Do `set' in a subshell so we don't clobber the current shell's
1611 # arguments. Must try -L first in case configure is actually a
1612 # symlink; some systems play weird games with the mod time of symlinks
1613 # (eg FreeBSD returns the mod time of the symlink's containing
1616 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1617 if test "$[*]" = "X"; then
1619 set X `ls -t "$srcdir/configure" conftest.file`
1622 if test "$[*]" != "X $srcdir/configure conftest.file" \
1623 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1625 # If neither matched, then we have a broken ls. This can happen
1626 # if, for instance, CONFIG_SHELL is bash and it inherits a
1627 # broken ls alias from the environment. This has actually
1628 # happened. Such a system could not be considered "sane".
1629 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1630 alias in your environment])
1633 test "$[2]" = conftest.file
1639 AC_MSG_ERROR([newly created file is older than distributed files!
1640 Check your system clock])
1642 AC_MSG_RESULT(yes)])
1644 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1646 # This file is free software; the Free Software Foundation
1647 # gives unlimited permission to copy and/or distribute it,
1648 # 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, 2010 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, 2012 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. Yes, it's still used
1718 # in the wild :-( We should find a proper way to deprecate it ...
1719 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1721 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1722 [m4_case([$1], [ustar],, [pax],,
1723 [m4_fatal([Unknown tar format])])
1724 AC_MSG_CHECKING([how to create a $1 tar archive])
1725 # Loop over all known methods to create a tar archive until one works.
1726 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1727 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1728 # Do not fold the above two line into one, because Tru64 sh and
1729 # Solaris sh will not grok spaces in the rhs of `-'.
1730 for _am_tool in $_am_tools
1734 for _am_tar in tar gnutar gtar;
1736 AM_RUN_LOG([$_am_tar --version]) && break
1738 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1739 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1740 am__untar="$_am_tar -xf -"
1743 # Must skip GNU tar: if it does not support --format= it doesn't create
1744 # ustar tarball either.
1745 (tar --version) >/dev/null 2>&1 && continue
1746 am__tar='tar chf - "$$tardir"'
1747 am__tar_='tar chf - "$tardir"'
1748 am__untar='tar xf -'
1751 am__tar='pax -L -x $1 -w "$$tardir"'
1752 am__tar_='pax -L -x $1 -w "$tardir"'
1756 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1757 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1758 am__untar='cpio -i -H $1 -d'
1767 # If the value was cached, stop now. We just wanted to have am__tar
1768 # and am__untar set.
1769 test -n "${am_cv_prog_tar_$1}" && break
1771 # tar/untar a dummy directory, and stop if the command works
1774 echo GrepMe > conftest.dir/file
1775 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1777 if test -s conftest.tar; then
1778 AM_RUN_LOG([$am__untar <conftest.tar])
1779 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1784 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1785 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1787 AC_SUBST([am__untar])
1790 m4_include([m4/libtool.m4])
1791 m4_include([m4/ltoptions.m4])
1792 m4_include([m4/ltsugar.m4])
1793 m4_include([m4/ltversion.m4])
1794 m4_include([m4/lt~obsolete.m4])
1795 m4_include([m4/pkg.m4])