aclocal.m4 31 KB

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