OSDN Git Service

First commit: Nothing changed from original netatalk v.3.1.7, Completely same as...
[netatalk-doc-ja/netatalk-doc-ja.git] / aclocal.m4
1 # generated automatically by aclocal 1.12.5 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
23 #
24 #   Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
25 #   Written by Thomas Tanner, 1999
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 # serial 18 LTDL_INIT
32
33 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
34 # ------------------------------------------
35 # DIRECTORY contains the libltdl sources.  It is okay to call this
36 # function multiple times, as long as the same DIRECTORY is always given.
37 AC_DEFUN([LT_CONFIG_LTDL_DIR],
38 [AC_BEFORE([$0], [LTDL_INIT])
39 _$0($*)
40 ])# LT_CONFIG_LTDL_DIR
41
42 # We break this out into a separate macro, so that we can call it safely
43 # internally without being caught accidentally by the sed scan in libtoolize.
44 m4_defun([_LT_CONFIG_LTDL_DIR],
45 [dnl remove trailing slashes
46 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
47 m4_case(_LTDL_DIR,
48         [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
49              m4_if(_ARG_DIR, [.],
50                      [],
51                  [m4_define([_LTDL_DIR], _ARG_DIR)
52                   _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
53     [m4_if(_ARG_DIR, _LTDL_DIR,
54             [],
55         [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
56 m4_popdef([_ARG_DIR])
57 ])# _LT_CONFIG_LTDL_DIR
58
59 # Initialise:
60 m4_define([_LTDL_DIR], [])
61
62
63 # _LT_BUILD_PREFIX
64 # ----------------
65 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
66 # to `${top_builddir}/'.
67 m4_define([_LT_BUILD_PREFIX],
68 [m4_ifdef([AC_AUTOCONF_VERSION],
69    [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
70           [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
71                           [${top_build_prefix}],
72                           [${top_builddir}/])],
73           [${top_build_prefix}])],
74    [${top_builddir}/])[]dnl
75 ])
76
77
78 # LTDL_CONVENIENCE
79 # ----------------
80 # sets LIBLTDL to the link flags for the libltdl convenience library and
81 # LTDLINCL to the include flags for the libltdl header and adds
82 # --enable-ltdl-convenience to the configure arguments.  Note that
83 # AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with
84 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
85 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
86 # quotes!).  If your package is not flat and you're not using automake,
87 # define top_build_prefix, top_builddir, and top_srcdir appropriately
88 # in your Makefiles.
89 AC_DEFUN([LTDL_CONVENIENCE],
90 [AC_BEFORE([$0], [LTDL_INIT])dnl
91 dnl Although the argument is deprecated and no longer documented,
92 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
93 dnl here make sure it is the same as any other declaration of libltdl's
94 dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
95 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
96 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
97 _$0()
98 ])# LTDL_CONVENIENCE
99
100 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
101 # now we have LT_CONFIG_LTDL_DIR:
102 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
103 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
104 _LTDL_CONVENIENCE])
105
106 dnl aclocal-1.4 backwards compatibility:
107 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
108
109
110 # _LTDL_CONVENIENCE
111 # -----------------
112 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
113 m4_defun([_LTDL_CONVENIENCE],
114 [case $enable_ltdl_convenience in
115   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
116   "") enable_ltdl_convenience=yes
117       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
118 esac
119 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
120 LTDLDEPS=$LIBLTDL
121 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
122
123 AC_SUBST([LIBLTDL])
124 AC_SUBST([LTDLDEPS])
125 AC_SUBST([LTDLINCL])
126
127 # For backwards non-gettext consistent compatibility...
128 INCLTDL="$LTDLINCL"
129 AC_SUBST([INCLTDL])
130 ])# _LTDL_CONVENIENCE
131
132
133 # LTDL_INSTALLABLE
134 # ----------------
135 # sets LIBLTDL to the link flags for the libltdl installable library
136 # and LTDLINCL to the include flags for the libltdl header and adds
137 # --enable-ltdl-install to the configure arguments.  Note that
138 # AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl
139 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
140 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
141 # prefixed with '${top_srcdir}/' (note the single quotes!).  If your
142 # package is not flat and you're not using automake, define top_build_prefix,
143 # top_builddir, and top_srcdir appropriately in your Makefiles.
144 # In the future, this macro may have to be called after LT_INIT.
145 AC_DEFUN([LTDL_INSTALLABLE],
146 [AC_BEFORE([$0], [LTDL_INIT])dnl
147 dnl Although the argument is deprecated and no longer documented,
148 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
149 dnl here make sure it is the same as any other declaration of libltdl's
150 dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
151 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
152 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
153 _$0()
154 ])# LTDL_INSTALLABLE
155
156 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
157 # now we have LT_CONFIG_LTDL_DIR:
158 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
159 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
160 _LTDL_INSTALLABLE])
161
162 dnl aclocal-1.4 backwards compatibility:
163 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
164
165
166 # _LTDL_INSTALLABLE
167 # -----------------
168 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
169 m4_defun([_LTDL_INSTALLABLE],
170 [if test -f $prefix/lib/libltdl.la; then
171   lt_save_LDFLAGS="$LDFLAGS"
172   LDFLAGS="-L$prefix/lib $LDFLAGS"
173   AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
174   LDFLAGS="$lt_save_LDFLAGS"
175   if test x"${lt_lib_ltdl-no}" = xyes; then
176     if test x"$enable_ltdl_install" != xyes; then
177       # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
178       AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
179       enable_ltdl_install=no
180     fi
181   elif test x"$enable_ltdl_install" = xno; then
182     AC_MSG_WARN([libltdl not installed, but installation disabled])
183   fi
184 fi
185
186 # If configure.ac declared an installable ltdl, and the user didn't override
187 # with --disable-ltdl-install, we will install the shipped libltdl.
188 case $enable_ltdl_install in
189   no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
190       LIBLTDL="-lltdl"
191       LTDLDEPS=
192       LTDLINCL=
193       ;;
194   *)  enable_ltdl_install=yes
195       ac_configure_args="$ac_configure_args --enable-ltdl-install"
196       LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
197       LTDLDEPS=$LIBLTDL
198       LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
199       ;;
200 esac
201
202 AC_SUBST([LIBLTDL])
203 AC_SUBST([LTDLDEPS])
204 AC_SUBST([LTDLINCL])
205
206 # For backwards non-gettext consistent compatibility...
207 INCLTDL="$LTDLINCL"
208 AC_SUBST([INCLTDL])
209 ])# LTDL_INSTALLABLE
210
211
212 # _LTDL_MODE_DISPATCH
213 # -------------------
214 m4_define([_LTDL_MODE_DISPATCH],
215 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
216 m4_if(_LTDL_DIR, [],
217         [],
218     dnl if _LTDL_MODE was not set already, the default value is `subproject':
219     [m4_case(m4_default(_LTDL_MODE, [subproject]),
220           [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
221                           _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
222           [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
223           [recursive], [],
224         [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
225 dnl Be careful not to expand twice:
226 m4_define([$0], [])
227 ])# _LTDL_MODE_DISPATCH
228
229
230 # _LT_LIBOBJ(MODULE_NAME)
231 # -----------------------
232 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
233 # of into LIBOBJS.
234 AC_DEFUN([_LT_LIBOBJ], [
235   m4_pattern_allow([^_LT_LIBOBJS$])
236   _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
237 ])# _LT_LIBOBJS
238
239
240 # LTDL_INIT([OPTIONS])
241 # --------------------
242 # Clients of libltdl can use this macro to allow the installer to
243 # choose between a shipped copy of the ltdl sources or a preinstalled
244 # version of the library.  If the shipped ltdl sources are not in a
245 # subdirectory named libltdl, the directory name must be given by
246 # LT_CONFIG_LTDL_DIR.
247 AC_DEFUN([LTDL_INIT],
248 [dnl Parse OPTIONS
249 _LT_SET_OPTIONS([$0], [$1])
250
251 dnl We need to keep our own list of libobjs separate from our parent project,
252 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
253 dnl we look for our own LIBOBJs.
254 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
255 m4_pushdef([AC_LIBSOURCES])
256
257 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
258 m4_if(_LTDL_MODE, [],
259         [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
260         m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
261                 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
262
263 AC_ARG_WITH([included_ltdl],
264     [AS_HELP_STRING([--with-included-ltdl],
265                     [use the GNU ltdl sources included here])])
266
267 if test "x$with_included_ltdl" != xyes; then
268   # We are not being forced to use the included libltdl sources, so
269   # decide whether there is a useful installed version we can use.
270   AC_CHECK_HEADER([ltdl.h],
271       [AC_CHECK_DECL([lt_dlinterface_register],
272            [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
273                [with_included_ltdl=no],
274                [with_included_ltdl=yes])],
275            [with_included_ltdl=yes],
276            [AC_INCLUDES_DEFAULT
277             #include <ltdl.h>])],
278       [with_included_ltdl=yes],
279       [AC_INCLUDES_DEFAULT]
280   )
281 fi
282
283 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
284 dnl was called yet, then for old times' sake, we assume libltdl is in an
285 dnl eponymous directory:
286 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
287
288 AC_ARG_WITH([ltdl_include],
289     [AS_HELP_STRING([--with-ltdl-include=DIR],
290                     [use the ltdl headers installed in DIR])])
291
292 if test -n "$with_ltdl_include"; then
293   if test -f "$with_ltdl_include/ltdl.h"; then :
294   else
295     AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
296   fi
297 else
298   with_ltdl_include=no
299 fi
300
301 AC_ARG_WITH([ltdl_lib],
302     [AS_HELP_STRING([--with-ltdl-lib=DIR],
303                     [use the libltdl.la installed in DIR])])
304
305 if test -n "$with_ltdl_lib"; then
306   if test -f "$with_ltdl_lib/libltdl.la"; then :
307   else
308     AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
309   fi
310 else
311   with_ltdl_lib=no
312 fi
313
314 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
315   ,yes,no,no,)
316         m4_case(m4_default(_LTDL_TYPE, [convenience]),
317             [convenience], [_LTDL_CONVENIENCE],
318             [installable], [_LTDL_INSTALLABLE],
319           [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
320         ;;
321   ,no,no,no,)
322         # If the included ltdl is not to be used, then use the
323         # preinstalled libltdl we found.
324         AC_DEFINE([HAVE_LTDL], [1],
325           [Define this if a modern libltdl is already installed])
326         LIBLTDL=-lltdl
327         LTDLDEPS=
328         LTDLINCL=
329         ;;
330   ,no*,no,*)
331         AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
332         ;;
333   *)    with_included_ltdl=no
334         LIBLTDL="-L$with_ltdl_lib -lltdl"
335         LTDLDEPS=
336         LTDLINCL="-I$with_ltdl_include"
337         ;;
338 esac
339 INCLTDL="$LTDLINCL"
340
341 # Report our decision...
342 AC_MSG_CHECKING([where to find libltdl headers])
343 AC_MSG_RESULT([$LTDLINCL])
344 AC_MSG_CHECKING([where to find libltdl library])
345 AC_MSG_RESULT([$LIBLTDL])
346
347 _LTDL_SETUP
348
349 dnl restore autoconf definition.
350 m4_popdef([AC_LIBOBJ])
351 m4_popdef([AC_LIBSOURCES])
352
353 AC_CONFIG_COMMANDS_PRE([
354     _ltdl_libobjs=
355     _ltdl_ltlibobjs=
356     if test -n "$_LT_LIBOBJS"; then
357       # Remove the extension.
358       _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
359       for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
360         _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
361         _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
362       done
363     fi
364     AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
365     AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
366 ])
367
368 # Only expand once:
369 m4_define([LTDL_INIT])
370 ])# LTDL_INIT
371
372 # Old names:
373 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
374 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
375 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
376 dnl aclocal-1.4 backwards compatibility:
377 dnl AC_DEFUN([AC_LIB_LTDL], [])
378 dnl AC_DEFUN([AC_WITH_LTDL], [])
379 dnl AC_DEFUN([LT_WITH_LTDL], [])
380
381
382 # _LTDL_SETUP
383 # -----------
384 # Perform all the checks necessary for compilation of the ltdl objects
385 #  -- including compiler checks and header checks.  This is a public
386 # interface  mainly for the benefit of libltdl's own configure.ac, most
387 # other users should call LTDL_INIT instead.
388 AC_DEFUN([_LTDL_SETUP],
389 [AC_REQUIRE([AC_PROG_CC])dnl
390 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
391 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
392 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
393 AC_REQUIRE([LT_LIB_DLLOAD])dnl
394 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
395 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
396 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
397 AC_REQUIRE([gl_FUNC_ARGZ])dnl
398
399 m4_require([_LT_CHECK_OBJDIR])dnl
400 m4_require([_LT_HEADER_DLFCN])dnl
401 m4_require([_LT_CHECK_DLPREOPEN])dnl
402 m4_require([_LT_DECL_SED])dnl
403
404 dnl Don't require this, or it will be expanded earlier than the code
405 dnl that sets the variables it relies on:
406 _LT_ENABLE_INSTALL
407
408 dnl _LTDL_MODE specific code must be called at least once:
409 _LTDL_MODE_DISPATCH
410
411 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
412 # the user used.  This is so that ltdl.h can pick up the parent projects
413 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
414 # definitions required by ltdl.c.
415 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
416 AC_CONFIG_COMMANDS_PRE([dnl
417 m4_pattern_allow([^LT_CONFIG_H$])dnl
418 m4_ifset([AH_HEADER],
419     [LT_CONFIG_H=AH_HEADER],
420     [m4_ifset([AC_LIST_HEADERS],
421             [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],
422         [])])])
423 AC_SUBST([LT_CONFIG_H])
424
425 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
426         [], [], [AC_INCLUDES_DEFAULT])
427
428 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
429 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
430
431 m4_pattern_allow([LT_LIBEXT])dnl
432 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
433
434 name=
435 eval "lt_libprefix=\"$libname_spec\""
436 m4_pattern_allow([LT_LIBPREFIX])dnl
437 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
438
439 name=ltdl
440 eval "LTDLOPEN=\"$libname_spec\""
441 AC_SUBST([LTDLOPEN])
442 ])# _LTDL_SETUP
443
444
445 # _LT_ENABLE_INSTALL
446 # ------------------
447 m4_define([_LT_ENABLE_INSTALL],
448 [AC_ARG_ENABLE([ltdl-install],
449     [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
450
451 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
452   *yes*) ;;
453   *) enable_ltdl_convenience=yes ;;
454 esac
455
456 m4_ifdef([AM_CONDITIONAL],
457 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
458  AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
459 ])# _LT_ENABLE_INSTALL
460
461
462 # LT_SYS_DLOPEN_DEPLIBS
463 # ---------------------
464 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
465 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
466 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
467   [lt_cv_sys_dlopen_deplibs],
468   [# PORTME does your system automatically load deplibs for dlopen?
469   # or its logical equivalent (e.g. shl_load for HP-UX < 11)
470   # For now, we just catch OSes we know something about -- in the
471   # future, we'll try test this programmatically.
472   lt_cv_sys_dlopen_deplibs=unknown
473   case $host_os in
474   aix3*|aix4.1.*|aix4.2.*)
475     # Unknown whether this is true for these versions of AIX, but
476     # we want this `case' here to explicitly catch those versions.
477     lt_cv_sys_dlopen_deplibs=unknown
478     ;;
479   aix[[4-9]]*)
480     lt_cv_sys_dlopen_deplibs=yes
481     ;;
482   amigaos*)
483     case $host_cpu in
484     powerpc)
485       lt_cv_sys_dlopen_deplibs=no
486       ;;
487     esac
488     ;;
489   darwin*)
490     # Assuming the user has installed a libdl from somewhere, this is true
491     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
492     lt_cv_sys_dlopen_deplibs=yes
493     ;;
494   freebsd* | dragonfly*)
495     lt_cv_sys_dlopen_deplibs=yes
496     ;;
497   gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
498     # GNU and its variants, using gnu ld.so (Glibc)
499     lt_cv_sys_dlopen_deplibs=yes
500     ;;
501   hpux10*|hpux11*)
502     lt_cv_sys_dlopen_deplibs=yes
503     ;;
504   interix*)
505     lt_cv_sys_dlopen_deplibs=yes
506     ;;
507   irix[[12345]]*|irix6.[[01]]*)
508     # Catch all versions of IRIX before 6.2, and indicate that we don't
509     # know how it worked for any of those versions.
510     lt_cv_sys_dlopen_deplibs=unknown
511     ;;
512   irix*)
513     # The case above catches anything before 6.2, and it's known that
514     # at 6.2 and later dlopen does load deplibs.
515     lt_cv_sys_dlopen_deplibs=yes
516     ;;
517   netbsd*)
518     lt_cv_sys_dlopen_deplibs=yes
519     ;;
520   openbsd*)
521     lt_cv_sys_dlopen_deplibs=yes
522     ;;
523   osf[[1234]]*)
524     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
525     # it did *not* use an RPATH in a shared library to find objects the
526     # library depends on, so we explicitly say `no'.
527     lt_cv_sys_dlopen_deplibs=no
528     ;;
529   osf5.0|osf5.0a|osf5.1)
530     # dlopen *does* load deplibs and with the right loader patch applied
531     # it even uses RPATH in a shared library to search for shared objects
532     # that the library depends on, but there's no easy way to know if that
533     # patch is installed.  Since this is the case, all we can really
534     # say is unknown -- it depends on the patch being installed.  If
535     # it is, this changes to `yes'.  Without it, it would be `no'.
536     lt_cv_sys_dlopen_deplibs=unknown
537     ;;
538   osf*)
539     # the two cases above should catch all versions of osf <= 5.1.  Read
540     # the comments above for what we know about them.
541     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
542     # is used to find them so we can finally say `yes'.
543     lt_cv_sys_dlopen_deplibs=yes
544     ;;
545   qnx*)
546     lt_cv_sys_dlopen_deplibs=yes
547     ;;
548   solaris*)
549     lt_cv_sys_dlopen_deplibs=yes
550     ;;
551   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
552     libltdl_cv_sys_dlopen_deplibs=yes
553     ;;
554   esac
555   ])
556 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
557  AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
558     [Define if the OS needs help to load dependent libraries for dlopen().])
559 fi
560 ])# LT_SYS_DLOPEN_DEPLIBS
561
562 # Old name:
563 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
564 dnl aclocal-1.4 backwards compatibility:
565 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
566
567
568 # LT_SYS_MODULE_EXT
569 # -----------------
570 AC_DEFUN([LT_SYS_MODULE_EXT],
571 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
572 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
573   [libltdl_cv_shlibext],
574 [
575 module=yes
576 eval libltdl_cv_shlibext=$shrext_cmds
577 module=no
578 eval libltdl_cv_shrext=$shrext_cmds
579   ])
580 if test -n "$libltdl_cv_shlibext"; then
581   m4_pattern_allow([LT_MODULE_EXT])dnl
582   AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
583     [Define to the extension used for runtime loadable modules, say, ".so".])
584 fi
585 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
586   m4_pattern_allow([LT_SHARED_EXT])dnl
587   AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
588     [Define to the shared library suffix, say, ".dylib".])
589 fi
590 ])# LT_SYS_MODULE_EXT
591
592 # Old name:
593 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
594 dnl aclocal-1.4 backwards compatibility:
595 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
596
597
598 # LT_SYS_MODULE_PATH
599 # ------------------
600 AC_DEFUN([LT_SYS_MODULE_PATH],
601 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
602 AC_CACHE_CHECK([which variable specifies run-time module search path],
603   [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
604 if test -n "$lt_cv_module_path_var"; then
605   m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
606   AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
607     [Define to the name of the environment variable that determines the run-time module search path.])
608 fi
609 ])# LT_SYS_MODULE_PATH
610
611 # Old name:
612 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
613 dnl aclocal-1.4 backwards compatibility:
614 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
615
616
617 # LT_SYS_DLSEARCH_PATH
618 # --------------------
619 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
620 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
621 AC_CACHE_CHECK([for the default library search path],
622   [lt_cv_sys_dlsearch_path],
623   [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
624 if test -n "$lt_cv_sys_dlsearch_path"; then
625   sys_dlsearch_path=
626   for dir in $lt_cv_sys_dlsearch_path; do
627     if test -z "$sys_dlsearch_path"; then
628       sys_dlsearch_path="$dir"
629     else
630       sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
631     fi
632   done
633   m4_pattern_allow([LT_DLSEARCH_PATH])dnl
634   AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
635     [Define to the system default library search path.])
636 fi
637 ])# LT_SYS_DLSEARCH_PATH
638
639 # Old name:
640 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
641 dnl aclocal-1.4 backwards compatibility:
642 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
643
644
645 # _LT_CHECK_DLPREOPEN
646 # -------------------
647 m4_defun([_LT_CHECK_DLPREOPEN],
648 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
649 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
650   [libltdl_cv_preloaded_symbols],
651   [if test -n "$lt_cv_sys_global_symbol_pipe"; then
652     libltdl_cv_preloaded_symbols=yes
653   else
654     libltdl_cv_preloaded_symbols=no
655   fi
656   ])
657 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
658   AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
659     [Define if libtool can extract symbol lists from object files.])
660 fi
661 ])# _LT_CHECK_DLPREOPEN
662
663
664 # LT_LIB_DLLOAD
665 # -------------
666 AC_DEFUN([LT_LIB_DLLOAD],
667 [m4_pattern_allow([^LT_DLLOADERS$])
668 LT_DLLOADERS=
669 AC_SUBST([LT_DLLOADERS])
670
671 AC_LANG_PUSH([C])
672
673 LIBADD_DLOPEN=
674 AC_SEARCH_LIBS([dlopen], [dl],
675         [AC_DEFINE([HAVE_LIBDL], [1],
676                    [Define if you have the libdl library or equivalent.])
677         if test "$ac_cv_search_dlopen" != "none required" ; then
678           LIBADD_DLOPEN="-ldl"
679         fi
680         libltdl_cv_lib_dl_dlopen="yes"
681         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
682     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
683 #  include <dlfcn.h>
684 #endif
685     ]], [[dlopen(0, 0);]])],
686             [AC_DEFINE([HAVE_LIBDL], [1],
687                        [Define if you have the libdl library or equivalent.])
688             libltdl_cv_func_dlopen="yes"
689             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
690         [AC_CHECK_LIB([svld], [dlopen],
691                 [AC_DEFINE([HAVE_LIBDL], [1],
692                          [Define if you have the libdl library or equivalent.])
693                 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
694                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
695 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
696 then
697   lt_save_LIBS="$LIBS"
698   LIBS="$LIBS $LIBADD_DLOPEN"
699   AC_CHECK_FUNCS([dlerror])
700   LIBS="$lt_save_LIBS"
701 fi
702 AC_SUBST([LIBADD_DLOPEN])
703
704 LIBADD_SHL_LOAD=
705 AC_CHECK_FUNC([shl_load],
706         [AC_DEFINE([HAVE_SHL_LOAD], [1],
707                    [Define if you have the shl_load function.])
708         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
709     [AC_CHECK_LIB([dld], [shl_load],
710             [AC_DEFINE([HAVE_SHL_LOAD], [1],
711                        [Define if you have the shl_load function.])
712             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
713             LIBADD_SHL_LOAD="-ldld"])])
714 AC_SUBST([LIBADD_SHL_LOAD])
715
716 case $host_os in
717 darwin[[1567]].*)
718 # We only want this for pre-Mac OS X 10.4.
719   AC_CHECK_FUNC([_dyld_func_lookup],
720         [AC_DEFINE([HAVE_DYLD], [1],
721                    [Define if you have the _dyld_func_lookup function.])
722         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
723   ;;
724 beos*)
725   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
726   ;;
727 cygwin* | mingw* | os2* | pw32*)
728   AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
729   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
730   ;;
731 esac
732
733 AC_CHECK_LIB([dld], [dld_link],
734         [AC_DEFINE([HAVE_DLD], [1],
735                    [Define if you have the GNU dld library.])
736                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
737 AC_SUBST([LIBADD_DLD_LINK])
738
739 m4_pattern_allow([^LT_DLPREOPEN$])
740 LT_DLPREOPEN=
741 if test -n "$LT_DLLOADERS"
742 then
743   for lt_loader in $LT_DLLOADERS; do
744     LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
745   done
746   AC_DEFINE([HAVE_LIBDLLOADER], [1],
747             [Define if libdlloader will be built on this platform])
748 fi
749 AC_SUBST([LT_DLPREOPEN])
750
751 dnl This isn't used anymore, but set it for backwards compatibility
752 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
753 AC_SUBST([LIBADD_DL])
754
755 AC_LANG_POP
756 ])# LT_LIB_DLLOAD
757
758 # Old name:
759 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
760 dnl aclocal-1.4 backwards compatibility:
761 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
762
763
764 # LT_SYS_SYMBOL_USCORE
765 # --------------------
766 # does the compiler prefix global symbols with an underscore?
767 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
768 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
769 AC_CACHE_CHECK([for _ prefix in compiled symbols],
770   [lt_cv_sys_symbol_underscore],
771   [lt_cv_sys_symbol_underscore=no
772   cat > conftest.$ac_ext <<_LT_EOF
773 void nm_test_func(){}
774 int main(){nm_test_func;return 0;}
775 _LT_EOF
776   if AC_TRY_EVAL(ac_compile); then
777     # Now try to grab the symbols.
778     ac_nlist=conftest.nm
779     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
780       # See whether the symbols have a leading underscore.
781       if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
782         lt_cv_sys_symbol_underscore=yes
783       else
784         if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
785           :
786         else
787           echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
788         fi
789       fi
790     else
791       echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
792     fi
793   else
794     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
795     cat conftest.c >&AS_MESSAGE_LOG_FD
796   fi
797   rm -rf conftest*
798   ])
799   sys_symbol_underscore=$lt_cv_sys_symbol_underscore
800   AC_SUBST([sys_symbol_underscore])
801 ])# LT_SYS_SYMBOL_USCORE
802
803 # Old name:
804 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
805 dnl aclocal-1.4 backwards compatibility:
806 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
807
808
809 # LT_FUNC_DLSYM_USCORE
810 # --------------------
811 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
812 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
813 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
814   if test x"$libltdl_cv_func_dlopen" = xyes ||
815      test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
816         AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
817           [libltdl_cv_need_uscore],
818           [libltdl_cv_need_uscore=unknown
819           save_LIBS="$LIBS"
820           LIBS="$LIBS $LIBADD_DLOPEN"
821           _LT_TRY_DLOPEN_SELF(
822             [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
823             [],                          [libltdl_cv_need_uscore=cross])
824           LIBS="$save_LIBS"
825         ])
826   fi
827 fi
828
829 if test x"$libltdl_cv_need_uscore" = xyes; then
830   AC_DEFINE([NEED_USCORE], [1],
831     [Define if dlsym() requires a leading underscore in symbol names.])
832 fi
833 ])# LT_FUNC_DLSYM_USCORE
834
835 # Old name:
836 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
837 dnl aclocal-1.4 backwards compatibility:
838 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
839
840 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
841
842 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
843 #
844 # This program is free software; you can redistribute it and/or modify
845 # it under the terms of the GNU General Public License as published by
846 # the Free Software Foundation; either version 2 of the License, or
847 # (at your option) any later version.
848 #
849 # This program is distributed in the hope that it will be useful, but
850 # WITHOUT ANY WARRANTY; without even the implied warranty of
851 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
852 # General Public License for more details.
853 #
854 # You should have received a copy of the GNU General Public License
855 # along with this program; if not, write to the Free Software
856 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
857 #
858 # As a special exception to the GNU General Public License, if you
859 # distribute this file as part of a program that contains a
860 # configuration script generated by Autoconf, you may include it under
861 # the same distribution terms that you use for the rest of that program.
862
863 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
864 # ----------------------------------
865 AC_DEFUN([PKG_PROG_PKG_CONFIG],
866 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
867 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
868 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
869 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
870         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
871 fi
872 if test -n "$PKG_CONFIG"; then
873         _pkg_min_version=m4_default([$1], [0.9.0])
874         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
875         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
876                 AC_MSG_RESULT([yes])
877         else
878                 AC_MSG_RESULT([no])
879                 PKG_CONFIG=""
880         fi
881                 
882 fi[]dnl
883 ])# PKG_PROG_PKG_CONFIG
884
885 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
886 #
887 # Check to see whether a particular set of modules exists.  Similar
888 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
889 #
890 #
891 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
892 # this or PKG_CHECK_MODULES is called, or make sure to call
893 # PKG_CHECK_EXISTS manually
894 # --------------------------------------------------------------
895 AC_DEFUN([PKG_CHECK_EXISTS],
896 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
897 if test -n "$PKG_CONFIG" && \
898     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
899   m4_ifval([$2], [$2], [:])
900 m4_ifvaln([$3], [else
901   $3])dnl
902 fi])
903
904
905 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
906 # ---------------------------------------------
907 m4_define([_PKG_CONFIG],
908 [if test -n "$$1"; then
909     pkg_cv_[]$1="$$1"
910  elif test -n "$PKG_CONFIG"; then
911     PKG_CHECK_EXISTS([$3],
912                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
913                      [pkg_failed=yes])
914  else
915     pkg_failed=untried
916 fi[]dnl
917 ])# _PKG_CONFIG
918
919 # _PKG_SHORT_ERRORS_SUPPORTED
920 # -----------------------------
921 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
922 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
923 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
924         _pkg_short_errors_supported=yes
925 else
926         _pkg_short_errors_supported=no
927 fi[]dnl
928 ])# _PKG_SHORT_ERRORS_SUPPORTED
929
930
931 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
932 # [ACTION-IF-NOT-FOUND])
933 #
934 #
935 # Note that if there is a possibility the first call to
936 # PKG_CHECK_MODULES might not happen, you should be sure to include an
937 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
938 #
939 #
940 # --------------------------------------------------------------
941 AC_DEFUN([PKG_CHECK_MODULES],
942 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
943 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
944 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
945
946 pkg_failed=no
947 AC_MSG_CHECKING([for $1])
948
949 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
950 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
951
952 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
953 and $1[]_LIBS to avoid the need to call pkg-config.
954 See the pkg-config man page for more details.])
955
956 if test $pkg_failed = yes; then
957         _PKG_SHORT_ERRORS_SUPPORTED
958         if test $_pkg_short_errors_supported = yes; then
959                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
960         else 
961                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
962         fi
963         # Put the nasty error message in config.log where it belongs
964         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
965
966         ifelse([$4], , [AC_MSG_ERROR(dnl
967 [Package requirements ($2) were not met:
968
969 $$1_PKG_ERRORS
970
971 Consider adjusting the PKG_CONFIG_PATH environment variable if you
972 installed software in a non-standard prefix.
973
974 _PKG_TEXT
975 ])],
976                 [AC_MSG_RESULT([no])
977                 $4])
978 elif test $pkg_failed = untried; then
979         ifelse([$4], , [AC_MSG_FAILURE(dnl
980 [The pkg-config script could not be found or is too old.  Make sure it
981 is in your PATH or set the PKG_CONFIG environment variable to the full
982 path to pkg-config.
983
984 _PKG_TEXT
985
986 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
987                 [$4])
988 else
989         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
990         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
991         AC_MSG_RESULT([yes])
992         ifelse([$3], , :, [$3])
993 fi[]dnl
994 ])# PKG_CHECK_MODULES
995
996 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
997 #
998 # This file is free software; the Free Software Foundation
999 # gives unlimited permission to copy and/or distribute it,
1000 # with or without modifications, as long as this notice is preserved.
1001
1002 # AM_AUTOMAKE_VERSION(VERSION)
1003 # ----------------------------
1004 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1005 # generated from the m4 files accompanying Automake X.Y.
1006 # (This private macro should not be called outside this file.)
1007 AC_DEFUN([AM_AUTOMAKE_VERSION],
1008 [am__api_version='1.12'
1009 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1010 dnl require some minimum version.  Point them to the right macro.
1011 m4_if([$1], [1.12.5], [],
1012       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1013 ])
1014
1015 # _AM_AUTOCONF_VERSION(VERSION)
1016 # -----------------------------
1017 # aclocal traces this macro to find the Autoconf version.
1018 # This is a private macro too.  Using m4_define simplifies
1019 # the logic in aclocal, which can simply ignore this definition.
1020 m4_define([_AM_AUTOCONF_VERSION], [])
1021
1022 # AM_SET_CURRENT_AUTOMAKE_VERSION
1023 # -------------------------------
1024 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1025 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1026 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1027 [AM_AUTOMAKE_VERSION([1.12.5])dnl
1028 m4_ifndef([AC_AUTOCONF_VERSION],
1029   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1030 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1031
1032 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1033
1034 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1035 #
1036 # This file is free software; the Free Software Foundation
1037 # gives unlimited permission to copy and/or distribute it,
1038 # with or without modifications, as long as this notice is preserved.
1039
1040 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1041 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1042 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1043 #
1044 # Of course, Automake must honor this variable whenever it calls a
1045 # tool from the auxiliary directory.  The problem is that $srcdir (and
1046 # therefore $ac_aux_dir as well) can be either absolute or relative,
1047 # depending on how configure is run.  This is pretty annoying, since
1048 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1049 # source directory, any form will work fine, but in subdirectories a
1050 # relative path needs to be adjusted first.
1051 #
1052 # $ac_aux_dir/missing
1053 #    fails when called from a subdirectory if $ac_aux_dir is relative
1054 # $top_srcdir/$ac_aux_dir/missing
1055 #    fails if $ac_aux_dir is absolute,
1056 #    fails when called from a subdirectory in a VPATH build with
1057 #          a relative $ac_aux_dir
1058 #
1059 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1060 # are both prefixed by $srcdir.  In an in-source build this is usually
1061 # harmless because $srcdir is '.', but things will broke when you
1062 # start a VPATH build or use an absolute $srcdir.
1063 #
1064 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1065 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1066 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1067 # and then we would define $MISSING as
1068 #   MISSING="\${SHELL} $am_aux_dir/missing"
1069 # This will work as long as MISSING is not called from configure, because
1070 # unfortunately $(top_srcdir) has no meaning in configure.
1071 # However there are other variables, like CC, which are often used in
1072 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1073 #
1074 # Another solution, used here, is to always expand $ac_aux_dir to an
1075 # absolute PATH.  The drawback is that using absolute paths prevent a
1076 # configured tree to be moved without reconfiguration.
1077
1078 AC_DEFUN([AM_AUX_DIR_EXPAND],
1079 [dnl Rely on autoconf to set up CDPATH properly.
1080 AC_PREREQ([2.50])dnl
1081 # expand $ac_aux_dir to an absolute path
1082 am_aux_dir=`cd $ac_aux_dir && pwd`
1083 ])
1084
1085 # AM_CONDITIONAL                                            -*- Autoconf -*-
1086
1087 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
1088 #
1089 # This file is free software; the Free Software Foundation
1090 # gives unlimited permission to copy and/or distribute it,
1091 # with or without modifications, as long as this notice is preserved.
1092
1093 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1094 # -------------------------------------
1095 # Define a conditional.
1096 AC_DEFUN([AM_CONDITIONAL],
1097 [AC_PREREQ([2.52])dnl
1098  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1099        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1100 AC_SUBST([$1_TRUE])dnl
1101 AC_SUBST([$1_FALSE])dnl
1102 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1103 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1104 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1105 if $2; then
1106   $1_TRUE=
1107   $1_FALSE='#'
1108 else
1109   $1_TRUE='#'
1110   $1_FALSE=
1111 fi
1112 AC_CONFIG_COMMANDS_PRE(
1113 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1114   AC_MSG_ERROR([[conditional "$1" was never defined.
1115 Usually this means the macro was only invoked conditionally.]])
1116 fi])])
1117
1118 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
1119 #
1120 # This file is free software; the Free Software Foundation
1121 # gives unlimited permission to copy and/or distribute it,
1122 # with or without modifications, as long as this notice is preserved.
1123
1124
1125 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1126 # written in clear, in which case automake, when reading aclocal.m4,
1127 # will think it sees a *use*, and therefore will trigger all it's
1128 # C support machinery.  Also note that it means that autoscan, seeing
1129 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1130
1131
1132 # _AM_DEPENDENCIES(NAME)
1133 # ----------------------
1134 # See how the compiler implements dependency checking.
1135 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1136 # We try a few techniques and use that to set a single cache variable.
1137 #
1138 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1139 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1140 # dependency, and given that the user is not expected to run this macro,
1141 # just rely on AC_PROG_CC.
1142 AC_DEFUN([_AM_DEPENDENCIES],
1143 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1144 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1145 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1146 AC_REQUIRE([AM_DEP_TRACK])dnl
1147
1148 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1149       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1150       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1151       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1152       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1153       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1154                     [depcc="$$1"   am_compiler_list=])
1155
1156 AC_CACHE_CHECK([dependency style of $depcc],
1157                [am_cv_$1_dependencies_compiler_type],
1158 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1159   # We make a subdir and do the tests there.  Otherwise we can end up
1160   # making bogus files that we don't know about and never remove.  For
1161   # instance it was reported that on HP-UX the gcc test will end up
1162   # making a dummy file named 'D' -- because '-MD' means "put the output
1163   # in D".
1164   rm -rf conftest.dir
1165   mkdir conftest.dir
1166   # Copy depcomp to subdir because otherwise we won't find it if we're
1167   # using a relative directory.
1168   cp "$am_depcomp" conftest.dir
1169   cd conftest.dir
1170   # We will build objects and dependencies in a subdirectory because
1171   # it helps to detect inapplicable dependency modes.  For instance
1172   # both Tru64's cc and ICC support -MD to output dependencies as a
1173   # side effect of compilation, but ICC will put the dependencies in
1174   # the current directory while Tru64 will put them in the object
1175   # directory.
1176   mkdir sub
1177
1178   am_cv_$1_dependencies_compiler_type=none
1179   if test "$am_compiler_list" = ""; then
1180      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1181   fi
1182   am__universal=false
1183   m4_case([$1], [CC],
1184     [case " $depcc " in #(
1185      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1186      esac],
1187     [CXX],
1188     [case " $depcc " in #(
1189      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1190      esac])
1191
1192   for depmode in $am_compiler_list; do
1193     # Setup a source with many dependencies, because some compilers
1194     # like to wrap large dependency lists on column 80 (with \), and
1195     # we should not choose a depcomp mode which is confused by this.
1196     #
1197     # We need to recreate these files for each test, as the compiler may
1198     # overwrite some of them when testing with obscure command lines.
1199     # This happens at least with the AIX C compiler.
1200     : > sub/conftest.c
1201     for i in 1 2 3 4 5 6; do
1202       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1203       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1204       # Solaris 10 /bin/sh.
1205       echo '/* dummy */' > sub/conftst$i.h
1206     done
1207     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1208
1209     # We check with '-c' and '-o' for the sake of the "dashmstdout"
1210     # mode.  It turns out that the SunPro C++ compiler does not properly
1211     # handle '-M -o', and we need to detect this.  Also, some Intel
1212     # versions had trouble with output in subdirs.
1213     am__obj=sub/conftest.${OBJEXT-o}
1214     am__minus_obj="-o $am__obj"
1215     case $depmode in
1216     gcc)
1217       # This depmode causes a compiler race in universal mode.
1218       test "$am__universal" = false || continue
1219       ;;
1220     nosideeffect)
1221       # After this tag, mechanisms are not by side-effect, so they'll
1222       # only be used when explicitly requested.
1223       if test "x$enable_dependency_tracking" = xyes; then
1224         continue
1225       else
1226         break
1227       fi
1228       ;;
1229     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1230       # This compiler won't grok '-c -o', but also, the minuso test has
1231       # not run yet.  These depmodes are late enough in the game, and
1232       # so weak that their functioning should not be impacted.
1233       am__obj=conftest.${OBJEXT-o}
1234       am__minus_obj=
1235       ;;
1236     none) break ;;
1237     esac
1238     if depmode=$depmode \
1239        source=sub/conftest.c object=$am__obj \
1240        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1241        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1242          >/dev/null 2>conftest.err &&
1243        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1244        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1245        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1246        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1247       # icc doesn't choke on unknown options, it will just issue warnings
1248       # or remarks (even with -Werror).  So we grep stderr for any message
1249       # that says an option was ignored or not supported.
1250       # When given -MP, icc 7.0 and 7.1 complain thusly:
1251       #   icc: Command line warning: ignoring option '-M'; no argument required
1252       # The diagnosis changed in icc 8.0:
1253       #   icc: Command line remark: option '-MP' not supported
1254       if (grep 'ignoring option' conftest.err ||
1255           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1256         am_cv_$1_dependencies_compiler_type=$depmode
1257         break
1258       fi
1259     fi
1260   done
1261
1262   cd ..
1263   rm -rf conftest.dir
1264 else
1265   am_cv_$1_dependencies_compiler_type=none
1266 fi
1267 ])
1268 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1269 AM_CONDITIONAL([am__fastdep$1], [
1270   test "x$enable_dependency_tracking" != xno \
1271   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1272 ])
1273
1274
1275 # AM_SET_DEPDIR
1276 # -------------
1277 # Choose a directory name for dependency files.
1278 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1279 AC_DEFUN([AM_SET_DEPDIR],
1280 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1281 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1282 ])
1283
1284
1285 # AM_DEP_TRACK
1286 # ------------
1287 AC_DEFUN([AM_DEP_TRACK],
1288 [AC_ARG_ENABLE([dependency-tracking], [dnl
1289 AS_HELP_STRING(
1290   [--enable-dependency-tracking],
1291   [do not reject slow dependency extractors])
1292 AS_HELP_STRING(
1293   [--disable-dependency-tracking],
1294   [speeds up one-time build])])
1295 if test "x$enable_dependency_tracking" != xno; then
1296   am_depcomp="$ac_aux_dir/depcomp"
1297   AMDEPBACKSLASH='\'
1298   am__nodep='_no'
1299 fi
1300 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1301 AC_SUBST([AMDEPBACKSLASH])dnl
1302 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1303 AC_SUBST([am__nodep])dnl
1304 _AM_SUBST_NOTMAKE([am__nodep])dnl
1305 ])
1306
1307 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1308
1309 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
1310 #
1311 # This file is free software; the Free Software Foundation
1312 # gives unlimited permission to copy and/or distribute it,
1313 # with or without modifications, as long as this notice is preserved.
1314
1315
1316 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1317 # ------------------------------
1318 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1319 [{
1320   # Autoconf 2.62 quotes --file arguments for eval, but not when files
1321   # are listed without --file.  Let's play safe and only enable the eval
1322   # if we detect the quoting.
1323   case $CONFIG_FILES in
1324   *\'*) eval set x "$CONFIG_FILES" ;;
1325   *)   set x $CONFIG_FILES ;;
1326   esac
1327   shift
1328   for mf
1329   do
1330     # Strip MF so we end up with the name of the file.
1331     mf=`echo "$mf" | sed -e 's/:.*$//'`
1332     # Check whether this is an Automake generated Makefile or not.
1333     # We used to match only the files named 'Makefile.in', but
1334     # some people rename them; so instead we look at the file content.
1335     # Grep'ing the first line is not enough: some people post-process
1336     # each Makefile.in and add a new line on top of each file to say so.
1337     # Grep'ing the whole file is not good either: AIX grep has a line
1338     # limit of 2048, but all sed's we know have understand at least 4000.
1339     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1340       dirpart=`AS_DIRNAME("$mf")`
1341     else
1342       continue
1343     fi
1344     # Extract the definition of DEPDIR, am__include, and am__quote
1345     # from the Makefile without running 'make'.
1346     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1347     test -z "$DEPDIR" && continue
1348     am__include=`sed -n 's/^am__include = //p' < "$mf"`
1349     test -z "am__include" && continue
1350     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1351     # Find all dependency output files, they are included files with
1352     # $(DEPDIR) in their names.  We invoke sed twice because it is the
1353     # simplest approach to changing $(DEPDIR) to its actual value in the
1354     # expansion.
1355     for file in `sed -n "
1356       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1357          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1358       # Make sure the directory exists.
1359       test -f "$dirpart/$file" && continue
1360       fdir=`AS_DIRNAME(["$file"])`
1361       AS_MKDIR_P([$dirpart/$fdir])
1362       # echo "creating $dirpart/$file"
1363       echo '# dummy' > "$dirpart/$file"
1364     done
1365   done
1366 }
1367 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1368
1369
1370 # AM_OUTPUT_DEPENDENCY_COMMANDS
1371 # -----------------------------
1372 # This macro should only be invoked once -- use via AC_REQUIRE.
1373 #
1374 # This code is only required when automatic dependency tracking
1375 # is enabled.  FIXME.  This creates each '.P' file that we will
1376 # need in order to bootstrap the dependency handling code.
1377 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1378 [AC_CONFIG_COMMANDS([depfiles],
1379      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1380      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1381 ])
1382
1383 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
1384 #
1385 # This file is free software; the Free Software Foundation
1386 # gives unlimited permission to copy and/or distribute it,
1387 # with or without modifications, as long as this notice is preserved.
1388
1389 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1390 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1391
1392 # Do all the work for Automake.                             -*- Autoconf -*-
1393
1394 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
1395 #
1396 # This file is free software; the Free Software Foundation
1397 # gives unlimited permission to copy and/or distribute it,
1398 # with or without modifications, as long as this notice is preserved.
1399
1400 # This macro actually does too much.  Some checks are only needed if
1401 # your package does certain things.  But this isn't really a big deal.
1402
1403 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1404 # AM_INIT_AUTOMAKE([OPTIONS])
1405 # -----------------------------------------------
1406 # The call with PACKAGE and VERSION arguments is the old style
1407 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1408 # and VERSION should now be passed to AC_INIT and removed from
1409 # the call to AM_INIT_AUTOMAKE.
1410 # We support both call styles for the transition.  After
1411 # the next Automake release, Autoconf can make the AC_INIT
1412 # arguments mandatory, and then we can depend on a new Autoconf
1413 # release and drop the old call support.
1414 AC_DEFUN([AM_INIT_AUTOMAKE],
1415 [AC_PREREQ([2.62])dnl
1416 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1417 dnl the ones we care about.
1418 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1419 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1420 AC_REQUIRE([AC_PROG_INSTALL])dnl
1421 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1422   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1423   # is not polluted with repeated "-I."
1424   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1425   # test to see if srcdir already configured
1426   if test -f $srcdir/config.status; then
1427     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1428   fi
1429 fi
1430
1431 # test whether we have cygpath
1432 if test -z "$CYGPATH_W"; then
1433   if (cygpath --version) >/dev/null 2>/dev/null; then
1434     CYGPATH_W='cygpath -w'
1435   else
1436     CYGPATH_W=echo
1437   fi
1438 fi
1439 AC_SUBST([CYGPATH_W])
1440
1441 # Define the identity of the package.
1442 dnl Distinguish between old-style and new-style calls.
1443 m4_ifval([$2],
1444 [AC_DIAGNOSE([obsolete],
1445 [$0: two- and three-arguments forms are deprecated.  For more info, see:
1446 http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
1447 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1448  AC_SUBST([PACKAGE], [$1])dnl
1449  AC_SUBST([VERSION], [$2])],
1450 [_AM_SET_OPTIONS([$1])dnl
1451 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1452 m4_if(
1453   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1454   [ok:ok],,
1455   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1456  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1457  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1458
1459 _AM_IF_OPTION([no-define],,
1460 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1461  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1462
1463 # Some tools Automake needs.
1464 AC_REQUIRE([AM_SANITY_CHECK])dnl
1465 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1466 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1467 AM_MISSING_PROG([AUTOCONF], [autoconf])
1468 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1469 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1470 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1471 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1472 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1473 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1474 # For better backward compatibility.  To be removed once Automake 1.9.x
1475 # dies out for good.  For more background, see:
1476 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1477 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1478 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1479 # We need awk for the "check" target.  The system "awk" is bad on
1480 # some platforms.
1481 AC_REQUIRE([AC_PROG_AWK])dnl
1482 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1483 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1484 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1485               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1486                              [_AM_PROG_TAR([v7])])])
1487 _AM_IF_OPTION([no-dependencies],,
1488 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1489                   [_AM_DEPENDENCIES([CC])],
1490                   [m4_define([AC_PROG_CC],
1491                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1492 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1493                   [_AM_DEPENDENCIES([CXX])],
1494                   [m4_define([AC_PROG_CXX],
1495                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1496 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1497                   [_AM_DEPENDENCIES([OBJC])],
1498                   [m4_define([AC_PROG_OBJC],
1499                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1500 dnl Support for Objective C++ was only introduced in Autoconf 2.65,
1501 dnl but we still cater to Autoconf 2.62.
1502 m4_ifdef([AC_PROG_OBJCXX],
1503 [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1504                   [_AM_DEPENDENCIES([OBJCXX])],
1505                   [m4_define([AC_PROG_OBJCXX],
1506                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
1507 ])
1508 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1509 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
1510 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
1511 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1512 AC_CONFIG_COMMANDS_PRE(dnl
1513 [m4_provide_if([_AM_COMPILER_EXEEXT],
1514   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1515 ])
1516
1517 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1518 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1519 dnl mangled by Autoconf and run in a shell conditional statement.
1520 m4_define([_AC_COMPILER_EXEEXT],
1521 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1522
1523
1524 # When config.status generates a header, we must update the stamp-h file.
1525 # This file resides in the same directory as the config header
1526 # that is generated.  The stamp files are numbered to have different names.
1527
1528 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1529 # loop where config.status creates the headers, so we can generate
1530 # our stamp files there.
1531 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1532 [# Compute $1's index in $config_headers.
1533 _am_arg=$1
1534 _am_stamp_count=1
1535 for _am_header in $config_headers :; do
1536   case $_am_header in
1537     $_am_arg | $_am_arg:* )
1538       break ;;
1539     * )
1540       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1541   esac
1542 done
1543 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1544
1545 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1546 #
1547 # This file is free software; the Free Software Foundation
1548 # gives unlimited permission to copy and/or distribute it,
1549 # with or without modifications, as long as this notice is preserved.
1550
1551 # AM_PROG_INSTALL_SH
1552 # ------------------
1553 # Define $install_sh.
1554 AC_DEFUN([AM_PROG_INSTALL_SH],
1555 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1556 if test x"${install_sh}" != xset; then
1557   case $am_aux_dir in
1558   *\ * | *\     *)
1559     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1560   *)
1561     install_sh="\${SHELL} $am_aux_dir/install-sh"
1562   esac
1563 fi
1564 AC_SUBST([install_sh])])
1565
1566 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
1567 #
1568 # This file is free software; the Free Software Foundation
1569 # gives unlimited permission to copy and/or distribute it,
1570 # with or without modifications, as long as this notice is preserved.
1571
1572 # Check whether the underlying file-system supports filenames
1573 # with a leading dot.  For instance MS-DOS doesn't.
1574 AC_DEFUN([AM_SET_LEADING_DOT],
1575 [rm -rf .tst 2>/dev/null
1576 mkdir .tst 2>/dev/null
1577 if test -d .tst; then
1578   am__leading_dot=.
1579 else
1580   am__leading_dot=_
1581 fi
1582 rmdir .tst 2>/dev/null
1583 AC_SUBST([am__leading_dot])])
1584
1585 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1586 # From Jim Meyering
1587
1588 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
1589 #
1590 # This file is free software; the Free Software Foundation
1591 # gives unlimited permission to copy and/or distribute it,
1592 # with or without modifications, as long as this notice is preserved.
1593
1594 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1595 # ----------------------------------
1596 # Control maintainer-specific portions of Makefiles.
1597 # Default is to disable them, unless 'enable' is passed literally.
1598 # For symmetry, 'disable' may be passed as well.  Anyway, the user
1599 # can override the default with the --enable/--disable switch.
1600 AC_DEFUN([AM_MAINTAINER_MODE],
1601 [m4_case(m4_default([$1], [disable]),
1602        [enable], [m4_define([am_maintainer_other], [disable])],
1603        [disable], [m4_define([am_maintainer_other], [enable])],
1604        [m4_define([am_maintainer_other], [enable])
1605         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1606 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1607   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1608   AC_ARG_ENABLE([maintainer-mode],
1609     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1610       am_maintainer_other[ make rules and dependencies not useful
1611       (and sometimes confusing) to the casual installer])],
1612     [USE_MAINTAINER_MODE=$enableval],
1613     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1614   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1615   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1616   MAINT=$MAINTAINER_MODE_TRUE
1617   AC_SUBST([MAINT])dnl
1618 ]
1619 )
1620
1621 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1622
1623 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1624
1625 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1626 #
1627 # This file is free software; the Free Software Foundation
1628 # gives unlimited permission to copy and/or distribute it,
1629 # with or without modifications, as long as this notice is preserved.
1630
1631 # AM_MAKE_INCLUDE()
1632 # -----------------
1633 # Check to see how make treats includes.
1634 AC_DEFUN([AM_MAKE_INCLUDE],
1635 [am_make=${MAKE-make}
1636 cat > confinc << 'END'
1637 am__doit:
1638         @echo this is the am__doit target
1639 .PHONY: am__doit
1640 END
1641 # If we don't find an include directive, just comment out the code.
1642 AC_MSG_CHECKING([for style of include used by $am_make])
1643 am__include="#"
1644 am__quote=
1645 _am_result=none
1646 # First try GNU make style include.
1647 echo "include confinc" > confmf
1648 # Ignore all kinds of additional output from 'make'.
1649 case `$am_make -s -f confmf 2> /dev/null` in #(
1650 *the\ am__doit\ target*)
1651   am__include=include
1652   am__quote=
1653   _am_result=GNU
1654   ;;
1655 esac
1656 # Now try BSD make style include.
1657 if test "$am__include" = "#"; then
1658    echo '.include "confinc"' > confmf
1659    case `$am_make -s -f confmf 2> /dev/null` in #(
1660    *the\ am__doit\ target*)
1661      am__include=.include
1662      am__quote="\""
1663      _am_result=BSD
1664      ;;
1665    esac
1666 fi
1667 AC_SUBST([am__include])
1668 AC_SUBST([am__quote])
1669 AC_MSG_RESULT([$_am_result])
1670 rm -f confinc confmf
1671 ])
1672
1673 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
1674 #
1675 # This file is free software; the Free Software Foundation
1676 # gives unlimited permission to copy and/or distribute it,
1677 # with or without modifications, as long as this notice is preserved.
1678
1679 # AM_PROG_CC_C_O
1680 # --------------
1681 # Like AC_PROG_CC_C_O, but changed for automake.
1682 AC_DEFUN([AM_PROG_CC_C_O],
1683 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1684 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1685 AC_REQUIRE_AUX_FILE([compile])dnl
1686 # FIXME: we rely on the cache variable name because
1687 # there is no other way.
1688 set dummy $CC
1689 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1690 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1691 if test "$am_t" != yes; then
1692    # Losing compiler, so override with the script.
1693    # FIXME: It is wrong to rewrite CC.
1694    # But if we don't then we get into trouble of one sort or another.
1695    # A longer-term fix would be to have automake use am__CC in this case,
1696    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1697    CC="$am_aux_dir/compile $CC"
1698 fi
1699 dnl Make sure AC_PROG_CC is never called again, or it will override our
1700 dnl setting of CC.
1701 m4_define([AC_PROG_CC],
1702           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1703 ])
1704
1705 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1706
1707 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
1708 #
1709 # This file is free software; the Free Software Foundation
1710 # gives unlimited permission to copy and/or distribute it,
1711 # with or without modifications, as long as this notice is preserved.
1712
1713 # AM_MISSING_PROG(NAME, PROGRAM)
1714 # ------------------------------
1715 AC_DEFUN([AM_MISSING_PROG],
1716 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1717 $1=${$1-"${am_missing_run}$2"}
1718 AC_SUBST($1)])
1719
1720 # AM_MISSING_HAS_RUN
1721 # ------------------
1722 # Define MISSING if not defined so far and test if it supports --run.
1723 # If it does, set am_missing_run to use it, otherwise, to nothing.
1724 AC_DEFUN([AM_MISSING_HAS_RUN],
1725 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1726 AC_REQUIRE_AUX_FILE([missing])dnl
1727 if test x"${MISSING+set}" != xset; then
1728   case $am_aux_dir in
1729   *\ * | *\     *)
1730     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1731   *)
1732     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1733   esac
1734 fi
1735 # Use eval to expand $SHELL
1736 if eval "$MISSING --run true"; then
1737   am_missing_run="$MISSING --run "
1738 else
1739   am_missing_run=
1740   AC_MSG_WARN(['missing' script is too old or missing])
1741 fi
1742 ])
1743
1744 # Helper functions for option handling.                     -*- Autoconf -*-
1745
1746 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1747 #
1748 # This file is free software; the Free Software Foundation
1749 # gives unlimited permission to copy and/or distribute it,
1750 # with or without modifications, as long as this notice is preserved.
1751
1752 # _AM_MANGLE_OPTION(NAME)
1753 # -----------------------
1754 AC_DEFUN([_AM_MANGLE_OPTION],
1755 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1756
1757 # _AM_SET_OPTION(NAME)
1758 # --------------------
1759 # Set option NAME.  Presently that only means defining a flag for this option.
1760 AC_DEFUN([_AM_SET_OPTION],
1761 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1762
1763 # _AM_SET_OPTIONS(OPTIONS)
1764 # ------------------------
1765 # OPTIONS is a space-separated list of Automake options.
1766 AC_DEFUN([_AM_SET_OPTIONS],
1767 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1768
1769 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1770 # -------------------------------------------
1771 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1772 AC_DEFUN([_AM_IF_OPTION],
1773 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1774
1775 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1776
1777 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
1778 #
1779 # This file is free software; the Free Software Foundation
1780 # gives unlimited permission to copy and/or distribute it,
1781 # with or without modifications, as long as this notice is preserved.
1782
1783 # AM_SANITY_CHECK
1784 # ---------------
1785 AC_DEFUN([AM_SANITY_CHECK],
1786 [AC_MSG_CHECKING([whether build environment is sane])
1787 # Reject unsafe characters in $srcdir or the absolute working directory
1788 # name.  Accept space and tab only in the latter.
1789 am_lf='
1790 '
1791 case `pwd` in
1792   *[[\\\"\#\$\&\'\`$am_lf]]*)
1793     AC_MSG_ERROR([unsafe absolute working directory name]);;
1794 esac
1795 case $srcdir in
1796   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1797     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1798 esac
1799
1800 # Do 'set' in a subshell so we don't clobber the current shell's
1801 # arguments.  Must try -L first in case configure is actually a
1802 # symlink; some systems play weird games with the mod time of symlinks
1803 # (eg FreeBSD returns the mod time of the symlink's containing
1804 # directory).
1805 if (
1806    am_has_slept=no
1807    for am_try in 1 2; do
1808      echo "timestamp, slept: $am_has_slept" > conftest.file
1809      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1810      if test "$[*]" = "X"; then
1811         # -L didn't work.
1812         set X `ls -t "$srcdir/configure" conftest.file`
1813      fi
1814      if test "$[*]" != "X $srcdir/configure conftest.file" \
1815         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1816
1817         # If neither matched, then we have a broken ls.  This can happen
1818         # if, for instance, CONFIG_SHELL is bash and it inherits a
1819         # broken ls alias from the environment.  This has actually
1820         # happened.  Such a system could not be considered "sane".
1821         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1822   alias in your environment])
1823      fi
1824      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1825        break
1826      fi
1827      # Just in case.
1828      sleep 1
1829      am_has_slept=yes
1830    done
1831    test "$[2]" = conftest.file
1832    )
1833 then
1834    # Ok.
1835    :
1836 else
1837    AC_MSG_ERROR([newly created file is older than distributed files!
1838 Check your system clock])
1839 fi
1840 AC_MSG_RESULT([yes])
1841 # If we didn't sleep, we still need to ensure time stamps of config.status and
1842 # generated files are strictly newer.
1843 am_sleep_pid=
1844 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1845   ( sleep 1 ) &
1846   am_sleep_pid=$!
1847 fi
1848 AC_CONFIG_COMMANDS_PRE(
1849   [AC_MSG_CHECKING([that generated files are newer than configure])
1850    if test -n "$am_sleep_pid"; then
1851      # Hide warnings about reused PIDs.
1852      wait $am_sleep_pid 2>/dev/null
1853    fi
1854    AC_MSG_RESULT([done])])
1855 rm -f conftest.file
1856 ])
1857
1858 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
1859 #
1860 # This file is free software; the Free Software Foundation
1861 # gives unlimited permission to copy and/or distribute it,
1862 # with or without modifications, as long as this notice is preserved.
1863
1864 # AM_SILENT_RULES([DEFAULT])
1865 # --------------------------
1866 # Enable less verbose build rules; with the default set to DEFAULT
1867 # ("yes" being less verbose, "no" or empty being verbose).
1868 AC_DEFUN([AM_SILENT_RULES],
1869 [AC_ARG_ENABLE([silent-rules], [dnl
1870 AS_HELP_STRING(
1871   [--enable-silent-rules],
1872   [less verbose build output (undo: "make V=1")])
1873 AS_HELP_STRING(
1874   [--disable-silent-rules],
1875   [verbose build output (undo: "make V=0")])dnl
1876 ])
1877 case $enable_silent_rules in @%:@ (((
1878   yes) AM_DEFAULT_VERBOSITY=0;;
1879    no) AM_DEFAULT_VERBOSITY=1;;
1880     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1881 esac
1882 dnl
1883 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1884 dnl do not support nested variable expansions.
1885 dnl See automake bug#9928 and bug#10237.
1886 am_make=${MAKE-make}
1887 AC_CACHE_CHECK([whether $am_make supports nested variables],
1888    [am_cv_make_support_nested_variables],
1889    [if AS_ECHO([['TRUE=$(BAR$(V))
1890 BAR0=false
1891 BAR1=true
1892 V=1
1893 am__doit:
1894         @$(TRUE)
1895 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1896   am_cv_make_support_nested_variables=yes
1897 else
1898   am_cv_make_support_nested_variables=no
1899 fi])
1900 if test $am_cv_make_support_nested_variables = yes; then
1901   dnl Using '$V' instead of '$(V)' breaks IRIX make.
1902   AM_V='$(V)'
1903   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1904 else
1905   AM_V=$AM_DEFAULT_VERBOSITY
1906   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1907 fi
1908 AC_SUBST([AM_V])dnl
1909 AM_SUBST_NOTMAKE([AM_V])dnl
1910 AC_SUBST([AM_DEFAULT_V])dnl
1911 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1912 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1913 AM_BACKSLASH='\'
1914 AC_SUBST([AM_BACKSLASH])dnl
1915 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1916 ])
1917
1918 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
1919 #
1920 # This file is free software; the Free Software Foundation
1921 # gives unlimited permission to copy and/or distribute it,
1922 # with or without modifications, as long as this notice is preserved.
1923
1924 # AM_PROG_INSTALL_STRIP
1925 # ---------------------
1926 # One issue with vendor 'install' (even GNU) is that you can't
1927 # specify the program used to strip binaries.  This is especially
1928 # annoying in cross-compiling environments, where the build's strip
1929 # is unlikely to handle the host's binaries.
1930 # Fortunately install-sh will honor a STRIPPROG variable, so we
1931 # always use install-sh in "make install-strip", and initialize
1932 # STRIPPROG with the value of the STRIP variable (set by the user).
1933 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1934 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1935 # Installed binaries are usually stripped using 'strip' when the user
1936 # run "make install-strip".  However 'strip' might not be the right
1937 # tool to use in cross-compilation environments, therefore Automake
1938 # will honor the 'STRIP' environment variable to overrule this program.
1939 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1940 if test "$cross_compiling" != no; then
1941   AC_CHECK_TOOL([STRIP], [strip], :)
1942 fi
1943 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1944 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1945
1946 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
1947 #
1948 # This file is free software; the Free Software Foundation
1949 # gives unlimited permission to copy and/or distribute it,
1950 # with or without modifications, as long as this notice is preserved.
1951
1952 # _AM_SUBST_NOTMAKE(VARIABLE)
1953 # ---------------------------
1954 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1955 # This macro is traced by Automake.
1956 AC_DEFUN([_AM_SUBST_NOTMAKE])
1957
1958 # AM_SUBST_NOTMAKE(VARIABLE)
1959 # --------------------------
1960 # Public sister of _AM_SUBST_NOTMAKE.
1961 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1962
1963 # Check how to create a tarball.                            -*- Autoconf -*-
1964
1965 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
1966 #
1967 # This file is free software; the Free Software Foundation
1968 # gives unlimited permission to copy and/or distribute it,
1969 # with or without modifications, as long as this notice is preserved.
1970
1971 # _AM_PROG_TAR(FORMAT)
1972 # --------------------
1973 # Check how to create a tarball in format FORMAT.
1974 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1975 #
1976 # Substitute a variable $(am__tar) that is a command
1977 # writing to stdout a FORMAT-tarball containing the directory
1978 # $tardir.
1979 #     tardir=directory && $(am__tar) > result.tar
1980 #
1981 # Substitute a variable $(am__untar) that extract such
1982 # a tarball read from stdin.
1983 #     $(am__untar) < result.tar
1984 AC_DEFUN([_AM_PROG_TAR],
1985 [# Always define AMTAR for backward compatibility.  Yes, it's still used
1986 # in the wild :-(  We should find a proper way to deprecate it ...
1987 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1988 m4_if([$1], [v7],
1989      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1990      [m4_case([$1], [ustar],, [pax],,
1991               [m4_fatal([Unknown tar format])])
1992 AC_MSG_CHECKING([how to create a $1 tar archive])
1993 # Loop over all known methods to create a tar archive until one works.
1994 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1995 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1996 # Do not fold the above two line into one, because Tru64 sh and
1997 # Solaris sh will not grok spaces in the rhs of '-'.
1998 for _am_tool in $_am_tools
1999 do
2000   case $_am_tool in
2001   gnutar)
2002     for _am_tar in tar gnutar gtar;
2003     do
2004       AM_RUN_LOG([$_am_tar --version]) && break
2005     done
2006     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2007     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2008     am__untar="$_am_tar -xf -"
2009     ;;
2010   plaintar)
2011     # Must skip GNU tar: if it does not support --format= it doesn't create
2012     # ustar tarball either.
2013     (tar --version) >/dev/null 2>&1 && continue
2014     am__tar='tar chf - "$$tardir"'
2015     am__tar_='tar chf - "$tardir"'
2016     am__untar='tar xf -'
2017     ;;
2018   pax)
2019     am__tar='pax -L -x $1 -w "$$tardir"'
2020     am__tar_='pax -L -x $1 -w "$tardir"'
2021     am__untar='pax -r'
2022     ;;
2023   cpio)
2024     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2025     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2026     am__untar='cpio -i -H $1 -d'
2027     ;;
2028   none)
2029     am__tar=false
2030     am__tar_=false
2031     am__untar=false
2032     ;;
2033   esac
2034
2035   # If the value was cached, stop now.  We just wanted to have am__tar
2036   # and am__untar set.
2037   test -n "${am_cv_prog_tar_$1}" && break
2038
2039   # tar/untar a dummy directory, and stop if the command works
2040   rm -rf conftest.dir
2041   mkdir conftest.dir
2042   echo GrepMe > conftest.dir/file
2043   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2044   rm -rf conftest.dir
2045   if test -s conftest.tar; then
2046     AM_RUN_LOG([$am__untar <conftest.tar])
2047     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2048   fi
2049 done
2050 rm -rf conftest.dir
2051
2052 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2053 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2054 AC_SUBST([am__tar])
2055 AC_SUBST([am__untar])
2056 ]) # _AM_PROG_TAR
2057
2058 m4_include([macros/afs-check.m4])
2059 m4_include([macros/ax_pthread.m4])
2060 m4_include([macros/cnid-backend.m4])
2061 m4_include([macros/config-checks.m4])
2062 m4_include([macros/db3-check.m4])
2063 m4_include([macros/grep-check.m4])
2064 m4_include([macros/gssapi-check.m4])
2065 m4_include([macros/iconv.m4])
2066 m4_include([macros/largefile-check.m4])
2067 m4_include([macros/libgcrypt.m4])
2068 m4_include([macros/libtool.m4])
2069 m4_include([macros/ltoptions.m4])
2070 m4_include([macros/ltsugar.m4])
2071 m4_include([macros/ltversion.m4])
2072 m4_include([macros/lt~obsolete.m4])
2073 m4_include([macros/netatalk.m4])
2074 m4_include([macros/pam-check.m4])
2075 m4_include([macros/perl-check.m4])
2076 m4_include([macros/ps-check.m4])
2077 m4_include([macros/quota-check.m4])
2078 m4_include([macros/ssl-check.m4])
2079 m4_include([macros/summary.m4])
2080 m4_include([macros/tcp-wrappers.m4])
2081 m4_include([macros/util.m4])
2082 m4_include([macros/zeroconf.m4])