52765c137d89f79f87436389e028e2e10d19fbfb
[platform/upstream/libffi.git] / .pc / ppc64-darwin / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
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.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
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 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 17 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 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
432
433 name=ltdl
434 LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
435 AC_SUBST([LTDLOPEN])
436 ])# _LTDL_SETUP
437
438
439 # _LT_ENABLE_INSTALL
440 # ------------------
441 m4_define([_LT_ENABLE_INSTALL],
442 [AC_ARG_ENABLE([ltdl-install],
443     [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
444
445 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
446   *yes*) ;;
447   *) enable_ltdl_convenience=yes ;;
448 esac
449
450 m4_ifdef([AM_CONDITIONAL],
451 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
452  AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
453 ])# _LT_ENABLE_INSTALL
454
455
456 # LT_SYS_DLOPEN_DEPLIBS
457 # ---------------------
458 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
459 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
460 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
461   [lt_cv_sys_dlopen_deplibs],
462   [# PORTME does your system automatically load deplibs for dlopen?
463   # or its logical equivalent (e.g. shl_load for HP-UX < 11)
464   # For now, we just catch OSes we know something about -- in the
465   # future, we'll try test this programmatically.
466   lt_cv_sys_dlopen_deplibs=unknown
467   case $host_os in
468   aix3*|aix4.1.*|aix4.2.*)
469     # Unknown whether this is true for these versions of AIX, but
470     # we want this `case' here to explicitly catch those versions.
471     lt_cv_sys_dlopen_deplibs=unknown
472     ;;
473   aix[[4-9]]*)
474     lt_cv_sys_dlopen_deplibs=yes
475     ;;
476   amigaos*)
477     case $host_cpu in
478     powerpc)
479       lt_cv_sys_dlopen_deplibs=no
480       ;;
481     esac
482     ;;
483   darwin*)
484     # Assuming the user has installed a libdl from somewhere, this is true
485     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
486     lt_cv_sys_dlopen_deplibs=yes
487     ;;
488   freebsd* | dragonfly*)
489     lt_cv_sys_dlopen_deplibs=yes
490     ;;
491   gnu* | linux* | k*bsd*-gnu)
492     # GNU and its variants, using gnu ld.so (Glibc)
493     lt_cv_sys_dlopen_deplibs=yes
494     ;;
495   hpux10*|hpux11*)
496     lt_cv_sys_dlopen_deplibs=yes
497     ;;
498   interix*)
499     lt_cv_sys_dlopen_deplibs=yes
500     ;;
501   irix[[12345]]*|irix6.[[01]]*)
502     # Catch all versions of IRIX before 6.2, and indicate that we don't
503     # know how it worked for any of those versions.
504     lt_cv_sys_dlopen_deplibs=unknown
505     ;;
506   irix*)
507     # The case above catches anything before 6.2, and it's known that
508     # at 6.2 and later dlopen does load deplibs.
509     lt_cv_sys_dlopen_deplibs=yes
510     ;;
511   netbsd*)
512     lt_cv_sys_dlopen_deplibs=yes
513     ;;
514   openbsd*)
515     lt_cv_sys_dlopen_deplibs=yes
516     ;;
517   osf[[1234]]*)
518     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
519     # it did *not* use an RPATH in a shared library to find objects the
520     # library depends on, so we explicitly say `no'.
521     lt_cv_sys_dlopen_deplibs=no
522     ;;
523   osf5.0|osf5.0a|osf5.1)
524     # dlopen *does* load deplibs and with the right loader patch applied
525     # it even uses RPATH in a shared library to search for shared objects
526     # that the library depends on, but there's no easy way to know if that
527     # patch is installed.  Since this is the case, all we can really
528     # say is unknown -- it depends on the patch being installed.  If
529     # it is, this changes to `yes'.  Without it, it would be `no'.
530     lt_cv_sys_dlopen_deplibs=unknown
531     ;;
532   osf*)
533     # the two cases above should catch all versions of osf <= 5.1.  Read
534     # the comments above for what we know about them.
535     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
536     # is used to find them so we can finally say `yes'.
537     lt_cv_sys_dlopen_deplibs=yes
538     ;;
539   qnx*)
540     lt_cv_sys_dlopen_deplibs=yes
541     ;;
542   solaris*)
543     lt_cv_sys_dlopen_deplibs=yes
544     ;;
545   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
546     libltdl_cv_sys_dlopen_deplibs=yes
547     ;;
548   esac
549   ])
550 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
551  AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
552     [Define if the OS needs help to load dependent libraries for dlopen().])
553 fi
554 ])# LT_SYS_DLOPEN_DEPLIBS
555
556 # Old name:
557 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
558 dnl aclocal-1.4 backwards compatibility:
559 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
560
561
562 # LT_SYS_MODULE_EXT
563 # -----------------
564 AC_DEFUN([LT_SYS_MODULE_EXT],
565 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
566 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
567   [libltdl_cv_shlibext],
568 [
569 module=yes
570 eval libltdl_cv_shlibext=$shrext_cmds
571   ])
572 if test -n "$libltdl_cv_shlibext"; then
573   m4_pattern_allow([LT_MODULE_EXT])dnl
574   AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
575     [Define to the extension used for runtime loadable modules, say, ".so".])
576 fi
577 ])# LT_SYS_MODULE_EXT
578
579 # Old name:
580 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
581 dnl aclocal-1.4 backwards compatibility:
582 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
583
584
585 # LT_SYS_MODULE_PATH
586 # ------------------
587 AC_DEFUN([LT_SYS_MODULE_PATH],
588 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
589 AC_CACHE_CHECK([which variable specifies run-time module search path],
590   [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
591 if test -n "$lt_cv_module_path_var"; then
592   m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
593   AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
594     [Define to the name of the environment variable that determines the run-time module search path.])
595 fi
596 ])# LT_SYS_MODULE_PATH
597
598 # Old name:
599 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
600 dnl aclocal-1.4 backwards compatibility:
601 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
602
603
604 # LT_SYS_DLSEARCH_PATH
605 # --------------------
606 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
607 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
608 AC_CACHE_CHECK([for the default library search path],
609   [lt_cv_sys_dlsearch_path],
610   [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
611 if test -n "$lt_cv_sys_dlsearch_path"; then
612   sys_dlsearch_path=
613   for dir in $lt_cv_sys_dlsearch_path; do
614     if test -z "$sys_dlsearch_path"; then
615       sys_dlsearch_path="$dir"
616     else
617       sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
618     fi
619   done
620   m4_pattern_allow([LT_DLSEARCH_PATH])dnl
621   AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
622     [Define to the system default library search path.])
623 fi
624 ])# LT_SYS_DLSEARCH_PATH
625
626 # Old name:
627 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
628 dnl aclocal-1.4 backwards compatibility:
629 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
630
631
632 # _LT_CHECK_DLPREOPEN
633 # -------------------
634 m4_defun([_LT_CHECK_DLPREOPEN],
635 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
636 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
637   [libltdl_cv_preloaded_symbols],
638   [if test -n "$lt_cv_sys_global_symbol_pipe"; then
639     libltdl_cv_preloaded_symbols=yes
640   else
641     libltdl_cv_preloaded_symbols=no
642   fi
643   ])
644 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
645   AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
646     [Define if libtool can extract symbol lists from object files.])
647 fi
648 ])# _LT_CHECK_DLPREOPEN
649
650
651 # LT_LIB_DLLOAD
652 # -------------
653 AC_DEFUN([LT_LIB_DLLOAD],
654 [m4_pattern_allow([^LT_DLLOADERS$])
655 LT_DLLOADERS=
656 AC_SUBST([LT_DLLOADERS])
657
658 AC_LANG_PUSH([C])
659
660 LIBADD_DLOPEN=
661 AC_SEARCH_LIBS([dlopen], [dl],
662         [AC_DEFINE([HAVE_LIBDL], [1],
663                    [Define if you have the libdl library or equivalent.])
664         if test "$ac_cv_search_dlopen" != "none required" ; then
665           LIBADD_DLOPEN="-ldl"
666         fi
667         libltdl_cv_lib_dl_dlopen="yes"
668         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
669     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
670 #  include <dlfcn.h>
671 #endif
672     ]], [[dlopen(0, 0);]])],
673             [AC_DEFINE([HAVE_LIBDL], [1],
674                        [Define if you have the libdl library or equivalent.])
675             libltdl_cv_func_dlopen="yes"
676             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
677         [AC_CHECK_LIB([svld], [dlopen],
678                 [AC_DEFINE([HAVE_LIBDL], [1],
679                          [Define if you have the libdl library or equivalent.])
680                 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
681                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
682 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
683 then
684   lt_save_LIBS="$LIBS"
685   LIBS="$LIBS $LIBADD_DLOPEN"
686   AC_CHECK_FUNCS([dlerror])
687   LIBS="$lt_save_LIBS"
688 fi
689 AC_SUBST([LIBADD_DLOPEN])
690
691 LIBADD_SHL_LOAD=
692 AC_CHECK_FUNC([shl_load],
693         [AC_DEFINE([HAVE_SHL_LOAD], [1],
694                    [Define if you have the shl_load function.])
695         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
696     [AC_CHECK_LIB([dld], [shl_load],
697             [AC_DEFINE([HAVE_SHL_LOAD], [1],
698                        [Define if you have the shl_load function.])
699             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
700             LIBADD_SHL_LOAD="-ldld"])])
701 AC_SUBST([LIBADD_SHL_LOAD])
702
703 case $host_os in
704 darwin[[1567]].*)
705 # We only want this for pre-Mac OS X 10.4.
706   AC_CHECK_FUNC([_dyld_func_lookup],
707         [AC_DEFINE([HAVE_DYLD], [1],
708                    [Define if you have the _dyld_func_lookup function.])
709         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
710   ;;
711 beos*)
712   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
713   ;;
714 cygwin* | mingw* | os2* | pw32*)
715   AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
716   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
717   ;;
718 esac
719
720 AC_CHECK_LIB([dld], [dld_link],
721         [AC_DEFINE([HAVE_DLD], [1],
722                    [Define if you have the GNU dld library.])
723                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
724 AC_SUBST([LIBADD_DLD_LINK])
725
726 m4_pattern_allow([^LT_DLPREOPEN$])
727 LT_DLPREOPEN=
728 if test -n "$LT_DLLOADERS"
729 then
730   for lt_loader in $LT_DLLOADERS; do
731     LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
732   done
733   AC_DEFINE([HAVE_LIBDLLOADER], [1],
734             [Define if libdlloader will be built on this platform])
735 fi
736 AC_SUBST([LT_DLPREOPEN])
737
738 dnl This isn't used anymore, but set it for backwards compatibility
739 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
740 AC_SUBST([LIBADD_DL])
741
742 AC_LANG_POP
743 ])# LT_LIB_DLLOAD
744
745 # Old name:
746 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
747 dnl aclocal-1.4 backwards compatibility:
748 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
749
750
751 # LT_SYS_SYMBOL_USCORE
752 # --------------------
753 # does the compiler prefix global symbols with an underscore?
754 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
755 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
756 AC_CACHE_CHECK([for _ prefix in compiled symbols],
757   [lt_cv_sys_symbol_underscore],
758   [lt_cv_sys_symbol_underscore=no
759   cat > conftest.$ac_ext <<_LT_EOF
760 void nm_test_func(){}
761 int main(){nm_test_func;return 0;}
762 _LT_EOF
763   if AC_TRY_EVAL(ac_compile); then
764     # Now try to grab the symbols.
765     ac_nlist=conftest.nm
766     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
767       # See whether the symbols have a leading underscore.
768       if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
769         lt_cv_sys_symbol_underscore=yes
770       else
771         if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
772           :
773         else
774           echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
775         fi
776       fi
777     else
778       echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
779     fi
780   else
781     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
782     cat conftest.c >&AS_MESSAGE_LOG_FD
783   fi
784   rm -rf conftest*
785   ])
786   sys_symbol_underscore=$lt_cv_sys_symbol_underscore
787   AC_SUBST([sys_symbol_underscore])
788 ])# LT_SYS_SYMBOL_USCORE
789
790 # Old name:
791 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
792 dnl aclocal-1.4 backwards compatibility:
793 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
794
795
796 # LT_FUNC_DLSYM_USCORE
797 # --------------------
798 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
799 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
800 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
801   if test x"$libltdl_cv_func_dlopen" = xyes ||
802      test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
803         AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
804           [libltdl_cv_need_uscore],
805           [libltdl_cv_need_uscore=unknown
806           save_LIBS="$LIBS"
807           LIBS="$LIBS $LIBADD_DLOPEN"
808           _LT_TRY_DLOPEN_SELF(
809             [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
810             [],                          [libltdl_cv_need_uscore=cross])
811           LIBS="$save_LIBS"
812         ])
813   fi
814 fi
815
816 if test x"$libltdl_cv_need_uscore" = xyes; then
817   AC_DEFINE([NEED_USCORE], [1],
818     [Define if dlsym() requires a leading underscore in symbol names.])
819 fi
820 ])# LT_FUNC_DLSYM_USCORE
821
822 # Old name:
823 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
824 dnl aclocal-1.4 backwards compatibility:
825 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
826
827 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
828 #
829 # This file is free software; the Free Software Foundation
830 # gives unlimited permission to copy and/or distribute it,
831 # with or without modifications, as long as this notice is preserved.
832
833 # AM_AUTOMAKE_VERSION(VERSION)
834 # ----------------------------
835 # Automake X.Y traces this macro to ensure aclocal.m4 has been
836 # generated from the m4 files accompanying Automake X.Y.
837 # (This private macro should not be called outside this file.)
838 AC_DEFUN([AM_AUTOMAKE_VERSION],
839 [am__api_version='1.11'
840 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
841 dnl require some minimum version.  Point them to the right macro.
842 m4_if([$1], [1.11.1], [],
843       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
844 ])
845
846 # _AM_AUTOCONF_VERSION(VERSION)
847 # -----------------------------
848 # aclocal traces this macro to find the Autoconf version.
849 # This is a private macro too.  Using m4_define simplifies
850 # the logic in aclocal, which can simply ignore this definition.
851 m4_define([_AM_AUTOCONF_VERSION], [])
852
853 # AM_SET_CURRENT_AUTOMAKE_VERSION
854 # -------------------------------
855 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
856 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
857 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
858 [AM_AUTOMAKE_VERSION([1.11.1])dnl
859 m4_ifndef([AC_AUTOCONF_VERSION],
860   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
861 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
862
863 # Figure out how to run the assembler.                      -*- Autoconf -*-
864
865 # Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
866 #
867 # This file is free software; the Free Software Foundation
868 # gives unlimited permission to copy and/or distribute it,
869 # with or without modifications, as long as this notice is preserved.
870
871 # serial 5
872
873 # AM_PROG_AS
874 # ----------
875 AC_DEFUN([AM_PROG_AS],
876 [# By default we simply use the C compiler to build assembly code.
877 AC_REQUIRE([AC_PROG_CC])
878 test "${CCAS+set}" = set || CCAS=$CC
879 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
880 AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
881 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
882 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
883 ])
884
885 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
886
887 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
888 #
889 # This file is free software; the Free Software Foundation
890 # gives unlimited permission to copy and/or distribute it,
891 # with or without modifications, as long as this notice is preserved.
892
893 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
894 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
895 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
896 #
897 # Of course, Automake must honor this variable whenever it calls a
898 # tool from the auxiliary directory.  The problem is that $srcdir (and
899 # therefore $ac_aux_dir as well) can be either absolute or relative,
900 # depending on how configure is run.  This is pretty annoying, since
901 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
902 # source directory, any form will work fine, but in subdirectories a
903 # relative path needs to be adjusted first.
904 #
905 # $ac_aux_dir/missing
906 #    fails when called from a subdirectory if $ac_aux_dir is relative
907 # $top_srcdir/$ac_aux_dir/missing
908 #    fails if $ac_aux_dir is absolute,
909 #    fails when called from a subdirectory in a VPATH build with
910 #          a relative $ac_aux_dir
911 #
912 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
913 # are both prefixed by $srcdir.  In an in-source build this is usually
914 # harmless because $srcdir is `.', but things will broke when you
915 # start a VPATH build or use an absolute $srcdir.
916 #
917 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
918 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
919 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
920 # and then we would define $MISSING as
921 #   MISSING="\${SHELL} $am_aux_dir/missing"
922 # This will work as long as MISSING is not called from configure, because
923 # unfortunately $(top_srcdir) has no meaning in configure.
924 # However there are other variables, like CC, which are often used in
925 # configure, and could therefore not use this "fixed" $ac_aux_dir.
926 #
927 # Another solution, used here, is to always expand $ac_aux_dir to an
928 # absolute PATH.  The drawback is that using absolute paths prevent a
929 # configured tree to be moved without reconfiguration.
930
931 AC_DEFUN([AM_AUX_DIR_EXPAND],
932 [dnl Rely on autoconf to set up CDPATH properly.
933 AC_PREREQ([2.50])dnl
934 # expand $ac_aux_dir to an absolute path
935 am_aux_dir=`cd $ac_aux_dir && pwd`
936 ])
937
938 # AM_CONDITIONAL                                            -*- Autoconf -*-
939
940 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
941 # Free Software Foundation, Inc.
942 #
943 # This file is free software; the Free Software Foundation
944 # gives unlimited permission to copy and/or distribute it,
945 # with or without modifications, as long as this notice is preserved.
946
947 # serial 9
948
949 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
950 # -------------------------------------
951 # Define a conditional.
952 AC_DEFUN([AM_CONDITIONAL],
953 [AC_PREREQ(2.52)dnl
954  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
955         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
956 AC_SUBST([$1_TRUE])dnl
957 AC_SUBST([$1_FALSE])dnl
958 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
959 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
960 m4_define([_AM_COND_VALUE_$1], [$2])dnl
961 if $2; then
962   $1_TRUE=
963   $1_FALSE='#'
964 else
965   $1_TRUE='#'
966   $1_FALSE=
967 fi
968 AC_CONFIG_COMMANDS_PRE(
969 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
970   AC_MSG_ERROR([[conditional "$1" was never defined.
971 Usually this means the macro was only invoked conditionally.]])
972 fi])])
973
974 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
975 # Free Software Foundation, Inc.
976 #
977 # This file is free software; the Free Software Foundation
978 # gives unlimited permission to copy and/or distribute it,
979 # with or without modifications, as long as this notice is preserved.
980
981 # serial 10
982
983 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
984 # written in clear, in which case automake, when reading aclocal.m4,
985 # will think it sees a *use*, and therefore will trigger all it's
986 # C support machinery.  Also note that it means that autoscan, seeing
987 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
988
989
990 # _AM_DEPENDENCIES(NAME)
991 # ----------------------
992 # See how the compiler implements dependency checking.
993 # NAME is "CC", "CXX", "GCJ", or "OBJC".
994 # We try a few techniques and use that to set a single cache variable.
995 #
996 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
997 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
998 # dependency, and given that the user is not expected to run this macro,
999 # just rely on AC_PROG_CC.
1000 AC_DEFUN([_AM_DEPENDENCIES],
1001 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1002 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1003 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1004 AC_REQUIRE([AM_DEP_TRACK])dnl
1005
1006 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1007        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1008        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1009        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1010        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1011                    [depcc="$$1"   am_compiler_list=])
1012
1013 AC_CACHE_CHECK([dependency style of $depcc],
1014                [am_cv_$1_dependencies_compiler_type],
1015 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1016   # We make a subdir and do the tests there.  Otherwise we can end up
1017   # making bogus files that we don't know about and never remove.  For
1018   # instance it was reported that on HP-UX the gcc test will end up
1019   # making a dummy file named `D' -- because `-MD' means `put the output
1020   # in D'.
1021   mkdir conftest.dir
1022   # Copy depcomp to subdir because otherwise we won't find it if we're
1023   # using a relative directory.
1024   cp "$am_depcomp" conftest.dir
1025   cd conftest.dir
1026   # We will build objects and dependencies in a subdirectory because
1027   # it helps to detect inapplicable dependency modes.  For instance
1028   # both Tru64's cc and ICC support -MD to output dependencies as a
1029   # side effect of compilation, but ICC will put the dependencies in
1030   # the current directory while Tru64 will put them in the object
1031   # directory.
1032   mkdir sub
1033
1034   am_cv_$1_dependencies_compiler_type=none
1035   if test "$am_compiler_list" = ""; then
1036      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1037   fi
1038   am__universal=false
1039   m4_case([$1], [CC],
1040     [case " $depcc " in #(
1041      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1042      esac],
1043     [CXX],
1044     [case " $depcc " in #(
1045      *\ -arch\ *\ -arch\ *) am__universal=true ;;
1046      esac])
1047
1048   for depmode in $am_compiler_list; do
1049     # Setup a source with many dependencies, because some compilers
1050     # like to wrap large dependency lists on column 80 (with \), and
1051     # we should not choose a depcomp mode which is confused by this.
1052     #
1053     # We need to recreate these files for each test, as the compiler may
1054     # overwrite some of them when testing with obscure command lines.
1055     # This happens at least with the AIX C compiler.
1056     : > sub/conftest.c
1057     for i in 1 2 3 4 5 6; do
1058       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1059       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1060       # Solaris 8's {/usr,}/bin/sh.
1061       touch sub/conftst$i.h
1062     done
1063     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1064
1065     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1066     # mode.  It turns out that the SunPro C++ compiler does not properly
1067     # handle `-M -o', and we need to detect this.  Also, some Intel
1068     # versions had trouble with output in subdirs
1069     am__obj=sub/conftest.${OBJEXT-o}
1070     am__minus_obj="-o $am__obj"
1071     case $depmode in
1072     gcc)
1073       # This depmode causes a compiler race in universal mode.
1074       test "$am__universal" = false || continue
1075       ;;
1076     nosideeffect)
1077       # after this tag, mechanisms are not by side-effect, so they'll
1078       # only be used when explicitly requested
1079       if test "x$enable_dependency_tracking" = xyes; then
1080         continue
1081       else
1082         break
1083       fi
1084       ;;
1085     msvisualcpp | msvcmsys)
1086       # This compiler won't grok `-c -o', but also, the minuso test has
1087       # not run yet.  These depmodes are late enough in the game, and
1088       # so weak that their functioning should not be impacted.
1089       am__obj=conftest.${OBJEXT-o}
1090       am__minus_obj=
1091       ;;
1092     none) break ;;
1093     esac
1094     if depmode=$depmode \
1095        source=sub/conftest.c object=$am__obj \
1096        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1097        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1098          >/dev/null 2>conftest.err &&
1099        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1100        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1101        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1102        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1103       # icc doesn't choke on unknown options, it will just issue warnings
1104       # or remarks (even with -Werror).  So we grep stderr for any message
1105       # that says an option was ignored or not supported.
1106       # When given -MP, icc 7.0 and 7.1 complain thusly:
1107       #   icc: Command line warning: ignoring option '-M'; no argument required
1108       # The diagnosis changed in icc 8.0:
1109       #   icc: Command line remark: option '-MP' not supported
1110       if (grep 'ignoring option' conftest.err ||
1111           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1112         am_cv_$1_dependencies_compiler_type=$depmode
1113         break
1114       fi
1115     fi
1116   done
1117
1118   cd ..
1119   rm -rf conftest.dir
1120 else
1121   am_cv_$1_dependencies_compiler_type=none
1122 fi
1123 ])
1124 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1125 AM_CONDITIONAL([am__fastdep$1], [
1126   test "x$enable_dependency_tracking" != xno \
1127   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1128 ])
1129
1130
1131 # AM_SET_DEPDIR
1132 # -------------
1133 # Choose a directory name for dependency files.
1134 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1135 AC_DEFUN([AM_SET_DEPDIR],
1136 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1137 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1138 ])
1139
1140
1141 # AM_DEP_TRACK
1142 # ------------
1143 AC_DEFUN([AM_DEP_TRACK],
1144 [AC_ARG_ENABLE(dependency-tracking,
1145 [  --disable-dependency-tracking  speeds up one-time build
1146   --enable-dependency-tracking   do not reject slow dependency extractors])
1147 if test "x$enable_dependency_tracking" != xno; then
1148   am_depcomp="$ac_aux_dir/depcomp"
1149   AMDEPBACKSLASH='\'
1150 fi
1151 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1152 AC_SUBST([AMDEPBACKSLASH])dnl
1153 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1154 ])
1155
1156 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1157
1158 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1159 # Free Software Foundation, Inc.
1160 #
1161 # This file is free software; the Free Software Foundation
1162 # gives unlimited permission to copy and/or distribute it,
1163 # with or without modifications, as long as this notice is preserved.
1164
1165 #serial 5
1166
1167 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1168 # ------------------------------
1169 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1170 [{
1171   # Autoconf 2.62 quotes --file arguments for eval, but not when files
1172   # are listed without --file.  Let's play safe and only enable the eval
1173   # if we detect the quoting.
1174   case $CONFIG_FILES in
1175   *\'*) eval set x "$CONFIG_FILES" ;;
1176   *)   set x $CONFIG_FILES ;;
1177   esac
1178   shift
1179   for mf
1180   do
1181     # Strip MF so we end up with the name of the file.
1182     mf=`echo "$mf" | sed -e 's/:.*$//'`
1183     # Check whether this is an Automake generated Makefile or not.
1184     # We used to match only the files named `Makefile.in', but
1185     # some people rename them; so instead we look at the file content.
1186     # Grep'ing the first line is not enough: some people post-process
1187     # each Makefile.in and add a new line on top of each file to say so.
1188     # Grep'ing the whole file is not good either: AIX grep has a line
1189     # limit of 2048, but all sed's we know have understand at least 4000.
1190     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1191       dirpart=`AS_DIRNAME("$mf")`
1192     else
1193       continue
1194     fi
1195     # Extract the definition of DEPDIR, am__include, and am__quote
1196     # from the Makefile without running `make'.
1197     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1198     test -z "$DEPDIR" && continue
1199     am__include=`sed -n 's/^am__include = //p' < "$mf"`
1200     test -z "am__include" && continue
1201     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1202     # When using ansi2knr, U may be empty or an underscore; expand it
1203     U=`sed -n 's/^U = //p' < "$mf"`
1204     # Find all dependency output files, they are included files with
1205     # $(DEPDIR) in their names.  We invoke sed twice because it is the
1206     # simplest approach to changing $(DEPDIR) to its actual value in the
1207     # expansion.
1208     for file in `sed -n "
1209       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1210          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1211       # Make sure the directory exists.
1212       test -f "$dirpart/$file" && continue
1213       fdir=`AS_DIRNAME(["$file"])`
1214       AS_MKDIR_P([$dirpart/$fdir])
1215       # echo "creating $dirpart/$file"
1216       echo '# dummy' > "$dirpart/$file"
1217     done
1218   done
1219 }
1220 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1221
1222
1223 # AM_OUTPUT_DEPENDENCY_COMMANDS
1224 # -----------------------------
1225 # This macro should only be invoked once -- use via AC_REQUIRE.
1226 #
1227 # This code is only required when automatic dependency tracking
1228 # is enabled.  FIXME.  This creates each `.P' file that we will
1229 # need in order to bootstrap the dependency handling code.
1230 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1231 [AC_CONFIG_COMMANDS([depfiles],
1232      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1233      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1234 ])
1235
1236 # Do all the work for Automake.                             -*- Autoconf -*-
1237
1238 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1239 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1240 #
1241 # This file is free software; the Free Software Foundation
1242 # gives unlimited permission to copy and/or distribute it,
1243 # with or without modifications, as long as this notice is preserved.
1244
1245 # serial 16
1246
1247 # This macro actually does too much.  Some checks are only needed if
1248 # your package does certain things.  But this isn't really a big deal.
1249
1250 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1251 # AM_INIT_AUTOMAKE([OPTIONS])
1252 # -----------------------------------------------
1253 # The call with PACKAGE and VERSION arguments is the old style
1254 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1255 # and VERSION should now be passed to AC_INIT and removed from
1256 # the call to AM_INIT_AUTOMAKE.
1257 # We support both call styles for the transition.  After
1258 # the next Automake release, Autoconf can make the AC_INIT
1259 # arguments mandatory, and then we can depend on a new Autoconf
1260 # release and drop the old call support.
1261 AC_DEFUN([AM_INIT_AUTOMAKE],
1262 [AC_PREREQ([2.62])dnl
1263 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1264 dnl the ones we care about.
1265 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1266 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1267 AC_REQUIRE([AC_PROG_INSTALL])dnl
1268 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1269   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1270   # is not polluted with repeated "-I."
1271   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1272   # test to see if srcdir already configured
1273   if test -f $srcdir/config.status; then
1274     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1275   fi
1276 fi
1277
1278 # test whether we have cygpath
1279 if test -z "$CYGPATH_W"; then
1280   if (cygpath --version) >/dev/null 2>/dev/null; then
1281     CYGPATH_W='cygpath -w'
1282   else
1283     CYGPATH_W=echo
1284   fi
1285 fi
1286 AC_SUBST([CYGPATH_W])
1287
1288 # Define the identity of the package.
1289 dnl Distinguish between old-style and new-style calls.
1290 m4_ifval([$2],
1291 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1292  AC_SUBST([PACKAGE], [$1])dnl
1293  AC_SUBST([VERSION], [$2])],
1294 [_AM_SET_OPTIONS([$1])dnl
1295 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1296 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1297   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1298  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1299  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1300
1301 _AM_IF_OPTION([no-define],,
1302 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1303  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1304
1305 # Some tools Automake needs.
1306 AC_REQUIRE([AM_SANITY_CHECK])dnl
1307 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1308 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1309 AM_MISSING_PROG(AUTOCONF, autoconf)
1310 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1311 AM_MISSING_PROG(AUTOHEADER, autoheader)
1312 AM_MISSING_PROG(MAKEINFO, makeinfo)
1313 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1314 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1315 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1316 # We need awk for the "check" target.  The system "awk" is bad on
1317 # some platforms.
1318 AC_REQUIRE([AC_PROG_AWK])dnl
1319 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1320 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1321 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1322               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1323                              [_AM_PROG_TAR([v7])])])
1324 _AM_IF_OPTION([no-dependencies],,
1325 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1326                   [_AM_DEPENDENCIES(CC)],
1327                   [define([AC_PROG_CC],
1328                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1329 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1330                   [_AM_DEPENDENCIES(CXX)],
1331                   [define([AC_PROG_CXX],
1332                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1333 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1334                   [_AM_DEPENDENCIES(OBJC)],
1335                   [define([AC_PROG_OBJC],
1336                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1337 ])
1338 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1339 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1340 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
1341 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1342 AC_CONFIG_COMMANDS_PRE(dnl
1343 [m4_provide_if([_AM_COMPILER_EXEEXT],
1344   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1345 ])
1346
1347 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1348 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1349 dnl mangled by Autoconf and run in a shell conditional statement.
1350 m4_define([_AC_COMPILER_EXEEXT],
1351 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1352
1353
1354 # When config.status generates a header, we must update the stamp-h file.
1355 # This file resides in the same directory as the config header
1356 # that is generated.  The stamp files are numbered to have different names.
1357
1358 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1359 # loop where config.status creates the headers, so we can generate
1360 # our stamp files there.
1361 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1362 [# Compute $1's index in $config_headers.
1363 _am_arg=$1
1364 _am_stamp_count=1
1365 for _am_header in $config_headers :; do
1366   case $_am_header in
1367     $_am_arg | $_am_arg:* )
1368       break ;;
1369     * )
1370       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1371   esac
1372 done
1373 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1374
1375 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
1376 #
1377 # This file is free software; the Free Software Foundation
1378 # gives unlimited permission to copy and/or distribute it,
1379 # with or without modifications, as long as this notice is preserved.
1380
1381 # AM_PROG_INSTALL_SH
1382 # ------------------
1383 # Define $install_sh.
1384 AC_DEFUN([AM_PROG_INSTALL_SH],
1385 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1386 if test x"${install_sh}" != xset; then
1387   case $am_aux_dir in
1388   *\ * | *\     *)
1389     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1390   *)
1391     install_sh="\${SHELL} $am_aux_dir/install-sh"
1392   esac
1393 fi
1394 AC_SUBST(install_sh)])
1395
1396 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1397 #
1398 # This file is free software; the Free Software Foundation
1399 # gives unlimited permission to copy and/or distribute it,
1400 # with or without modifications, as long as this notice is preserved.
1401
1402 # serial 2
1403
1404 # Check whether the underlying file-system supports filenames
1405 # with a leading dot.  For instance MS-DOS doesn't.
1406 AC_DEFUN([AM_SET_LEADING_DOT],
1407 [rm -rf .tst 2>/dev/null
1408 mkdir .tst 2>/dev/null
1409 if test -d .tst; then
1410   am__leading_dot=.
1411 else
1412   am__leading_dot=_
1413 fi
1414 rmdir .tst 2>/dev/null
1415 AC_SUBST([am__leading_dot])])
1416
1417 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1418 # From Jim Meyering
1419
1420 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1421 # Free Software Foundation, Inc.
1422 #
1423 # This file is free software; the Free Software Foundation
1424 # gives unlimited permission to copy and/or distribute it,
1425 # with or without modifications, as long as this notice is preserved.
1426
1427 # serial 5
1428
1429 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1430 # ----------------------------------
1431 # Control maintainer-specific portions of Makefiles.
1432 # Default is to disable them, unless `enable' is passed literally.
1433 # For symmetry, `disable' may be passed as well.  Anyway, the user
1434 # can override the default with the --enable/--disable switch.
1435 AC_DEFUN([AM_MAINTAINER_MODE],
1436 [m4_case(m4_default([$1], [disable]),
1437        [enable], [m4_define([am_maintainer_other], [disable])],
1438        [disable], [m4_define([am_maintainer_other], [enable])],
1439        [m4_define([am_maintainer_other], [enable])
1440         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1441 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1442   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1443   AC_ARG_ENABLE([maintainer-mode],
1444 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
1445                           (and sometimes confusing) to the casual installer],
1446       [USE_MAINTAINER_MODE=$enableval],
1447       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1448   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1449   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1450   MAINT=$MAINTAINER_MODE_TRUE
1451   AC_SUBST([MAINT])dnl
1452 ]
1453 )
1454
1455 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1456
1457 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1458
1459 # Copyright (C) 2001, 2002, 2003, 2005, 2009  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 4
1466
1467 # AM_MAKE_INCLUDE()
1468 # -----------------
1469 # Check to see how make treats includes.
1470 AC_DEFUN([AM_MAKE_INCLUDE],
1471 [am_make=${MAKE-make}
1472 cat > confinc << 'END'
1473 am__doit:
1474         @echo this is the am__doit target
1475 .PHONY: am__doit
1476 END
1477 # If we don't find an include directive, just comment out the code.
1478 AC_MSG_CHECKING([for style of include used by $am_make])
1479 am__include="#"
1480 am__quote=
1481 _am_result=none
1482 # First try GNU make style include.
1483 echo "include confinc" > confmf
1484 # Ignore all kinds of additional output from `make'.
1485 case `$am_make -s -f confmf 2> /dev/null` in #(
1486 *the\ am__doit\ target*)
1487   am__include=include
1488   am__quote=
1489   _am_result=GNU
1490   ;;
1491 esac
1492 # Now try BSD make style include.
1493 if test "$am__include" = "#"; then
1494    echo '.include "confinc"' > confmf
1495    case `$am_make -s -f confmf 2> /dev/null` in #(
1496    *the\ am__doit\ target*)
1497      am__include=.include
1498      am__quote="\""
1499      _am_result=BSD
1500      ;;
1501    esac
1502 fi
1503 AC_SUBST([am__include])
1504 AC_SUBST([am__quote])
1505 AC_MSG_RESULT([$_am_result])
1506 rm -f confinc confmf
1507 ])
1508
1509 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1510 # Free Software Foundation, Inc.
1511 #
1512 # This file is free software; the Free Software Foundation
1513 # gives unlimited permission to copy and/or distribute it,
1514 # with or without modifications, as long as this notice is preserved.
1515
1516 # serial 6
1517
1518 # AM_PROG_CC_C_O
1519 # --------------
1520 # Like AC_PROG_CC_C_O, but changed for automake.
1521 AC_DEFUN([AM_PROG_CC_C_O],
1522 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1523 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1524 AC_REQUIRE_AUX_FILE([compile])dnl
1525 # FIXME: we rely on the cache variable name because
1526 # there is no other way.
1527 set dummy $CC
1528 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1529 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1530 if test "$am_t" != yes; then
1531    # Losing compiler, so override with the script.
1532    # FIXME: It is wrong to rewrite CC.
1533    # But if we don't then we get into trouble of one sort or another.
1534    # A longer-term fix would be to have automake use am__CC in this case,
1535    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1536    CC="$am_aux_dir/compile $CC"
1537 fi
1538 dnl Make sure AC_PROG_CC is never called again, or it will override our
1539 dnl setting of CC.
1540 m4_define([AC_PROG_CC],
1541           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1542 ])
1543
1544 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1545
1546 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1547 # Free Software Foundation, Inc.
1548 #
1549 # This file is free software; the Free Software Foundation
1550 # gives unlimited permission to copy and/or distribute it,
1551 # with or without modifications, as long as this notice is preserved.
1552
1553 # serial 6
1554
1555 # AM_MISSING_PROG(NAME, PROGRAM)
1556 # ------------------------------
1557 AC_DEFUN([AM_MISSING_PROG],
1558 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1559 $1=${$1-"${am_missing_run}$2"}
1560 AC_SUBST($1)])
1561
1562
1563 # AM_MISSING_HAS_RUN
1564 # ------------------
1565 # Define MISSING if not defined so far and test if it supports --run.
1566 # If it does, set am_missing_run to use it, otherwise, to nothing.
1567 AC_DEFUN([AM_MISSING_HAS_RUN],
1568 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1569 AC_REQUIRE_AUX_FILE([missing])dnl
1570 if test x"${MISSING+set}" != xset; then
1571   case $am_aux_dir in
1572   *\ * | *\     *)
1573     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1574   *)
1575     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1576   esac
1577 fi
1578 # Use eval to expand $SHELL
1579 if eval "$MISSING --run true"; then
1580   am_missing_run="$MISSING --run "
1581 else
1582   am_missing_run=
1583   AC_MSG_WARN([`missing' script is too old or missing])
1584 fi
1585 ])
1586
1587 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1588 #
1589 # This file is free software; the Free Software Foundation
1590 # gives unlimited permission to copy and/or distribute it,
1591 # with or without modifications, as long as this notice is preserved.
1592
1593 # AM_PROG_MKDIR_P
1594 # ---------------
1595 # Check for `mkdir -p'.
1596 AC_DEFUN([AM_PROG_MKDIR_P],
1597 [AC_PREREQ([2.60])dnl
1598 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1599 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1600 dnl while keeping a definition of mkdir_p for backward compatibility.
1601 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1602 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1603 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1604 dnl adjustment using top_builddir (which is defined more often than
1605 dnl MKDIR_P).
1606 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1607 case $mkdir_p in
1608   [[\\/$]]* | ?:[[\\/]]*) ;;
1609   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1610 esac
1611 ])
1612
1613 # Helper functions for option handling.                     -*- Autoconf -*-
1614
1615 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1616 #
1617 # This file is free software; the Free Software Foundation
1618 # gives unlimited permission to copy and/or distribute it,
1619 # with or without modifications, as long as this notice is preserved.
1620
1621 # serial 4
1622
1623 # _AM_MANGLE_OPTION(NAME)
1624 # -----------------------
1625 AC_DEFUN([_AM_MANGLE_OPTION],
1626 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1627
1628 # _AM_SET_OPTION(NAME)
1629 # ------------------------------
1630 # Set option NAME.  Presently that only means defining a flag for this option.
1631 AC_DEFUN([_AM_SET_OPTION],
1632 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1633
1634 # _AM_SET_OPTIONS(OPTIONS)
1635 # ----------------------------------
1636 # OPTIONS is a space-separated list of Automake options.
1637 AC_DEFUN([_AM_SET_OPTIONS],
1638 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1639
1640 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1641 # -------------------------------------------
1642 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1643 AC_DEFUN([_AM_IF_OPTION],
1644 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1645
1646 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1647
1648 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1649 # Free Software Foundation, Inc.
1650 #
1651 # This file is free software; the Free Software Foundation
1652 # gives unlimited permission to copy and/or distribute it,
1653 # with or without modifications, as long as this notice is preserved.
1654
1655 # serial 5
1656
1657 # AM_SANITY_CHECK
1658 # ---------------
1659 AC_DEFUN([AM_SANITY_CHECK],
1660 [AC_MSG_CHECKING([whether build environment is sane])
1661 # Just in case
1662 sleep 1
1663 echo timestamp > conftest.file
1664 # Reject unsafe characters in $srcdir or the absolute working directory
1665 # name.  Accept space and tab only in the latter.
1666 am_lf='
1667 '
1668 case `pwd` in
1669   *[[\\\"\#\$\&\'\`$am_lf]]*)
1670     AC_MSG_ERROR([unsafe absolute working directory name]);;
1671 esac
1672 case $srcdir in
1673   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1674     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1675 esac
1676
1677 # Do `set' in a subshell so we don't clobber the current shell's
1678 # arguments.  Must try -L first in case configure is actually a
1679 # symlink; some systems play weird games with the mod time of symlinks
1680 # (eg FreeBSD returns the mod time of the symlink's containing
1681 # directory).
1682 if (
1683    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1684    if test "$[*]" = "X"; then
1685       # -L didn't work.
1686       set X `ls -t "$srcdir/configure" conftest.file`
1687    fi
1688    rm -f conftest.file
1689    if test "$[*]" != "X $srcdir/configure conftest.file" \
1690       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1691
1692       # If neither matched, then we have a broken ls.  This can happen
1693       # if, for instance, CONFIG_SHELL is bash and it inherits a
1694       # broken ls alias from the environment.  This has actually
1695       # happened.  Such a system could not be considered "sane".
1696       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1697 alias in your environment])
1698    fi
1699
1700    test "$[2]" = conftest.file
1701    )
1702 then
1703    # Ok.
1704    :
1705 else
1706    AC_MSG_ERROR([newly created file is older than distributed files!
1707 Check your system clock])
1708 fi
1709 AC_MSG_RESULT(yes)])
1710
1711 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1712 #
1713 # This file is free software; the Free Software Foundation
1714 # gives unlimited permission to copy and/or distribute it,
1715 # with or without modifications, as long as this notice is preserved.
1716
1717 # AM_PROG_INSTALL_STRIP
1718 # ---------------------
1719 # One issue with vendor `install' (even GNU) is that you can't
1720 # specify the program used to strip binaries.  This is especially
1721 # annoying in cross-compiling environments, where the build's strip
1722 # is unlikely to handle the host's binaries.
1723 # Fortunately install-sh will honor a STRIPPROG variable, so we
1724 # always use install-sh in `make install-strip', and initialize
1725 # STRIPPROG with the value of the STRIP variable (set by the user).
1726 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1727 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1728 # Installed binaries are usually stripped using `strip' when the user
1729 # run `make install-strip'.  However `strip' might not be the right
1730 # tool to use in cross-compilation environments, therefore Automake
1731 # will honor the `STRIP' environment variable to overrule this program.
1732 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1733 if test "$cross_compiling" != no; then
1734   AC_CHECK_TOOL([STRIP], [strip], :)
1735 fi
1736 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1737 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1738
1739 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1740 #
1741 # This file is free software; the Free Software Foundation
1742 # gives unlimited permission to copy and/or distribute it,
1743 # with or without modifications, as long as this notice is preserved.
1744
1745 # serial 2
1746
1747 # _AM_SUBST_NOTMAKE(VARIABLE)
1748 # ---------------------------
1749 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1750 # This macro is traced by Automake.
1751 AC_DEFUN([_AM_SUBST_NOTMAKE])
1752
1753 # AM_SUBST_NOTMAKE(VARIABLE)
1754 # ---------------------------
1755 # Public sister of _AM_SUBST_NOTMAKE.
1756 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1757
1758 # Check how to create a tarball.                            -*- Autoconf -*-
1759
1760 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1761 #
1762 # This file is free software; the Free Software Foundation
1763 # gives unlimited permission to copy and/or distribute it,
1764 # with or without modifications, as long as this notice is preserved.
1765
1766 # serial 2
1767
1768 # _AM_PROG_TAR(FORMAT)
1769 # --------------------
1770 # Check how to create a tarball in format FORMAT.
1771 # FORMAT should be one of `v7', `ustar', or `pax'.
1772 #
1773 # Substitute a variable $(am__tar) that is a command
1774 # writing to stdout a FORMAT-tarball containing the directory
1775 # $tardir.
1776 #     tardir=directory && $(am__tar) > result.tar
1777 #
1778 # Substitute a variable $(am__untar) that extract such
1779 # a tarball read from stdin.
1780 #     $(am__untar) < result.tar
1781 AC_DEFUN([_AM_PROG_TAR],
1782 [# Always define AMTAR for backward compatibility.
1783 AM_MISSING_PROG([AMTAR], [tar])
1784 m4_if([$1], [v7],
1785      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1786      [m4_case([$1], [ustar],, [pax],,
1787               [m4_fatal([Unknown tar format])])
1788 AC_MSG_CHECKING([how to create a $1 tar archive])
1789 # Loop over all known methods to create a tar archive until one works.
1790 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1791 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1792 # Do not fold the above two line into one, because Tru64 sh and
1793 # Solaris sh will not grok spaces in the rhs of `-'.
1794 for _am_tool in $_am_tools
1795 do
1796   case $_am_tool in
1797   gnutar)
1798     for _am_tar in tar gnutar gtar;
1799     do
1800       AM_RUN_LOG([$_am_tar --version]) && break
1801     done
1802     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1803     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1804     am__untar="$_am_tar -xf -"
1805     ;;
1806   plaintar)
1807     # Must skip GNU tar: if it does not support --format= it doesn't create
1808     # ustar tarball either.
1809     (tar --version) >/dev/null 2>&1 && continue
1810     am__tar='tar chf - "$$tardir"'
1811     am__tar_='tar chf - "$tardir"'
1812     am__untar='tar xf -'
1813     ;;
1814   pax)
1815     am__tar='pax -L -x $1 -w "$$tardir"'
1816     am__tar_='pax -L -x $1 -w "$tardir"'
1817     am__untar='pax -r'
1818     ;;
1819   cpio)
1820     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1821     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1822     am__untar='cpio -i -H $1 -d'
1823     ;;
1824   none)
1825     am__tar=false
1826     am__tar_=false
1827     am__untar=false
1828     ;;
1829   esac
1830
1831   # If the value was cached, stop now.  We just wanted to have am__tar
1832   # and am__untar set.
1833   test -n "${am_cv_prog_tar_$1}" && break
1834
1835   # tar/untar a dummy directory, and stop if the command works
1836   rm -rf conftest.dir
1837   mkdir conftest.dir
1838   echo GrepMe > conftest.dir/file
1839   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1840   rm -rf conftest.dir
1841   if test -s conftest.tar; then
1842     AM_RUN_LOG([$am__untar <conftest.tar])
1843     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1844   fi
1845 done
1846 rm -rf conftest.dir
1847
1848 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1849 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1850 AC_SUBST([am__tar])
1851 AC_SUBST([am__untar])
1852 ]) # _AM_PROG_TAR
1853
1854 m4_include([m4/libtool.m4])
1855 m4_include([m4/ltoptions.m4])
1856 m4_include([m4/ltsugar.m4])
1857 m4_include([m4/ltversion.m4])
1858 m4_include([m4/lt~obsolete.m4])
1859 m4_include([acinclude.m4])