1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
24 dnl * Make ready to link EB Library 3.x or 4.x.
26 dnl * Copyright (c) 2000-2006 Motoyuki Kasahara
28 dnl * Redistribution and use in source and binary forms, with or without
29 dnl * modification, are permitted provided that the following conditions
31 dnl * 1. Redistributions of source code must retain the above copyright
32 dnl * notice, this list of conditions and the following disclaimer.
33 dnl * 2. Redistributions in binary form must reproduce the above copyright
34 dnl * notice, this list of conditions and the following disclaimer in the
35 dnl * documentation and/or other materials provided with the distribution.
36 dnl * 3. Neither the name of the project nor the names of its contributors
37 dnl * may be used to endorse or promote products derived from this software
38 dnl * without specific prior written permission.
40 dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
41 dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43 dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
44 dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45 dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46 dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48 dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49 dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 AC_DEFUN([eb_LIB_EB4],
58 AC_REQUIRE([AC_PROG_CC])
59 AC_REQUIRE([AC_PROG_LIBTOOL])
60 AC_REQUIRE([AC_TYPE_OFF_T])
61 AC_REQUIRE([AC_TYPE_SIZE_T])
63 AC_CHECK_HEADERS(limits.h)
64 AC_CHECK_TYPE(ssize_t, int)
67 dnl * --with-eb-conf option.
70 AC_HELP_STRING([--with-eb-conf=FILE],
71 [eb.conf file is FILE [[SYSCONFDIR/eb.conf]]]),
72 [ebconf="${withval}"], [ebconf=$sysconfdir/eb.conf])
73 if test X$prefix = XNONE; then
74 PREFIX=$ac_default_prefix
78 ebconf=`echo X$ebconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \
79 -e 's;\$(prefix);'"$PREFIX;g"`
84 AC_MSG_CHECKING(for eb.conf)
85 AC_MSG_RESULT($ebconf)
86 if test -f ${ebconf}; then
89 AC_MSG_ERROR($ebconf not found)
92 if test X$EBCONF_ENABLE_PTHREAD = Xyes; then
93 AC_DEFINE(EBCONF_ENABLE_PTHREAD, 1,
94 [Define if EB Library supports pthread.])
96 if test X$EBCONF_ENABLE_NLS = Xyes; then
97 AC_DEFINE(EBCONF_ENABLE_NLS, 1,
98 [Define if EB Library supports native language.])
100 if test X$EBCONF_ENABLE_EBNET = Xyes; then
101 AC_DEFINE(EBCONF_ENABLE_EBNET, 1,
102 [Define if EB Library supports remote access.])
105 AC_SUBST(EBCONF_EBINCS)
106 AC_SUBST(EBCONF_EBLIBS)
107 AC_SUBST(EBCONF_ZLIBINCS)
108 AC_SUBST(EBCONF_ZLIBLIBS)
109 AC_SUBST(EBCONF_PTHREAD_CPPFLAGS)
110 AC_SUBST(EBCONF_PTHREAD_CFLAGS)
111 AC_SUBST(EBCONF_PTHREAD_LDFLAGS)
112 AC_SUBST(EBCONF_INTLINCS)
113 AC_SUBST(EBCONF_INTLLIBS)
116 dnl * Check for EB Library.
118 AC_MSG_CHECKING(for EB Library)
119 save_CPPFLAGS=$CPPFLAGS
121 save_LDFLAGS=$LDFLAGS
123 CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS"
124 CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS"
125 LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS"
126 LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS"
127 AC_TRY_LINK([#include <eb/eb.h>],
128 [eb_initialize_library(); return 0;],
129 try_eb=yes, try_eb=no)
130 CPPFLAGS=$save_CPPFLAGS
132 LDFLAGS=$save_LDFLAGS
134 AC_MSG_RESULT($try_eb)
135 if test ${try_eb} != yes; then
136 AC_MSG_ERROR(EB Library not available)
140 # Configure paths for GTK+
141 # Owen Taylor 1997-2001
143 dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
144 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
145 dnl pass to pkg-config
147 AC_DEFUN([AM_PATH_GTK_3_0],
149 dnl Get the cflags and libraries from pkg-config
151 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
152 , enable_gtktest=yes)
154 pkg_config_args=gtk+-3.0
159 pkg_config_args="$pkg_config_args gthread-2.0"
166 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
168 if test x$PKG_CONFIG != xno ; then
169 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
172 echo "*** pkg-config too old; version 0.7 or better required."
180 min_gtk_version=ifelse([$1], ,3.0.0,$1)
181 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
183 if test x$PKG_CONFIG != xno ; then
184 ## don't try to run the test against uninstalled libtool libs
185 if $PKG_CONFIG --uninstalled $pkg_config_args; then
186 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
190 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
197 if test x"$no_gtk" = x ; then
198 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
199 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
200 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
201 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
202 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
203 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
204 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
205 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
206 if test "x$enable_gtktest" = "xyes" ; then
207 ac_save_CFLAGS="$CFLAGS"
209 CFLAGS="$CFLAGS $GTK_CFLAGS"
210 LIBS="$GTK_LIBS $LIBS"
212 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
213 dnl checks the results of pkg-config to some extent)
224 int major, minor, micro;
227 fclose (fopen ("conf.gtktest", "w"));
229 /* HP/UX 9 (%@#!) writes to sscanf strings */
230 tmp_version = g_strdup("$min_gtk_version");
231 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
232 printf("%s, bad version string\n", "$min_gtk_version");
236 if ((gtk_major_version != $gtk_config_major_version) ||
237 (gtk_minor_version != $gtk_config_minor_version) ||
238 (gtk_micro_version != $gtk_config_micro_version))
240 printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
241 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
242 gtk_major_version, gtk_minor_version, gtk_micro_version);
243 printf ("*** was found! If pkg-config was correct, then it is best\n");
244 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
245 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
246 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
247 printf("*** required on your system.\n");
248 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
249 printf("*** to point to the correct configuration files\n");
251 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
252 (gtk_minor_version != GTK_MINOR_VERSION) ||
253 (gtk_micro_version != GTK_MICRO_VERSION))
255 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
256 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
257 printf("*** library (version %d.%d.%d)\n",
258 gtk_major_version, gtk_minor_version, gtk_micro_version);
262 if ((gtk_major_version > major) ||
263 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
264 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
270 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
271 gtk_major_version, gtk_minor_version, gtk_micro_version);
272 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
273 major, minor, micro);
274 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
276 printf("*** If you have already installed a sufficiently new version, this error\n");
277 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
278 printf("*** being found. The easiest way to fix this is to remove the old version\n");
279 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
280 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
281 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
282 printf("*** so that the correct libraries are found at run-time))\n");
287 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
288 CFLAGS="$ac_save_CFLAGS"
292 if test "x$no_gtk" = x ; then
293 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
294 ifelse([$2], , :, [$2])
297 if test "$PKG_CONFIG" = "no" ; then
298 echo "*** A new enough version of pkg-config was not found."
299 echo "*** See http://pkgconfig.sourceforge.net"
301 if test -f conf.gtktest ; then
304 echo "*** Could not run GTK+ test program, checking why..."
305 ac_save_CFLAGS="$CFLAGS"
307 CFLAGS="$CFLAGS $GTK_CFLAGS"
308 LIBS="$LIBS $GTK_LIBS"
312 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
313 [ echo "*** The test program compiled, but did not run. This usually means"
314 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
315 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
316 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
317 echo "*** to the installed location Also, make sure you have run ldconfig if that"
318 echo "*** is required on your system"
320 echo "*** If you have an old version installed, it is best to remove it, although"
321 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
322 [ echo "*** The test program failed to compile or link. See the file config.log for the"
323 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
324 CFLAGS="$ac_save_CFLAGS"
330 ifelse([$3], , :, [$3])
337 dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
338 dnl Tests for BACKEND-NAME in the GTK targets list
340 AC_DEFUN([GTK_CHECK_BACKEND],
342 pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
343 min_gtk_version=ifelse([$2],,3.0.0,$2)
345 AC_PATH_PROG(PKG_CONFIG, [pkg-config], [AC_MSG_ERROR([No pkg-config found])])
347 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args ; then
353 if test "x$target_found" = "xno"; then
354 ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
356 ifelse([$3],,[:],[$3])
360 # Configure paths for LIBXML2
361 # Mike Hommey 2004-06-19
362 # use CPPFLAGS instead of CFLAGS
363 # Toshio Kuratomi 2001-04-21
365 # Configure paths for GLIB
366 # Owen Taylor 97-11-3
368 dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
369 dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
371 AC_DEFUN([AM_PATH_XML2],[
372 AC_ARG_WITH(xml-prefix,
373 [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
374 xml_config_prefix="$withval", xml_config_prefix="")
375 AC_ARG_WITH(xml-exec-prefix,
376 [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
377 xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
378 AC_ARG_ENABLE(xmltest,
379 [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
382 if test x$xml_config_exec_prefix != x ; then
383 xml_config_args="$xml_config_args"
384 if test x${XML2_CONFIG+set} != xset ; then
385 XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
388 if test x$xml_config_prefix != x ; then
389 xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
390 if test x${XML2_CONFIG+set} != xset ; then
391 XML2_CONFIG=$xml_config_prefix/bin/xml2-config
395 AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
396 min_xml_version=ifelse([$1], ,2.0.0,[$1])
397 AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
399 if test "$XML2_CONFIG" = "no" ; then
402 XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
403 XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
404 xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
405 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
406 xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
407 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
408 xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
409 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
410 if test "x$enable_xmltest" = "xyes" ; then
411 ac_save_CPPFLAGS="$CPPFLAGS"
413 CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
414 LIBS="$XML_LIBS $LIBS"
416 dnl Now check if the installed libxml is sufficiently new.
417 dnl (Also sanity checks the results of xml2-config to some extent)
424 #include <libxml/xmlversion.h>
429 int xml_major_version, xml_minor_version, xml_micro_version;
430 int major, minor, micro;
433 system("touch conf.xmltest");
435 /* Capture xml2-config output via autoconf/configure variables */
436 /* HP/UX 9 (%@#!) writes to sscanf strings */
437 tmp_version = (char *)strdup("$min_xml_version");
438 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
439 printf("%s, bad version string from xml2-config\n", "$min_xml_version");
444 /* Capture the version information from the header files */
445 tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
446 if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
447 printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
452 /* Compare xml2-config output to the libxml headers */
453 if ((xml_major_version != $xml_config_major_version) ||
454 (xml_minor_version != $xml_config_minor_version) ||
455 (xml_micro_version != $xml_config_micro_version))
457 printf("*** libxml header files (version %d.%d.%d) do not match\n",
458 xml_major_version, xml_minor_version, xml_micro_version);
459 printf("*** xml2-config (version %d.%d.%d)\n",
460 $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
463 /* Compare the headers to the library to make sure we match */
464 /* Less than ideal -- doesn't provide us with return value feedback,
465 * only exits if there's a serious mismatch between header and library.
469 /* Test that the library is greater than our minimum version */
470 if ((xml_major_version > major) ||
471 ((xml_major_version == major) && (xml_minor_version > minor)) ||
472 ((xml_major_version == major) && (xml_minor_version == minor) &&
473 (xml_micro_version >= micro)))
479 printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
480 xml_major_version, xml_minor_version, xml_micro_version);
481 printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
482 major, minor, micro);
483 printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
485 printf("*** If you have already installed a sufficiently new version, this error\n");
486 printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
487 printf("*** being found. The easiest way to fix this is to remove the old version\n");
488 printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
489 printf("*** correct copy of xml2-config. (In this case, you will have to\n");
490 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
491 printf("*** so that the correct libraries are found at run-time))\n");
495 ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
496 CPPFLAGS="$ac_save_CPPFLAGS"
501 if test "x$no_xml" = x ; then
502 AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
503 ifelse([$2], , :, [$2])
506 if test "$XML2_CONFIG" = "no" ; then
507 echo "*** The xml2-config script installed by LIBXML could not be found"
508 echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
509 echo "*** your path, or set the XML2_CONFIG environment variable to the"
510 echo "*** full path to xml2-config."
512 if test -f conf.xmltest ; then
515 echo "*** Could not run libxml test program, checking why..."
516 CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
517 LIBS="$LIBS $XML_LIBS"
519 #include <libxml/xmlversion.h>
521 ], [ LIBXML_TEST_VERSION; return 0;],
522 [ echo "*** The test program compiled, but did not run. This usually means"
523 echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
524 echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
525 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
526 echo "*** to the installed location Also, make sure you have run ldconfig if that"
527 echo "*** is required on your system"
529 echo "*** If you have an old version installed, it is best to remove it, although"
530 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
531 [ echo "*** The test program failed to compile or link. See the file config.log for the"
532 echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
533 echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
534 echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
535 CPPFLAGS="$ac_save_CPPFLAGS"
542 ifelse([$3], , :, [$3])
544 AC_SUBST(XML_CPPFLAGS)
549 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
550 # serial 1 (pkg-config-0.24)
552 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
554 # This program is free software; you can redistribute it and/or modify
555 # it under the terms of the GNU General Public License as published by
556 # the Free Software Foundation; either version 2 of the License, or
557 # (at your option) any later version.
559 # This program is distributed in the hope that it will be useful, but
560 # WITHOUT ANY WARRANTY; without even the implied warranty of
561 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
562 # General Public License for more details.
564 # You should have received a copy of the GNU General Public License
565 # along with this program; if not, write to the Free Software
566 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
568 # As a special exception to the GNU General Public License, if you
569 # distribute this file as part of a program that contains a
570 # configuration script generated by Autoconf, you may include it under
571 # the same distribution terms that you use for the rest of that program.
573 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
574 # ----------------------------------
575 AC_DEFUN([PKG_PROG_PKG_CONFIG],
576 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
577 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
578 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
579 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
580 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
581 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
583 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
584 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
586 if test -n "$PKG_CONFIG"; then
587 _pkg_min_version=m4_default([$1], [0.9.0])
588 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
589 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
596 ])# PKG_PROG_PKG_CONFIG
598 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
600 # Check to see whether a particular set of modules exists. Similar
601 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
603 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
604 # only at the first occurence in configure.ac, so if the first place
605 # it's called might be skipped (such as if it is within an "if", you
606 # have to call PKG_CHECK_EXISTS manually
607 # --------------------------------------------------------------
608 AC_DEFUN([PKG_CHECK_EXISTS],
609 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
610 if test -n "$PKG_CONFIG" && \
611 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
612 m4_default([$2], [:])
613 m4_ifvaln([$3], [else
617 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
618 # ---------------------------------------------
619 m4_define([_PKG_CONFIG],
620 [if test -n "$$1"; then
622 elif test -n "$PKG_CONFIG"; then
623 PKG_CHECK_EXISTS([$3],
624 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
625 test "x$?" != "x0" && pkg_failed=yes ],
632 # _PKG_SHORT_ERRORS_SUPPORTED
633 # -----------------------------
634 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
635 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
636 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
637 _pkg_short_errors_supported=yes
639 _pkg_short_errors_supported=no
641 ])# _PKG_SHORT_ERRORS_SUPPORTED
644 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
645 # [ACTION-IF-NOT-FOUND])
648 # Note that if there is a possibility the first call to
649 # PKG_CHECK_MODULES might not happen, you should be sure to include an
650 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
653 # --------------------------------------------------------------
654 AC_DEFUN([PKG_CHECK_MODULES],
655 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
656 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
657 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
660 AC_MSG_CHECKING([for $1])
662 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
663 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
665 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
666 and $1[]_LIBS to avoid the need to call pkg-config.
667 See the pkg-config man page for more details.])
669 if test $pkg_failed = yes; then
671 _PKG_SHORT_ERRORS_SUPPORTED
672 if test $_pkg_short_errors_supported = yes; then
673 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
675 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
677 # Put the nasty error message in config.log where it belongs
678 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
680 m4_default([$4], [AC_MSG_ERROR(
681 [Package requirements ($2) were not met:
685 Consider adjusting the PKG_CONFIG_PATH environment variable if you
686 installed software in a non-standard prefix.
690 elif test $pkg_failed = untried; then
692 m4_default([$4], [AC_MSG_FAILURE(
693 [The pkg-config script could not be found or is too old. Make sure it
694 is in your PATH or set the PKG_CONFIG environment variable to the full
699 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
702 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
703 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
707 ])# PKG_CHECK_MODULES
710 # PKG_INSTALLDIR(DIRECTORY)
711 # -------------------------
712 # Substitutes the variable pkgconfigdir as the location where a module
713 # should install pkg-config .pc files. By default the directory is
714 # $libdir/pkgconfig, but the default can be changed by passing
715 # DIRECTORY. The user can override through the --with-pkgconfigdir
717 AC_DEFUN([PKG_INSTALLDIR],
718 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
719 m4_pushdef([pkg_description],
720 [pkg-config installation directory @<:@]pkg_default[@:>@])
721 AC_ARG_WITH([pkgconfigdir],
722 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
723 [with_pkgconfigdir=]pkg_default)
724 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
725 m4_popdef([pkg_default])
726 m4_popdef([pkg_description])
727 ]) dnl PKG_INSTALLDIR
730 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
731 # -------------------------
732 # Substitutes the variable noarch_pkgconfigdir as the location where a
733 # module should install arch-independent pkg-config .pc files. By
734 # default the directory is $datadir/pkgconfig, but the default can be
735 # changed by passing DIRECTORY. The user can override through the
736 # --with-noarch-pkgconfigdir parameter.
737 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
738 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
739 m4_pushdef([pkg_description],
740 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
741 AC_ARG_WITH([noarch-pkgconfigdir],
742 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
743 [with_noarch_pkgconfigdir=]pkg_default)
744 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
745 m4_popdef([pkg_default])
746 m4_popdef([pkg_description])
747 ]) dnl PKG_NOARCH_INSTALLDIR
750 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
751 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
752 # -------------------------------------------
753 # Retrieves the value of the pkg-config variable for the given module.
754 AC_DEFUN([PKG_CHECK_VAR],
755 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
756 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
758 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
759 AS_VAR_COPY([$1], [pkg_cv_][$1])
761 AS_VAR_IF([$1], [""], [$5], [$4])dnl
764 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
773 # AM_AUTOMAKE_VERSION(VERSION)
774 # ----------------------------
775 # Automake X.Y traces this macro to ensure aclocal.m4 has been
776 # generated from the m4 files accompanying Automake X.Y.
777 # (This private macro should not be called outside this file.)
778 AC_DEFUN([AM_AUTOMAKE_VERSION],
779 [am__api_version='1.11'
780 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
781 dnl require some minimum version. Point them to the right macro.
782 m4_if([$1], [1.11.6], [],
783 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
786 # _AM_AUTOCONF_VERSION(VERSION)
787 # -----------------------------
788 # aclocal traces this macro to find the Autoconf version.
789 # This is a private macro too. Using m4_define simplifies
790 # the logic in aclocal, which can simply ignore this definition.
791 m4_define([_AM_AUTOCONF_VERSION], [])
793 # AM_SET_CURRENT_AUTOMAKE_VERSION
794 # -------------------------------
795 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
796 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
797 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
798 [AM_AUTOMAKE_VERSION([1.11.6])dnl
799 m4_ifndef([AC_AUTOCONF_VERSION],
800 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
801 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
803 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
805 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
807 # This file is free software; the Free Software Foundation
808 # gives unlimited permission to copy and/or distribute it,
809 # with or without modifications, as long as this notice is preserved.
813 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
814 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
815 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
817 # Of course, Automake must honor this variable whenever it calls a
818 # tool from the auxiliary directory. The problem is that $srcdir (and
819 # therefore $ac_aux_dir as well) can be either absolute or relative,
820 # depending on how configure is run. This is pretty annoying, since
821 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
822 # source directory, any form will work fine, but in subdirectories a
823 # relative path needs to be adjusted first.
825 # $ac_aux_dir/missing
826 # fails when called from a subdirectory if $ac_aux_dir is relative
827 # $top_srcdir/$ac_aux_dir/missing
828 # fails if $ac_aux_dir is absolute,
829 # fails when called from a subdirectory in a VPATH build with
830 # a relative $ac_aux_dir
832 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
833 # are both prefixed by $srcdir. In an in-source build this is usually
834 # harmless because $srcdir is `.', but things will broke when you
835 # start a VPATH build or use an absolute $srcdir.
837 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
838 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
839 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
840 # and then we would define $MISSING as
841 # MISSING="\${SHELL} $am_aux_dir/missing"
842 # This will work as long as MISSING is not called from configure, because
843 # unfortunately $(top_srcdir) has no meaning in configure.
844 # However there are other variables, like CC, which are often used in
845 # configure, and could therefore not use this "fixed" $ac_aux_dir.
847 # Another solution, used here, is to always expand $ac_aux_dir to an
848 # absolute PATH. The drawback is that using absolute paths prevent a
849 # configured tree to be moved without reconfiguration.
851 AC_DEFUN([AM_AUX_DIR_EXPAND],
852 [dnl Rely on autoconf to set up CDPATH properly.
854 # expand $ac_aux_dir to an absolute path
855 am_aux_dir=`cd $ac_aux_dir && pwd`
858 # AM_CONDITIONAL -*- Autoconf -*-
860 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
861 # Free Software Foundation, Inc.
863 # This file is free software; the Free Software Foundation
864 # gives unlimited permission to copy and/or distribute it,
865 # with or without modifications, as long as this notice is preserved.
869 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
870 # -------------------------------------
871 # Define a conditional.
872 AC_DEFUN([AM_CONDITIONAL],
874 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
875 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
876 AC_SUBST([$1_TRUE])dnl
877 AC_SUBST([$1_FALSE])dnl
878 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
879 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
880 m4_define([_AM_COND_VALUE_$1], [$2])dnl
888 AC_CONFIG_COMMANDS_PRE(
889 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
890 AC_MSG_ERROR([[conditional "$1" was never defined.
891 Usually this means the macro was only invoked conditionally.]])
894 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
895 # 2010, 2011 Free Software Foundation, Inc.
897 # This file is free software; the Free Software Foundation
898 # gives unlimited permission to copy and/or distribute it,
899 # with or without modifications, as long as this notice is preserved.
903 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
904 # written in clear, in which case automake, when reading aclocal.m4,
905 # will think it sees a *use*, and therefore will trigger all it's
906 # C support machinery. Also note that it means that autoscan, seeing
907 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
910 # _AM_DEPENDENCIES(NAME)
911 # ----------------------
912 # See how the compiler implements dependency checking.
913 # NAME is "CC", "CXX", "GCJ", or "OBJC".
914 # We try a few techniques and use that to set a single cache variable.
916 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
917 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
918 # dependency, and given that the user is not expected to run this macro,
919 # just rely on AC_PROG_CC.
920 AC_DEFUN([_AM_DEPENDENCIES],
921 [AC_REQUIRE([AM_SET_DEPDIR])dnl
922 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
923 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
924 AC_REQUIRE([AM_DEP_TRACK])dnl
926 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
927 [$1], CXX, [depcc="$CXX" am_compiler_list=],
928 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
929 [$1], UPC, [depcc="$UPC" am_compiler_list=],
930 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
931 [depcc="$$1" am_compiler_list=])
933 AC_CACHE_CHECK([dependency style of $depcc],
934 [am_cv_$1_dependencies_compiler_type],
935 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
936 # We make a subdir and do the tests there. Otherwise we can end up
937 # making bogus files that we don't know about and never remove. For
938 # instance it was reported that on HP-UX the gcc test will end up
939 # making a dummy file named `D' -- because `-MD' means `put the output
943 # Copy depcomp to subdir because otherwise we won't find it if we're
944 # using a relative directory.
945 cp "$am_depcomp" conftest.dir
947 # We will build objects and dependencies in a subdirectory because
948 # it helps to detect inapplicable dependency modes. For instance
949 # both Tru64's cc and ICC support -MD to output dependencies as a
950 # side effect of compilation, but ICC will put the dependencies in
951 # the current directory while Tru64 will put them in the object
955 am_cv_$1_dependencies_compiler_type=none
956 if test "$am_compiler_list" = ""; then
957 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
961 [case " $depcc " in #(
962 *\ -arch\ *\ -arch\ *) am__universal=true ;;
965 [case " $depcc " in #(
966 *\ -arch\ *\ -arch\ *) am__universal=true ;;
969 for depmode in $am_compiler_list; do
970 # Setup a source with many dependencies, because some compilers
971 # like to wrap large dependency lists on column 80 (with \), and
972 # we should not choose a depcomp mode which is confused by this.
974 # We need to recreate these files for each test, as the compiler may
975 # overwrite some of them when testing with obscure command lines.
976 # This happens at least with the AIX C compiler.
978 for i in 1 2 3 4 5 6; do
979 echo '#include "conftst'$i'.h"' >> sub/conftest.c
980 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
981 # Solaris 8's {/usr,}/bin/sh.
982 touch sub/conftst$i.h
984 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
986 # We check with `-c' and `-o' for the sake of the "dashmstdout"
987 # mode. It turns out that the SunPro C++ compiler does not properly
988 # handle `-M -o', and we need to detect this. Also, some Intel
989 # versions had trouble with output in subdirs
990 am__obj=sub/conftest.${OBJEXT-o}
991 am__minus_obj="-o $am__obj"
994 # This depmode causes a compiler race in universal mode.
995 test "$am__universal" = false || continue
998 # after this tag, mechanisms are not by side-effect, so they'll
999 # only be used when explicitly requested
1000 if test "x$enable_dependency_tracking" = xyes; then
1006 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1007 # This compiler won't grok `-c -o', but also, the minuso test has
1008 # not run yet. These depmodes are late enough in the game, and
1009 # so weak that their functioning should not be impacted.
1010 am__obj=conftest.${OBJEXT-o}
1015 if depmode=$depmode \
1016 source=sub/conftest.c object=$am__obj \
1017 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1018 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1019 >/dev/null 2>conftest.err &&
1020 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1021 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1022 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1023 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1024 # icc doesn't choke on unknown options, it will just issue warnings
1025 # or remarks (even with -Werror). So we grep stderr for any message
1026 # that says an option was ignored or not supported.
1027 # When given -MP, icc 7.0 and 7.1 complain thusly:
1028 # icc: Command line warning: ignoring option '-M'; no argument required
1029 # The diagnosis changed in icc 8.0:
1030 # icc: Command line remark: option '-MP' not supported
1031 if (grep 'ignoring option' conftest.err ||
1032 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1033 am_cv_$1_dependencies_compiler_type=$depmode
1042 am_cv_$1_dependencies_compiler_type=none
1045 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1046 AM_CONDITIONAL([am__fastdep$1], [
1047 test "x$enable_dependency_tracking" != xno \
1048 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1054 # Choose a directory name for dependency files.
1055 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1056 AC_DEFUN([AM_SET_DEPDIR],
1057 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1058 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1064 AC_DEFUN([AM_DEP_TRACK],
1065 [AC_ARG_ENABLE(dependency-tracking,
1066 [ --disable-dependency-tracking speeds up one-time build
1067 --enable-dependency-tracking do not reject slow dependency extractors])
1068 if test "x$enable_dependency_tracking" != xno; then
1069 am_depcomp="$ac_aux_dir/depcomp"
1073 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1074 AC_SUBST([AMDEPBACKSLASH])dnl
1075 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1076 AC_SUBST([am__nodep])dnl
1077 _AM_SUBST_NOTMAKE([am__nodep])dnl
1080 # Generate code to set up dependency tracking. -*- Autoconf -*-
1082 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1083 # Free Software Foundation, Inc.
1085 # This file is free software; the Free Software Foundation
1086 # gives unlimited permission to copy and/or distribute it,
1087 # with or without modifications, as long as this notice is preserved.
1091 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1092 # ------------------------------
1093 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1095 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1096 # are listed without --file. Let's play safe and only enable the eval
1097 # if we detect the quoting.
1098 case $CONFIG_FILES in
1099 *\'*) eval set x "$CONFIG_FILES" ;;
1100 *) set x $CONFIG_FILES ;;
1105 # Strip MF so we end up with the name of the file.
1106 mf=`echo "$mf" | sed -e 's/:.*$//'`
1107 # Check whether this is an Automake generated Makefile or not.
1108 # We used to match only the files named `Makefile.in', but
1109 # some people rename them; so instead we look at the file content.
1110 # Grep'ing the first line is not enough: some people post-process
1111 # each Makefile.in and add a new line on top of each file to say so.
1112 # Grep'ing the whole file is not good either: AIX grep has a line
1113 # limit of 2048, but all sed's we know have understand at least 4000.
1114 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1115 dirpart=`AS_DIRNAME("$mf")`
1119 # Extract the definition of DEPDIR, am__include, and am__quote
1120 # from the Makefile without running `make'.
1121 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1122 test -z "$DEPDIR" && continue
1123 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1124 test -z "am__include" && continue
1125 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1126 # When using ansi2knr, U may be empty or an underscore; expand it
1127 U=`sed -n 's/^U = //p' < "$mf"`
1128 # Find all dependency output files, they are included files with
1129 # $(DEPDIR) in their names. We invoke sed twice because it is the
1130 # simplest approach to changing $(DEPDIR) to its actual value in the
1132 for file in `sed -n "
1133 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1134 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1135 # Make sure the directory exists.
1136 test -f "$dirpart/$file" && continue
1137 fdir=`AS_DIRNAME(["$file"])`
1138 AS_MKDIR_P([$dirpart/$fdir])
1139 # echo "creating $dirpart/$file"
1140 echo '# dummy' > "$dirpart/$file"
1144 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1147 # AM_OUTPUT_DEPENDENCY_COMMANDS
1148 # -----------------------------
1149 # This macro should only be invoked once -- use via AC_REQUIRE.
1151 # This code is only required when automatic dependency tracking
1152 # is enabled. FIXME. This creates each `.P' file that we will
1153 # need in order to bootstrap the dependency handling code.
1154 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1155 [AC_CONFIG_COMMANDS([depfiles],
1156 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1157 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1160 # Do all the work for Automake. -*- Autoconf -*-
1162 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1163 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1165 # This file is free software; the Free Software Foundation
1166 # gives unlimited permission to copy and/or distribute it,
1167 # with or without modifications, as long as this notice is preserved.
1171 # This macro actually does too much. Some checks are only needed if
1172 # your package does certain things. But this isn't really a big deal.
1174 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1175 # AM_INIT_AUTOMAKE([OPTIONS])
1176 # -----------------------------------------------
1177 # The call with PACKAGE and VERSION arguments is the old style
1178 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1179 # and VERSION should now be passed to AC_INIT and removed from
1180 # the call to AM_INIT_AUTOMAKE.
1181 # We support both call styles for the transition. After
1182 # the next Automake release, Autoconf can make the AC_INIT
1183 # arguments mandatory, and then we can depend on a new Autoconf
1184 # release and drop the old call support.
1185 AC_DEFUN([AM_INIT_AUTOMAKE],
1186 [AC_PREREQ([2.62])dnl
1187 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1188 dnl the ones we care about.
1189 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1190 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1191 AC_REQUIRE([AC_PROG_INSTALL])dnl
1192 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1193 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1194 # is not polluted with repeated "-I."
1195 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1196 # test to see if srcdir already configured
1197 if test -f $srcdir/config.status; then
1198 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1202 # test whether we have cygpath
1203 if test -z "$CYGPATH_W"; then
1204 if (cygpath --version) >/dev/null 2>/dev/null; then
1205 CYGPATH_W='cygpath -w'
1210 AC_SUBST([CYGPATH_W])
1212 # Define the identity of the package.
1213 dnl Distinguish between old-style and new-style calls.
1215 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1216 AC_SUBST([PACKAGE], [$1])dnl
1217 AC_SUBST([VERSION], [$2])],
1218 [_AM_SET_OPTIONS([$1])dnl
1219 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1220 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1221 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1222 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1223 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1225 _AM_IF_OPTION([no-define],,
1226 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1227 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1229 # Some tools Automake needs.
1230 AC_REQUIRE([AM_SANITY_CHECK])dnl
1231 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1232 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1233 AM_MISSING_PROG(AUTOCONF, autoconf)
1234 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1235 AM_MISSING_PROG(AUTOHEADER, autoheader)
1236 AM_MISSING_PROG(MAKEINFO, makeinfo)
1237 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1238 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1239 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1240 # We need awk for the "check" target. The system "awk" is bad on
1242 AC_REQUIRE([AC_PROG_AWK])dnl
1243 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1244 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1245 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1246 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1247 [_AM_PROG_TAR([v7])])])
1248 _AM_IF_OPTION([no-dependencies],,
1249 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1250 [_AM_DEPENDENCIES(CC)],
1251 [define([AC_PROG_CC],
1252 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1253 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1254 [_AM_DEPENDENCIES(CXX)],
1255 [define([AC_PROG_CXX],
1256 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1257 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1258 [_AM_DEPENDENCIES(OBJC)],
1259 [define([AC_PROG_OBJC],
1260 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1262 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1263 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1264 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1265 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1266 AC_CONFIG_COMMANDS_PRE(dnl
1267 [m4_provide_if([_AM_COMPILER_EXEEXT],
1268 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1271 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1272 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1273 dnl mangled by Autoconf and run in a shell conditional statement.
1274 m4_define([_AC_COMPILER_EXEEXT],
1275 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1278 # When config.status generates a header, we must update the stamp-h file.
1279 # This file resides in the same directory as the config header
1280 # that is generated. The stamp files are numbered to have different names.
1282 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1283 # loop where config.status creates the headers, so we can generate
1284 # our stamp files there.
1285 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1286 [# Compute $1's index in $config_headers.
1289 for _am_header in $config_headers :; do
1291 $_am_arg | $_am_arg:* )
1294 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1297 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1299 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1302 # This file is free software; the Free Software Foundation
1303 # gives unlimited permission to copy and/or distribute it,
1304 # with or without modifications, as long as this notice is preserved.
1308 # AM_PROG_INSTALL_SH
1309 # ------------------
1310 # Define $install_sh.
1311 AC_DEFUN([AM_PROG_INSTALL_SH],
1312 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1313 if test x"${install_sh}" != xset; then
1316 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1318 install_sh="\${SHELL} $am_aux_dir/install-sh"
1321 AC_SUBST(install_sh)])
1323 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1325 # This file is free software; the Free Software Foundation
1326 # gives unlimited permission to copy and/or distribute it,
1327 # with or without modifications, as long as this notice is preserved.
1331 # Check whether the underlying file-system supports filenames
1332 # with a leading dot. For instance MS-DOS doesn't.
1333 AC_DEFUN([AM_SET_LEADING_DOT],
1334 [rm -rf .tst 2>/dev/null
1335 mkdir .tst 2>/dev/null
1336 if test -d .tst; then
1341 rmdir .tst 2>/dev/null
1342 AC_SUBST([am__leading_dot])])
1344 # Check to see how 'make' treats includes. -*- Autoconf -*-
1346 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1348 # This file is free software; the Free Software Foundation
1349 # gives unlimited permission to copy and/or distribute it,
1350 # with or without modifications, as long as this notice is preserved.
1356 # Check to see how make treats includes.
1357 AC_DEFUN([AM_MAKE_INCLUDE],
1358 [am_make=${MAKE-make}
1359 cat > confinc << 'END'
1361 @echo this is the am__doit target
1364 # If we don't find an include directive, just comment out the code.
1365 AC_MSG_CHECKING([for style of include used by $am_make])
1369 # First try GNU make style include.
1370 echo "include confinc" > confmf
1371 # Ignore all kinds of additional output from `make'.
1372 case `$am_make -s -f confmf 2> /dev/null` in #(
1373 *the\ am__doit\ target*)
1379 # Now try BSD make style include.
1380 if test "$am__include" = "#"; then
1381 echo '.include "confinc"' > confmf
1382 case `$am_make -s -f confmf 2> /dev/null` in #(
1383 *the\ am__doit\ target*)
1384 am__include=.include
1390 AC_SUBST([am__include])
1391 AC_SUBST([am__quote])
1392 AC_MSG_RESULT([$_am_result])
1393 rm -f confinc confmf
1396 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1398 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1399 # Free Software Foundation, Inc.
1401 # This file is free software; the Free Software Foundation
1402 # gives unlimited permission to copy and/or distribute it,
1403 # with or without modifications, as long as this notice is preserved.
1407 # AM_MISSING_PROG(NAME, PROGRAM)
1408 # ------------------------------
1409 AC_DEFUN([AM_MISSING_PROG],
1410 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1411 $1=${$1-"${am_missing_run}$2"}
1415 # AM_MISSING_HAS_RUN
1416 # ------------------
1417 # Define MISSING if not defined so far and test if it supports --run.
1418 # If it does, set am_missing_run to use it, otherwise, to nothing.
1419 AC_DEFUN([AM_MISSING_HAS_RUN],
1420 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1421 AC_REQUIRE_AUX_FILE([missing])dnl
1422 if test x"${MISSING+set}" != xset; then
1425 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1427 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1430 # Use eval to expand $SHELL
1431 if eval "$MISSING --run true"; then
1432 am_missing_run="$MISSING --run "
1435 AC_MSG_WARN([`missing' script is too old or missing])
1439 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1442 # This file is free software; the Free Software Foundation
1443 # gives unlimited permission to copy and/or distribute it,
1444 # with or without modifications, as long as this notice is preserved.
1450 # Check for `mkdir -p'.
1451 AC_DEFUN([AM_PROG_MKDIR_P],
1452 [AC_PREREQ([2.60])dnl
1453 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1454 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1455 dnl while keeping a definition of mkdir_p for backward compatibility.
1456 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1457 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1458 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1459 dnl adjustment using top_builddir (which is defined more often than
1461 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1463 [[\\/$]]* | ?:[[\\/]]*) ;;
1464 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1468 # Helper functions for option handling. -*- Autoconf -*-
1470 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
1473 # This file is free software; the Free Software Foundation
1474 # gives unlimited permission to copy and/or distribute it,
1475 # with or without modifications, as long as this notice is preserved.
1479 # _AM_MANGLE_OPTION(NAME)
1480 # -----------------------
1481 AC_DEFUN([_AM_MANGLE_OPTION],
1482 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1484 # _AM_SET_OPTION(NAME)
1485 # --------------------
1486 # Set option NAME. Presently that only means defining a flag for this option.
1487 AC_DEFUN([_AM_SET_OPTION],
1488 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1490 # _AM_SET_OPTIONS(OPTIONS)
1491 # ------------------------
1492 # OPTIONS is a space-separated list of Automake options.
1493 AC_DEFUN([_AM_SET_OPTIONS],
1494 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1496 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1497 # -------------------------------------------
1498 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1499 AC_DEFUN([_AM_IF_OPTION],
1500 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1502 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1504 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1505 # Free Software Foundation, Inc.
1507 # This file is free software; the Free Software Foundation
1508 # gives unlimited permission to copy and/or distribute it,
1509 # with or without modifications, as long as this notice is preserved.
1515 AC_DEFUN([AM_SANITY_CHECK],
1516 [AC_MSG_CHECKING([whether build environment is sane])
1519 echo timestamp > conftest.file
1520 # Reject unsafe characters in $srcdir or the absolute working directory
1521 # name. Accept space and tab only in the latter.
1525 *[[\\\"\#\$\&\'\`$am_lf]]*)
1526 AC_MSG_ERROR([unsafe absolute working directory name]);;
1529 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1530 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1533 # Do `set' in a subshell so we don't clobber the current shell's
1534 # arguments. Must try -L first in case configure is actually a
1535 # symlink; some systems play weird games with the mod time of symlinks
1536 # (eg FreeBSD returns the mod time of the symlink's containing
1539 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1540 if test "$[*]" = "X"; then
1542 set X `ls -t "$srcdir/configure" conftest.file`
1545 if test "$[*]" != "X $srcdir/configure conftest.file" \
1546 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1548 # If neither matched, then we have a broken ls. This can happen
1549 # if, for instance, CONFIG_SHELL is bash and it inherits a
1550 # broken ls alias from the environment. This has actually
1551 # happened. Such a system could not be considered "sane".
1552 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1553 alias in your environment])
1556 test "$[2]" = conftest.file
1562 AC_MSG_ERROR([newly created file is older than distributed files!
1563 Check your system clock])
1565 AC_MSG_RESULT(yes)])
1567 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1569 # This file is free software; the Free Software Foundation
1570 # gives unlimited permission to copy and/or distribute it,
1571 # with or without modifications, as long as this notice is preserved.
1575 # AM_PROG_INSTALL_STRIP
1576 # ---------------------
1577 # One issue with vendor `install' (even GNU) is that you can't
1578 # specify the program used to strip binaries. This is especially
1579 # annoying in cross-compiling environments, where the build's strip
1580 # is unlikely to handle the host's binaries.
1581 # Fortunately install-sh will honor a STRIPPROG variable, so we
1582 # always use install-sh in `make install-strip', and initialize
1583 # STRIPPROG with the value of the STRIP variable (set by the user).
1584 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1585 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1586 # Installed binaries are usually stripped using `strip' when the user
1587 # run `make install-strip'. However `strip' might not be the right
1588 # tool to use in cross-compilation environments, therefore Automake
1589 # will honor the `STRIP' environment variable to overrule this program.
1590 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1591 if test "$cross_compiling" != no; then
1592 AC_CHECK_TOOL([STRIP], [strip], :)
1594 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1595 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1597 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1599 # This file is free software; the Free Software Foundation
1600 # gives unlimited permission to copy and/or distribute it,
1601 # with or without modifications, as long as this notice is preserved.
1605 # _AM_SUBST_NOTMAKE(VARIABLE)
1606 # ---------------------------
1607 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1608 # This macro is traced by Automake.
1609 AC_DEFUN([_AM_SUBST_NOTMAKE])
1611 # AM_SUBST_NOTMAKE(VARIABLE)
1612 # --------------------------
1613 # Public sister of _AM_SUBST_NOTMAKE.
1614 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1616 # Check how to create a tarball. -*- Autoconf -*-
1618 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1620 # This file is free software; the Free Software Foundation
1621 # gives unlimited permission to copy and/or distribute it,
1622 # with or without modifications, as long as this notice is preserved.
1626 # _AM_PROG_TAR(FORMAT)
1627 # --------------------
1628 # Check how to create a tarball in format FORMAT.
1629 # FORMAT should be one of `v7', `ustar', or `pax'.
1631 # Substitute a variable $(am__tar) that is a command
1632 # writing to stdout a FORMAT-tarball containing the directory
1634 # tardir=directory && $(am__tar) > result.tar
1636 # Substitute a variable $(am__untar) that extract such
1637 # a tarball read from stdin.
1638 # $(am__untar) < result.tar
1639 AC_DEFUN([_AM_PROG_TAR],
1640 [# Always define AMTAR for backward compatibility. Yes, it's still used
1641 # in the wild :-( We should find a proper way to deprecate it ...
1642 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1644 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1645 [m4_case([$1], [ustar],, [pax],,
1646 [m4_fatal([Unknown tar format])])
1647 AC_MSG_CHECKING([how to create a $1 tar archive])
1648 # Loop over all known methods to create a tar archive until one works.
1649 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1650 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1651 # Do not fold the above two line into one, because Tru64 sh and
1652 # Solaris sh will not grok spaces in the rhs of `-'.
1653 for _am_tool in $_am_tools
1657 for _am_tar in tar gnutar gtar;
1659 AM_RUN_LOG([$_am_tar --version]) && break
1661 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1662 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1663 am__untar="$_am_tar -xf -"
1666 # Must skip GNU tar: if it does not support --format= it doesn't create
1667 # ustar tarball either.
1668 (tar --version) >/dev/null 2>&1 && continue
1669 am__tar='tar chf - "$$tardir"'
1670 am__tar_='tar chf - "$tardir"'
1671 am__untar='tar xf -'
1674 am__tar='pax -L -x $1 -w "$$tardir"'
1675 am__tar_='pax -L -x $1 -w "$tardir"'
1679 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1680 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1681 am__untar='cpio -i -H $1 -d'
1690 # If the value was cached, stop now. We just wanted to have am__tar
1691 # and am__untar set.
1692 test -n "${am_cv_prog_tar_$1}" && break
1694 # tar/untar a dummy directory, and stop if the command works
1697 echo GrepMe > conftest.dir/file
1698 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1700 if test -s conftest.tar; then
1701 AM_RUN_LOG([$am__untar <conftest.tar])
1702 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1707 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1708 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1710 AC_SUBST([am__untar])
1713 m4_include([m4/common.m4])
1714 m4_include([m4/libtool.m4])
1715 m4_include([m4/ltoptions.m4])
1716 m4_include([m4/ltsugar.m4])
1717 m4_include([m4/ltversion.m4])
1718 m4_include([m4/lt~obsolete.m4])