aclocal.m4 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060
  1. # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(AC_AUTOCONF_VERSION, [2.61],,
  14. [m4_warning([this file was generated for autoconf 2.61.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  18. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  19. #
  20. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  21. #
  22. # This program is free software; you can redistribute it and/or modify
  23. # it under the terms of the GNU General Public License as published by
  24. # the Free Software Foundation; either version 2 of the License, or
  25. # (at your option) any later version.
  26. #
  27. # This program is distributed in the hope that it will be useful, but
  28. # WITHOUT ANY WARRANTY; without even the implied warranty of
  29. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  30. # General Public License for more details.
  31. #
  32. # You should have received a copy of the GNU General Public License
  33. # along with this program; if not, write to the Free Software
  34. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  35. #
  36. # As a special exception to the GNU General Public License, if you
  37. # distribute this file as part of a program that contains a
  38. # configuration script generated by Autoconf, you may include it under
  39. # the same distribution terms that you use for the rest of that program.
  40. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  41. # ----------------------------------
  42. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  43. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  44. m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
  45. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
  46. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  47. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  48. fi
  49. if test -n "$PKG_CONFIG"; then
  50. _pkg_min_version=m4_default([$1], [0.9.0])
  51. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  52. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  53. AC_MSG_RESULT([yes])
  54. else
  55. AC_MSG_RESULT([no])
  56. PKG_CONFIG=""
  57. fi
  58. fi[]dnl
  59. ])# PKG_PROG_PKG_CONFIG
  60. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  61. #
  62. # Check to see whether a particular set of modules exists. Similar
  63. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  64. #
  65. #
  66. # Similar to PKG_CHECK_MODULES, make sure that the first instance of
  67. # this or PKG_CHECK_MODULES is called, or make sure to call
  68. # PKG_CHECK_EXISTS manually
  69. # --------------------------------------------------------------
  70. AC_DEFUN([PKG_CHECK_EXISTS],
  71. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  72. if test -n "$PKG_CONFIG" && \
  73. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  74. m4_ifval([$2], [$2], [:])
  75. m4_ifvaln([$3], [else
  76. $3])dnl
  77. fi])
  78. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  79. # ---------------------------------------------
  80. m4_define([_PKG_CONFIG],
  81. [if test -n "$PKG_CONFIG"; then
  82. if test -n "$$1"; then
  83. pkg_cv_[]$1="$$1"
  84. else
  85. PKG_CHECK_EXISTS([$3],
  86. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
  87. [pkg_failed=yes])
  88. fi
  89. else
  90. pkg_failed=untried
  91. fi[]dnl
  92. ])# _PKG_CONFIG
  93. # _PKG_SHORT_ERRORS_SUPPORTED
  94. # -----------------------------
  95. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  96. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  97. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  98. _pkg_short_errors_supported=yes
  99. else
  100. _pkg_short_errors_supported=no
  101. fi[]dnl
  102. ])# _PKG_SHORT_ERRORS_SUPPORTED
  103. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  104. # [ACTION-IF-NOT-FOUND])
  105. #
  106. #
  107. # Note that if there is a possibility the first call to
  108. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  109. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  110. #
  111. #
  112. # --------------------------------------------------------------
  113. AC_DEFUN([PKG_CHECK_MODULES],
  114. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  115. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  116. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  117. pkg_failed=no
  118. AC_MSG_CHECKING([for $1])
  119. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  120. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  121. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  122. and $1[]_LIBS to avoid the need to call pkg-config.
  123. See the pkg-config man page for more details.])
  124. if test $pkg_failed = yes; then
  125. _PKG_SHORT_ERRORS_SUPPORTED
  126. if test $_pkg_short_errors_supported = yes; then
  127. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
  128. else
  129. $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  130. fi
  131. # Put the nasty error message in config.log where it belongs
  132. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  133. ifelse([$4], , [AC_MSG_ERROR(dnl
  134. [Package requirements ($2) were not met:
  135. $$1_PKG_ERRORS
  136. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  137. installed software in a non-standard prefix.
  138. _PKG_TEXT
  139. ])],
  140. [AC_MSG_RESULT([no])
  141. $4])
  142. elif test $pkg_failed = untried; then
  143. ifelse([$4], , [AC_MSG_FAILURE(dnl
  144. [The pkg-config script could not be found or is too old. Make sure it
  145. is in your PATH or set the PKG_CONFIG environment variable to the full
  146. path to pkg-config.
  147. _PKG_TEXT
  148. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
  149. [$4])
  150. else
  151. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  152. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  153. AC_MSG_RESULT([yes])
  154. ifelse([$3], , :, [$3])
  155. fi[]dnl
  156. ])# PKG_CHECK_MODULES
  157. # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
  158. #
  159. # This file is free software; the Free Software Foundation
  160. # gives unlimited permission to copy and/or distribute it,
  161. # with or without modifications, as long as this notice is preserved.
  162. # AM_AUTOMAKE_VERSION(VERSION)
  163. # ----------------------------
  164. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  165. # generated from the m4 files accompanying Automake X.Y.
  166. # (This private macro should not be called outside this file.)
  167. AC_DEFUN([AM_AUTOMAKE_VERSION],
  168. [am__api_version='1.10'
  169. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  170. dnl require some minimum version. Point them to the right macro.
  171. m4_if([$1], [1.10.1], [],
  172. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  173. ])
  174. # _AM_AUTOCONF_VERSION(VERSION)
  175. # -----------------------------
  176. # aclocal traces this macro to find the Autoconf version.
  177. # This is a private macro too. Using m4_define simplifies
  178. # the logic in aclocal, which can simply ignore this definition.
  179. m4_define([_AM_AUTOCONF_VERSION], [])
  180. # AM_SET_CURRENT_AUTOMAKE_VERSION
  181. # -------------------------------
  182. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  183. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  184. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  185. [AM_AUTOMAKE_VERSION([1.10.1])dnl
  186. m4_ifndef([AC_AUTOCONF_VERSION],
  187. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  188. _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
  189. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  190. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  191. #
  192. # This file is free software; the Free Software Foundation
  193. # gives unlimited permission to copy and/or distribute it,
  194. # with or without modifications, as long as this notice is preserved.
  195. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  196. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  197. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  198. #
  199. # Of course, Automake must honor this variable whenever it calls a
  200. # tool from the auxiliary directory. The problem is that $srcdir (and
  201. # therefore $ac_aux_dir as well) can be either absolute or relative,
  202. # depending on how configure is run. This is pretty annoying, since
  203. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  204. # source directory, any form will work fine, but in subdirectories a
  205. # relative path needs to be adjusted first.
  206. #
  207. # $ac_aux_dir/missing
  208. # fails when called from a subdirectory if $ac_aux_dir is relative
  209. # $top_srcdir/$ac_aux_dir/missing
  210. # fails if $ac_aux_dir is absolute,
  211. # fails when called from a subdirectory in a VPATH build with
  212. # a relative $ac_aux_dir
  213. #
  214. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  215. # are both prefixed by $srcdir. In an in-source build this is usually
  216. # harmless because $srcdir is `.', but things will broke when you
  217. # start a VPATH build or use an absolute $srcdir.
  218. #
  219. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  220. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  221. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  222. # and then we would define $MISSING as
  223. # MISSING="\${SHELL} $am_aux_dir/missing"
  224. # This will work as long as MISSING is not called from configure, because
  225. # unfortunately $(top_srcdir) has no meaning in configure.
  226. # However there are other variables, like CC, which are often used in
  227. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  228. #
  229. # Another solution, used here, is to always expand $ac_aux_dir to an
  230. # absolute PATH. The drawback is that using absolute paths prevent a
  231. # configured tree to be moved without reconfiguration.
  232. AC_DEFUN([AM_AUX_DIR_EXPAND],
  233. [dnl Rely on autoconf to set up CDPATH properly.
  234. AC_PREREQ([2.50])dnl
  235. # expand $ac_aux_dir to an absolute path
  236. am_aux_dir=`cd $ac_aux_dir && pwd`
  237. ])
  238. # AM_CONDITIONAL -*- Autoconf -*-
  239. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
  240. # Free Software Foundation, Inc.
  241. #
  242. # This file is free software; the Free Software Foundation
  243. # gives unlimited permission to copy and/or distribute it,
  244. # with or without modifications, as long as this notice is preserved.
  245. # serial 8
  246. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  247. # -------------------------------------
  248. # Define a conditional.
  249. AC_DEFUN([AM_CONDITIONAL],
  250. [AC_PREREQ(2.52)dnl
  251. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  252. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  253. AC_SUBST([$1_TRUE])dnl
  254. AC_SUBST([$1_FALSE])dnl
  255. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  256. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  257. if $2; then
  258. $1_TRUE=
  259. $1_FALSE='#'
  260. else
  261. $1_TRUE='#'
  262. $1_FALSE=
  263. fi
  264. AC_CONFIG_COMMANDS_PRE(
  265. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  266. AC_MSG_ERROR([[conditional "$1" was never defined.
  267. Usually this means the macro was only invoked conditionally.]])
  268. fi])])
  269. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
  270. # Free Software Foundation, Inc.
  271. #
  272. # This file is free software; the Free Software Foundation
  273. # gives unlimited permission to copy and/or distribute it,
  274. # with or without modifications, as long as this notice is preserved.
  275. # serial 9
  276. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  277. # written in clear, in which case automake, when reading aclocal.m4,
  278. # will think it sees a *use*, and therefore will trigger all it's
  279. # C support machinery. Also note that it means that autoscan, seeing
  280. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  281. # _AM_DEPENDENCIES(NAME)
  282. # ----------------------
  283. # See how the compiler implements dependency checking.
  284. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  285. # We try a few techniques and use that to set a single cache variable.
  286. #
  287. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  288. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  289. # dependency, and given that the user is not expected to run this macro,
  290. # just rely on AC_PROG_CC.
  291. AC_DEFUN([_AM_DEPENDENCIES],
  292. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  293. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  294. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  295. AC_REQUIRE([AM_DEP_TRACK])dnl
  296. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  297. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  298. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  299. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  300. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  301. [depcc="$$1" am_compiler_list=])
  302. AC_CACHE_CHECK([dependency style of $depcc],
  303. [am_cv_$1_dependencies_compiler_type],
  304. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  305. # We make a subdir and do the tests there. Otherwise we can end up
  306. # making bogus files that we don't know about and never remove. For
  307. # instance it was reported that on HP-UX the gcc test will end up
  308. # making a dummy file named `D' -- because `-MD' means `put the output
  309. # in D'.
  310. mkdir conftest.dir
  311. # Copy depcomp to subdir because otherwise we won't find it if we're
  312. # using a relative directory.
  313. cp "$am_depcomp" conftest.dir
  314. cd conftest.dir
  315. # We will build objects and dependencies in a subdirectory because
  316. # it helps to detect inapplicable dependency modes. For instance
  317. # both Tru64's cc and ICC support -MD to output dependencies as a
  318. # side effect of compilation, but ICC will put the dependencies in
  319. # the current directory while Tru64 will put them in the object
  320. # directory.
  321. mkdir sub
  322. am_cv_$1_dependencies_compiler_type=none
  323. if test "$am_compiler_list" = ""; then
  324. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  325. fi
  326. for depmode in $am_compiler_list; do
  327. # Setup a source with many dependencies, because some compilers
  328. # like to wrap large dependency lists on column 80 (with \), and
  329. # we should not choose a depcomp mode which is confused by this.
  330. #
  331. # We need to recreate these files for each test, as the compiler may
  332. # overwrite some of them when testing with obscure command lines.
  333. # This happens at least with the AIX C compiler.
  334. : > sub/conftest.c
  335. for i in 1 2 3 4 5 6; do
  336. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  337. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  338. # Solaris 8's {/usr,}/bin/sh.
  339. touch sub/conftst$i.h
  340. done
  341. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  342. case $depmode in
  343. nosideeffect)
  344. # after this tag, mechanisms are not by side-effect, so they'll
  345. # only be used when explicitly requested
  346. if test "x$enable_dependency_tracking" = xyes; then
  347. continue
  348. else
  349. break
  350. fi
  351. ;;
  352. none) break ;;
  353. esac
  354. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  355. # mode. It turns out that the SunPro C++ compiler does not properly
  356. # handle `-M -o', and we need to detect this.
  357. if depmode=$depmode \
  358. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  359. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  360. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  361. >/dev/null 2>conftest.err &&
  362. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  363. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  364. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  365. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  366. # icc doesn't choke on unknown options, it will just issue warnings
  367. # or remarks (even with -Werror). So we grep stderr for any message
  368. # that says an option was ignored or not supported.
  369. # When given -MP, icc 7.0 and 7.1 complain thusly:
  370. # icc: Command line warning: ignoring option '-M'; no argument required
  371. # The diagnosis changed in icc 8.0:
  372. # icc: Command line remark: option '-MP' not supported
  373. if (grep 'ignoring option' conftest.err ||
  374. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  375. am_cv_$1_dependencies_compiler_type=$depmode
  376. break
  377. fi
  378. fi
  379. done
  380. cd ..
  381. rm -rf conftest.dir
  382. else
  383. am_cv_$1_dependencies_compiler_type=none
  384. fi
  385. ])
  386. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  387. AM_CONDITIONAL([am__fastdep$1], [
  388. test "x$enable_dependency_tracking" != xno \
  389. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  390. ])
  391. # AM_SET_DEPDIR
  392. # -------------
  393. # Choose a directory name for dependency files.
  394. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  395. AC_DEFUN([AM_SET_DEPDIR],
  396. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  397. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  398. ])
  399. # AM_DEP_TRACK
  400. # ------------
  401. AC_DEFUN([AM_DEP_TRACK],
  402. [AC_ARG_ENABLE(dependency-tracking,
  403. [ --disable-dependency-tracking speeds up one-time build
  404. --enable-dependency-tracking do not reject slow dependency extractors])
  405. if test "x$enable_dependency_tracking" != xno; then
  406. am_depcomp="$ac_aux_dir/depcomp"
  407. AMDEPBACKSLASH='\'
  408. fi
  409. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  410. AC_SUBST([AMDEPBACKSLASH])dnl
  411. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  412. ])
  413. # Generate code to set up dependency tracking. -*- Autoconf -*-
  414. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  415. # Free Software Foundation, Inc.
  416. #
  417. # This file is free software; the Free Software Foundation
  418. # gives unlimited permission to copy and/or distribute it,
  419. # with or without modifications, as long as this notice is preserved.
  420. #serial 3
  421. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  422. # ------------------------------
  423. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  424. [for mf in $CONFIG_FILES; do
  425. # Strip MF so we end up with the name of the file.
  426. mf=`echo "$mf" | sed -e 's/:.*$//'`
  427. # Check whether this is an Automake generated Makefile or not.
  428. # We used to match only the files named `Makefile.in', but
  429. # some people rename them; so instead we look at the file content.
  430. # Grep'ing the first line is not enough: some people post-process
  431. # each Makefile.in and add a new line on top of each file to say so.
  432. # Grep'ing the whole file is not good either: AIX grep has a line
  433. # limit of 2048, but all sed's we know have understand at least 4000.
  434. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  435. dirpart=`AS_DIRNAME("$mf")`
  436. else
  437. continue
  438. fi
  439. # Extract the definition of DEPDIR, am__include, and am__quote
  440. # from the Makefile without running `make'.
  441. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  442. test -z "$DEPDIR" && continue
  443. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  444. test -z "am__include" && continue
  445. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  446. # When using ansi2knr, U may be empty or an underscore; expand it
  447. U=`sed -n 's/^U = //p' < "$mf"`
  448. # Find all dependency output files, they are included files with
  449. # $(DEPDIR) in their names. We invoke sed twice because it is the
  450. # simplest approach to changing $(DEPDIR) to its actual value in the
  451. # expansion.
  452. for file in `sed -n "
  453. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  454. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  455. # Make sure the directory exists.
  456. test -f "$dirpart/$file" && continue
  457. fdir=`AS_DIRNAME(["$file"])`
  458. AS_MKDIR_P([$dirpart/$fdir])
  459. # echo "creating $dirpart/$file"
  460. echo '# dummy' > "$dirpart/$file"
  461. done
  462. done
  463. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  464. # AM_OUTPUT_DEPENDENCY_COMMANDS
  465. # -----------------------------
  466. # This macro should only be invoked once -- use via AC_REQUIRE.
  467. #
  468. # This code is only required when automatic dependency tracking
  469. # is enabled. FIXME. This creates each `.P' file that we will
  470. # need in order to bootstrap the dependency handling code.
  471. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  472. [AC_CONFIG_COMMANDS([depfiles],
  473. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  474. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  475. ])
  476. # Do all the work for Automake. -*- Autoconf -*-
  477. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  478. # 2005, 2006, 2008 Free Software Foundation, Inc.
  479. #
  480. # This file is free software; the Free Software Foundation
  481. # gives unlimited permission to copy and/or distribute it,
  482. # with or without modifications, as long as this notice is preserved.
  483. # serial 13
  484. # This macro actually does too much. Some checks are only needed if
  485. # your package does certain things. But this isn't really a big deal.
  486. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  487. # AM_INIT_AUTOMAKE([OPTIONS])
  488. # -----------------------------------------------
  489. # The call with PACKAGE and VERSION arguments is the old style
  490. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  491. # and VERSION should now be passed to AC_INIT and removed from
  492. # the call to AM_INIT_AUTOMAKE.
  493. # We support both call styles for the transition. After
  494. # the next Automake release, Autoconf can make the AC_INIT
  495. # arguments mandatory, and then we can depend on a new Autoconf
  496. # release and drop the old call support.
  497. AC_DEFUN([AM_INIT_AUTOMAKE],
  498. [AC_PREREQ([2.60])dnl
  499. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  500. dnl the ones we care about.
  501. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  502. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  503. AC_REQUIRE([AC_PROG_INSTALL])dnl
  504. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  505. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  506. # is not polluted with repeated "-I."
  507. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  508. # test to see if srcdir already configured
  509. if test -f $srcdir/config.status; then
  510. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  511. fi
  512. fi
  513. # test whether we have cygpath
  514. if test -z "$CYGPATH_W"; then
  515. if (cygpath --version) >/dev/null 2>/dev/null; then
  516. CYGPATH_W='cygpath -w'
  517. else
  518. CYGPATH_W=echo
  519. fi
  520. fi
  521. AC_SUBST([CYGPATH_W])
  522. # Define the identity of the package.
  523. dnl Distinguish between old-style and new-style calls.
  524. m4_ifval([$2],
  525. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  526. AC_SUBST([PACKAGE], [$1])dnl
  527. AC_SUBST([VERSION], [$2])],
  528. [_AM_SET_OPTIONS([$1])dnl
  529. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  530. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  531. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  532. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  533. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  534. _AM_IF_OPTION([no-define],,
  535. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  536. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  537. # Some tools Automake needs.
  538. AC_REQUIRE([AM_SANITY_CHECK])dnl
  539. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  540. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  541. AM_MISSING_PROG(AUTOCONF, autoconf)
  542. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  543. AM_MISSING_PROG(AUTOHEADER, autoheader)
  544. AM_MISSING_PROG(MAKEINFO, makeinfo)
  545. AM_PROG_INSTALL_SH
  546. AM_PROG_INSTALL_STRIP
  547. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  548. # We need awk for the "check" target. The system "awk" is bad on
  549. # some platforms.
  550. AC_REQUIRE([AC_PROG_AWK])dnl
  551. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  552. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  553. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  554. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  555. [_AM_PROG_TAR([v7])])])
  556. _AM_IF_OPTION([no-dependencies],,
  557. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  558. [_AM_DEPENDENCIES(CC)],
  559. [define([AC_PROG_CC],
  560. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  561. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  562. [_AM_DEPENDENCIES(CXX)],
  563. [define([AC_PROG_CXX],
  564. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  565. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  566. [_AM_DEPENDENCIES(OBJC)],
  567. [define([AC_PROG_OBJC],
  568. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  569. ])
  570. ])
  571. # When config.status generates a header, we must update the stamp-h file.
  572. # This file resides in the same directory as the config header
  573. # that is generated. The stamp files are numbered to have different names.
  574. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  575. # loop where config.status creates the headers, so we can generate
  576. # our stamp files there.
  577. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  578. [# Compute $1's index in $config_headers.
  579. _am_arg=$1
  580. _am_stamp_count=1
  581. for _am_header in $config_headers :; do
  582. case $_am_header in
  583. $_am_arg | $_am_arg:* )
  584. break ;;
  585. * )
  586. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  587. esac
  588. done
  589. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  590. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  591. #
  592. # This file is free software; the Free Software Foundation
  593. # gives unlimited permission to copy and/or distribute it,
  594. # with or without modifications, as long as this notice is preserved.
  595. # AM_PROG_INSTALL_SH
  596. # ------------------
  597. # Define $install_sh.
  598. AC_DEFUN([AM_PROG_INSTALL_SH],
  599. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  600. install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  601. AC_SUBST(install_sh)])
  602. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  603. #
  604. # This file is free software; the Free Software Foundation
  605. # gives unlimited permission to copy and/or distribute it,
  606. # with or without modifications, as long as this notice is preserved.
  607. # serial 2
  608. # Check whether the underlying file-system supports filenames
  609. # with a leading dot. For instance MS-DOS doesn't.
  610. AC_DEFUN([AM_SET_LEADING_DOT],
  611. [rm -rf .tst 2>/dev/null
  612. mkdir .tst 2>/dev/null
  613. if test -d .tst; then
  614. am__leading_dot=.
  615. else
  616. am__leading_dot=_
  617. fi
  618. rmdir .tst 2>/dev/null
  619. AC_SUBST([am__leading_dot])])
  620. # Check to see how 'make' treats includes. -*- Autoconf -*-
  621. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  622. #
  623. # This file is free software; the Free Software Foundation
  624. # gives unlimited permission to copy and/or distribute it,
  625. # with or without modifications, as long as this notice is preserved.
  626. # serial 3
  627. # AM_MAKE_INCLUDE()
  628. # -----------------
  629. # Check to see how make treats includes.
  630. AC_DEFUN([AM_MAKE_INCLUDE],
  631. [am_make=${MAKE-make}
  632. cat > confinc << 'END'
  633. am__doit:
  634. @echo done
  635. .PHONY: am__doit
  636. END
  637. # If we don't find an include directive, just comment out the code.
  638. AC_MSG_CHECKING([for style of include used by $am_make])
  639. am__include="#"
  640. am__quote=
  641. _am_result=none
  642. # First try GNU make style include.
  643. echo "include confinc" > confmf
  644. # We grep out `Entering directory' and `Leaving directory'
  645. # messages which can occur if `w' ends up in MAKEFLAGS.
  646. # In particular we don't look at `^make:' because GNU make might
  647. # be invoked under some other name (usually "gmake"), in which
  648. # case it prints its new name instead of `make'.
  649. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  650. am__include=include
  651. am__quote=
  652. _am_result=GNU
  653. fi
  654. # Now try BSD make style include.
  655. if test "$am__include" = "#"; then
  656. echo '.include "confinc"' > confmf
  657. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  658. am__include=.include
  659. am__quote="\""
  660. _am_result=BSD
  661. fi
  662. fi
  663. AC_SUBST([am__include])
  664. AC_SUBST([am__quote])
  665. AC_MSG_RESULT([$_am_result])
  666. rm -f confinc confmf
  667. ])
  668. # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
  669. # Free Software Foundation, Inc.
  670. #
  671. # This file is free software; the Free Software Foundation
  672. # gives unlimited permission to copy and/or distribute it,
  673. # with or without modifications, as long as this notice is preserved.
  674. # serial 5
  675. # AM_PROG_CC_C_O
  676. # --------------
  677. # Like AC_PROG_CC_C_O, but changed for automake.
  678. AC_DEFUN([AM_PROG_CC_C_O],
  679. [AC_REQUIRE([AC_PROG_CC_C_O])dnl
  680. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  681. AC_REQUIRE_AUX_FILE([compile])dnl
  682. # FIXME: we rely on the cache variable name because
  683. # there is no other way.
  684. set dummy $CC
  685. ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
  686. if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
  687. # Losing compiler, so override with the script.
  688. # FIXME: It is wrong to rewrite CC.
  689. # But if we don't then we get into trouble of one sort or another.
  690. # A longer-term fix would be to have automake use am__CC in this case,
  691. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  692. CC="$am_aux_dir/compile $CC"
  693. fi
  694. dnl Make sure AC_PROG_CC is never called again, or it will override our
  695. dnl setting of CC.
  696. m4_define([AC_PROG_CC],
  697. [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
  698. ])
  699. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  700. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
  701. # Free Software Foundation, Inc.
  702. #
  703. # This file is free software; the Free Software Foundation
  704. # gives unlimited permission to copy and/or distribute it,
  705. # with or without modifications, as long as this notice is preserved.
  706. # serial 5
  707. # AM_MISSING_PROG(NAME, PROGRAM)
  708. # ------------------------------
  709. AC_DEFUN([AM_MISSING_PROG],
  710. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  711. $1=${$1-"${am_missing_run}$2"}
  712. AC_SUBST($1)])
  713. # AM_MISSING_HAS_RUN
  714. # ------------------
  715. # Define MISSING if not defined so far and test if it supports --run.
  716. # If it does, set am_missing_run to use it, otherwise, to nothing.
  717. AC_DEFUN([AM_MISSING_HAS_RUN],
  718. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  719. AC_REQUIRE_AUX_FILE([missing])dnl
  720. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  721. # Use eval to expand $SHELL
  722. if eval "$MISSING --run true"; then
  723. am_missing_run="$MISSING --run "
  724. else
  725. am_missing_run=
  726. AC_MSG_WARN([`missing' script is too old or missing])
  727. fi
  728. ])
  729. # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  730. #
  731. # This file is free software; the Free Software Foundation
  732. # gives unlimited permission to copy and/or distribute it,
  733. # with or without modifications, as long as this notice is preserved.
  734. # AM_PROG_MKDIR_P
  735. # ---------------
  736. # Check for `mkdir -p'.
  737. AC_DEFUN([AM_PROG_MKDIR_P],
  738. [AC_PREREQ([2.60])dnl
  739. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  740. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  741. dnl while keeping a definition of mkdir_p for backward compatibility.
  742. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  743. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  744. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  745. dnl adjustment using top_builddir (which is defined more often than
  746. dnl MKDIR_P).
  747. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  748. case $mkdir_p in
  749. [[\\/$]]* | ?:[[\\/]]*) ;;
  750. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  751. esac
  752. ])
  753. # Helper functions for option handling. -*- Autoconf -*-
  754. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  755. #
  756. # This file is free software; the Free Software Foundation
  757. # gives unlimited permission to copy and/or distribute it,
  758. # with or without modifications, as long as this notice is preserved.
  759. # serial 3
  760. # _AM_MANGLE_OPTION(NAME)
  761. # -----------------------
  762. AC_DEFUN([_AM_MANGLE_OPTION],
  763. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  764. # _AM_SET_OPTION(NAME)
  765. # ------------------------------
  766. # Set option NAME. Presently that only means defining a flag for this option.
  767. AC_DEFUN([_AM_SET_OPTION],
  768. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  769. # _AM_SET_OPTIONS(OPTIONS)
  770. # ----------------------------------
  771. # OPTIONS is a space-separated list of Automake options.
  772. AC_DEFUN([_AM_SET_OPTIONS],
  773. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  774. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  775. # -------------------------------------------
  776. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  777. AC_DEFUN([_AM_IF_OPTION],
  778. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  779. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  780. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  781. # Free Software Foundation, Inc.
  782. #
  783. # This file is free software; the Free Software Foundation
  784. # gives unlimited permission to copy and/or distribute it,
  785. # with or without modifications, as long as this notice is preserved.
  786. # serial 4
  787. # AM_SANITY_CHECK
  788. # ---------------
  789. AC_DEFUN([AM_SANITY_CHECK],
  790. [AC_MSG_CHECKING([whether build environment is sane])
  791. # Just in case
  792. sleep 1
  793. echo timestamp > conftest.file
  794. # Do `set' in a subshell so we don't clobber the current shell's
  795. # arguments. Must try -L first in case configure is actually a
  796. # symlink; some systems play weird games with the mod time of symlinks
  797. # (eg FreeBSD returns the mod time of the symlink's containing
  798. # directory).
  799. if (
  800. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  801. if test "$[*]" = "X"; then
  802. # -L didn't work.
  803. set X `ls -t $srcdir/configure conftest.file`
  804. fi
  805. rm -f conftest.file
  806. if test "$[*]" != "X $srcdir/configure conftest.file" \
  807. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  808. # If neither matched, then we have a broken ls. This can happen
  809. # if, for instance, CONFIG_SHELL is bash and it inherits a
  810. # broken ls alias from the environment. This has actually
  811. # happened. Such a system could not be considered "sane".
  812. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  813. alias in your environment])
  814. fi
  815. test "$[2]" = conftest.file
  816. )
  817. then
  818. # Ok.
  819. :
  820. else
  821. AC_MSG_ERROR([newly created file is older than distributed files!
  822. Check your system clock])
  823. fi
  824. AC_MSG_RESULT(yes)])
  825. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  826. #
  827. # This file is free software; the Free Software Foundation
  828. # gives unlimited permission to copy and/or distribute it,
  829. # with or without modifications, as long as this notice is preserved.
  830. # AM_PROG_INSTALL_STRIP
  831. # ---------------------
  832. # One issue with vendor `install' (even GNU) is that you can't
  833. # specify the program used to strip binaries. This is especially
  834. # annoying in cross-compiling environments, where the build's strip
  835. # is unlikely to handle the host's binaries.
  836. # Fortunately install-sh will honor a STRIPPROG variable, so we
  837. # always use install-sh in `make install-strip', and initialize
  838. # STRIPPROG with the value of the STRIP variable (set by the user).
  839. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  840. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  841. # Installed binaries are usually stripped using `strip' when the user
  842. # run `make install-strip'. However `strip' might not be the right
  843. # tool to use in cross-compilation environments, therefore Automake
  844. # will honor the `STRIP' environment variable to overrule this program.
  845. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  846. if test "$cross_compiling" != no; then
  847. AC_CHECK_TOOL([STRIP], [strip], :)
  848. fi
  849. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  850. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  851. # Copyright (C) 2006 Free Software Foundation, Inc.
  852. #
  853. # This file is free software; the Free Software Foundation
  854. # gives unlimited permission to copy and/or distribute it,
  855. # with or without modifications, as long as this notice is preserved.
  856. # _AM_SUBST_NOTMAKE(VARIABLE)
  857. # ---------------------------
  858. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  859. # This macro is traced by Automake.
  860. AC_DEFUN([_AM_SUBST_NOTMAKE])
  861. # Check how to create a tarball. -*- Autoconf -*-
  862. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  863. #
  864. # This file is free software; the Free Software Foundation
  865. # gives unlimited permission to copy and/or distribute it,
  866. # with or without modifications, as long as this notice is preserved.
  867. # serial 2
  868. # _AM_PROG_TAR(FORMAT)
  869. # --------------------
  870. # Check how to create a tarball in format FORMAT.
  871. # FORMAT should be one of `v7', `ustar', or `pax'.
  872. #
  873. # Substitute a variable $(am__tar) that is a command
  874. # writing to stdout a FORMAT-tarball containing the directory
  875. # $tardir.
  876. # tardir=directory && $(am__tar) > result.tar
  877. #
  878. # Substitute a variable $(am__untar) that extract such
  879. # a tarball read from stdin.
  880. # $(am__untar) < result.tar
  881. AC_DEFUN([_AM_PROG_TAR],
  882. [# Always define AMTAR for backward compatibility.
  883. AM_MISSING_PROG([AMTAR], [tar])
  884. m4_if([$1], [v7],
  885. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  886. [m4_case([$1], [ustar],, [pax],,
  887. [m4_fatal([Unknown tar format])])
  888. AC_MSG_CHECKING([how to create a $1 tar archive])
  889. # Loop over all known methods to create a tar archive until one works.
  890. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  891. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  892. # Do not fold the above two line into one, because Tru64 sh and
  893. # Solaris sh will not grok spaces in the rhs of `-'.
  894. for _am_tool in $_am_tools
  895. do
  896. case $_am_tool in
  897. gnutar)
  898. for _am_tar in tar gnutar gtar;
  899. do
  900. AM_RUN_LOG([$_am_tar --version]) && break
  901. done
  902. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  903. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  904. am__untar="$_am_tar -xf -"
  905. ;;
  906. plaintar)
  907. # Must skip GNU tar: if it does not support --format= it doesn't create
  908. # ustar tarball either.
  909. (tar --version) >/dev/null 2>&1 && continue
  910. am__tar='tar chf - "$$tardir"'
  911. am__tar_='tar chf - "$tardir"'
  912. am__untar='tar xf -'
  913. ;;
  914. pax)
  915. am__tar='pax -L -x $1 -w "$$tardir"'
  916. am__tar_='pax -L -x $1 -w "$tardir"'
  917. am__untar='pax -r'
  918. ;;
  919. cpio)
  920. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  921. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  922. am__untar='cpio -i -H $1 -d'
  923. ;;
  924. none)
  925. am__tar=false
  926. am__tar_=false
  927. am__untar=false
  928. ;;
  929. esac
  930. # If the value was cached, stop now. We just wanted to have am__tar
  931. # and am__untar set.
  932. test -n "${am_cv_prog_tar_$1}" && break
  933. # tar/untar a dummy directory, and stop if the command works
  934. rm -rf conftest.dir
  935. mkdir conftest.dir
  936. echo GrepMe > conftest.dir/file
  937. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  938. rm -rf conftest.dir
  939. if test -s conftest.tar; then
  940. AM_RUN_LOG([$am__untar <conftest.tar])
  941. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  942. fi
  943. done
  944. rm -rf conftest.dir
  945. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  946. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  947. AC_SUBST([am__tar])
  948. AC_SUBST([am__untar])
  949. ]) # _AM_PROG_TAR