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

  ViewVC Help
Powered by ViewVC 1.1.26