aclocal.m4 33 KB

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