/[debian]/bti/branches/upstream/current/aclocal.m4
ViewVC logotype

Contents of /bti/branches/upstream/current/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2233 - (show annotations)
Wed Aug 18 15:33:14 2010 UTC (10 years, 2 months ago) by gregoa
File size: 58708 byte(s)
[svn-upgrade] new version bti (027)
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.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'.])])
21
22 # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
23 # [ACTION-IF-YES], [ACTION-IF-NO])
24 # ----------------------------------------------------------
25 # David Shaw <dshaw@jabberwocky.com> May-09-2006
26 #
27 # Checks for libcurl. DEFAULT-ACTION is the string yes or no to
28 # specify whether to default to --with-libcurl or --without-libcurl.
29 # If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
30 # minimum version of libcurl to accept. Pass the version as a regular
31 # version number like 7.10.1. If not supplied, any version is
32 # accepted. ACTION-IF-YES is a list of shell commands to run if
33 # libcurl was successfully found and passed the various tests.
34 # ACTION-IF-NO is a list of shell commands that are run otherwise.
35 # Note that using --without-libcurl does run ACTION-IF-NO.
36 #
37 # This macro #defines HAVE_LIBCURL if a working libcurl setup is
38 # found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
39 # values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
40 # the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
41 # where yyy are the various protocols supported by libcurl. Both xxx
42 # and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
43 # the macro for the complete list of possible defines. Shell
44 # variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
45 # defined to 'yes' for those features and protocols that were found.
46 # Note that xxx and yyy keep the same capitalization as in the
47 # curl-config list (e.g. it's "HTTP" and not "http").
48 #
49 # Users may override the detected values by doing something like:
50 # LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
51 #
52 # For the sake of sanity, this macro assumes that any libcurl that is
53 # found is after version 7.7.2, the first version that included the
54 # curl-config script. Note that it is very important for people
55 # packaging binary versions of libcurl to include this script!
56 # Without curl-config, we can only guess what protocols are available,
57 # or use curl_version_info to figure it out at runtime.
58
59 AC_DEFUN([LIBCURL_CHECK_CONFIG],
60 [
61 AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL])
62 AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4])
63 AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
64 AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
65 AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
66 AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
67 AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
68 AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
69
70 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
71 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
72 AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
73 AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
74 AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
75 AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
76 AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
77 AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
78 AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
79 AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
80 AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
81 AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
82 AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
83
84 AC_ARG_WITH(libcurl,
85 AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
86 [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
87
88 if test "$_libcurl_with" != "no" ; then
89
90 AC_PROG_AWK
91
92 _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
93
94 _libcurl_try_link=yes
95
96 if test -d "$_libcurl_with" ; then
97 LIBCURL_CPPFLAGS="-I$withval/include"
98 _libcurl_ldflags="-L$withval/lib"
99 AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"],
100 ["$withval/bin"])
101 else
102 AC_PATH_PROG([_libcurl_config],[curl-config])
103 fi
104
105 if test x$_libcurl_config != "x" ; then
106 AC_CACHE_CHECK([for the version of libcurl],
107 [libcurl_cv_lib_curl_version],
108 [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
109
110 _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
111 _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
112
113 if test $_libcurl_wanted -gt 0 ; then
114 AC_CACHE_CHECK([for libcurl >= version $2],
115 [libcurl_cv_lib_version_ok],
116 [
117 if test $_libcurl_version -ge $_libcurl_wanted ; then
118 libcurl_cv_lib_version_ok=yes
119 else
120 libcurl_cv_lib_version_ok=no
121 fi
122 ])
123 fi
124
125 if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
126 if test x"$LIBCURL_CPPFLAGS" = "x" ; then
127 LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
128 fi
129 if test x"$LIBCURL" = "x" ; then
130 LIBCURL=`$_libcurl_config --libs`
131
132 # This is so silly, but Apple actually has a bug in their
133 # curl-config script. Fixed in Tiger, but there are still
134 # lots of Panther installs around.
135 case "${host}" in
136 powerpc-apple-darwin7*)
137 LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
138 ;;
139 esac
140 fi
141
142 # All curl-config scripts support --feature
143 _libcurl_features=`$_libcurl_config --feature`
144
145 # Is it modern enough to have --protocols? (7.12.4)
146 if test $_libcurl_version -ge 461828 ; then
147 _libcurl_protocols=`$_libcurl_config --protocols`
148 fi
149 else
150 _libcurl_try_link=no
151 fi
152
153 unset _libcurl_wanted
154 fi
155
156 if test $_libcurl_try_link = yes ; then
157
158 # we didn't find curl-config, so let's see if the user-supplied
159 # link line (or failing that, "-lcurl") is enough.
160 LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
161
162 AC_CACHE_CHECK([whether libcurl is usable],
163 [libcurl_cv_lib_curl_usable],
164 [
165 _libcurl_save_cppflags=$CPPFLAGS
166 CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
167 _libcurl_save_libs=$LIBS
168 LIBS="$LIBCURL $LIBS"
169
170 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
171 /* Try and use a few common options to force a failure if we are
172 missing symbols or can't link. */
173 int x;
174 curl_easy_setopt(NULL,CURLOPT_URL,NULL);
175 x=CURL_ERROR_SIZE;
176 x=CURLOPT_WRITEFUNCTION;
177 x=CURLOPT_FILE;
178 x=CURLOPT_ERRORBUFFER;
179 x=CURLOPT_STDERR;
180 x=CURLOPT_VERBOSE;
181 ]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
182
183 CPPFLAGS=$_libcurl_save_cppflags
184 LIBS=$_libcurl_save_libs
185 unset _libcurl_save_cppflags
186 unset _libcurl_save_libs
187 ])
188
189 if test $libcurl_cv_lib_curl_usable = yes ; then
190
191 # Does curl_free() exist in this version of libcurl?
192 # If not, fake it with free()
193
194 _libcurl_save_cppflags=$CPPFLAGS
195 CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
196 _libcurl_save_libs=$LIBS
197 LIBS="$LIBS $LIBCURL"
198
199 AC_CHECK_FUNC(curl_free,,
200 AC_DEFINE(curl_free,free,
201 [Define curl_free() as free() if our version of curl lacks curl_free.]))
202
203 CPPFLAGS=$_libcurl_save_cppflags
204 LIBS=$_libcurl_save_libs
205 unset _libcurl_save_cppflags
206 unset _libcurl_save_libs
207
208 AC_DEFINE(HAVE_LIBCURL,1,
209 [Define to 1 if you have a functional curl library.])
210 AC_SUBST(LIBCURL_CPPFLAGS)
211 AC_SUBST(LIBCURL)
212
213 for _libcurl_feature in $_libcurl_features ; do
214 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
215 eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
216 done
217
218 if test "x$_libcurl_protocols" = "x" ; then
219
220 # We don't have --protocols, so just assume that all
221 # protocols are available
222 _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
223
224 if test x$libcurl_feature_SSL = xyes ; then
225 _libcurl_protocols="$_libcurl_protocols HTTPS"
226
227 # FTPS wasn't standards-compliant until version
228 # 7.11.0 (0x070b00 == 461568)
229 if test $_libcurl_version -ge 461568; then
230 _libcurl_protocols="$_libcurl_protocols FTPS"
231 fi
232 fi
233
234 # RTSP, IMAP, POP3 and SMTP were added in
235 # 7.20.0 (0x071400 == 463872)
236 if test $_libcurl_version -ge 463872; then
237 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
238 fi
239 fi
240
241 for _libcurl_protocol in $_libcurl_protocols ; do
242 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
243 eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
244 done
245 else
246 unset LIBCURL
247 unset LIBCURL_CPPFLAGS
248 fi
249 fi
250
251 unset _libcurl_try_link
252 unset _libcurl_version_parse
253 unset _libcurl_config
254 unset _libcurl_feature
255 unset _libcurl_features
256 unset _libcurl_protocol
257 unset _libcurl_protocols
258 unset _libcurl_version
259 unset _libcurl_ldflags
260 fi
261
262 if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
263 # This is the IF-NO path
264 ifelse([$4],,:,[$4])
265 else
266 # This is the IF-YES path
267 ifelse([$3],,:,[$3])
268 fi
269
270 unset _libcurl_with
271 ])dnl
272
273 # Configure paths for LIBXML2
274 # Mike Hommey 2004-06-19
275 # use CPPFLAGS instead of CFLAGS
276 # Toshio Kuratomi 2001-04-21
277 # Adapted from:
278 # Configure paths for GLIB
279 # Owen Taylor 97-11-3
280
281 dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
282 dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
283 dnl
284 AC_DEFUN([AM_PATH_XML2],[
285 AC_ARG_WITH(xml-prefix,
286 [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
287 xml_config_prefix="$withval", xml_config_prefix="")
288 AC_ARG_WITH(xml-exec-prefix,
289 [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
290 xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
291 AC_ARG_ENABLE(xmltest,
292 [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
293 enable_xmltest=yes)
294
295 if test x$xml_config_exec_prefix != x ; then
296 xml_config_args="$xml_config_args"
297 if test x${XML2_CONFIG+set} != xset ; then
298 XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
299 fi
300 fi
301 if test x$xml_config_prefix != x ; then
302 xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
303 if test x${XML2_CONFIG+set} != xset ; then
304 XML2_CONFIG=$xml_config_prefix/bin/xml2-config
305 fi
306 fi
307
308 AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
309 min_xml_version=ifelse([$1], ,2.0.0,[$1])
310 AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
311 no_xml=""
312 if test "$XML2_CONFIG" = "no" ; then
313 no_xml=yes
314 else
315 XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
316 XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
317 xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
318 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
319 xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
320 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
321 xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
322 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
323 if test "x$enable_xmltest" = "xyes" ; then
324 ac_save_CPPFLAGS="$CPPFLAGS"
325 ac_save_LIBS="$LIBS"
326 CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
327 LIBS="$XML_LIBS $LIBS"
328 dnl
329 dnl Now check if the installed libxml is sufficiently new.
330 dnl (Also sanity checks the results of xml2-config to some extent)
331 dnl
332 rm -f conf.xmltest
333 AC_TRY_RUN([
334 #include <stdlib.h>
335 #include <stdio.h>
336 #include <string.h>
337 #include <libxml/xmlversion.h>
338
339 int
340 main()
341 {
342 int xml_major_version, xml_minor_version, xml_micro_version;
343 int major, minor, micro;
344 char *tmp_version;
345
346 system("touch conf.xmltest");
347
348 /* Capture xml2-config output via autoconf/configure variables */
349 /* HP/UX 9 (%@#!) writes to sscanf strings */
350 tmp_version = (char *)strdup("$min_xml_version");
351 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
352 printf("%s, bad version string from xml2-config\n", "$min_xml_version");
353 exit(1);
354 }
355 free(tmp_version);
356
357 /* Capture the version information from the header files */
358 tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
359 if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
360 printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
361 exit(1);
362 }
363 free(tmp_version);
364
365 /* Compare xml2-config output to the libxml headers */
366 if ((xml_major_version != $xml_config_major_version) ||
367 (xml_minor_version != $xml_config_minor_version) ||
368 (xml_micro_version != $xml_config_micro_version))
369 {
370 printf("*** libxml header files (version %d.%d.%d) do not match\n",
371 xml_major_version, xml_minor_version, xml_micro_version);
372 printf("*** xml2-config (version %d.%d.%d)\n",
373 $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
374 return 1;
375 }
376 /* Compare the headers to the library to make sure we match */
377 /* Less than ideal -- doesn't provide us with return value feedback,
378 * only exits if there's a serious mismatch between header and library.
379 */
380 LIBXML_TEST_VERSION;
381
382 /* Test that the library is greater than our minimum version */
383 if ((xml_major_version > major) ||
384 ((xml_major_version == major) && (xml_minor_version > minor)) ||
385 ((xml_major_version == major) && (xml_minor_version == minor) &&
386 (xml_micro_version >= micro)))
387 {
388 return 0;
389 }
390 else
391 {
392 printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
393 xml_major_version, xml_minor_version, xml_micro_version);
394 printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
395 major, minor, micro);
396 printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
397 printf("***\n");
398 printf("*** If you have already installed a sufficiently new version, this error\n");
399 printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
400 printf("*** being found. The easiest way to fix this is to remove the old version\n");
401 printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
402 printf("*** correct copy of xml2-config. (In this case, you will have to\n");
403 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
404 printf("*** so that the correct libraries are found at run-time))\n");
405 }
406 return 1;
407 }
408 ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
409 CPPFLAGS="$ac_save_CPPFLAGS"
410 LIBS="$ac_save_LIBS"
411 fi
412 fi
413
414 if test "x$no_xml" = x ; then
415 AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
416 ifelse([$2], , :, [$2])
417 else
418 AC_MSG_RESULT(no)
419 if test "$XML2_CONFIG" = "no" ; then
420 echo "*** The xml2-config script installed by LIBXML could not be found"
421 echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
422 echo "*** your path, or set the XML2_CONFIG environment variable to the"
423 echo "*** full path to xml2-config."
424 else
425 if test -f conf.xmltest ; then
426 :
427 else
428 echo "*** Could not run libxml test program, checking why..."
429 CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
430 LIBS="$LIBS $XML_LIBS"
431 AC_TRY_LINK([
432 #include <libxml/xmlversion.h>
433 #include <stdio.h>
434 ], [ LIBXML_TEST_VERSION; return 0;],
435 [ echo "*** The test program compiled, but did not run. This usually means"
436 echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
437 echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
438 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
439 echo "*** to the installed location Also, make sure you have run ldconfig if that"
440 echo "*** is required on your system"
441 echo "***"
442 echo "*** If you have an old version installed, it is best to remove it, although"
443 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
444 [ echo "*** The test program failed to compile or link. See the file config.log for the"
445 echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
446 echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
447 echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
448 CPPFLAGS="$ac_save_CPPFLAGS"
449 LIBS="$ac_save_LIBS"
450 fi
451 fi
452
453 XML_CPPFLAGS=""
454 XML_LIBS=""
455 ifelse([$3], , :, [$3])
456 fi
457 AC_SUBST(XML_CPPFLAGS)
458 AC_SUBST(XML_LIBS)
459 rm -f conf.xmltest
460 ])
461
462 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
463 #
464 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
465 #
466 # This program is free software; you can redistribute it and/or modify
467 # it under the terms of the GNU General Public License as published by
468 # the Free Software Foundation; either version 2 of the License, or
469 # (at your option) any later version.
470 #
471 # This program is distributed in the hope that it will be useful, but
472 # WITHOUT ANY WARRANTY; without even the implied warranty of
473 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
474 # General Public License for more details.
475 #
476 # You should have received a copy of the GNU General Public License
477 # along with this program; if not, write to the Free Software
478 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
479 #
480 # As a special exception to the GNU General Public License, if you
481 # distribute this file as part of a program that contains a
482 # configuration script generated by Autoconf, you may include it under
483 # the same distribution terms that you use for the rest of that program.
484
485 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
486 # ----------------------------------
487 AC_DEFUN([PKG_PROG_PKG_CONFIG],
488 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
489 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
490 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
491 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
492 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
493 fi
494 if test -n "$PKG_CONFIG"; then
495 _pkg_min_version=m4_default([$1], [0.9.0])
496 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
497 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
498 AC_MSG_RESULT([yes])
499 else
500 AC_MSG_RESULT([no])
501 PKG_CONFIG=""
502 fi
503
504 fi[]dnl
505 ])# PKG_PROG_PKG_CONFIG
506
507 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
508 #
509 # Check to see whether a particular set of modules exists. Similar
510 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
511 #
512 #
513 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
514 # this or PKG_CHECK_MODULES is called, or make sure to call
515 # PKG_CHECK_EXISTS manually
516 # --------------------------------------------------------------
517 AC_DEFUN([PKG_CHECK_EXISTS],
518 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
519 if test -n "$PKG_CONFIG" && \
520 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
521 m4_ifval([$2], [$2], [:])
522 m4_ifvaln([$3], [else
523 $3])dnl
524 fi])
525
526
527 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
528 # ---------------------------------------------
529 m4_define([_PKG_CONFIG],
530 [if test -n "$$1"; then
531 pkg_cv_[]$1="$$1"
532 elif test -n "$PKG_CONFIG"; then
533 PKG_CHECK_EXISTS([$3],
534 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
535 [pkg_failed=yes])
536 else
537 pkg_failed=untried
538 fi[]dnl
539 ])# _PKG_CONFIG
540
541 # _PKG_SHORT_ERRORS_SUPPORTED
542 # -----------------------------
543 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
544 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
545 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
546 _pkg_short_errors_supported=yes
547 else
548 _pkg_short_errors_supported=no
549 fi[]dnl
550 ])# _PKG_SHORT_ERRORS_SUPPORTED
551
552
553 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
554 # [ACTION-IF-NOT-FOUND])
555 #
556 #
557 # Note that if there is a possibility the first call to
558 # PKG_CHECK_MODULES might not happen, you should be sure to include an
559 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
560 #
561 #
562 # --------------------------------------------------------------
563 AC_DEFUN([PKG_CHECK_MODULES],
564 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
565 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
566 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
567
568 pkg_failed=no
569 AC_MSG_CHECKING([for $1])
570
571 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
572 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
573
574 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
575 and $1[]_LIBS to avoid the need to call pkg-config.
576 See the pkg-config man page for more details.])
577
578 if test $pkg_failed = yes; then
579 _PKG_SHORT_ERRORS_SUPPORTED
580 if test $_pkg_short_errors_supported = yes; then
581 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
582 else
583 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
584 fi
585 # Put the nasty error message in config.log where it belongs
586 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
587
588 ifelse([$4], , [AC_MSG_ERROR(dnl
589 [Package requirements ($2) were not met:
590
591 $$1_PKG_ERRORS
592
593 Consider adjusting the PKG_CONFIG_PATH environment variable if you
594 installed software in a non-standard prefix.
595
596 _PKG_TEXT
597 ])],
598 [AC_MSG_RESULT([no])
599 $4])
600 elif test $pkg_failed = untried; then
601 ifelse([$4], , [AC_MSG_FAILURE(dnl
602 [The pkg-config script could not be found or is too old. Make sure it
603 is in your PATH or set the PKG_CONFIG environment variable to the full
604 path to pkg-config.
605
606 _PKG_TEXT
607
608 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
609 [$4])
610 else
611 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
612 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
613 AC_MSG_RESULT([yes])
614 ifelse([$3], , :, [$3])
615 fi[]dnl
616 ])# PKG_CHECK_MODULES
617
618 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
619 #
620 # This file is free software; the Free Software Foundation
621 # gives unlimited permission to copy and/or distribute it,
622 # with or without modifications, as long as this notice is preserved.
623
624 # AM_AUTOMAKE_VERSION(VERSION)
625 # ----------------------------
626 # Automake X.Y traces this macro to ensure aclocal.m4 has been
627 # generated from the m4 files accompanying Automake X.Y.
628 # (This private macro should not be called outside this file.)
629 AC_DEFUN([AM_AUTOMAKE_VERSION],
630 [am__api_version='1.11'
631 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
632 dnl require some minimum version. Point them to the right macro.
633 m4_if([$1], [1.11.1], [],
634 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
635 ])
636
637 # _AM_AUTOCONF_VERSION(VERSION)
638 # -----------------------------
639 # aclocal traces this macro to find the Autoconf version.
640 # This is a private macro too. Using m4_define simplifies
641 # the logic in aclocal, which can simply ignore this definition.
642 m4_define([_AM_AUTOCONF_VERSION], [])
643
644 # AM_SET_CURRENT_AUTOMAKE_VERSION
645 # -------------------------------
646 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
647 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
648 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
649 [AM_AUTOMAKE_VERSION([1.11.1])dnl
650 m4_ifndef([AC_AUTOCONF_VERSION],
651 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
652 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
653
654 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
655
656 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
657 #
658 # This file is free software; the Free Software Foundation
659 # gives unlimited permission to copy and/or distribute it,
660 # with or without modifications, as long as this notice is preserved.
661
662 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
663 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
664 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
665 #
666 # Of course, Automake must honor this variable whenever it calls a
667 # tool from the auxiliary directory. The problem is that $srcdir (and
668 # therefore $ac_aux_dir as well) can be either absolute or relative,
669 # depending on how configure is run. This is pretty annoying, since
670 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
671 # source directory, any form will work fine, but in subdirectories a
672 # relative path needs to be adjusted first.
673 #
674 # $ac_aux_dir/missing
675 # fails when called from a subdirectory if $ac_aux_dir is relative
676 # $top_srcdir/$ac_aux_dir/missing
677 # fails if $ac_aux_dir is absolute,
678 # fails when called from a subdirectory in a VPATH build with
679 # a relative $ac_aux_dir
680 #
681 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
682 # are both prefixed by $srcdir. In an in-source build this is usually
683 # harmless because $srcdir is `.', but things will broke when you
684 # start a VPATH build or use an absolute $srcdir.
685 #
686 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
687 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
688 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
689 # and then we would define $MISSING as
690 # MISSING="\${SHELL} $am_aux_dir/missing"
691 # This will work as long as MISSING is not called from configure, because
692 # unfortunately $(top_srcdir) has no meaning in configure.
693 # However there are other variables, like CC, which are often used in
694 # configure, and could therefore not use this "fixed" $ac_aux_dir.
695 #
696 # Another solution, used here, is to always expand $ac_aux_dir to an
697 # absolute PATH. The drawback is that using absolute paths prevent a
698 # configured tree to be moved without reconfiguration.
699
700 AC_DEFUN([AM_AUX_DIR_EXPAND],
701 [dnl Rely on autoconf to set up CDPATH properly.
702 AC_PREREQ([2.50])dnl
703 # expand $ac_aux_dir to an absolute path
704 am_aux_dir=`cd $ac_aux_dir && pwd`
705 ])
706
707 # AM_CONDITIONAL -*- Autoconf -*-
708
709 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
710 # Free Software Foundation, Inc.
711 #
712 # This file is free software; the Free Software Foundation
713 # gives unlimited permission to copy and/or distribute it,
714 # with or without modifications, as long as this notice is preserved.
715
716 # serial 9
717
718 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
719 # -------------------------------------
720 # Define a conditional.
721 AC_DEFUN([AM_CONDITIONAL],
722 [AC_PREREQ(2.52)dnl
723 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
724 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
725 AC_SUBST([$1_TRUE])dnl
726 AC_SUBST([$1_FALSE])dnl
727 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
728 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
729 m4_define([_AM_COND_VALUE_$1], [$2])dnl
730 if $2; then
731 $1_TRUE=
732 $1_FALSE='#'
733 else
734 $1_TRUE='#'
735 $1_FALSE=
736 fi
737 AC_CONFIG_COMMANDS_PRE(
738 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
739 AC_MSG_ERROR([[conditional "$1" was never defined.
740 Usually this means the macro was only invoked conditionally.]])
741 fi])])
742
743 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
744 # Free Software Foundation, Inc.
745 #
746 # This file is free software; the Free Software Foundation
747 # gives unlimited permission to copy and/or distribute it,
748 # with or without modifications, as long as this notice is preserved.
749
750 # serial 10
751
752 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
753 # written in clear, in which case automake, when reading aclocal.m4,
754 # will think it sees a *use*, and therefore will trigger all it's
755 # C support machinery. Also note that it means that autoscan, seeing
756 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
757
758
759 # _AM_DEPENDENCIES(NAME)
760 # ----------------------
761 # See how the compiler implements dependency checking.
762 # NAME is "CC", "CXX", "GCJ", or "OBJC".
763 # We try a few techniques and use that to set a single cache variable.
764 #
765 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
766 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
767 # dependency, and given that the user is not expected to run this macro,
768 # just rely on AC_PROG_CC.
769 AC_DEFUN([_AM_DEPENDENCIES],
770 [AC_REQUIRE([AM_SET_DEPDIR])dnl
771 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
772 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
773 AC_REQUIRE([AM_DEP_TRACK])dnl
774
775 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
776 [$1], CXX, [depcc="$CXX" am_compiler_list=],
777 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
778 [$1], UPC, [depcc="$UPC" am_compiler_list=],
779 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
780 [depcc="$$1" am_compiler_list=])
781
782 AC_CACHE_CHECK([dependency style of $depcc],
783 [am_cv_$1_dependencies_compiler_type],
784 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
785 # We make a subdir and do the tests there. Otherwise we can end up
786 # making bogus files that we don't know about and never remove. For
787 # instance it was reported that on HP-UX the gcc test will end up
788 # making a dummy file named `D' -- because `-MD' means `put the output
789 # in D'.
790 mkdir conftest.dir
791 # Copy depcomp to subdir because otherwise we won't find it if we're
792 # using a relative directory.
793 cp "$am_depcomp" conftest.dir
794 cd conftest.dir
795 # We will build objects and dependencies in a subdirectory because
796 # it helps to detect inapplicable dependency modes. For instance
797 # both Tru64's cc and ICC support -MD to output dependencies as a
798 # side effect of compilation, but ICC will put the dependencies in
799 # the current directory while Tru64 will put them in the object
800 # directory.
801 mkdir sub
802
803 am_cv_$1_dependencies_compiler_type=none
804 if test "$am_compiler_list" = ""; then
805 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
806 fi
807 am__universal=false
808 m4_case([$1], [CC],
809 [case " $depcc " in #(
810 *\ -arch\ *\ -arch\ *) am__universal=true ;;
811 esac],
812 [CXX],
813 [case " $depcc " in #(
814 *\ -arch\ *\ -arch\ *) am__universal=true ;;
815 esac])
816
817 for depmode in $am_compiler_list; do
818 # Setup a source with many dependencies, because some compilers
819 # like to wrap large dependency lists on column 80 (with \), and
820 # we should not choose a depcomp mode which is confused by this.
821 #
822 # We need to recreate these files for each test, as the compiler may
823 # overwrite some of them when testing with obscure command lines.
824 # This happens at least with the AIX C compiler.
825 : > sub/conftest.c
826 for i in 1 2 3 4 5 6; do
827 echo '#include "conftst'$i'.h"' >> sub/conftest.c
828 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
829 # Solaris 8's {/usr,}/bin/sh.
830 touch sub/conftst$i.h
831 done
832 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
833
834 # We check with `-c' and `-o' for the sake of the "dashmstdout"
835 # mode. It turns out that the SunPro C++ compiler does not properly
836 # handle `-M -o', and we need to detect this. Also, some Intel
837 # versions had trouble with output in subdirs
838 am__obj=sub/conftest.${OBJEXT-o}
839 am__minus_obj="-o $am__obj"
840 case $depmode in
841 gcc)
842 # This depmode causes a compiler race in universal mode.
843 test "$am__universal" = false || continue
844 ;;
845 nosideeffect)
846 # after this tag, mechanisms are not by side-effect, so they'll
847 # only be used when explicitly requested
848 if test "x$enable_dependency_tracking" = xyes; then
849 continue
850 else
851 break
852 fi
853 ;;
854 msvisualcpp | msvcmsys)
855 # This compiler won't grok `-c -o', but also, the minuso test has
856 # not run yet. These depmodes are late enough in the game, and
857 # so weak that their functioning should not be impacted.
858 am__obj=conftest.${OBJEXT-o}
859 am__minus_obj=
860 ;;
861 none) break ;;
862 esac
863 if depmode=$depmode \
864 source=sub/conftest.c object=$am__obj \
865 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
866 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
867 >/dev/null 2>conftest.err &&
868 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
869 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
870 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
871 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
872 # icc doesn't choke on unknown options, it will just issue warnings
873 # or remarks (even with -Werror). So we grep stderr for any message
874 # that says an option was ignored or not supported.
875 # When given -MP, icc 7.0 and 7.1 complain thusly:
876 # icc: Command line warning: ignoring option '-M'; no argument required
877 # The diagnosis changed in icc 8.0:
878 # icc: Command line remark: option '-MP' not supported
879 if (grep 'ignoring option' conftest.err ||
880 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
881 am_cv_$1_dependencies_compiler_type=$depmode
882 break
883 fi
884 fi
885 done
886
887 cd ..
888 rm -rf conftest.dir
889 else
890 am_cv_$1_dependencies_compiler_type=none
891 fi
892 ])
893 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
894 AM_CONDITIONAL([am__fastdep$1], [
895 test "x$enable_dependency_tracking" != xno \
896 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
897 ])
898
899
900 # AM_SET_DEPDIR
901 # -------------
902 # Choose a directory name for dependency files.
903 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
904 AC_DEFUN([AM_SET_DEPDIR],
905 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
906 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
907 ])
908
909
910 # AM_DEP_TRACK
911 # ------------
912 AC_DEFUN([AM_DEP_TRACK],
913 [AC_ARG_ENABLE(dependency-tracking,
914 [ --disable-dependency-tracking speeds up one-time build
915 --enable-dependency-tracking do not reject slow dependency extractors])
916 if test "x$enable_dependency_tracking" != xno; then
917 am_depcomp="$ac_aux_dir/depcomp"
918 AMDEPBACKSLASH='\'
919 fi
920 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
921 AC_SUBST([AMDEPBACKSLASH])dnl
922 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
923 ])
924
925 # Generate code to set up dependency tracking. -*- Autoconf -*-
926
927 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
928 # Free Software Foundation, Inc.
929 #
930 # This file is free software; the Free Software Foundation
931 # gives unlimited permission to copy and/or distribute it,
932 # with or without modifications, as long as this notice is preserved.
933
934 #serial 5
935
936 # _AM_OUTPUT_DEPENDENCY_COMMANDS
937 # ------------------------------
938 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
939 [{
940 # Autoconf 2.62 quotes --file arguments for eval, but not when files
941 # are listed without --file. Let's play safe and only enable the eval
942 # if we detect the quoting.
943 case $CONFIG_FILES in
944 *\'*) eval set x "$CONFIG_FILES" ;;
945 *) set x $CONFIG_FILES ;;
946 esac
947 shift
948 for mf
949 do
950 # Strip MF so we end up with the name of the file.
951 mf=`echo "$mf" | sed -e 's/:.*$//'`
952 # Check whether this is an Automake generated Makefile or not.
953 # We used to match only the files named `Makefile.in', but
954 # some people rename them; so instead we look at the file content.
955 # Grep'ing the first line is not enough: some people post-process
956 # each Makefile.in and add a new line on top of each file to say so.
957 # Grep'ing the whole file is not good either: AIX grep has a line
958 # limit of 2048, but all sed's we know have understand at least 4000.
959 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
960 dirpart=`AS_DIRNAME("$mf")`
961 else
962 continue
963 fi
964 # Extract the definition of DEPDIR, am__include, and am__quote
965 # from the Makefile without running `make'.
966 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
967 test -z "$DEPDIR" && continue
968 am__include=`sed -n 's/^am__include = //p' < "$mf"`
969 test -z "am__include" && continue
970 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
971 # When using ansi2knr, U may be empty or an underscore; expand it
972 U=`sed -n 's/^U = //p' < "$mf"`
973 # Find all dependency output files, they are included files with
974 # $(DEPDIR) in their names. We invoke sed twice because it is the
975 # simplest approach to changing $(DEPDIR) to its actual value in the
976 # expansion.
977 for file in `sed -n "
978 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
979 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
980 # Make sure the directory exists.
981 test -f "$dirpart/$file" && continue
982 fdir=`AS_DIRNAME(["$file"])`
983 AS_MKDIR_P([$dirpart/$fdir])
984 # echo "creating $dirpart/$file"
985 echo '# dummy' > "$dirpart/$file"
986 done
987 done
988 }
989 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
990
991
992 # AM_OUTPUT_DEPENDENCY_COMMANDS
993 # -----------------------------
994 # This macro should only be invoked once -- use via AC_REQUIRE.
995 #
996 # This code is only required when automatic dependency tracking
997 # is enabled. FIXME. This creates each `.P' file that we will
998 # need in order to bootstrap the dependency handling code.
999 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1000 [AC_CONFIG_COMMANDS([depfiles],
1001 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1002 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1003 ])
1004
1005 # Do all the work for Automake. -*- Autoconf -*-
1006
1007 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1008 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1009 #
1010 # This file is free software; the Free Software Foundation
1011 # gives unlimited permission to copy and/or distribute it,
1012 # with or without modifications, as long as this notice is preserved.
1013
1014 # serial 16
1015
1016 # This macro actually does too much. Some checks are only needed if
1017 # your package does certain things. But this isn't really a big deal.
1018
1019 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1020 # AM_INIT_AUTOMAKE([OPTIONS])
1021 # -----------------------------------------------
1022 # The call with PACKAGE and VERSION arguments is the old style
1023 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1024 # and VERSION should now be passed to AC_INIT and removed from
1025 # the call to AM_INIT_AUTOMAKE.
1026 # We support both call styles for the transition. After
1027 # the next Automake release, Autoconf can make the AC_INIT
1028 # arguments mandatory, and then we can depend on a new Autoconf
1029 # release and drop the old call support.
1030 AC_DEFUN([AM_INIT_AUTOMAKE],
1031 [AC_PREREQ([2.62])dnl
1032 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1033 dnl the ones we care about.
1034 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1035 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1036 AC_REQUIRE([AC_PROG_INSTALL])dnl
1037 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1038 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1039 # is not polluted with repeated "-I."
1040 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1041 # test to see if srcdir already configured
1042 if test -f $srcdir/config.status; then
1043 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1044 fi
1045 fi
1046
1047 # test whether we have cygpath
1048 if test -z "$CYGPATH_W"; then
1049 if (cygpath --version) >/dev/null 2>/dev/null; then
1050 CYGPATH_W='cygpath -w'
1051 else
1052 CYGPATH_W=echo
1053 fi
1054 fi
1055 AC_SUBST([CYGPATH_W])
1056
1057 # Define the identity of the package.
1058 dnl Distinguish between old-style and new-style calls.
1059 m4_ifval([$2],
1060 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1061 AC_SUBST([PACKAGE], [$1])dnl
1062 AC_SUBST([VERSION], [$2])],
1063 [_AM_SET_OPTIONS([$1])dnl
1064 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1065 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1066 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1067 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1068 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1069
1070 _AM_IF_OPTION([no-define],,
1071 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1072 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1073
1074 # Some tools Automake needs.
1075 AC_REQUIRE([AM_SANITY_CHECK])dnl
1076 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1077 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1078 AM_MISSING_PROG(AUTOCONF, autoconf)
1079 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1080 AM_MISSING_PROG(AUTOHEADER, autoheader)
1081 AM_MISSING_PROG(MAKEINFO, makeinfo)
1082 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1083 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1084 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1085 # We need awk for the "check" target. The system "awk" is bad on
1086 # some platforms.
1087 AC_REQUIRE([AC_PROG_AWK])dnl
1088 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1089 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1090 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1091 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1092 [_AM_PROG_TAR([v7])])])
1093 _AM_IF_OPTION([no-dependencies],,
1094 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1095 [_AM_DEPENDENCIES(CC)],
1096 [define([AC_PROG_CC],
1097 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1098 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1099 [_AM_DEPENDENCIES(CXX)],
1100 [define([AC_PROG_CXX],
1101 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1102 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1103 [_AM_DEPENDENCIES(OBJC)],
1104 [define([AC_PROG_OBJC],
1105 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1106 ])
1107 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1108 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1109 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1110 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1111 AC_CONFIG_COMMANDS_PRE(dnl
1112 [m4_provide_if([_AM_COMPILER_EXEEXT],
1113 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1114 ])
1115
1116 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1117 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1118 dnl mangled by Autoconf and run in a shell conditional statement.
1119 m4_define([_AC_COMPILER_EXEEXT],
1120 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1121
1122
1123 # When config.status generates a header, we must update the stamp-h file.
1124 # This file resides in the same directory as the config header
1125 # that is generated. The stamp files are numbered to have different names.
1126
1127 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1128 # loop where config.status creates the headers, so we can generate
1129 # our stamp files there.
1130 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1131 [# Compute $1's index in $config_headers.
1132 _am_arg=$1
1133 _am_stamp_count=1
1134 for _am_header in $config_headers :; do
1135 case $_am_header in
1136 $_am_arg | $_am_arg:* )
1137 break ;;
1138 * )
1139 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1140 esac
1141 done
1142 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1143
1144 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1145 #
1146 # This file is free software; the Free Software Foundation
1147 # gives unlimited permission to copy and/or distribute it,
1148 # with or without modifications, as long as this notice is preserved.
1149
1150 # AM_PROG_INSTALL_SH
1151 # ------------------
1152 # Define $install_sh.
1153 AC_DEFUN([AM_PROG_INSTALL_SH],
1154 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1155 if test x"${install_sh}" != xset; then
1156 case $am_aux_dir in
1157 *\ * | *\ *)
1158 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1159 *)
1160 install_sh="\${SHELL} $am_aux_dir/install-sh"
1161 esac
1162 fi
1163 AC_SUBST(install_sh)])
1164
1165 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1166 #
1167 # This file is free software; the Free Software Foundation
1168 # gives unlimited permission to copy and/or distribute it,
1169 # with or without modifications, as long as this notice is preserved.
1170
1171 # serial 2
1172
1173 # Check whether the underlying file-system supports filenames
1174 # with a leading dot. For instance MS-DOS doesn't.
1175 AC_DEFUN([AM_SET_LEADING_DOT],
1176 [rm -rf .tst 2>/dev/null
1177 mkdir .tst 2>/dev/null
1178 if test -d .tst; then
1179 am__leading_dot=.
1180 else
1181 am__leading_dot=_
1182 fi
1183 rmdir .tst 2>/dev/null
1184 AC_SUBST([am__leading_dot])])
1185
1186 # Check to see how 'make' treats includes. -*- Autoconf -*-
1187
1188 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1189 #
1190 # This file is free software; the Free Software Foundation
1191 # gives unlimited permission to copy and/or distribute it,
1192 # with or without modifications, as long as this notice is preserved.
1193
1194 # serial 4
1195
1196 # AM_MAKE_INCLUDE()
1197 # -----------------
1198 # Check to see how make treats includes.
1199 AC_DEFUN([AM_MAKE_INCLUDE],
1200 [am_make=${MAKE-make}
1201 cat > confinc << 'END'
1202 am__doit:
1203 @echo this is the am__doit target
1204 .PHONY: am__doit
1205 END
1206 # If we don't find an include directive, just comment out the code.
1207 AC_MSG_CHECKING([for style of include used by $am_make])
1208 am__include="#"
1209 am__quote=
1210 _am_result=none
1211 # First try GNU make style include.
1212 echo "include confinc" > confmf
1213 # Ignore all kinds of additional output from `make'.
1214 case `$am_make -s -f confmf 2> /dev/null` in #(
1215 *the\ am__doit\ target*)
1216 am__include=include
1217 am__quote=
1218 _am_result=GNU
1219 ;;
1220 esac
1221 # Now try BSD make style include.
1222 if test "$am__include" = "#"; then
1223 echo '.include "confinc"' > confmf
1224 case `$am_make -s -f confmf 2> /dev/null` in #(
1225 *the\ am__doit\ target*)
1226 am__include=.include
1227 am__quote="\""
1228 _am_result=BSD
1229 ;;
1230 esac
1231 fi
1232 AC_SUBST([am__include])
1233 AC_SUBST([am__quote])
1234 AC_MSG_RESULT([$_am_result])
1235 rm -f confinc confmf
1236 ])
1237
1238 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1239
1240 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1241 # Free Software Foundation, Inc.
1242 #
1243 # This file is free software; the Free Software Foundation
1244 # gives unlimited permission to copy and/or distribute it,
1245 # with or without modifications, as long as this notice is preserved.
1246
1247 # serial 6
1248
1249 # AM_MISSING_PROG(NAME, PROGRAM)
1250 # ------------------------------
1251 AC_DEFUN([AM_MISSING_PROG],
1252 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1253 $1=${$1-"${am_missing_run}$2"}
1254 AC_SUBST($1)])
1255
1256
1257 # AM_MISSING_HAS_RUN
1258 # ------------------
1259 # Define MISSING if not defined so far and test if it supports --run.
1260 # If it does, set am_missing_run to use it, otherwise, to nothing.
1261 AC_DEFUN([AM_MISSING_HAS_RUN],
1262 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1263 AC_REQUIRE_AUX_FILE([missing])dnl
1264 if test x"${MISSING+set}" != xset; then
1265 case $am_aux_dir in
1266 *\ * | *\ *)
1267 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1268 *)
1269 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1270 esac
1271 fi
1272 # Use eval to expand $SHELL
1273 if eval "$MISSING --run true"; then
1274 am_missing_run="$MISSING --run "
1275 else
1276 am_missing_run=
1277 AC_MSG_WARN([`missing' script is too old or missing])
1278 fi
1279 ])
1280
1281 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1282 #
1283 # This file is free software; the Free Software Foundation
1284 # gives unlimited permission to copy and/or distribute it,
1285 # with or without modifications, as long as this notice is preserved.
1286
1287 # AM_PROG_MKDIR_P
1288 # ---------------
1289 # Check for `mkdir -p'.
1290 AC_DEFUN([AM_PROG_MKDIR_P],
1291 [AC_PREREQ([2.60])dnl
1292 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1293 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1294 dnl while keeping a definition of mkdir_p for backward compatibility.
1295 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1296 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1297 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1298 dnl adjustment using top_builddir (which is defined more often than
1299 dnl MKDIR_P).
1300 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1301 case $mkdir_p in
1302 [[\\/$]]* | ?:[[\\/]]*) ;;
1303 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1304 esac
1305 ])
1306
1307 # Helper functions for option handling. -*- Autoconf -*-
1308
1309 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1310 #
1311 # This file is free software; the Free Software Foundation
1312 # gives unlimited permission to copy and/or distribute it,
1313 # with or without modifications, as long as this notice is preserved.
1314
1315 # serial 4
1316
1317 # _AM_MANGLE_OPTION(NAME)
1318 # -----------------------
1319 AC_DEFUN([_AM_MANGLE_OPTION],
1320 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1321
1322 # _AM_SET_OPTION(NAME)
1323 # ------------------------------
1324 # Set option NAME. Presently that only means defining a flag for this option.
1325 AC_DEFUN([_AM_SET_OPTION],
1326 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1327
1328 # _AM_SET_OPTIONS(OPTIONS)
1329 # ----------------------------------
1330 # OPTIONS is a space-separated list of Automake options.
1331 AC_DEFUN([_AM_SET_OPTIONS],
1332 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1333
1334 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1335 # -------------------------------------------
1336 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1337 AC_DEFUN([_AM_IF_OPTION],
1338 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1339
1340 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1341
1342 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1343 # Free Software Foundation, Inc.
1344 #
1345 # This file is free software; the Free Software Foundation
1346 # gives unlimited permission to copy and/or distribute it,
1347 # with or without modifications, as long as this notice is preserved.
1348
1349 # serial 5
1350
1351 # AM_SANITY_CHECK
1352 # ---------------
1353 AC_DEFUN([AM_SANITY_CHECK],
1354 [AC_MSG_CHECKING([whether build environment is sane])
1355 # Just in case
1356 sleep 1
1357 echo timestamp > conftest.file
1358 # Reject unsafe characters in $srcdir or the absolute working directory
1359 # name. Accept space and tab only in the latter.
1360 am_lf='
1361 '
1362 case `pwd` in
1363 *[[\\\"\#\$\&\'\`$am_lf]]*)
1364 AC_MSG_ERROR([unsafe absolute working directory name]);;
1365 esac
1366 case $srcdir in
1367 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1368 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1369 esac
1370
1371 # Do `set' in a subshell so we don't clobber the current shell's
1372 # arguments. Must try -L first in case configure is actually a
1373 # symlink; some systems play weird games with the mod time of symlinks
1374 # (eg FreeBSD returns the mod time of the symlink's containing
1375 # directory).
1376 if (
1377 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1378 if test "$[*]" = "X"; then
1379 # -L didn't work.
1380 set X `ls -t "$srcdir/configure" conftest.file`
1381 fi
1382 rm -f conftest.file
1383 if test "$[*]" != "X $srcdir/configure conftest.file" \
1384 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1385
1386 # If neither matched, then we have a broken ls. This can happen
1387 # if, for instance, CONFIG_SHELL is bash and it inherits a
1388 # broken ls alias from the environment. This has actually
1389 # happened. Such a system could not be considered "sane".
1390 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1391 alias in your environment])
1392 fi
1393
1394 test "$[2]" = conftest.file
1395 )
1396 then
1397 # Ok.
1398 :
1399 else
1400 AC_MSG_ERROR([newly created file is older than distributed files!
1401 Check your system clock])
1402 fi
1403 AC_MSG_RESULT(yes)])
1404
1405 # Copyright (C) 2009 Free Software Foundation, Inc.
1406 #
1407 # This file is free software; the Free Software Foundation
1408 # gives unlimited permission to copy and/or distribute it,
1409 # with or without modifications, as long as this notice is preserved.
1410
1411 # serial 1
1412
1413 # AM_SILENT_RULES([DEFAULT])
1414 # --------------------------
1415 # Enable less verbose build rules; with the default set to DEFAULT
1416 # (`yes' being less verbose, `no' or empty being verbose).
1417 AC_DEFUN([AM_SILENT_RULES],
1418 [AC_ARG_ENABLE([silent-rules],
1419 [ --enable-silent-rules less verbose build output (undo: `make V=1')
1420 --disable-silent-rules verbose build output (undo: `make V=0')])
1421 case $enable_silent_rules in
1422 yes) AM_DEFAULT_VERBOSITY=0;;
1423 no) AM_DEFAULT_VERBOSITY=1;;
1424 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1425 esac
1426 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1427 AM_BACKSLASH='\'
1428 AC_SUBST([AM_BACKSLASH])dnl
1429 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1430 ])
1431
1432 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1433 #
1434 # This file is free software; the Free Software Foundation
1435 # gives unlimited permission to copy and/or distribute it,
1436 # with or without modifications, as long as this notice is preserved.
1437
1438 # AM_PROG_INSTALL_STRIP
1439 # ---------------------
1440 # One issue with vendor `install' (even GNU) is that you can't
1441 # specify the program used to strip binaries. This is especially
1442 # annoying in cross-compiling environments, where the build's strip
1443 # is unlikely to handle the host's binaries.
1444 # Fortunately install-sh will honor a STRIPPROG variable, so we
1445 # always use install-sh in `make install-strip', and initialize
1446 # STRIPPROG with the value of the STRIP variable (set by the user).
1447 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1448 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1449 # Installed binaries are usually stripped using `strip' when the user
1450 # run `make install-strip'. However `strip' might not be the right
1451 # tool to use in cross-compilation environments, therefore Automake
1452 # will honor the `STRIP' environment variable to overrule this program.
1453 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1454 if test "$cross_compiling" != no; then
1455 AC_CHECK_TOOL([STRIP], [strip], :)
1456 fi
1457 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1458 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1459
1460 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1461 #
1462 # This file is free software; the Free Software Foundation
1463 # gives unlimited permission to copy and/or distribute it,
1464 # with or without modifications, as long as this notice is preserved.
1465
1466 # serial 2
1467
1468 # _AM_SUBST_NOTMAKE(VARIABLE)
1469 # ---------------------------
1470 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1471 # This macro is traced by Automake.
1472 AC_DEFUN([_AM_SUBST_NOTMAKE])
1473
1474 # AM_SUBST_NOTMAKE(VARIABLE)
1475 # ---------------------------
1476 # Public sister of _AM_SUBST_NOTMAKE.
1477 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1478
1479 # Check how to create a tarball. -*- Autoconf -*-
1480
1481 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1482 #
1483 # This file is free software; the Free Software Foundation
1484 # gives unlimited permission to copy and/or distribute it,
1485 # with or without modifications, as long as this notice is preserved.
1486
1487 # serial 2
1488
1489 # _AM_PROG_TAR(FORMAT)
1490 # --------------------
1491 # Check how to create a tarball in format FORMAT.
1492 # FORMAT should be one of `v7', `ustar', or `pax'.
1493 #
1494 # Substitute a variable $(am__tar) that is a command
1495 # writing to stdout a FORMAT-tarball containing the directory
1496 # $tardir.
1497 # tardir=directory && $(am__tar) > result.tar
1498 #
1499 # Substitute a variable $(am__untar) that extract such
1500 # a tarball read from stdin.
1501 # $(am__untar) < result.tar
1502 AC_DEFUN([_AM_PROG_TAR],
1503 [# Always define AMTAR for backward compatibility.
1504 AM_MISSING_PROG([AMTAR], [tar])
1505 m4_if([$1], [v7],
1506 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1507 [m4_case([$1], [ustar],, [pax],,
1508 [m4_fatal([Unknown tar format])])
1509 AC_MSG_CHECKING([how to create a $1 tar archive])
1510 # Loop over all known methods to create a tar archive until one works.
1511 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1512 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1513 # Do not fold the above two line into one, because Tru64 sh and
1514 # Solaris sh will not grok spaces in the rhs of `-'.
1515 for _am_tool in $_am_tools
1516 do
1517 case $_am_tool in
1518 gnutar)
1519 for _am_tar in tar gnutar gtar;
1520 do
1521 AM_RUN_LOG([$_am_tar --version]) && break
1522 done
1523 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1524 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1525 am__untar="$_am_tar -xf -"
1526 ;;
1527 plaintar)
1528 # Must skip GNU tar: if it does not support --format= it doesn't create
1529 # ustar tarball either.
1530 (tar --version) >/dev/null 2>&1 && continue
1531 am__tar='tar chf - "$$tardir"'
1532 am__tar_='tar chf - "$tardir"'
1533 am__untar='tar xf -'
1534 ;;
1535 pax)
1536 am__tar='pax -L -x $1 -w "$$tardir"'
1537 am__tar_='pax -L -x $1 -w "$tardir"'
1538 am__untar='pax -r'
1539 ;;
1540 cpio)
1541 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1542 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1543 am__untar='cpio -i -H $1 -d'
1544 ;;
1545 none)
1546 am__tar=false
1547 am__tar_=false
1548 am__untar=false
1549 ;;
1550 esac
1551
1552 # If the value was cached, stop now. We just wanted to have am__tar
1553 # and am__untar set.
1554 test -n "${am_cv_prog_tar_$1}" && break
1555
1556 # tar/untar a dummy directory, and stop if the command works
1557 rm -rf conftest.dir
1558 mkdir conftest.dir
1559 echo GrepMe > conftest.dir/file
1560 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1561 rm -rf conftest.dir
1562 if test -s conftest.tar; then
1563 AM_RUN_LOG([$am__untar <conftest.tar])
1564 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1565 fi
1566 done
1567 rm -rf conftest.dir
1568
1569 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1570 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1571 AC_SUBST([am__tar])
1572 AC_SUBST([am__untar])
1573 ]) # _AM_PROG_TAR
1574

  ViewVC Help
Powered by ViewVC 1.1.26