1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
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.
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
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.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
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'.])])
22 # Configure paths for GTK+
23 # Owen Taylor 1997-2001
25 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
27 dnl pass to pkg-config
29 AC_DEFUN([AM_PATH_GTK_2_0],
31 dnl Get the cflags and libraries from pkg-config
33 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
36 pkg_config_args=gtk+-2.0
41 pkg_config_args="$pkg_config_args gthread-2.0"
48 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
50 if test x$PKG_CONFIG != xno ; then
51 if pkg-config --atleast-pkgconfig-version 0.7 ; then
54 echo "*** pkg-config too old; version 0.7 or better required."
62 min_gtk_version=ifelse([$1], ,2.0.0,$1)
63 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
65 if test x$PKG_CONFIG != xno ; then
66 ## don't try to run the test against uninstalled libtool libs
67 if $PKG_CONFIG --uninstalled $pkg_config_args; then
68 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
72 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
79 if test x"$no_gtk" = x ; then
80 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
81 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
82 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
83 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
84 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
85 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
86 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
87 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
88 if test "x$enable_gtktest" = "xyes" ; then
89 ac_save_CFLAGS="$CFLAGS"
91 CFLAGS="$CFLAGS $GTK_CFLAGS"
92 LIBS="$GTK_LIBS $LIBS"
94 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
95 dnl checks the results of pkg-config to some extent)
106 int major, minor, micro;
109 fclose (fopen ("conf.gtktest", "w"));
111 /* HP/UX 9 (%@#!) writes to sscanf strings */
112 tmp_version = g_strdup("$min_gtk_version");
113 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
114 printf("%s, bad version string\n", "$min_gtk_version");
118 if ((gtk_major_version != $gtk_config_major_version) ||
119 (gtk_minor_version != $gtk_config_minor_version) ||
120 (gtk_micro_version != $gtk_config_micro_version))
122 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
123 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
124 gtk_major_version, gtk_minor_version, gtk_micro_version);
125 printf ("*** was found! If pkg-config was correct, then it is best\n");
126 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
127 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
128 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
129 printf("*** required on your system.\n");
130 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
131 printf("*** to point to the correct configuration files\n");
133 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
134 (gtk_minor_version != GTK_MINOR_VERSION) ||
135 (gtk_micro_version != GTK_MICRO_VERSION))
137 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
138 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
139 printf("*** library (version %d.%d.%d)\n",
140 gtk_major_version, gtk_minor_version, gtk_micro_version);
144 if ((gtk_major_version > major) ||
145 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
146 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
152 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
153 gtk_major_version, gtk_minor_version, gtk_micro_version);
154 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
155 major, minor, micro);
156 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
158 printf("*** If you have already installed a sufficiently new version, this error\n");
159 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
160 printf("*** being found. The easiest way to fix this is to remove the old version\n");
161 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
162 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
163 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
164 printf("*** so that the correct libraries are found at run-time))\n");
169 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
170 CFLAGS="$ac_save_CFLAGS"
174 if test "x$no_gtk" = x ; then
175 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
176 ifelse([$2], , :, [$2])
179 if test "$PKG_CONFIG" = "no" ; then
180 echo "*** A new enough version of pkg-config was not found."
181 echo "*** See http://pkgconfig.sourceforge.net"
183 if test -f conf.gtktest ; then
186 echo "*** Could not run GTK+ test program, checking why..."
187 ac_save_CFLAGS="$CFLAGS"
189 CFLAGS="$CFLAGS $GTK_CFLAGS"
190 LIBS="$LIBS $GTK_LIBS"
194 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
195 [ echo "*** The test program compiled, but did not run. This usually means"
196 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
197 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
198 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
199 echo "*** to the installed location Also, make sure you have run ldconfig if that"
200 echo "*** is required on your system"
202 echo "*** If you have an old version installed, it is best to remove it, although"
203 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
204 [ echo "*** The test program failed to compile or link. See the file config.log for the"
205 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
206 CFLAGS="$ac_save_CFLAGS"
212 ifelse([$3], , :, [$3])
219 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
221 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
222 # Written by Scott James Remnant, 2004.
224 # This file is free software; the Free Software Foundation gives
225 # unlimited permission to copy and/or distribute it, with or without
226 # modifications, as long as this notice is preserved.
228 # serial 5 lt~obsolete.m4
230 # These exist entirely to fool aclocal when bootstrapping libtool.
232 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
233 # which have later been changed to m4_define as they aren't part of the
234 # exported API, or moved to Autoconf or Automake where they belong.
236 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
237 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
238 # using a macro with the same name in our local m4/libtool.m4 it'll
239 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
240 # and doesn't know about Autoconf macros at all.)
242 # So we provide this file, which has a silly filename so it's always
243 # included after everything else. This provides aclocal with the
244 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
245 # because those macros already exist, or will be overwritten later.
246 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
248 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
249 # Yes, that means every name once taken will need to remain here until
250 # we give up compatibility with versions before 1.7, at which point
251 # we need to keep only those names which we still refer to.
253 # This is to help aclocal find these macros, as it can't see m4_define.
254 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
256 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
257 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
258 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
259 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
260 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
261 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
262 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
263 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
264 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
265 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
266 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
267 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
268 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
269 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
270 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
271 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
272 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
273 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
274 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
275 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
276 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
277 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
278 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
279 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
280 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
281 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
282 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
283 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
284 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
285 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
286 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
287 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
288 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
289 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
290 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
291 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
292 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
293 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
294 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
295 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
296 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
297 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
298 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
299 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
300 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
301 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
302 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
303 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
304 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
305 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
306 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
307 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
308 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
309 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
310 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
311 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
312 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
313 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
314 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
315 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
316 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
318 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
319 # serial 1 (pkg-config-0.24)
321 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
323 # This program is free software; you can redistribute it and/or modify
324 # it under the terms of the GNU General Public License as published by
325 # the Free Software Foundation; either version 2 of the License, or
326 # (at your option) any later version.
328 # This program is distributed in the hope that it will be useful, but
329 # WITHOUT ANY WARRANTY; without even the implied warranty of
330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
331 # General Public License for more details.
333 # You should have received a copy of the GNU General Public License
334 # along with this program; if not, write to the Free Software
335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
337 # As a special exception to the GNU General Public License, if you
338 # distribute this file as part of a program that contains a
339 # configuration script generated by Autoconf, you may include it under
340 # the same distribution terms that you use for the rest of that program.
342 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
343 # ----------------------------------
344 AC_DEFUN([PKG_PROG_PKG_CONFIG],
345 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
346 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
347 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
348 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
349 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
351 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
352 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
354 if test -n "$PKG_CONFIG"; then
355 _pkg_min_version=m4_default([$1], [0.9.0])
356 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
357 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
364 ])# PKG_PROG_PKG_CONFIG
366 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
368 # Check to see whether a particular set of modules exists. Similar
369 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
371 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
372 # only at the first occurence in configure.ac, so if the first place
373 # it's called might be skipped (such as if it is within an "if", you
374 # have to call PKG_CHECK_EXISTS manually
375 # --------------------------------------------------------------
376 AC_DEFUN([PKG_CHECK_EXISTS],
377 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
378 if test -n "$PKG_CONFIG" && \
379 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
380 m4_default([$2], [:])
381 m4_ifvaln([$3], [else
385 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
386 # ---------------------------------------------
387 m4_define([_PKG_CONFIG],
388 [if test -n "$$1"; then
390 elif test -n "$PKG_CONFIG"; then
391 PKG_CHECK_EXISTS([$3],
392 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
399 # _PKG_SHORT_ERRORS_SUPPORTED
400 # -----------------------------
401 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
402 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
403 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
404 _pkg_short_errors_supported=yes
406 _pkg_short_errors_supported=no
408 ])# _PKG_SHORT_ERRORS_SUPPORTED
411 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
412 # [ACTION-IF-NOT-FOUND])
415 # Note that if there is a possibility the first call to
416 # PKG_CHECK_MODULES might not happen, you should be sure to include an
417 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
420 # --------------------------------------------------------------
421 AC_DEFUN([PKG_CHECK_MODULES],
422 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
423 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
424 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
427 AC_MSG_CHECKING([for $1])
429 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
430 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
432 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
433 and $1[]_LIBS to avoid the need to call pkg-config.
434 See the pkg-config man page for more details.])
436 if test $pkg_failed = yes; then
438 _PKG_SHORT_ERRORS_SUPPORTED
439 if test $_pkg_short_errors_supported = yes; then
440 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
442 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
444 # Put the nasty error message in config.log where it belongs
445 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
447 m4_default([$4], [AC_MSG_ERROR(
448 [Package requirements ($2) were not met:
452 Consider adjusting the PKG_CONFIG_PATH environment variable if you
453 installed software in a non-standard prefix.
457 elif test $pkg_failed = untried; then
459 m4_default([$4], [AC_MSG_FAILURE(
460 [The pkg-config script could not be found or is too old. Make sure it
461 is in your PATH or set the PKG_CONFIG environment variable to the full
466 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
469 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
470 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
474 ])# PKG_CHECK_MODULES
476 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
478 # This file is free software; the Free Software Foundation
479 # gives unlimited permission to copy and/or distribute it,
480 # with or without modifications, as long as this notice is preserved.
482 # AM_AUTOMAKE_VERSION(VERSION)
483 # ----------------------------
484 # Automake X.Y traces this macro to ensure aclocal.m4 has been
485 # generated from the m4 files accompanying Automake X.Y.
486 # (This private macro should not be called outside this file.)
487 AC_DEFUN([AM_AUTOMAKE_VERSION],
488 [am__api_version='1.11'
489 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
490 dnl require some minimum version. Point them to the right macro.
491 m4_if([$1], [1.11.1], [],
492 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
495 # _AM_AUTOCONF_VERSION(VERSION)
496 # -----------------------------
497 # aclocal traces this macro to find the Autoconf version.
498 # This is a private macro too. Using m4_define simplifies
499 # the logic in aclocal, which can simply ignore this definition.
500 m4_define([_AM_AUTOCONF_VERSION], [])
502 # AM_SET_CURRENT_AUTOMAKE_VERSION
503 # -------------------------------
504 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
505 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
506 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
507 [AM_AUTOMAKE_VERSION([1.11.1])dnl
508 m4_ifndef([AC_AUTOCONF_VERSION],
509 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
510 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
512 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
514 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
516 # This file is free software; the Free Software Foundation
517 # gives unlimited permission to copy and/or distribute it,
518 # with or without modifications, as long as this notice is preserved.
520 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
521 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
522 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
524 # Of course, Automake must honor this variable whenever it calls a
525 # tool from the auxiliary directory. The problem is that $srcdir (and
526 # therefore $ac_aux_dir as well) can be either absolute or relative,
527 # depending on how configure is run. This is pretty annoying, since
528 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
529 # source directory, any form will work fine, but in subdirectories a
530 # relative path needs to be adjusted first.
532 # $ac_aux_dir/missing
533 # fails when called from a subdirectory if $ac_aux_dir is relative
534 # $top_srcdir/$ac_aux_dir/missing
535 # fails if $ac_aux_dir is absolute,
536 # fails when called from a subdirectory in a VPATH build with
537 # a relative $ac_aux_dir
539 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
540 # are both prefixed by $srcdir. In an in-source build this is usually
541 # harmless because $srcdir is `.', but things will broke when you
542 # start a VPATH build or use an absolute $srcdir.
544 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
545 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
546 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
547 # and then we would define $MISSING as
548 # MISSING="\${SHELL} $am_aux_dir/missing"
549 # This will work as long as MISSING is not called from configure, because
550 # unfortunately $(top_srcdir) has no meaning in configure.
551 # However there are other variables, like CC, which are often used in
552 # configure, and could therefore not use this "fixed" $ac_aux_dir.
554 # Another solution, used here, is to always expand $ac_aux_dir to an
555 # absolute PATH. The drawback is that using absolute paths prevent a
556 # configured tree to be moved without reconfiguration.
558 AC_DEFUN([AM_AUX_DIR_EXPAND],
559 [dnl Rely on autoconf to set up CDPATH properly.
561 # expand $ac_aux_dir to an absolute path
562 am_aux_dir=`cd $ac_aux_dir && pwd`
565 # AM_CONDITIONAL -*- Autoconf -*-
567 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
568 # Free Software Foundation, Inc.
570 # This file is free software; the Free Software Foundation
571 # gives unlimited permission to copy and/or distribute it,
572 # with or without modifications, as long as this notice is preserved.
576 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
577 # -------------------------------------
578 # Define a conditional.
579 AC_DEFUN([AM_CONDITIONAL],
581 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
582 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
583 AC_SUBST([$1_TRUE])dnl
584 AC_SUBST([$1_FALSE])dnl
585 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
586 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
587 m4_define([_AM_COND_VALUE_$1], [$2])dnl
595 AC_CONFIG_COMMANDS_PRE(
596 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
597 AC_MSG_ERROR([[conditional "$1" was never defined.
598 Usually this means the macro was only invoked conditionally.]])
601 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
602 # Free Software Foundation, Inc.
604 # This file is free software; the Free Software Foundation
605 # gives unlimited permission to copy and/or distribute it,
606 # with or without modifications, as long as this notice is preserved.
610 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
611 # written in clear, in which case automake, when reading aclocal.m4,
612 # will think it sees a *use*, and therefore will trigger all it's
613 # C support machinery. Also note that it means that autoscan, seeing
614 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
617 # _AM_DEPENDENCIES(NAME)
618 # ----------------------
619 # See how the compiler implements dependency checking.
620 # NAME is "CC", "CXX", "GCJ", or "OBJC".
621 # We try a few techniques and use that to set a single cache variable.
623 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
624 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
625 # dependency, and given that the user is not expected to run this macro,
626 # just rely on AC_PROG_CC.
627 AC_DEFUN([_AM_DEPENDENCIES],
628 [AC_REQUIRE([AM_SET_DEPDIR])dnl
629 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
630 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
631 AC_REQUIRE([AM_DEP_TRACK])dnl
633 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
634 [$1], CXX, [depcc="$CXX" am_compiler_list=],
635 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
636 [$1], UPC, [depcc="$UPC" am_compiler_list=],
637 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
638 [depcc="$$1" am_compiler_list=])
640 AC_CACHE_CHECK([dependency style of $depcc],
641 [am_cv_$1_dependencies_compiler_type],
642 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
643 # We make a subdir and do the tests there. Otherwise we can end up
644 # making bogus files that we don't know about and never remove. For
645 # instance it was reported that on HP-UX the gcc test will end up
646 # making a dummy file named `D' -- because `-MD' means `put the output
649 # Copy depcomp to subdir because otherwise we won't find it if we're
650 # using a relative directory.
651 cp "$am_depcomp" conftest.dir
653 # We will build objects and dependencies in a subdirectory because
654 # it helps to detect inapplicable dependency modes. For instance
655 # both Tru64's cc and ICC support -MD to output dependencies as a
656 # side effect of compilation, but ICC will put the dependencies in
657 # the current directory while Tru64 will put them in the object
661 am_cv_$1_dependencies_compiler_type=none
662 if test "$am_compiler_list" = ""; then
663 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
667 [case " $depcc " in #(
668 *\ -arch\ *\ -arch\ *) am__universal=true ;;
671 [case " $depcc " in #(
672 *\ -arch\ *\ -arch\ *) am__universal=true ;;
675 for depmode in $am_compiler_list; do
676 # Setup a source with many dependencies, because some compilers
677 # like to wrap large dependency lists on column 80 (with \), and
678 # we should not choose a depcomp mode which is confused by this.
680 # We need to recreate these files for each test, as the compiler may
681 # overwrite some of them when testing with obscure command lines.
682 # This happens at least with the AIX C compiler.
684 for i in 1 2 3 4 5 6; do
685 echo '#include "conftst'$i'.h"' >> sub/conftest.c
686 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
687 # Solaris 8's {/usr,}/bin/sh.
688 touch sub/conftst$i.h
690 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
692 # We check with `-c' and `-o' for the sake of the "dashmstdout"
693 # mode. It turns out that the SunPro C++ compiler does not properly
694 # handle `-M -o', and we need to detect this. Also, some Intel
695 # versions had trouble with output in subdirs
696 am__obj=sub/conftest.${OBJEXT-o}
697 am__minus_obj="-o $am__obj"
700 # This depmode causes a compiler race in universal mode.
701 test "$am__universal" = false || continue
704 # after this tag, mechanisms are not by side-effect, so they'll
705 # only be used when explicitly requested
706 if test "x$enable_dependency_tracking" = xyes; then
712 msvisualcpp | msvcmsys)
713 # This compiler won't grok `-c -o', but also, the minuso test has
714 # not run yet. These depmodes are late enough in the game, and
715 # so weak that their functioning should not be impacted.
716 am__obj=conftest.${OBJEXT-o}
721 if depmode=$depmode \
722 source=sub/conftest.c object=$am__obj \
723 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
724 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
725 >/dev/null 2>conftest.err &&
726 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
727 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
728 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
729 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
730 # icc doesn't choke on unknown options, it will just issue warnings
731 # or remarks (even with -Werror). So we grep stderr for any message
732 # that says an option was ignored or not supported.
733 # When given -MP, icc 7.0 and 7.1 complain thusly:
734 # icc: Command line warning: ignoring option '-M'; no argument required
735 # The diagnosis changed in icc 8.0:
736 # icc: Command line remark: option '-MP' not supported
737 if (grep 'ignoring option' conftest.err ||
738 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
739 am_cv_$1_dependencies_compiler_type=$depmode
748 am_cv_$1_dependencies_compiler_type=none
751 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
752 AM_CONDITIONAL([am__fastdep$1], [
753 test "x$enable_dependency_tracking" != xno \
754 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
760 # Choose a directory name for dependency files.
761 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
762 AC_DEFUN([AM_SET_DEPDIR],
763 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
764 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
770 AC_DEFUN([AM_DEP_TRACK],
771 [AC_ARG_ENABLE(dependency-tracking,
772 [ --disable-dependency-tracking speeds up one-time build
773 --enable-dependency-tracking do not reject slow dependency extractors])
774 if test "x$enable_dependency_tracking" != xno; then
775 am_depcomp="$ac_aux_dir/depcomp"
778 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
779 AC_SUBST([AMDEPBACKSLASH])dnl
780 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
783 # Generate code to set up dependency tracking. -*- Autoconf -*-
785 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
786 # Free Software Foundation, Inc.
788 # This file is free software; the Free Software Foundation
789 # gives unlimited permission to copy and/or distribute it,
790 # with or without modifications, as long as this notice is preserved.
794 # _AM_OUTPUT_DEPENDENCY_COMMANDS
795 # ------------------------------
796 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
798 # Autoconf 2.62 quotes --file arguments for eval, but not when files
799 # are listed without --file. Let's play safe and only enable the eval
800 # if we detect the quoting.
801 case $CONFIG_FILES in
802 *\'*) eval set x "$CONFIG_FILES" ;;
803 *) set x $CONFIG_FILES ;;
808 # Strip MF so we end up with the name of the file.
809 mf=`echo "$mf" | sed -e 's/:.*$//'`
810 # Check whether this is an Automake generated Makefile or not.
811 # We used to match only the files named `Makefile.in', but
812 # some people rename them; so instead we look at the file content.
813 # Grep'ing the first line is not enough: some people post-process
814 # each Makefile.in and add a new line on top of each file to say so.
815 # Grep'ing the whole file is not good either: AIX grep has a line
816 # limit of 2048, but all sed's we know have understand at least 4000.
817 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
818 dirpart=`AS_DIRNAME("$mf")`
822 # Extract the definition of DEPDIR, am__include, and am__quote
823 # from the Makefile without running `make'.
824 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
825 test -z "$DEPDIR" && continue
826 am__include=`sed -n 's/^am__include = //p' < "$mf"`
827 test -z "am__include" && continue
828 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
829 # When using ansi2knr, U may be empty or an underscore; expand it
830 U=`sed -n 's/^U = //p' < "$mf"`
831 # Find all dependency output files, they are included files with
832 # $(DEPDIR) in their names. We invoke sed twice because it is the
833 # simplest approach to changing $(DEPDIR) to its actual value in the
835 for file in `sed -n "
836 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
837 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
838 # Make sure the directory exists.
839 test -f "$dirpart/$file" && continue
840 fdir=`AS_DIRNAME(["$file"])`
841 AS_MKDIR_P([$dirpart/$fdir])
842 # echo "creating $dirpart/$file"
843 echo '# dummy' > "$dirpart/$file"
847 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
850 # AM_OUTPUT_DEPENDENCY_COMMANDS
851 # -----------------------------
852 # This macro should only be invoked once -- use via AC_REQUIRE.
854 # This code is only required when automatic dependency tracking
855 # is enabled. FIXME. This creates each `.P' file that we will
856 # need in order to bootstrap the dependency handling code.
857 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
858 [AC_CONFIG_COMMANDS([depfiles],
859 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
860 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
863 # Do all the work for Automake. -*- Autoconf -*-
865 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
866 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
868 # This file is free software; the Free Software Foundation
869 # gives unlimited permission to copy and/or distribute it,
870 # with or without modifications, as long as this notice is preserved.
874 # This macro actually does too much. Some checks are only needed if
875 # your package does certain things. But this isn't really a big deal.
877 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
878 # AM_INIT_AUTOMAKE([OPTIONS])
879 # -----------------------------------------------
880 # The call with PACKAGE and VERSION arguments is the old style
881 # call (pre autoconf-2.50), which is being phased out. PACKAGE
882 # and VERSION should now be passed to AC_INIT and removed from
883 # the call to AM_INIT_AUTOMAKE.
884 # We support both call styles for the transition. After
885 # the next Automake release, Autoconf can make the AC_INIT
886 # arguments mandatory, and then we can depend on a new Autoconf
887 # release and drop the old call support.
888 AC_DEFUN([AM_INIT_AUTOMAKE],
889 [AC_PREREQ([2.62])dnl
890 dnl Autoconf wants to disallow AM_ names. We explicitly allow
891 dnl the ones we care about.
892 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
893 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
894 AC_REQUIRE([AC_PROG_INSTALL])dnl
895 if test "`cd $srcdir && pwd`" != "`pwd`"; then
896 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
897 # is not polluted with repeated "-I."
898 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
899 # test to see if srcdir already configured
900 if test -f $srcdir/config.status; then
901 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
905 # test whether we have cygpath
906 if test -z "$CYGPATH_W"; then
907 if (cygpath --version) >/dev/null 2>/dev/null; then
908 CYGPATH_W='cygpath -w'
913 AC_SUBST([CYGPATH_W])
915 # Define the identity of the package.
916 dnl Distinguish between old-style and new-style calls.
918 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
919 AC_SUBST([PACKAGE], [$1])dnl
920 AC_SUBST([VERSION], [$2])],
921 [_AM_SET_OPTIONS([$1])dnl
922 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
923 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
924 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
925 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
926 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
928 _AM_IF_OPTION([no-define],,
929 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
930 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
932 # Some tools Automake needs.
933 AC_REQUIRE([AM_SANITY_CHECK])dnl
934 AC_REQUIRE([AC_ARG_PROGRAM])dnl
935 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
936 AM_MISSING_PROG(AUTOCONF, autoconf)
937 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
938 AM_MISSING_PROG(AUTOHEADER, autoheader)
939 AM_MISSING_PROG(MAKEINFO, makeinfo)
940 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
941 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
942 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
943 # We need awk for the "check" target. The system "awk" is bad on
945 AC_REQUIRE([AC_PROG_AWK])dnl
946 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
947 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
948 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
949 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
950 [_AM_PROG_TAR([v7])])])
951 _AM_IF_OPTION([no-dependencies],,
952 [AC_PROVIDE_IFELSE([AC_PROG_CC],
953 [_AM_DEPENDENCIES(CC)],
954 [define([AC_PROG_CC],
955 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
956 AC_PROVIDE_IFELSE([AC_PROG_CXX],
957 [_AM_DEPENDENCIES(CXX)],
958 [define([AC_PROG_CXX],
959 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
960 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
961 [_AM_DEPENDENCIES(OBJC)],
962 [define([AC_PROG_OBJC],
963 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
965 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
966 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
967 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
968 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
969 AC_CONFIG_COMMANDS_PRE(dnl
970 [m4_provide_if([_AM_COMPILER_EXEEXT],
971 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
974 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
975 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
976 dnl mangled by Autoconf and run in a shell conditional statement.
977 m4_define([_AC_COMPILER_EXEEXT],
978 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
981 # When config.status generates a header, we must update the stamp-h file.
982 # This file resides in the same directory as the config header
983 # that is generated. The stamp files are numbered to have different names.
985 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
986 # loop where config.status creates the headers, so we can generate
987 # our stamp files there.
988 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
989 [# Compute $1's index in $config_headers.
992 for _am_header in $config_headers :; do
994 $_am_arg | $_am_arg:* )
997 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1000 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1002 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1004 # This file is free software; the Free Software Foundation
1005 # gives unlimited permission to copy and/or distribute it,
1006 # with or without modifications, as long as this notice is preserved.
1008 # AM_PROG_INSTALL_SH
1009 # ------------------
1010 # Define $install_sh.
1011 AC_DEFUN([AM_PROG_INSTALL_SH],
1012 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1013 if test x"${install_sh}" != xset; then
1016 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1018 install_sh="\${SHELL} $am_aux_dir/install-sh"
1021 AC_SUBST(install_sh)])
1023 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1025 # This file is free software; the Free Software Foundation
1026 # gives unlimited permission to copy and/or distribute it,
1027 # with or without modifications, as long as this notice is preserved.
1031 # Check whether the underlying file-system supports filenames
1032 # with a leading dot. For instance MS-DOS doesn't.
1033 AC_DEFUN([AM_SET_LEADING_DOT],
1034 [rm -rf .tst 2>/dev/null
1035 mkdir .tst 2>/dev/null
1036 if test -d .tst; then
1041 rmdir .tst 2>/dev/null
1042 AC_SUBST([am__leading_dot])])
1044 # Check to see how 'make' treats includes. -*- Autoconf -*-
1046 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1048 # This file is free software; the Free Software Foundation
1049 # gives unlimited permission to copy and/or distribute it,
1050 # with or without modifications, as long as this notice is preserved.
1056 # Check to see how make treats includes.
1057 AC_DEFUN([AM_MAKE_INCLUDE],
1058 [am_make=${MAKE-make}
1059 cat > confinc << 'END'
1061 @echo this is the am__doit target
1064 # If we don't find an include directive, just comment out the code.
1065 AC_MSG_CHECKING([for style of include used by $am_make])
1069 # First try GNU make style include.
1070 echo "include confinc" > confmf
1071 # Ignore all kinds of additional output from `make'.
1072 case `$am_make -s -f confmf 2> /dev/null` in #(
1073 *the\ am__doit\ target*)
1079 # Now try BSD make style include.
1080 if test "$am__include" = "#"; then
1081 echo '.include "confinc"' > confmf
1082 case `$am_make -s -f confmf 2> /dev/null` in #(
1083 *the\ am__doit\ target*)
1084 am__include=.include
1090 AC_SUBST([am__include])
1091 AC_SUBST([am__quote])
1092 AC_MSG_RESULT([$_am_result])
1093 rm -f confinc confmf
1096 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1098 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1099 # Free Software Foundation, Inc.
1101 # This file is free software; the Free Software Foundation
1102 # gives unlimited permission to copy and/or distribute it,
1103 # with or without modifications, as long as this notice is preserved.
1107 # AM_MISSING_PROG(NAME, PROGRAM)
1108 # ------------------------------
1109 AC_DEFUN([AM_MISSING_PROG],
1110 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1111 $1=${$1-"${am_missing_run}$2"}
1115 # AM_MISSING_HAS_RUN
1116 # ------------------
1117 # Define MISSING if not defined so far and test if it supports --run.
1118 # If it does, set am_missing_run to use it, otherwise, to nothing.
1119 AC_DEFUN([AM_MISSING_HAS_RUN],
1120 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1121 AC_REQUIRE_AUX_FILE([missing])dnl
1122 if test x"${MISSING+set}" != xset; then
1125 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1127 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1130 # Use eval to expand $SHELL
1131 if eval "$MISSING --run true"; then
1132 am_missing_run="$MISSING --run "
1135 AC_MSG_WARN([`missing' script is too old or missing])
1139 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1141 # This file is free software; the Free Software Foundation
1142 # gives unlimited permission to copy and/or distribute it,
1143 # with or without modifications, as long as this notice is preserved.
1147 # Check for `mkdir -p'.
1148 AC_DEFUN([AM_PROG_MKDIR_P],
1149 [AC_PREREQ([2.60])dnl
1150 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1151 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1152 dnl while keeping a definition of mkdir_p for backward compatibility.
1153 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1154 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1155 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1156 dnl adjustment using top_builddir (which is defined more often than
1158 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1160 [[\\/$]]* | ?:[[\\/]]*) ;;
1161 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1165 # Helper functions for option handling. -*- Autoconf -*-
1167 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1169 # This file is free software; the Free Software Foundation
1170 # gives unlimited permission to copy and/or distribute it,
1171 # with or without modifications, as long as this notice is preserved.
1175 # _AM_MANGLE_OPTION(NAME)
1176 # -----------------------
1177 AC_DEFUN([_AM_MANGLE_OPTION],
1178 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1180 # _AM_SET_OPTION(NAME)
1181 # ------------------------------
1182 # Set option NAME. Presently that only means defining a flag for this option.
1183 AC_DEFUN([_AM_SET_OPTION],
1184 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1186 # _AM_SET_OPTIONS(OPTIONS)
1187 # ----------------------------------
1188 # OPTIONS is a space-separated list of Automake options.
1189 AC_DEFUN([_AM_SET_OPTIONS],
1190 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1192 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1193 # -------------------------------------------
1194 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1195 AC_DEFUN([_AM_IF_OPTION],
1196 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1198 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1200 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1201 # Free Software Foundation, Inc.
1203 # This file is free software; the Free Software Foundation
1204 # gives unlimited permission to copy and/or distribute it,
1205 # with or without modifications, as long as this notice is preserved.
1211 AC_DEFUN([AM_SANITY_CHECK],
1212 [AC_MSG_CHECKING([whether build environment is sane])
1215 echo timestamp > conftest.file
1216 # Reject unsafe characters in $srcdir or the absolute working directory
1217 # name. Accept space and tab only in the latter.
1221 *[[\\\"\#\$\&\'\`$am_lf]]*)
1222 AC_MSG_ERROR([unsafe absolute working directory name]);;
1225 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1226 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1229 # Do `set' in a subshell so we don't clobber the current shell's
1230 # arguments. Must try -L first in case configure is actually a
1231 # symlink; some systems play weird games with the mod time of symlinks
1232 # (eg FreeBSD returns the mod time of the symlink's containing
1235 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1236 if test "$[*]" = "X"; then
1238 set X `ls -t "$srcdir/configure" conftest.file`
1241 if test "$[*]" != "X $srcdir/configure conftest.file" \
1242 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1244 # If neither matched, then we have a broken ls. This can happen
1245 # if, for instance, CONFIG_SHELL is bash and it inherits a
1246 # broken ls alias from the environment. This has actually
1247 # happened. Such a system could not be considered "sane".
1248 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1249 alias in your environment])
1252 test "$[2]" = conftest.file
1258 AC_MSG_ERROR([newly created file is older than distributed files!
1259 Check your system clock])
1261 AC_MSG_RESULT(yes)])
1263 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1265 # This file is free software; the Free Software Foundation
1266 # gives unlimited permission to copy and/or distribute it,
1267 # with or without modifications, as long as this notice is preserved.
1269 # AM_PROG_INSTALL_STRIP
1270 # ---------------------
1271 # One issue with vendor `install' (even GNU) is that you can't
1272 # specify the program used to strip binaries. This is especially
1273 # annoying in cross-compiling environments, where the build's strip
1274 # is unlikely to handle the host's binaries.
1275 # Fortunately install-sh will honor a STRIPPROG variable, so we
1276 # always use install-sh in `make install-strip', and initialize
1277 # STRIPPROG with the value of the STRIP variable (set by the user).
1278 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1279 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1280 # Installed binaries are usually stripped using `strip' when the user
1281 # run `make install-strip'. However `strip' might not be the right
1282 # tool to use in cross-compilation environments, therefore Automake
1283 # will honor the `STRIP' environment variable to overrule this program.
1284 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1285 if test "$cross_compiling" != no; then
1286 AC_CHECK_TOOL([STRIP], [strip], :)
1288 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1289 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1291 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1293 # This file is free software; the Free Software Foundation
1294 # gives unlimited permission to copy and/or distribute it,
1295 # with or without modifications, as long as this notice is preserved.
1299 # _AM_SUBST_NOTMAKE(VARIABLE)
1300 # ---------------------------
1301 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1302 # This macro is traced by Automake.
1303 AC_DEFUN([_AM_SUBST_NOTMAKE])
1305 # AM_SUBST_NOTMAKE(VARIABLE)
1306 # ---------------------------
1307 # Public sister of _AM_SUBST_NOTMAKE.
1308 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1310 # Check how to create a tarball. -*- Autoconf -*-
1312 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1314 # This file is free software; the Free Software Foundation
1315 # gives unlimited permission to copy and/or distribute it,
1316 # with or without modifications, as long as this notice is preserved.
1320 # _AM_PROG_TAR(FORMAT)
1321 # --------------------
1322 # Check how to create a tarball in format FORMAT.
1323 # FORMAT should be one of `v7', `ustar', or `pax'.
1325 # Substitute a variable $(am__tar) that is a command
1326 # writing to stdout a FORMAT-tarball containing the directory
1328 # tardir=directory && $(am__tar) > result.tar
1330 # Substitute a variable $(am__untar) that extract such
1331 # a tarball read from stdin.
1332 # $(am__untar) < result.tar
1333 AC_DEFUN([_AM_PROG_TAR],
1334 [# Always define AMTAR for backward compatibility.
1335 AM_MISSING_PROG([AMTAR], [tar])
1337 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1338 [m4_case([$1], [ustar],, [pax],,
1339 [m4_fatal([Unknown tar format])])
1340 AC_MSG_CHECKING([how to create a $1 tar archive])
1341 # Loop over all known methods to create a tar archive until one works.
1342 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1343 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1344 # Do not fold the above two line into one, because Tru64 sh and
1345 # Solaris sh will not grok spaces in the rhs of `-'.
1346 for _am_tool in $_am_tools
1350 for _am_tar in tar gnutar gtar;
1352 AM_RUN_LOG([$_am_tar --version]) && break
1354 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1355 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1356 am__untar="$_am_tar -xf -"
1359 # Must skip GNU tar: if it does not support --format= it doesn't create
1360 # ustar tarball either.
1361 (tar --version) >/dev/null 2>&1 && continue
1362 am__tar='tar chf - "$$tardir"'
1363 am__tar_='tar chf - "$tardir"'
1364 am__untar='tar xf -'
1367 am__tar='pax -L -x $1 -w "$$tardir"'
1368 am__tar_='pax -L -x $1 -w "$tardir"'
1372 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1373 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1374 am__untar='cpio -i -H $1 -d'
1383 # If the value was cached, stop now. We just wanted to have am__tar
1384 # and am__untar set.
1385 test -n "${am_cv_prog_tar_$1}" && break
1387 # tar/untar a dummy directory, and stop if the command works
1390 echo GrepMe > conftest.dir/file
1391 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1393 if test -s conftest.tar; then
1394 AM_RUN_LOG([$am__untar <conftest.tar])
1395 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1400 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1401 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1403 AC_SUBST([am__untar])
1406 m4_include([m4/common.m4])
1407 m4_include([m4/libtool.m4])
1408 m4_include([m4/ltoptions.m4])
1409 m4_include([m4/ltsugar.m4])
1410 m4_include([m4/ltversion.m4])
1411 m4_include([m4/lt~obsolete.m4])