* Fix a typo in the dpkg changelog.
[deb_shairplay.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5 # Inc.
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.
9
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
13 # PARTICULAR PURPOSE.
14
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'.])])
22
23 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
24 #
25 # Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
26 # Written by Thomas Tanner, 1999
27 #
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.
31
32 # serial 18 LTDL_INIT
33
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])
40 _$0($*)
41 ])# LT_CONFIG_LTDL_DIR
42
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], [/*$]))
48 m4_case(_LTDL_DIR,
49 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
50 m4_if(_ARG_DIR, [.],
51 [],
52 [m4_define([_LTDL_DIR], _ARG_DIR)
53 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
54 [m4_if(_ARG_DIR, _LTDL_DIR,
55 [],
56 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
57 m4_popdef([_ARG_DIR])
58 ])# _LT_CONFIG_LTDL_DIR
59
60 # Initialise:
61 m4_define([_LTDL_DIR], [])
62
63
64 # _LT_BUILD_PREFIX
65 # ----------------
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}],
73 [${top_builddir}/])],
74 [${top_build_prefix}])],
75 [${top_builddir}/])[]dnl
76 ])
77
78
79 # LTDL_CONVENIENCE
80 # ----------------
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
89 # in your Makefiles.
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
98 _$0()
99 ])# LTDL_CONVENIENCE
100
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])])
105 _LTDL_CONVENIENCE])
106
107 dnl aclocal-1.4 backwards compatibility:
108 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
109
110
111 # _LTDL_CONVENIENCE
112 # -----------------
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" ;;
119 esac
120 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
121 LTDLDEPS=$LIBLTDL
122 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
123
124 AC_SUBST([LIBLTDL])
125 AC_SUBST([LTDLDEPS])
126 AC_SUBST([LTDLINCL])
127
128 # For backwards non-gettext consistent compatibility...
129 INCLTDL="$LTDLINCL"
130 AC_SUBST([INCLTDL])
131 ])# _LTDL_CONVENIENCE
132
133
134 # LTDL_INSTALLABLE
135 # ----------------
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
154 _$0()
155 ])# LTDL_INSTALLABLE
156
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])])
161 _LTDL_INSTALLABLE])
162
163 dnl aclocal-1.4 backwards compatibility:
164 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
165
166
167 # _LTDL_INSTALLABLE
168 # -----------------
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
181 fi
182 elif test x"$enable_ltdl_install" = xno; then
183 AC_MSG_WARN([libltdl not installed, but installation disabled])
184 fi
185 fi
186
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"
191 LIBLTDL="-lltdl"
192 LTDLDEPS=
193 LTDLINCL=
194 ;;
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"
198 LTDLDEPS=$LIBLTDL
199 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
200 ;;
201 esac
202
203 AC_SUBST([LIBLTDL])
204 AC_SUBST([LTDLDEPS])
205 AC_SUBST([LTDLINCL])
206
207 # For backwards non-gettext consistent compatibility...
208 INCLTDL="$LTDLINCL"
209 AC_SUBST([INCLTDL])
210 ])# LTDL_INSTALLABLE
211
212
213 # _LTDL_MODE_DISPATCH
214 # -------------------
215 m4_define([_LTDL_MODE_DISPATCH],
216 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
217 m4_if(_LTDL_DIR, [],
218 [],
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/"])],
224 [recursive], [],
225 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
226 dnl Be careful not to expand twice:
227 m4_define([$0], [])
228 ])# _LTDL_MODE_DISPATCH
229
230
231 # _LT_LIBOBJ(MODULE_NAME)
232 # -----------------------
233 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
234 # of into LIBOBJS.
235 AC_DEFUN([_LT_LIBOBJ], [
236 m4_pattern_allow([^_LT_LIBOBJS$])
237 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
238 ])# _LT_LIBOBJS
239
240
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],
249 [dnl Parse OPTIONS
250 _LT_SET_OPTIONS([$0], [$1])
251
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])
257
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)])])
263
264 AC_ARG_WITH([included_ltdl],
265 [AS_HELP_STRING([--with-included-ltdl],
266 [use the GNU ltdl sources included here])])
267
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],
277 [AC_INCLUDES_DEFAULT
278 #include <ltdl.h>])],
279 [with_included_ltdl=yes],
280 [AC_INCLUDES_DEFAULT]
281 )
282 fi
283
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])])
288
289 AC_ARG_WITH([ltdl_include],
290 [AS_HELP_STRING([--with-ltdl-include=DIR],
291 [use the ltdl headers installed in DIR])])
292
293 if test -n "$with_ltdl_include"; then
294 if test -f "$with_ltdl_include/ltdl.h"; then :
295 else
296 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
297 fi
298 else
299 with_ltdl_include=no
300 fi
301
302 AC_ARG_WITH([ltdl_lib],
303 [AS_HELP_STRING([--with-ltdl-lib=DIR],
304 [use the libltdl.la installed in DIR])])
305
306 if test -n "$with_ltdl_lib"; then
307 if test -f "$with_ltdl_lib/libltdl.la"; then :
308 else
309 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
310 fi
311 else
312 with_ltdl_lib=no
313 fi
314
315 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
316 ,yes,no,no,)
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)])
321 ;;
322 ,no,no,no,)
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])
327 LIBLTDL=-lltdl
328 LTDLDEPS=
329 LTDLINCL=
330 ;;
331 ,no*,no,*)
332 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
333 ;;
334 *) with_included_ltdl=no
335 LIBLTDL="-L$with_ltdl_lib -lltdl"
336 LTDLDEPS=
337 LTDLINCL="-I$with_ltdl_include"
338 ;;
339 esac
340 INCLTDL="$LTDLINCL"
341
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])
347
348 _LTDL_SETUP
349
350 dnl restore autoconf definition.
351 m4_popdef([AC_LIBOBJ])
352 m4_popdef([AC_LIBSOURCES])
353
354 AC_CONFIG_COMMANDS_PRE([
355 _ltdl_libobjs=
356 _ltdl_ltlibobjs=
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"
363 done
364 fi
365 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
366 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
367 ])
368
369 # Only expand once:
370 m4_define([LTDL_INIT])
371 ])# LTDL_INIT
372
373 # Old names:
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], [])
381
382
383 # _LTDL_SETUP
384 # -----------
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
399
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
404
405 dnl Don't require this, or it will be expanded earlier than the code
406 dnl that sets the variables it relies on:
407 _LT_ENABLE_INSTALL
408
409 dnl _LTDL_MODE specific code must be called at least once:
410 _LTDL_MODE_DISPATCH
411
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,[[ :]].*$,,'`],
423 [])])])
424 AC_SUBST([LT_CONFIG_H])
425
426 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
427 [], [], [AC_INCLUDES_DEFAULT])
428
429 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
430 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
431
432 m4_pattern_allow([LT_LIBEXT])dnl
433 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
434
435 name=
436 eval "lt_libprefix=\"$libname_spec\""
437 m4_pattern_allow([LT_LIBPREFIX])dnl
438 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
439
440 name=ltdl
441 eval "LTDLOPEN=\"$libname_spec\""
442 AC_SUBST([LTDLOPEN])
443 ])# _LTDL_SETUP
444
445
446 # _LT_ENABLE_INSTALL
447 # ------------------
448 m4_define([_LT_ENABLE_INSTALL],
449 [AC_ARG_ENABLE([ltdl-install],
450 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
451
452 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
453 *yes*) ;;
454 *) enable_ltdl_convenience=yes ;;
455 esac
456
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
461
462
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
474 case $host_os in
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
479 ;;
480 aix[[4-9]]*)
481 lt_cv_sys_dlopen_deplibs=yes
482 ;;
483 amigaos*)
484 case $host_cpu in
485 powerpc)
486 lt_cv_sys_dlopen_deplibs=no
487 ;;
488 esac
489 ;;
490 darwin*)
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
494 ;;
495 freebsd* | dragonfly*)
496 lt_cv_sys_dlopen_deplibs=yes
497 ;;
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
501 ;;
502 hpux10*|hpux11*)
503 lt_cv_sys_dlopen_deplibs=yes
504 ;;
505 interix*)
506 lt_cv_sys_dlopen_deplibs=yes
507 ;;
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
512 ;;
513 irix*)
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
517 ;;
518 netbsd* | netbsdelf*-gnu)
519 lt_cv_sys_dlopen_deplibs=yes
520 ;;
521 openbsd*)
522 lt_cv_sys_dlopen_deplibs=yes
523 ;;
524 osf[[1234]]*)
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
529 ;;
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
538 ;;
539 osf*)
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
545 ;;
546 qnx*)
547 lt_cv_sys_dlopen_deplibs=yes
548 ;;
549 solaris*)
550 lt_cv_sys_dlopen_deplibs=yes
551 ;;
552 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
553 libltdl_cv_sys_dlopen_deplibs=yes
554 ;;
555 esac
556 ])
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().])
560 fi
561 ])# LT_SYS_DLOPEN_DEPLIBS
562
563 # Old name:
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], [])
567
568
569 # LT_SYS_MODULE_EXT
570 # -----------------
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],
575 [
576 module=yes
577 eval libltdl_cv_shlibext=$shrext_cmds
578 module=no
579 eval libltdl_cv_shrext=$shrext_cmds
580 ])
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".])
585 fi
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".])
590 fi
591 ])# LT_SYS_MODULE_EXT
592
593 # Old name:
594 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
595 dnl aclocal-1.4 backwards compatibility:
596 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
597
598
599 # LT_SYS_MODULE_PATH
600 # ------------------
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.])
609 fi
610 ])# LT_SYS_MODULE_PATH
611
612 # Old name:
613 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
614 dnl aclocal-1.4 backwards compatibility:
615 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
616
617
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
626 sys_dlsearch_path=
627 for dir in $lt_cv_sys_dlsearch_path; do
628 if test -z "$sys_dlsearch_path"; then
629 sys_dlsearch_path="$dir"
630 else
631 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
632 fi
633 done
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.])
637 fi
638 ])# LT_SYS_DLSEARCH_PATH
639
640 # Old name:
641 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
642 dnl aclocal-1.4 backwards compatibility:
643 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
644
645
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
654 else
655 libltdl_cv_preloaded_symbols=no
656 fi
657 ])
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.])
661 fi
662 ])# _LT_CHECK_DLPREOPEN
663
664
665 # LT_LIB_DLLOAD
666 # -------------
667 AC_DEFUN([LT_LIB_DLLOAD],
668 [m4_pattern_allow([^LT_DLLOADERS$])
669 LT_DLLOADERS=
670 AC_SUBST([LT_DLLOADERS])
671
672 AC_LANG_PUSH([C])
673
674 LIBADD_DLOPEN=
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
679 LIBADD_DLOPEN="-ldl"
680 fi
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
684 # include <dlfcn.h>
685 #endif
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
697 then
698 lt_save_LIBS="$LIBS"
699 LIBS="$LIBS $LIBADD_DLOPEN"
700 AC_CHECK_FUNCS([dlerror])
701 LIBS="$lt_save_LIBS"
702 fi
703 AC_SUBST([LIBADD_DLOPEN])
704
705 LIBADD_SHL_LOAD=
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])
716
717 case $host_os in
718 darwin[[1567]].*)
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"])
724 ;;
725 beos*)
726 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
727 ;;
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"
731 ;;
732 esac
733
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])
739
740 m4_pattern_allow([^LT_DLPREOPEN$])
741 LT_DLPREOPEN=
742 if test -n "$LT_DLLOADERS"
743 then
744 for lt_loader in $LT_DLLOADERS; do
745 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
746 done
747 AC_DEFINE([HAVE_LIBDLLOADER], [1],
748 [Define if libdlloader will be built on this platform])
749 fi
750 AC_SUBST([LT_DLPREOPEN])
751
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])
755
756 AC_LANG_POP
757 ])# LT_LIB_DLLOAD
758
759 # Old name:
760 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
761 dnl aclocal-1.4 backwards compatibility:
762 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
763
764
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;}
776 _LT_EOF
777 if AC_TRY_EVAL(ac_compile); then
778 # Now try to grab the symbols.
779 ac_nlist=conftest.nm
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
784 else
785 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
786 :
787 else
788 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
789 fi
790 fi
791 else
792 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
793 fi
794 else
795 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
796 cat conftest.c >&AS_MESSAGE_LOG_FD
797 fi
798 rm -rf conftest*
799 ])
800 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
801 AC_SUBST([sys_symbol_underscore])
802 ])# LT_SYS_SYMBOL_USCORE
803
804 # Old name:
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], [])
808
809
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
820 save_LIBS="$LIBS"
821 LIBS="$LIBS $LIBADD_DLOPEN"
822 _LT_TRY_DLOPEN_SELF(
823 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
824 [], [libltdl_cv_need_uscore=cross])
825 LIBS="$save_LIBS"
826 ])
827 fi
828 fi
829
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.])
833 fi
834 ])# LT_FUNC_DLSYM_USCORE
835
836 # Old name:
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], [])
840
841 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
842 # Foundation, Inc.
843 #
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.
847
848 # serial 1
849
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
861 ])
862
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], [])
869
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]))])
879
880 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
881
882 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
883 #
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.
887
888 # serial 1
889
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/../..'.
893 #
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.
901 #
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
908 #
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.
913 #
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.
923 #
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.
927
928 AC_DEFUN([AM_AUX_DIR_EXPAND],
929 [dnl Rely on autoconf to set up CDPATH properly.
930 AC_PREREQ([2.50])dnl
931 # expand $ac_aux_dir to an absolute path
932 am_aux_dir=`cd $ac_aux_dir && pwd`
933 ])
934
935 # AM_CONDITIONAL -*- Autoconf -*-
936
937 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
938 # Free Software Foundation, Inc.
939 #
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.
943
944 # serial 9
945
946 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
947 # -------------------------------------
948 # Define a conditional.
949 AC_DEFUN([AM_CONDITIONAL],
950 [AC_PREREQ(2.52)dnl
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
958 if $2; then
959 $1_TRUE=
960 $1_FALSE='#'
961 else
962 $1_TRUE='#'
963 $1_FALSE=
964 fi
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.]])
969 fi])])
970
971 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
972 # 2010, 2011 Free Software Foundation, Inc.
973 #
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.
977
978 # serial 12
979
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...
985
986
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.
992 #
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
1002
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=])
1009
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
1017 # in D'.
1018 rm -rf conftest.dir
1019 mkdir conftest.dir
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
1023 cd 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
1029 # directory.
1030 mkdir sub
1031
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`
1035 fi
1036 am__universal=false
1037 m4_case([$1], [CC],
1038 [case " $depcc " in #(
1039 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1040 esac],
1041 [CXX],
1042 [case " $depcc " in #(
1043 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1044 esac])
1045
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.
1050 #
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.
1054 : > sub/conftest.c
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
1060 done
1061 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1062
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"
1069 case $depmode in
1070 gcc)
1071 # This depmode causes a compiler race in universal mode.
1072 test "$am__universal" = false || continue
1073 ;;
1074 nosideeffect)
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
1078 continue
1079 else
1080 break
1081 fi
1082 ;;
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}
1088 am__minus_obj=
1089 ;;
1090 none) break ;;
1091 esac
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
1111 break
1112 fi
1113 fi
1114 done
1115
1116 cd ..
1117 rm -rf conftest.dir
1118 else
1119 am_cv_$1_dependencies_compiler_type=none
1120 fi
1121 ])
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])
1126 ])
1127
1128
1129 # AM_SET_DEPDIR
1130 # -------------
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
1136 ])
1137
1138
1139 # AM_DEP_TRACK
1140 # ------------
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"
1147 AMDEPBACKSLASH='\'
1148 am__nodep='_no'
1149 fi
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
1155 ])
1156
1157 # Generate code to set up dependency tracking. -*- Autoconf -*-
1158
1159 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1160 # Free Software Foundation, Inc.
1161 #
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.
1165
1166 #serial 5
1167
1168 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1169 # ------------------------------
1170 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1171 [{
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 ;;
1178 esac
1179 shift
1180 for mf
1181 do
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")`
1193 else
1194 continue
1195 fi
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
1208 # expansion.
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"
1218 done
1219 done
1220 }
1221 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1222
1223
1224 # AM_OUTPUT_DEPENDENCY_COMMANDS
1225 # -----------------------------
1226 # This macro should only be invoked once -- use via AC_REQUIRE.
1227 #
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"])
1235 ])
1236
1237 # Do all the work for Automake. -*- Autoconf -*-
1238
1239 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1240 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1241 #
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.
1245
1246 # serial 16
1247
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.
1250
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])
1276 fi
1277 fi
1278
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'
1283 else
1284 CYGPATH_W=echo
1285 fi
1286 fi
1287 AC_SUBST([CYGPATH_W])
1288
1289 # Define the identity of the package.
1290 dnl Distinguish between old-style and new-style calls.
1291 m4_ifval([$2],
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
1301
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
1305
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
1318 # some platforms.
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
1338 ])
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
1346 ])
1347
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])])
1353
1354
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.
1358
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.
1364 _am_arg=$1
1365 _am_stamp_count=1
1366 for _am_header in $config_headers :; do
1367 case $_am_header in
1368 $_am_arg | $_am_arg:* )
1369 break ;;
1370 * )
1371 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1372 esac
1373 done
1374 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1375
1376 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1377 # Inc.
1378 #
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.
1382
1383 # serial 1
1384
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
1391 case $am_aux_dir in
1392 *\ * | *\ *)
1393 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1394 *)
1395 install_sh="\${SHELL} $am_aux_dir/install-sh"
1396 esac
1397 fi
1398 AC_SUBST(install_sh)])
1399
1400 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1401 #
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.
1405
1406 # serial 2
1407
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
1414 am__leading_dot=.
1415 else
1416 am__leading_dot=_
1417 fi
1418 rmdir .tst 2>/dev/null
1419 AC_SUBST([am__leading_dot])])
1420
1421 # Check to see how 'make' treats includes. -*- Autoconf -*-
1422
1423 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1424 #
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.
1428
1429 # serial 4
1430
1431 # AM_MAKE_INCLUDE()
1432 # -----------------
1433 # Check to see how make treats includes.
1434 AC_DEFUN([AM_MAKE_INCLUDE],
1435 [am_make=${MAKE-make}
1436 cat > confinc << 'END'
1437 am__doit:
1438 @echo this is the am__doit target
1439 .PHONY: am__doit
1440 END
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])
1443 am__include="#"
1444 am__quote=
1445 _am_result=none
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*)
1451 am__include=include
1452 am__quote=
1453 _am_result=GNU
1454 ;;
1455 esac
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
1462 am__quote="\""
1463 _am_result=BSD
1464 ;;
1465 esac
1466 fi
1467 AC_SUBST([am__include])
1468 AC_SUBST([am__quote])
1469 AC_MSG_RESULT([$_am_result])
1470 rm -f confinc confmf
1471 ])
1472
1473 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1474
1475 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1476 # Free Software Foundation, Inc.
1477 #
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.
1481
1482 # serial 6
1483
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"}
1489 AC_SUBST($1)])
1490
1491
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
1500 case $am_aux_dir in
1501 *\ * | *\ *)
1502 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1503 *)
1504 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1505 esac
1506 fi
1507 # Use eval to expand $SHELL
1508 if eval "$MISSING --run true"; then
1509 am_missing_run="$MISSING --run "
1510 else
1511 am_missing_run=
1512 AC_MSG_WARN([`missing' script is too old or missing])
1513 fi
1514 ])
1515
1516 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1517 # Inc.
1518 #
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.
1522
1523 # serial 1
1524
1525 # AM_PROG_MKDIR_P
1526 # ---------------
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
1537 dnl MKDIR_P).
1538 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1539 case $mkdir_p in
1540 [[\\/$]]* | ?:[[\\/]]*) ;;
1541 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1542 esac
1543 ])
1544
1545 # Helper functions for option handling. -*- Autoconf -*-
1546
1547 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
1548 # Foundation, Inc.
1549 #
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.
1553
1554 # serial 5
1555
1556 # _AM_MANGLE_OPTION(NAME)
1557 # -----------------------
1558 AC_DEFUN([_AM_MANGLE_OPTION],
1559 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1560
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)])
1566
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)])])
1572
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])])
1578
1579 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1580
1581 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1582 # Free Software Foundation, Inc.
1583 #
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.
1587
1588 # serial 5
1589
1590 # AM_SANITY_CHECK
1591 # ---------------
1592 AC_DEFUN([AM_SANITY_CHECK],
1593 [AC_MSG_CHECKING([whether build environment is sane])
1594 # Just in case
1595 sleep 1
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.
1599 am_lf='
1600 '
1601 case `pwd` in
1602 *[[\\\"\#\$\&\'\`$am_lf]]*)
1603 AC_MSG_ERROR([unsafe absolute working directory name]);;
1604 esac
1605 case $srcdir in
1606 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1607 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1608 esac
1609
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
1614 # directory).
1615 if (
1616 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1617 if test "$[*]" = "X"; then
1618 # -L didn't work.
1619 set X `ls -t "$srcdir/configure" conftest.file`
1620 fi
1621 rm -f conftest.file
1622 if test "$[*]" != "X $srcdir/configure conftest.file" \
1623 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1624
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])
1631 fi
1632
1633 test "$[2]" = conftest.file
1634 )
1635 then
1636 # Ok.
1637 :
1638 else
1639 AC_MSG_ERROR([newly created file is older than distributed files!
1640 Check your system clock])
1641 fi
1642 AC_MSG_RESULT(yes)])
1643
1644 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1645 #
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.
1649
1650 # serial 1
1651
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], :)
1670 fi
1671 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1672 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1673
1674 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1675 #
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.
1679
1680 # serial 3
1681
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])
1687
1688 # AM_SUBST_NOTMAKE(VARIABLE)
1689 # --------------------------
1690 # Public sister of _AM_SUBST_NOTMAKE.
1691 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1692
1693 # Check how to create a tarball. -*- Autoconf -*-
1694
1695 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1696 #
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.
1700
1701 # serial 2
1702
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'.
1707 #
1708 # Substitute a variable $(am__tar) that is a command
1709 # writing to stdout a FORMAT-tarball containing the directory
1710 # $tardir.
1711 # tardir=directory && $(am__tar) > result.tar
1712 #
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}'])
1720 m4_if([$1], [v7],
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
1731 do
1732 case $_am_tool in
1733 gnutar)
1734 for _am_tar in tar gnutar gtar;
1735 do
1736 AM_RUN_LOG([$_am_tar --version]) && break
1737 done
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 -"
1741 ;;
1742 plaintar)
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 -'
1749 ;;
1750 pax)
1751 am__tar='pax -L -x $1 -w "$$tardir"'
1752 am__tar_='pax -L -x $1 -w "$tardir"'
1753 am__untar='pax -r'
1754 ;;
1755 cpio)
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'
1759 ;;
1760 none)
1761 am__tar=false
1762 am__tar_=false
1763 am__untar=false
1764 ;;
1765 esac
1766
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
1770
1771 # tar/untar a dummy directory, and stop if the command works
1772 rm -rf conftest.dir
1773 mkdir conftest.dir
1774 echo GrepMe > conftest.dir/file
1775 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1776 rm -rf conftest.dir
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
1780 fi
1781 done
1782 rm -rf conftest.dir
1783
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])])
1786 AC_SUBST([am__tar])
1787 AC_SUBST([am__untar])
1788 ]) # _AM_PROG_TAR
1789
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])