1# generated automatically by aclocal 1.12.2 -*- 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
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17[m4_warning([this file was generated for autoconf 2.69.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To 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.
37AC_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.
44m4_defun([_LT_CONFIG_LTDL_DIR],
45[dnl remove trailing slashes
46m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
47m4_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['])])])
56m4_popdef([_ARG_DIR])
57])# _LT_CONFIG_LTDL_DIR
58
59# Initialise:
60m4_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}/'.
67m4_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.
89AC_DEFUN([LTDL_CONVENIENCE],
90[AC_BEFORE([$0], [LTDL_INIT])dnl
91dnl Although the argument is deprecated and no longer documented,
92dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
93dnl here make sure it is the same as any other declaration of libltdl's
94dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
95dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
96m4_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:
102AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
103[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
104_LTDL_CONVENIENCE])
105
106dnl aclocal-1.4 backwards compatibility:
107dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
108
109
110# _LTDL_CONVENIENCE
111# -----------------
112# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
113m4_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" ;;
118esac
119LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
120LTDLDEPS=$LIBLTDL
121LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
122
123AC_SUBST([LIBLTDL])
124AC_SUBST([LTDLDEPS])
125AC_SUBST([LTDLINCL])
126
127# For backwards non-gettext consistent compatibility...
128INCLTDL="$LTDLINCL"
129AC_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.
145AC_DEFUN([LTDL_INSTALLABLE],
146[AC_BEFORE([$0], [LTDL_INIT])dnl
147dnl Although the argument is deprecated and no longer documented,
148dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
149dnl here make sure it is the same as any other declaration of libltdl's
150dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
151dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
152m4_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:
158AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
159[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
160_LTDL_INSTALLABLE])
161
162dnl aclocal-1.4 backwards compatibility:
163dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
164
165
166# _LTDL_INSTALLABLE
167# -----------------
168# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
169m4_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
184fi
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.
188case $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      ;;
200esac
201
202AC_SUBST([LIBLTDL])
203AC_SUBST([LTDLDEPS])
204AC_SUBST([LTDLINCL])
205
206# For backwards non-gettext consistent compatibility...
207INCLTDL="$LTDLINCL"
208AC_SUBST([INCLTDL])
209])# LTDL_INSTALLABLE
210
211
212# _LTDL_MODE_DISPATCH
213# -------------------
214m4_define([_LTDL_MODE_DISPATCH],
215[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
216m4_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
225dnl Be careful not to expand twice:
226m4_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.
234AC_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.
247AC_DEFUN([LTDL_INIT],
248[dnl Parse OPTIONS
249_LT_SET_OPTIONS([$0], [$1])
250
251dnl We need to keep our own list of libobjs separate from our parent project,
252dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
253dnl we look for our own LIBOBJs.
254m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
255m4_pushdef([AC_LIBSOURCES])
256
257dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
258m4_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
263AC_ARG_WITH([included_ltdl],
264    [AS_HELP_STRING([--with-included-ltdl],
265                    [use the GNU ltdl sources included here])])
266
267if 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  )
281fi
282
283dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
284dnl was called yet, then for old times' sake, we assume libltdl is in an
285dnl eponymous directory:
286AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
287
288AC_ARG_WITH([ltdl_include],
289    [AS_HELP_STRING([--with-ltdl-include=DIR],
290                    [use the ltdl headers installed in DIR])])
291
292if 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
297else
298  with_ltdl_include=no
299fi
300
301AC_ARG_WITH([ltdl_lib],
302    [AS_HELP_STRING([--with-ltdl-lib=DIR],
303                    [use the libltdl.la installed in DIR])])
304
305if 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
310else
311  with_ltdl_lib=no
312fi
313
314case ,$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	;;
338esac
339INCLTDL="$LTDLINCL"
340
341# Report our decision...
342AC_MSG_CHECKING([where to find libltdl headers])
343AC_MSG_RESULT([$LTDLINCL])
344AC_MSG_CHECKING([where to find libltdl library])
345AC_MSG_RESULT([$LIBLTDL])
346
347_LTDL_SETUP
348
349dnl restore autoconf definition.
350m4_popdef([AC_LIBOBJ])
351m4_popdef([AC_LIBSOURCES])
352
353AC_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:
369m4_define([LTDL_INIT])
370])# LTDL_INIT
371
372# Old names:
373AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
374AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
375AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
376dnl aclocal-1.4 backwards compatibility:
377dnl AC_DEFUN([AC_LIB_LTDL], [])
378dnl AC_DEFUN([AC_WITH_LTDL], [])
379dnl 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.
388AC_DEFUN([_LTDL_SETUP],
389[AC_REQUIRE([AC_PROG_CC])dnl
390AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
391AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
392AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
393AC_REQUIRE([LT_LIB_DLLOAD])dnl
394AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
395AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
396AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
397AC_REQUIRE([gl_FUNC_ARGZ])dnl
398
399m4_require([_LT_CHECK_OBJDIR])dnl
400m4_require([_LT_HEADER_DLFCN])dnl
401m4_require([_LT_CHECK_DLPREOPEN])dnl
402m4_require([_LT_DECL_SED])dnl
403
404dnl Don't require this, or it will be expanded earlier than the code
405dnl that sets the variables it relies on:
406_LT_ENABLE_INSTALL
407
408dnl _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).
416AC_CONFIG_COMMANDS_PRE([dnl
417m4_pattern_allow([^LT_CONFIG_H$])dnl
418m4_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	[])])])
423AC_SUBST([LT_CONFIG_H])
424
425AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
426	[], [], [AC_INCLUDES_DEFAULT])
427
428AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
429AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
430
431m4_pattern_allow([LT_LIBEXT])dnl
432AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
433
434name=
435eval "lt_libprefix=\"$libname_spec\""
436m4_pattern_allow([LT_LIBPREFIX])dnl
437AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
438
439name=ltdl
440eval "LTDLOPEN=\"$libname_spec\""
441AC_SUBST([LTDLOPEN])
442])# _LTDL_SETUP
443
444
445# _LT_ENABLE_INSTALL
446# ------------------
447m4_define([_LT_ENABLE_INSTALL],
448[AC_ARG_ENABLE([ltdl-install],
449    [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
450
451case ,${enable_ltdl_install},${enable_ltdl_convenience} in
452  *yes*) ;;
453  *) enable_ltdl_convenience=yes ;;
454esac
455
456m4_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# ---------------------
464AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
465[AC_REQUIRE([AC_CANONICAL_HOST])dnl
466AC_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  ])
556if 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().])
559fi
560])# LT_SYS_DLOPEN_DEPLIBS
561
562# Old name:
563AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
564dnl aclocal-1.4 backwards compatibility:
565dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
566
567
568# LT_SYS_MODULE_EXT
569# -----------------
570AC_DEFUN([LT_SYS_MODULE_EXT],
571[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
572AC_CACHE_CHECK([which extension is used for runtime loadable modules],
573  [libltdl_cv_shlibext],
574[
575module=yes
576eval libltdl_cv_shlibext=$shrext_cmds
577module=no
578eval libltdl_cv_shrext=$shrext_cmds
579  ])
580if 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".])
584fi
585if 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".])
589fi
590])# LT_SYS_MODULE_EXT
591
592# Old name:
593AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
594dnl aclocal-1.4 backwards compatibility:
595dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
596
597
598# LT_SYS_MODULE_PATH
599# ------------------
600AC_DEFUN([LT_SYS_MODULE_PATH],
601[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
602AC_CACHE_CHECK([which variable specifies run-time module search path],
603  [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
604if 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.])
608fi
609])# LT_SYS_MODULE_PATH
610
611# Old name:
612AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
613dnl aclocal-1.4 backwards compatibility:
614dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
615
616
617# LT_SYS_DLSEARCH_PATH
618# --------------------
619AC_DEFUN([LT_SYS_DLSEARCH_PATH],
620[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
621AC_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"])
624if 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.])
636fi
637])# LT_SYS_DLSEARCH_PATH
638
639# Old name:
640AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
641dnl aclocal-1.4 backwards compatibility:
642dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
643
644
645# _LT_CHECK_DLPREOPEN
646# -------------------
647m4_defun([_LT_CHECK_DLPREOPEN],
648[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
649AC_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  ])
657if 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.])
660fi
661])# _LT_CHECK_DLPREOPEN
662
663
664# LT_LIB_DLLOAD
665# -------------
666AC_DEFUN([LT_LIB_DLLOAD],
667[m4_pattern_allow([^LT_DLLOADERS$])
668LT_DLLOADERS=
669AC_SUBST([LT_DLLOADERS])
670
671AC_LANG_PUSH([C])
672
673LIBADD_DLOPEN=
674AC_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"])])])
695if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
696then
697  lt_save_LIBS="$LIBS"
698  LIBS="$LIBS $LIBADD_DLOPEN"
699  AC_CHECK_FUNCS([dlerror])
700  LIBS="$lt_save_LIBS"
701fi
702AC_SUBST([LIBADD_DLOPEN])
703
704LIBADD_SHL_LOAD=
705AC_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"])])
714AC_SUBST([LIBADD_SHL_LOAD])
715
716case $host_os in
717darwin[[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  ;;
724beos*)
725  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
726  ;;
727cygwin* | 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  ;;
731esac
732
733AC_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"])
737AC_SUBST([LIBADD_DLD_LINK])
738
739m4_pattern_allow([^LT_DLPREOPEN$])
740LT_DLPREOPEN=
741if test -n "$LT_DLLOADERS"
742then
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])
748fi
749AC_SUBST([LT_DLPREOPEN])
750
751dnl This isn't used anymore, but set it for backwards compatibility
752LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
753AC_SUBST([LIBADD_DL])
754
755AC_LANG_POP
756])# LT_LIB_DLLOAD
757
758# Old name:
759AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
760dnl aclocal-1.4 backwards compatibility:
761dnl AC_DEFUN([AC_LTDL_DLLIB], [])
762
763
764# LT_SYS_SYMBOL_USCORE
765# --------------------
766# does the compiler prefix global symbols with an underscore?
767AC_DEFUN([LT_SYS_SYMBOL_USCORE],
768[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
769AC_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
773void nm_test_func(){}
774int 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:
804AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
805dnl aclocal-1.4 backwards compatibility:
806dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
807
808
809# LT_FUNC_DLSYM_USCORE
810# --------------------
811AC_DEFUN([LT_FUNC_DLSYM_USCORE],
812[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
813if 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
827fi
828
829if 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.])
832fi
833])# LT_FUNC_DLSYM_USCORE
834
835# Old name:
836AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
837dnl aclocal-1.4 backwards compatibility:
838dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
839
840# Copyright (C) 2002-2012 Free Software Foundation, Inc.
841#
842# This file is free software; the Free Software Foundation
843# gives unlimited permission to copy and/or distribute it,
844# with or without modifications, as long as this notice is preserved.
845
846# serial 8
847
848# AM_AUTOMAKE_VERSION(VERSION)
849# ----------------------------
850# Automake X.Y traces this macro to ensure aclocal.m4 has been
851# generated from the m4 files accompanying Automake X.Y.
852# (This private macro should not be called outside this file.)
853AC_DEFUN([AM_AUTOMAKE_VERSION],
854[am__api_version='1.12'
855dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
856dnl require some minimum version.  Point them to the right macro.
857m4_if([$1], [1.12.2], [],
858      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
859])
860
861# _AM_AUTOCONF_VERSION(VERSION)
862# -----------------------------
863# aclocal traces this macro to find the Autoconf version.
864# This is a private macro too.  Using m4_define simplifies
865# the logic in aclocal, which can simply ignore this definition.
866m4_define([_AM_AUTOCONF_VERSION], [])
867
868# AM_SET_CURRENT_AUTOMAKE_VERSION
869# -------------------------------
870# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
871# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
872AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
873[AM_AUTOMAKE_VERSION([1.12.2])dnl
874m4_ifndef([AC_AUTOCONF_VERSION],
875  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
876_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
877
878# Figure out how to run the assembler.                      -*- Autoconf -*-
879
880# Copyright (C) 2001-2012 Free Software Foundation, Inc.
881#
882# This file is free software; the Free Software Foundation
883# gives unlimited permission to copy and/or distribute it,
884# with or without modifications, as long as this notice is preserved.
885
886# serial 5
887
888# AM_PROG_AS
889# ----------
890AC_DEFUN([AM_PROG_AS],
891[# By default we simply use the C compiler to build assembly code.
892AC_REQUIRE([AC_PROG_CC])
893test "${CCAS+set}" = set || CCAS=$CC
894test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
895AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
896AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
897_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
898])
899
900# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
901
902# Copyright (C) 2001-2012 Free Software Foundation, Inc.
903#
904# This file is free software; the Free Software Foundation
905# gives unlimited permission to copy and/or distribute it,
906# with or without modifications, as long as this notice is preserved.
907
908# serial 2
909
910# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
911# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
912# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
913#
914# Of course, Automake must honor this variable whenever it calls a
915# tool from the auxiliary directory.  The problem is that $srcdir (and
916# therefore $ac_aux_dir as well) can be either absolute or relative,
917# depending on how configure is run.  This is pretty annoying, since
918# it makes $ac_aux_dir quite unusable in subdirectories: in the top
919# source directory, any form will work fine, but in subdirectories a
920# relative path needs to be adjusted first.
921#
922# $ac_aux_dir/missing
923#    fails when called from a subdirectory if $ac_aux_dir is relative
924# $top_srcdir/$ac_aux_dir/missing
925#    fails if $ac_aux_dir is absolute,
926#    fails when called from a subdirectory in a VPATH build with
927#          a relative $ac_aux_dir
928#
929# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
930# are both prefixed by $srcdir.  In an in-source build this is usually
931# harmless because $srcdir is '.', but things will broke when you
932# start a VPATH build or use an absolute $srcdir.
933#
934# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
935# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
936#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
937# and then we would define $MISSING as
938#   MISSING="\${SHELL} $am_aux_dir/missing"
939# This will work as long as MISSING is not called from configure, because
940# unfortunately $(top_srcdir) has no meaning in configure.
941# However there are other variables, like CC, which are often used in
942# configure, and could therefore not use this "fixed" $ac_aux_dir.
943#
944# Another solution, used here, is to always expand $ac_aux_dir to an
945# absolute PATH.  The drawback is that using absolute paths prevent a
946# configured tree to be moved without reconfiguration.
947
948AC_DEFUN([AM_AUX_DIR_EXPAND],
949[dnl Rely on autoconf to set up CDPATH properly.
950AC_PREREQ([2.50])dnl
951# expand $ac_aux_dir to an absolute path
952am_aux_dir=`cd $ac_aux_dir && pwd`
953])
954
955# AM_CONDITIONAL                                            -*- Autoconf -*-
956
957# Copyright (C) 1997-2012 Free Software Foundation, Inc.
958#
959# This file is free software; the Free Software Foundation
960# gives unlimited permission to copy and/or distribute it,
961# with or without modifications, as long as this notice is preserved.
962
963# serial 10
964
965# AM_CONDITIONAL(NAME, SHELL-CONDITION)
966# -------------------------------------
967# Define a conditional.
968AC_DEFUN([AM_CONDITIONAL],
969[AC_PREREQ([2.52])dnl
970 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
971       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
972AC_SUBST([$1_TRUE])dnl
973AC_SUBST([$1_FALSE])dnl
974_AM_SUBST_NOTMAKE([$1_TRUE])dnl
975_AM_SUBST_NOTMAKE([$1_FALSE])dnl
976m4_define([_AM_COND_VALUE_$1], [$2])dnl
977if $2; then
978  $1_TRUE=
979  $1_FALSE='#'
980else
981  $1_TRUE='#'
982  $1_FALSE=
983fi
984AC_CONFIG_COMMANDS_PRE(
985[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
986  AC_MSG_ERROR([[conditional "$1" was never defined.
987Usually this means the macro was only invoked conditionally.]])
988fi])])
989
990# Copyright (C) 1999-2012 Free Software Foundation, Inc.
991#
992# This file is free software; the Free Software Foundation
993# gives unlimited permission to copy and/or distribute it,
994# with or without modifications, as long as this notice is preserved.
995
996# serial 17
997
998# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
999# written in clear, in which case automake, when reading aclocal.m4,
1000# will think it sees a *use*, and therefore will trigger all it's
1001# C support machinery.  Also note that it means that autoscan, seeing
1002# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1003
1004
1005# _AM_DEPENDENCIES(NAME)
1006# ----------------------
1007# See how the compiler implements dependency checking.
1008# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1009# We try a few techniques and use that to set a single cache variable.
1010#
1011# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1012# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1013# dependency, and given that the user is not expected to run this macro,
1014# just rely on AC_PROG_CC.
1015AC_DEFUN([_AM_DEPENDENCIES],
1016[AC_REQUIRE([AM_SET_DEPDIR])dnl
1017AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1018AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1019AC_REQUIRE([AM_DEP_TRACK])dnl
1020
1021m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1022      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1023      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1024      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1025      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1026      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1027                    [depcc="$$1"   am_compiler_list=])
1028
1029AC_CACHE_CHECK([dependency style of $depcc],
1030               [am_cv_$1_dependencies_compiler_type],
1031[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1032  # We make a subdir and do the tests there.  Otherwise we can end up
1033  # making bogus files that we don't know about and never remove.  For
1034  # instance it was reported that on HP-UX the gcc test will end up
1035  # making a dummy file named 'D' -- because '-MD' means "put the output
1036  # in D".
1037  rm -rf conftest.dir
1038  mkdir conftest.dir
1039  # Copy depcomp to subdir because otherwise we won't find it if we're
1040  # using a relative directory.
1041  cp "$am_depcomp" conftest.dir
1042  cd conftest.dir
1043  # We will build objects and dependencies in a subdirectory because
1044  # it helps to detect inapplicable dependency modes.  For instance
1045  # both Tru64's cc and ICC support -MD to output dependencies as a
1046  # side effect of compilation, but ICC will put the dependencies in
1047  # the current directory while Tru64 will put them in the object
1048  # directory.
1049  mkdir sub
1050
1051  am_cv_$1_dependencies_compiler_type=none
1052  if test "$am_compiler_list" = ""; then
1053     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1054  fi
1055  am__universal=false
1056  m4_case([$1], [CC],
1057    [case " $depcc " in #(
1058     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1059     esac],
1060    [CXX],
1061    [case " $depcc " in #(
1062     *\ -arch\ *\ -arch\ *) am__universal=true ;;
1063     esac])
1064
1065  for depmode in $am_compiler_list; do
1066    # Setup a source with many dependencies, because some compilers
1067    # like to wrap large dependency lists on column 80 (with \), and
1068    # we should not choose a depcomp mode which is confused by this.
1069    #
1070    # We need to recreate these files for each test, as the compiler may
1071    # overwrite some of them when testing with obscure command lines.
1072    # This happens at least with the AIX C compiler.
1073    : > sub/conftest.c
1074    for i in 1 2 3 4 5 6; do
1075      echo '#include "conftst'$i'.h"' >> sub/conftest.c
1076      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1077      # Solaris 10 /bin/sh.
1078      echo '/* dummy */' > sub/conftst$i.h
1079    done
1080    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1081
1082    # We check with '-c' and '-o' for the sake of the "dashmstdout"
1083    # mode.  It turns out that the SunPro C++ compiler does not properly
1084    # handle '-M -o', and we need to detect this.  Also, some Intel
1085    # versions had trouble with output in subdirs.
1086    am__obj=sub/conftest.${OBJEXT-o}
1087    am__minus_obj="-o $am__obj"
1088    case $depmode in
1089    gcc)
1090      # This depmode causes a compiler race in universal mode.
1091      test "$am__universal" = false || continue
1092      ;;
1093    nosideeffect)
1094      # After this tag, mechanisms are not by side-effect, so they'll
1095      # only be used when explicitly requested.
1096      if test "x$enable_dependency_tracking" = xyes; then
1097	continue
1098      else
1099	break
1100      fi
1101      ;;
1102    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1103      # This compiler won't grok '-c -o', but also, the minuso test has
1104      # not run yet.  These depmodes are late enough in the game, and
1105      # so weak that their functioning should not be impacted.
1106      am__obj=conftest.${OBJEXT-o}
1107      am__minus_obj=
1108      ;;
1109    none) break ;;
1110    esac
1111    if depmode=$depmode \
1112       source=sub/conftest.c object=$am__obj \
1113       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1114       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1115         >/dev/null 2>conftest.err &&
1116       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1117       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1118       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1119       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1120      # icc doesn't choke on unknown options, it will just issue warnings
1121      # or remarks (even with -Werror).  So we grep stderr for any message
1122      # that says an option was ignored or not supported.
1123      # When given -MP, icc 7.0 and 7.1 complain thusly:
1124      #   icc: Command line warning: ignoring option '-M'; no argument required
1125      # The diagnosis changed in icc 8.0:
1126      #   icc: Command line remark: option '-MP' not supported
1127      if (grep 'ignoring option' conftest.err ||
1128          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1129        am_cv_$1_dependencies_compiler_type=$depmode
1130        break
1131      fi
1132    fi
1133  done
1134
1135  cd ..
1136  rm -rf conftest.dir
1137else
1138  am_cv_$1_dependencies_compiler_type=none
1139fi
1140])
1141AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1142AM_CONDITIONAL([am__fastdep$1], [
1143  test "x$enable_dependency_tracking" != xno \
1144  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1145])
1146
1147
1148# AM_SET_DEPDIR
1149# -------------
1150# Choose a directory name for dependency files.
1151# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1152AC_DEFUN([AM_SET_DEPDIR],
1153[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1154AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1155])
1156
1157
1158# AM_DEP_TRACK
1159# ------------
1160AC_DEFUN([AM_DEP_TRACK],
1161[AC_ARG_ENABLE([dependency-tracking], [dnl
1162AS_HELP_STRING(
1163  [--enable-dependency-tracking],
1164  [do not reject slow dependency extractors])
1165AS_HELP_STRING(
1166  [--disable-dependency-tracking],
1167  [speeds up one-time build])])
1168if test "x$enable_dependency_tracking" != xno; then
1169  am_depcomp="$ac_aux_dir/depcomp"
1170  AMDEPBACKSLASH='\'
1171  am__nodep='_no'
1172fi
1173AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1174AC_SUBST([AMDEPBACKSLASH])dnl
1175_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1176AC_SUBST([am__nodep])dnl
1177_AM_SUBST_NOTMAKE([am__nodep])dnl
1178])
1179
1180# Generate code to set up dependency tracking.              -*- Autoconf -*-
1181
1182# Copyright (C) 1999-2012 Free Software Foundation, Inc.
1183#
1184# This file is free software; the Free Software Foundation
1185# gives unlimited permission to copy and/or distribute it,
1186# with or without modifications, as long as this notice is preserved.
1187
1188# serial 6
1189
1190# _AM_OUTPUT_DEPENDENCY_COMMANDS
1191# ------------------------------
1192AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1193[{
1194  # Autoconf 2.62 quotes --file arguments for eval, but not when files
1195  # are listed without --file.  Let's play safe and only enable the eval
1196  # if we detect the quoting.
1197  case $CONFIG_FILES in
1198  *\'*) eval set x "$CONFIG_FILES" ;;
1199  *)   set x $CONFIG_FILES ;;
1200  esac
1201  shift
1202  for mf
1203  do
1204    # Strip MF so we end up with the name of the file.
1205    mf=`echo "$mf" | sed -e 's/:.*$//'`
1206    # Check whether this is an Automake generated Makefile or not.
1207    # We used to match only the files named 'Makefile.in', but
1208    # some people rename them; so instead we look at the file content.
1209    # Grep'ing the first line is not enough: some people post-process
1210    # each Makefile.in and add a new line on top of each file to say so.
1211    # Grep'ing the whole file is not good either: AIX grep has a line
1212    # limit of 2048, but all sed's we know have understand at least 4000.
1213    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1214      dirpart=`AS_DIRNAME("$mf")`
1215    else
1216      continue
1217    fi
1218    # Extract the definition of DEPDIR, am__include, and am__quote
1219    # from the Makefile without running 'make'.
1220    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1221    test -z "$DEPDIR" && continue
1222    am__include=`sed -n 's/^am__include = //p' < "$mf"`
1223    test -z "am__include" && continue
1224    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1225    # Find all dependency output files, they are included files with
1226    # $(DEPDIR) in their names.  We invoke sed twice because it is the
1227    # simplest approach to changing $(DEPDIR) to its actual value in the
1228    # expansion.
1229    for file in `sed -n "
1230      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1231	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1232      # Make sure the directory exists.
1233      test -f "$dirpart/$file" && continue
1234      fdir=`AS_DIRNAME(["$file"])`
1235      AS_MKDIR_P([$dirpart/$fdir])
1236      # echo "creating $dirpart/$file"
1237      echo '# dummy' > "$dirpart/$file"
1238    done
1239  done
1240}
1241])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1242
1243
1244# AM_OUTPUT_DEPENDENCY_COMMANDS
1245# -----------------------------
1246# This macro should only be invoked once -- use via AC_REQUIRE.
1247#
1248# This code is only required when automatic dependency tracking
1249# is enabled.  FIXME.  This creates each '.P' file that we will
1250# need in order to bootstrap the dependency handling code.
1251AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1252[AC_CONFIG_COMMANDS([depfiles],
1253     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1254     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1255])
1256
1257# Do all the work for Automake.                             -*- Autoconf -*-
1258
1259# Copyright (C) 1996-2012 Free Software Foundation, Inc.
1260#
1261# This file is free software; the Free Software Foundation
1262# gives unlimited permission to copy and/or distribute it,
1263# with or without modifications, as long as this notice is preserved.
1264
1265# serial 19
1266
1267# This macro actually does too much.  Some checks are only needed if
1268# your package does certain things.  But this isn't really a big deal.
1269
1270# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1271# AM_INIT_AUTOMAKE([OPTIONS])
1272# -----------------------------------------------
1273# The call with PACKAGE and VERSION arguments is the old style
1274# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1275# and VERSION should now be passed to AC_INIT and removed from
1276# the call to AM_INIT_AUTOMAKE.
1277# We support both call styles for the transition.  After
1278# the next Automake release, Autoconf can make the AC_INIT
1279# arguments mandatory, and then we can depend on a new Autoconf
1280# release and drop the old call support.
1281AC_DEFUN([AM_INIT_AUTOMAKE],
1282[AC_PREREQ([2.62])dnl
1283dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1284dnl the ones we care about.
1285m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1286AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1287AC_REQUIRE([AC_PROG_INSTALL])dnl
1288if test "`cd $srcdir && pwd`" != "`pwd`"; then
1289  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1290  # is not polluted with repeated "-I."
1291  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1292  # test to see if srcdir already configured
1293  if test -f $srcdir/config.status; then
1294    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1295  fi
1296fi
1297
1298# test whether we have cygpath
1299if test -z "$CYGPATH_W"; then
1300  if (cygpath --version) >/dev/null 2>/dev/null; then
1301    CYGPATH_W='cygpath -w'
1302  else
1303    CYGPATH_W=echo
1304  fi
1305fi
1306AC_SUBST([CYGPATH_W])
1307
1308# Define the identity of the package.
1309dnl Distinguish between old-style and new-style calls.
1310m4_ifval([$2],
1311[AC_DIAGNOSE([obsolete],
1312[$0: two- and three-arguments forms are deprecated.  For more info, see:
1313http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
1314m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1315 AC_SUBST([PACKAGE], [$1])dnl
1316 AC_SUBST([VERSION], [$2])],
1317[_AM_SET_OPTIONS([$1])dnl
1318dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1319m4_if(
1320  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1321  [ok:ok],,
1322  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1323 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1324 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1325
1326_AM_IF_OPTION([no-define],,
1327[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1328 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1329
1330# Some tools Automake needs.
1331AC_REQUIRE([AM_SANITY_CHECK])dnl
1332AC_REQUIRE([AC_ARG_PROGRAM])dnl
1333AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1334AM_MISSING_PROG([AUTOCONF], [autoconf])
1335AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1336AM_MISSING_PROG([AUTOHEADER], [autoheader])
1337AM_MISSING_PROG([MAKEINFO], [makeinfo])
1338AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1339AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1340AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1341# For better backward compatibility.  To be removed once Automake 1.9.x
1342# dies out for good.  For more background, see:
1343# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1344# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1345AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1346# We need awk for the "check" target.  The system "awk" is bad on
1347# some platforms.
1348AC_REQUIRE([AC_PROG_AWK])dnl
1349AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1350AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1351_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1352	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1353			     [_AM_PROG_TAR([v7])])])
1354_AM_IF_OPTION([no-dependencies],,
1355[AC_PROVIDE_IFELSE([AC_PROG_CC],
1356		  [_AM_DEPENDENCIES([CC])],
1357		  [m4_define([AC_PROG_CC],
1358			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1359AC_PROVIDE_IFELSE([AC_PROG_CXX],
1360		  [_AM_DEPENDENCIES([CXX])],
1361		  [m4_define([AC_PROG_CXX],
1362			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1363AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1364		  [_AM_DEPENDENCIES([OBJC])],
1365		  [m4_define([AC_PROG_OBJC],
1366			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1367dnl Support for Objective C++ was only introduced in Autoconf 2.65,
1368dnl but we still cater to Autoconf 2.62.
1369m4_ifdef([AC_PROG_OBJCXX],
1370[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1371		  [_AM_DEPENDENCIES([OBJCXX])],
1372		  [m4_define([AC_PROG_OBJCXX],
1373			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
1374])
1375_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1376dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
1377dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
1378dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1379AC_CONFIG_COMMANDS_PRE(dnl
1380[m4_provide_if([_AM_COMPILER_EXEEXT],
1381  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1382])
1383
1384dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1385dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1386dnl mangled by Autoconf and run in a shell conditional statement.
1387m4_define([_AC_COMPILER_EXEEXT],
1388m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1389
1390
1391# When config.status generates a header, we must update the stamp-h file.
1392# This file resides in the same directory as the config header
1393# that is generated.  The stamp files are numbered to have different names.
1394
1395# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1396# loop where config.status creates the headers, so we can generate
1397# our stamp files there.
1398AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1399[# Compute $1's index in $config_headers.
1400_am_arg=$1
1401_am_stamp_count=1
1402for _am_header in $config_headers :; do
1403  case $_am_header in
1404    $_am_arg | $_am_arg:* )
1405      break ;;
1406    * )
1407      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1408  esac
1409done
1410echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1411
1412# Copyright (C) 2001-2012 Free Software Foundation, Inc.
1413#
1414# This file is free software; the Free Software Foundation
1415# gives unlimited permission to copy and/or distribute it,
1416# with or without modifications, as long as this notice is preserved.
1417
1418# serial 8
1419
1420# AM_PROG_INSTALL_SH
1421# ------------------
1422# Define $install_sh.
1423AC_DEFUN([AM_PROG_INSTALL_SH],
1424[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1425if test x"${install_sh}" != xset; then
1426  case $am_aux_dir in
1427  *\ * | *\	*)
1428    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1429  *)
1430    install_sh="\${SHELL} $am_aux_dir/install-sh"
1431  esac
1432fi
1433AC_SUBST([install_sh])])
1434
1435# Copyright (C) 2003-2012 Free Software Foundation, Inc.
1436#
1437# This file is free software; the Free Software Foundation
1438# gives unlimited permission to copy and/or distribute it,
1439# with or without modifications, as long as this notice is preserved.
1440
1441# serial 2
1442
1443# Check whether the underlying file-system supports filenames
1444# with a leading dot.  For instance MS-DOS doesn't.
1445AC_DEFUN([AM_SET_LEADING_DOT],
1446[rm -rf .tst 2>/dev/null
1447mkdir .tst 2>/dev/null
1448if test -d .tst; then
1449  am__leading_dot=.
1450else
1451  am__leading_dot=_
1452fi
1453rmdir .tst 2>/dev/null
1454AC_SUBST([am__leading_dot])])
1455
1456# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1457# From Jim Meyering
1458
1459# Copyright (C) 1996-2012 Free Software Foundation, Inc.
1460#
1461# This file is free software; the Free Software Foundation
1462# gives unlimited permission to copy and/or distribute it,
1463# with or without modifications, as long as this notice is preserved.
1464
1465# serial 7
1466
1467# AM_MAINTAINER_MODE([DEFAULT-MODE])
1468# ----------------------------------
1469# Control maintainer-specific portions of Makefiles.
1470# Default is to disable them, unless 'enable' is passed literally.
1471# For symmetry, 'disable' may be passed as well.  Anyway, the user
1472# can override the default with the --enable/--disable switch.
1473AC_DEFUN([AM_MAINTAINER_MODE],
1474[m4_case(m4_default([$1], [disable]),
1475       [enable], [m4_define([am_maintainer_other], [disable])],
1476       [disable], [m4_define([am_maintainer_other], [enable])],
1477       [m4_define([am_maintainer_other], [enable])
1478        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1479AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1480  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1481  AC_ARG_ENABLE([maintainer-mode],
1482    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1483      am_maintainer_other[ make rules and dependencies not useful
1484      (and sometimes confusing) to the casual installer])],
1485    [USE_MAINTAINER_MODE=$enableval],
1486    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1487  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1488  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1489  MAINT=$MAINTAINER_MODE_TRUE
1490  AC_SUBST([MAINT])dnl
1491]
1492)
1493
1494AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1495
1496# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1497
1498# Copyright (C) 2001-2012 Free Software Foundation, Inc.
1499#
1500# This file is free software; the Free Software Foundation
1501# gives unlimited permission to copy and/or distribute it,
1502# with or without modifications, as long as this notice is preserved.
1503
1504# serial 5
1505
1506# AM_MAKE_INCLUDE()
1507# -----------------
1508# Check to see how make treats includes.
1509AC_DEFUN([AM_MAKE_INCLUDE],
1510[am_make=${MAKE-make}
1511cat > confinc << 'END'
1512am__doit:
1513	@echo this is the am__doit target
1514.PHONY: am__doit
1515END
1516# If we don't find an include directive, just comment out the code.
1517AC_MSG_CHECKING([for style of include used by $am_make])
1518am__include="#"
1519am__quote=
1520_am_result=none
1521# First try GNU make style include.
1522echo "include confinc" > confmf
1523# Ignore all kinds of additional output from 'make'.
1524case `$am_make -s -f confmf 2> /dev/null` in #(
1525*the\ am__doit\ target*)
1526  am__include=include
1527  am__quote=
1528  _am_result=GNU
1529  ;;
1530esac
1531# Now try BSD make style include.
1532if test "$am__include" = "#"; then
1533   echo '.include "confinc"' > confmf
1534   case `$am_make -s -f confmf 2> /dev/null` in #(
1535   *the\ am__doit\ target*)
1536     am__include=.include
1537     am__quote="\""
1538     _am_result=BSD
1539     ;;
1540   esac
1541fi
1542AC_SUBST([am__include])
1543AC_SUBST([am__quote])
1544AC_MSG_RESULT([$_am_result])
1545rm -f confinc confmf
1546])
1547
1548# Copyright (C) 1999-2012 Free Software 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 6
1555
1556# AM_PROG_CC_C_O
1557# --------------
1558# Like AC_PROG_CC_C_O, but changed for automake.
1559AC_DEFUN([AM_PROG_CC_C_O],
1560[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1561AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1562AC_REQUIRE_AUX_FILE([compile])dnl
1563# FIXME: we rely on the cache variable name because
1564# there is no other way.
1565set dummy $CC
1566am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1567eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1568if test "$am_t" != yes; then
1569   # Losing compiler, so override with the script.
1570   # FIXME: It is wrong to rewrite CC.
1571   # But if we don't then we get into trouble of one sort or another.
1572   # A longer-term fix would be to have automake use am__CC in this case,
1573   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1574   CC="$am_aux_dir/compile $CC"
1575fi
1576dnl Make sure AC_PROG_CC is never called again, or it will override our
1577dnl setting of CC.
1578m4_define([AC_PROG_CC],
1579          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1580])
1581
1582# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1583
1584# Copyright (C) 1997-2012 Free Software Foundation, Inc.
1585#
1586# This file is free software; the Free Software Foundation
1587# gives unlimited permission to copy and/or distribute it,
1588# with or without modifications, as long as this notice is preserved.
1589
1590# serial 7
1591
1592# AM_MISSING_PROG(NAME, PROGRAM)
1593# ------------------------------
1594AC_DEFUN([AM_MISSING_PROG],
1595[AC_REQUIRE([AM_MISSING_HAS_RUN])
1596$1=${$1-"${am_missing_run}$2"}
1597AC_SUBST($1)])
1598
1599
1600# AM_MISSING_HAS_RUN
1601# ------------------
1602# Define MISSING if not defined so far and test if it supports --run.
1603# If it does, set am_missing_run to use it, otherwise, to nothing.
1604AC_DEFUN([AM_MISSING_HAS_RUN],
1605[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1606AC_REQUIRE_AUX_FILE([missing])dnl
1607if test x"${MISSING+set}" != xset; then
1608  case $am_aux_dir in
1609  *\ * | *\	*)
1610    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1611  *)
1612    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1613  esac
1614fi
1615# Use eval to expand $SHELL
1616if eval "$MISSING --run true"; then
1617  am_missing_run="$MISSING --run "
1618else
1619  am_missing_run=
1620  AC_MSG_WARN(['missing' script is too old or missing])
1621fi
1622])
1623
1624# Helper functions for option handling.                     -*- Autoconf -*-
1625
1626# Copyright (C) 2001-2012 Free Software Foundation, Inc.
1627#
1628# This file is free software; the Free Software Foundation
1629# gives unlimited permission to copy and/or distribute it,
1630# with or without modifications, as long as this notice is preserved.
1631
1632# serial 6
1633
1634# _AM_MANGLE_OPTION(NAME)
1635# -----------------------
1636AC_DEFUN([_AM_MANGLE_OPTION],
1637[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1638
1639# _AM_SET_OPTION(NAME)
1640# --------------------
1641# Set option NAME.  Presently that only means defining a flag for this option.
1642AC_DEFUN([_AM_SET_OPTION],
1643[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1644
1645# _AM_SET_OPTIONS(OPTIONS)
1646# ------------------------
1647# OPTIONS is a space-separated list of Automake options.
1648AC_DEFUN([_AM_SET_OPTIONS],
1649[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1650
1651# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1652# -------------------------------------------
1653# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1654AC_DEFUN([_AM_IF_OPTION],
1655[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1656
1657# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1658
1659# Copyright (C) 1996-2012 Free Software Foundation, Inc.
1660#
1661# This file is free software; the Free Software Foundation
1662# gives unlimited permission to copy and/or distribute it,
1663# with or without modifications, as long as this notice is preserved.
1664
1665# serial 9
1666
1667# AM_SANITY_CHECK
1668# ---------------
1669AC_DEFUN([AM_SANITY_CHECK],
1670[AC_MSG_CHECKING([whether build environment is sane])
1671# Reject unsafe characters in $srcdir or the absolute working directory
1672# name.  Accept space and tab only in the latter.
1673am_lf='
1674'
1675case `pwd` in
1676  *[[\\\"\#\$\&\'\`$am_lf]]*)
1677    AC_MSG_ERROR([unsafe absolute working directory name]);;
1678esac
1679case $srcdir in
1680  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1681    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1682esac
1683
1684# Do 'set' in a subshell so we don't clobber the current shell's
1685# arguments.  Must try -L first in case configure is actually a
1686# symlink; some systems play weird games with the mod time of symlinks
1687# (eg FreeBSD returns the mod time of the symlink's containing
1688# directory).
1689if (
1690   am_has_slept=no
1691   for am_try in 1 2; do
1692     echo "timestamp, slept: $am_has_slept" > conftest.file
1693     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1694     if test "$[*]" = "X"; then
1695	# -L didn't work.
1696	set X `ls -t "$srcdir/configure" conftest.file`
1697     fi
1698     if test "$[*]" != "X $srcdir/configure conftest.file" \
1699	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1700
1701	# If neither matched, then we have a broken ls.  This can happen
1702	# if, for instance, CONFIG_SHELL is bash and it inherits a
1703	# broken ls alias from the environment.  This has actually
1704	# happened.  Such a system could not be considered "sane".
1705	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1706  alias in your environment])
1707     fi
1708     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1709       break
1710     fi
1711     # Just in case.
1712     sleep 1
1713     am_has_slept=yes
1714   done
1715   test "$[2]" = conftest.file
1716   )
1717then
1718   # Ok.
1719   :
1720else
1721   AC_MSG_ERROR([newly created file is older than distributed files!
1722Check your system clock])
1723fi
1724AC_MSG_RESULT([yes])
1725# If we didn't sleep, we still need to ensure time stamps of config.status and
1726# generated files are strictly newer.
1727am_sleep_pid=
1728if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1729  ( sleep 1 ) &
1730  am_sleep_pid=$!
1731fi
1732AC_CONFIG_COMMANDS_PRE(
1733  [AC_MSG_CHECKING([that generated files are newer than configure])
1734   if test -n "$am_sleep_pid"; then
1735     # Hide warnings about reused PIDs.
1736     wait $am_sleep_pid 2>/dev/null
1737   fi
1738   AC_MSG_RESULT([done])])
1739rm -f conftest.file
1740])
1741
1742# Copyright (C) 2001-2012 Free Software Foundation, Inc.
1743#
1744# This file is free software; the Free Software Foundation
1745# gives unlimited permission to copy and/or distribute it,
1746# with or without modifications, as long as this notice is preserved.
1747
1748# serial 2
1749
1750# AM_PROG_INSTALL_STRIP
1751# ---------------------
1752# One issue with vendor 'install' (even GNU) is that you can't
1753# specify the program used to strip binaries.  This is especially
1754# annoying in cross-compiling environments, where the build's strip
1755# is unlikely to handle the host's binaries.
1756# Fortunately install-sh will honor a STRIPPROG variable, so we
1757# always use install-sh in "make install-strip", and initialize
1758# STRIPPROG with the value of the STRIP variable (set by the user).
1759AC_DEFUN([AM_PROG_INSTALL_STRIP],
1760[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1761# Installed binaries are usually stripped using 'strip' when the user
1762# run "make install-strip".  However 'strip' might not be the right
1763# tool to use in cross-compilation environments, therefore Automake
1764# will honor the 'STRIP' environment variable to overrule this program.
1765dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1766if test "$cross_compiling" != no; then
1767  AC_CHECK_TOOL([STRIP], [strip], :)
1768fi
1769INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1770AC_SUBST([INSTALL_STRIP_PROGRAM])])
1771
1772# Copyright (C) 2006-2012 Free Software Foundation, Inc.
1773#
1774# This file is free software; the Free Software Foundation
1775# gives unlimited permission to copy and/or distribute it,
1776# with or without modifications, as long as this notice is preserved.
1777
1778# serial 3
1779
1780# _AM_SUBST_NOTMAKE(VARIABLE)
1781# ---------------------------
1782# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1783# This macro is traced by Automake.
1784AC_DEFUN([_AM_SUBST_NOTMAKE])
1785
1786# AM_SUBST_NOTMAKE(VARIABLE)
1787# --------------------------
1788# Public sister of _AM_SUBST_NOTMAKE.
1789AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1790
1791# Check how to create a tarball.                            -*- Autoconf -*-
1792
1793# Copyright (C) 2004-2012 Free Software Foundation, Inc.
1794#
1795# This file is free software; the Free Software Foundation
1796# gives unlimited permission to copy and/or distribute it,
1797# with or without modifications, as long as this notice is preserved.
1798
1799# serial 3
1800
1801# _AM_PROG_TAR(FORMAT)
1802# --------------------
1803# Check how to create a tarball in format FORMAT.
1804# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1805#
1806# Substitute a variable $(am__tar) that is a command
1807# writing to stdout a FORMAT-tarball containing the directory
1808# $tardir.
1809#     tardir=directory && $(am__tar) > result.tar
1810#
1811# Substitute a variable $(am__untar) that extract such
1812# a tarball read from stdin.
1813#     $(am__untar) < result.tar
1814AC_DEFUN([_AM_PROG_TAR],
1815[# Always define AMTAR for backward compatibility.  Yes, it's still used
1816# in the wild :-(  We should find a proper way to deprecate it ...
1817AC_SUBST([AMTAR], ['$${TAR-tar}'])
1818m4_if([$1], [v7],
1819     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1820     [m4_case([$1], [ustar],, [pax],,
1821              [m4_fatal([Unknown tar format])])
1822AC_MSG_CHECKING([how to create a $1 tar archive])
1823# Loop over all known methods to create a tar archive until one works.
1824_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1825_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1826# Do not fold the above two line into one, because Tru64 sh and
1827# Solaris sh will not grok spaces in the rhs of '-'.
1828for _am_tool in $_am_tools
1829do
1830  case $_am_tool in
1831  gnutar)
1832    for _am_tar in tar gnutar gtar;
1833    do
1834      AM_RUN_LOG([$_am_tar --version]) && break
1835    done
1836    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1837    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1838    am__untar="$_am_tar -xf -"
1839    ;;
1840  plaintar)
1841    # Must skip GNU tar: if it does not support --format= it doesn't create
1842    # ustar tarball either.
1843    (tar --version) >/dev/null 2>&1 && continue
1844    am__tar='tar chf - "$$tardir"'
1845    am__tar_='tar chf - "$tardir"'
1846    am__untar='tar xf -'
1847    ;;
1848  pax)
1849    am__tar='pax -L -x $1 -w "$$tardir"'
1850    am__tar_='pax -L -x $1 -w "$tardir"'
1851    am__untar='pax -r'
1852    ;;
1853  cpio)
1854    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1855    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1856    am__untar='cpio -i -H $1 -d'
1857    ;;
1858  none)
1859    am__tar=false
1860    am__tar_=false
1861    am__untar=false
1862    ;;
1863  esac
1864
1865  # If the value was cached, stop now.  We just wanted to have am__tar
1866  # and am__untar set.
1867  test -n "${am_cv_prog_tar_$1}" && break
1868
1869  # tar/untar a dummy directory, and stop if the command works
1870  rm -rf conftest.dir
1871  mkdir conftest.dir
1872  echo GrepMe > conftest.dir/file
1873  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1874  rm -rf conftest.dir
1875  if test -s conftest.tar; then
1876    AM_RUN_LOG([$am__untar <conftest.tar])
1877    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1878  fi
1879done
1880rm -rf conftest.dir
1881
1882AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1883AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1884AC_SUBST([am__tar])
1885AC_SUBST([am__untar])
1886]) # _AM_PROG_TAR
1887
1888m4_include([m4/asmcfi.m4])
1889m4_include([m4/ax_append_flag.m4])
1890m4_include([m4/ax_cc_maxopt.m4])
1891m4_include([m4/ax_cflags_warn_all.m4])
1892m4_include([m4/ax_check_compile_flag.m4])
1893m4_include([m4/ax_compiler_vendor.m4])
1894m4_include([m4/ax_configure_args.m4])
1895m4_include([m4/ax_enable_builddir.m4])
1896m4_include([m4/ax_gcc_archflag.m4])
1897m4_include([m4/ax_gcc_x86_cpuid.m4])
1898m4_include([m4/libtool.m4])
1899m4_include([m4/ltoptions.m4])
1900m4_include([m4/ltsugar.m4])
1901m4_include([m4/ltversion.m4])
1902m4_include([m4/lt~obsolete.m4])
1903m4_include([acinclude.m4])
1904