aclocal.m4 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  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. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  333. # Free Software Foundation, Inc.
  334. #
  335. # This file is free software; the Free Software Foundation
  336. # gives unlimited permission to copy and/or distribute it,
  337. # with or without modifications, as long as this notice is preserved.
  338. # serial 8
  339. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  340. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  341. # Do all the work for Automake. -*- Autoconf -*-
  342. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  343. # 2005, 2006 Free Software Foundation, Inc.
  344. #
  345. # This file is free software; the Free Software Foundation
  346. # gives unlimited permission to copy and/or distribute it,
  347. # with or without modifications, as long as this notice is preserved.
  348. # serial 12
  349. # This macro actually does too much. Some checks are only needed if
  350. # your package does certain things. But this isn't really a big deal.
  351. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  352. # AM_INIT_AUTOMAKE([OPTIONS])
  353. # -----------------------------------------------
  354. # The call with PACKAGE and VERSION arguments is the old style
  355. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  356. # and VERSION should now be passed to AC_INIT and removed from
  357. # the call to AM_INIT_AUTOMAKE.
  358. # We support both call styles for the transition. After
  359. # the next Automake release, Autoconf can make the AC_INIT
  360. # arguments mandatory, and then we can depend on a new Autoconf
  361. # release and drop the old call support.
  362. AC_DEFUN([AM_INIT_AUTOMAKE],
  363. [AC_PREREQ([2.60])dnl
  364. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  365. dnl the ones we care about.
  366. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  367. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  368. AC_REQUIRE([AC_PROG_INSTALL])dnl
  369. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  370. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  371. # is not polluted with repeated "-I."
  372. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  373. # test to see if srcdir already configured
  374. if test -f $srcdir/config.status; then
  375. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  376. fi
  377. fi
  378. # test whether we have cygpath
  379. if test -z "$CYGPATH_W"; then
  380. if (cygpath --version) >/dev/null 2>/dev/null; then
  381. CYGPATH_W='cygpath -w'
  382. else
  383. CYGPATH_W=echo
  384. fi
  385. fi
  386. AC_SUBST([CYGPATH_W])
  387. # Define the identity of the package.
  388. dnl Distinguish between old-style and new-style calls.
  389. m4_ifval([$2],
  390. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  391. AC_SUBST([PACKAGE], [$1])dnl
  392. AC_SUBST([VERSION], [$2])],
  393. [_AM_SET_OPTIONS([$1])dnl
  394. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  395. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  396. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  397. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  398. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  399. _AM_IF_OPTION([no-define],,
  400. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  401. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  402. # Some tools Automake needs.
  403. AC_REQUIRE([AM_SANITY_CHECK])dnl
  404. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  405. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  406. AM_MISSING_PROG(AUTOCONF, autoconf)
  407. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  408. AM_MISSING_PROG(AUTOHEADER, autoheader)
  409. AM_MISSING_PROG(MAKEINFO, makeinfo)
  410. AM_PROG_INSTALL_SH
  411. AM_PROG_INSTALL_STRIP
  412. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  413. # We need awk for the "check" target. The system "awk" is bad on
  414. # some platforms.
  415. AC_REQUIRE([AC_PROG_AWK])dnl
  416. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  417. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  418. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  419. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  420. [_AM_PROG_TAR([v7])])])
  421. _AM_IF_OPTION([no-dependencies],,
  422. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  423. [_AM_DEPENDENCIES(CC)],
  424. [define([AC_PROG_CC],
  425. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  426. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  427. [_AM_DEPENDENCIES(CXX)],
  428. [define([AC_PROG_CXX],
  429. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  430. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  431. [_AM_DEPENDENCIES(OBJC)],
  432. [define([AC_PROG_OBJC],
  433. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  434. ])
  435. ])
  436. # When config.status generates a header, we must update the stamp-h file.
  437. # This file resides in the same directory as the config header
  438. # that is generated. The stamp files are numbered to have different names.
  439. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  440. # loop where config.status creates the headers, so we can generate
  441. # our stamp files there.
  442. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  443. [# Compute $1's index in $config_headers.
  444. _am_stamp_count=1
  445. for _am_header in $config_headers :; do
  446. case $_am_header in
  447. $1 | $1:* )
  448. break ;;
  449. * )
  450. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  451. esac
  452. done
  453. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  454. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  455. #
  456. # This file is free software; the Free Software Foundation
  457. # gives unlimited permission to copy and/or distribute it,
  458. # with or without modifications, as long as this notice is preserved.
  459. # AM_PROG_INSTALL_SH
  460. # ------------------
  461. # Define $install_sh.
  462. AC_DEFUN([AM_PROG_INSTALL_SH],
  463. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  464. install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  465. AC_SUBST(install_sh)])
  466. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  467. #
  468. # This file is free software; the Free Software Foundation
  469. # gives unlimited permission to copy and/or distribute it,
  470. # with or without modifications, as long as this notice is preserved.
  471. # serial 2
  472. # Check whether the underlying file-system supports filenames
  473. # with a leading dot. For instance MS-DOS doesn't.
  474. AC_DEFUN([AM_SET_LEADING_DOT],
  475. [rm -rf .tst 2>/dev/null
  476. mkdir .tst 2>/dev/null
  477. if test -d .tst; then
  478. am__leading_dot=.
  479. else
  480. am__leading_dot=_
  481. fi
  482. rmdir .tst 2>/dev/null
  483. AC_SUBST([am__leading_dot])])
  484. # Check to see how 'make' treats includes. -*- Autoconf -*-
  485. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  486. #
  487. # This file is free software; the Free Software Foundation
  488. # gives unlimited permission to copy and/or distribute it,
  489. # with or without modifications, as long as this notice is preserved.
  490. # serial 3
  491. # AM_MAKE_INCLUDE()
  492. # -----------------
  493. # Check to see how make treats includes.
  494. AC_DEFUN([AM_MAKE_INCLUDE],
  495. [am_make=${MAKE-make}
  496. cat > confinc << 'END'
  497. am__doit:
  498. @echo done
  499. .PHONY: am__doit
  500. END
  501. # If we don't find an include directive, just comment out the code.
  502. AC_MSG_CHECKING([for style of include used by $am_make])
  503. am__include="#"
  504. am__quote=
  505. _am_result=none
  506. # First try GNU make style include.
  507. echo "include confinc" > confmf
  508. # We grep out `Entering directory' and `Leaving directory'
  509. # messages which can occur if `w' ends up in MAKEFLAGS.
  510. # In particular we don't look at `^make:' because GNU make might
  511. # be invoked under some other name (usually "gmake"), in which
  512. # case it prints its new name instead of `make'.
  513. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  514. am__include=include
  515. am__quote=
  516. _am_result=GNU
  517. fi
  518. # Now try BSD make style include.
  519. if test "$am__include" = "#"; then
  520. echo '.include "confinc"' > confmf
  521. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  522. am__include=.include
  523. am__quote="\""
  524. _am_result=BSD
  525. fi
  526. fi
  527. AC_SUBST([am__include])
  528. AC_SUBST([am__quote])
  529. AC_MSG_RESULT([$_am_result])
  530. rm -f confinc confmf
  531. ])
  532. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  533. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
  534. # Free Software Foundation, Inc.
  535. #
  536. # This file is free software; the Free Software Foundation
  537. # gives unlimited permission to copy and/or distribute it,
  538. # with or without modifications, as long as this notice is preserved.
  539. # serial 5
  540. # AM_MISSING_PROG(NAME, PROGRAM)
  541. # ------------------------------
  542. AC_DEFUN([AM_MISSING_PROG],
  543. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  544. $1=${$1-"${am_missing_run}$2"}
  545. AC_SUBST($1)])
  546. # AM_MISSING_HAS_RUN
  547. # ------------------
  548. # Define MISSING if not defined so far and test if it supports --run.
  549. # If it does, set am_missing_run to use it, otherwise, to nothing.
  550. AC_DEFUN([AM_MISSING_HAS_RUN],
  551. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  552. AC_REQUIRE_AUX_FILE([missing])dnl
  553. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  554. # Use eval to expand $SHELL
  555. if eval "$MISSING --run true"; then
  556. am_missing_run="$MISSING --run "
  557. else
  558. am_missing_run=
  559. AC_MSG_WARN([`missing' script is too old or missing])
  560. fi
  561. ])
  562. # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  563. #
  564. # This file is free software; the Free Software Foundation
  565. # gives unlimited permission to copy and/or distribute it,
  566. # with or without modifications, as long as this notice is preserved.
  567. # AM_PROG_MKDIR_P
  568. # ---------------
  569. # Check for `mkdir -p'.
  570. AC_DEFUN([AM_PROG_MKDIR_P],
  571. [AC_PREREQ([2.60])dnl
  572. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  573. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  574. dnl while keeping a definition of mkdir_p for backward compatibility.
  575. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  576. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  577. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  578. dnl adjustment using top_builddir (which is defined more often than
  579. dnl MKDIR_P).
  580. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  581. case $mkdir_p in
  582. [[\\/$]]* | ?:[[\\/]]*) ;;
  583. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  584. esac
  585. ])
  586. # Helper functions for option handling. -*- Autoconf -*-
  587. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  588. #
  589. # This file is free software; the Free Software Foundation
  590. # gives unlimited permission to copy and/or distribute it,
  591. # with or without modifications, as long as this notice is preserved.
  592. # serial 3
  593. # _AM_MANGLE_OPTION(NAME)
  594. # -----------------------
  595. AC_DEFUN([_AM_MANGLE_OPTION],
  596. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  597. # _AM_SET_OPTION(NAME)
  598. # ------------------------------
  599. # Set option NAME. Presently that only means defining a flag for this option.
  600. AC_DEFUN([_AM_SET_OPTION],
  601. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  602. # _AM_SET_OPTIONS(OPTIONS)
  603. # ----------------------------------
  604. # OPTIONS is a space-separated list of Automake options.
  605. AC_DEFUN([_AM_SET_OPTIONS],
  606. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  607. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  608. # -------------------------------------------
  609. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  610. AC_DEFUN([_AM_IF_OPTION],
  611. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  612. # Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
  613. # Free Software Foundation, Inc.
  614. #
  615. # This file is free software; the Free Software Foundation
  616. # gives unlimited permission to copy and/or distribute it,
  617. # with or without modifications, as long as this notice is preserved.
  618. # serial 5
  619. AC_DEFUN([AM_C_PROTOTYPES],
  620. [AC_REQUIRE([AC_C_PROTOTYPES])
  621. if test "$ac_cv_prog_cc_stdc" != no; then
  622. U= ANSI2KNR=
  623. else
  624. U=_ ANSI2KNR=./ansi2knr
  625. fi
  626. # Ensure some checks needed by ansi2knr itself.
  627. AC_REQUIRE([AC_HEADER_STDC])
  628. AC_CHECK_HEADERS([string.h])
  629. AC_SUBST([U])dnl
  630. AC_SUBST([ANSI2KNR])dnl
  631. _AM_SUBST_NOTMAKE([ANSI2KNR])dnl
  632. ])
  633. AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
  634. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  635. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  636. # Free Software Foundation, Inc.
  637. #
  638. # This file is free software; the Free Software Foundation
  639. # gives unlimited permission to copy and/or distribute it,
  640. # with or without modifications, as long as this notice is preserved.
  641. # serial 4
  642. # AM_SANITY_CHECK
  643. # ---------------
  644. AC_DEFUN([AM_SANITY_CHECK],
  645. [AC_MSG_CHECKING([whether build environment is sane])
  646. # Just in case
  647. sleep 1
  648. echo timestamp > conftest.file
  649. # Do `set' in a subshell so we don't clobber the current shell's
  650. # arguments. Must try -L first in case configure is actually a
  651. # symlink; some systems play weird games with the mod time of symlinks
  652. # (eg FreeBSD returns the mod time of the symlink's containing
  653. # directory).
  654. if (
  655. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  656. if test "$[*]" = "X"; then
  657. # -L didn't work.
  658. set X `ls -t $srcdir/configure conftest.file`
  659. fi
  660. rm -f conftest.file
  661. if test "$[*]" != "X $srcdir/configure conftest.file" \
  662. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  663. # If neither matched, then we have a broken ls. This can happen
  664. # if, for instance, CONFIG_SHELL is bash and it inherits a
  665. # broken ls alias from the environment. This has actually
  666. # happened. Such a system could not be considered "sane".
  667. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  668. alias in your environment])
  669. fi
  670. test "$[2]" = conftest.file
  671. )
  672. then
  673. # Ok.
  674. :
  675. else
  676. AC_MSG_ERROR([newly created file is older than distributed files!
  677. Check your system clock])
  678. fi
  679. AC_MSG_RESULT(yes)])
  680. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  681. #
  682. # This file is free software; the Free Software Foundation
  683. # gives unlimited permission to copy and/or distribute it,
  684. # with or without modifications, as long as this notice is preserved.
  685. # AM_PROG_INSTALL_STRIP
  686. # ---------------------
  687. # One issue with vendor `install' (even GNU) is that you can't
  688. # specify the program used to strip binaries. This is especially
  689. # annoying in cross-compiling environments, where the build's strip
  690. # is unlikely to handle the host's binaries.
  691. # Fortunately install-sh will honor a STRIPPROG variable, so we
  692. # always use install-sh in `make install-strip', and initialize
  693. # STRIPPROG with the value of the STRIP variable (set by the user).
  694. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  695. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  696. # Installed binaries are usually stripped using `strip' when the user
  697. # run `make install-strip'. However `strip' might not be the right
  698. # tool to use in cross-compilation environments, therefore Automake
  699. # will honor the `STRIP' environment variable to overrule this program.
  700. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  701. if test "$cross_compiling" != no; then
  702. AC_CHECK_TOOL([STRIP], [strip], :)
  703. fi
  704. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  705. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  706. # Copyright (C) 2006 Free Software Foundation, Inc.
  707. #
  708. # This file is free software; the Free Software Foundation
  709. # gives unlimited permission to copy and/or distribute it,
  710. # with or without modifications, as long as this notice is preserved.
  711. # _AM_SUBST_NOTMAKE(VARIABLE)
  712. # ---------------------------
  713. # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
  714. # This macro is traced by Automake.
  715. AC_DEFUN([_AM_SUBST_NOTMAKE])
  716. # Check how to create a tarball. -*- Autoconf -*-
  717. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  718. #
  719. # This file is free software; the Free Software Foundation
  720. # gives unlimited permission to copy and/or distribute it,
  721. # with or without modifications, as long as this notice is preserved.
  722. # serial 2
  723. # _AM_PROG_TAR(FORMAT)
  724. # --------------------
  725. # Check how to create a tarball in format FORMAT.
  726. # FORMAT should be one of `v7', `ustar', or `pax'.
  727. #
  728. # Substitute a variable $(am__tar) that is a command
  729. # writing to stdout a FORMAT-tarball containing the directory
  730. # $tardir.
  731. # tardir=directory && $(am__tar) > result.tar
  732. #
  733. # Substitute a variable $(am__untar) that extract such
  734. # a tarball read from stdin.
  735. # $(am__untar) < result.tar
  736. AC_DEFUN([_AM_PROG_TAR],
  737. [# Always define AMTAR for backward compatibility.
  738. AM_MISSING_PROG([AMTAR], [tar])
  739. m4_if([$1], [v7],
  740. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  741. [m4_case([$1], [ustar],, [pax],,
  742. [m4_fatal([Unknown tar format])])
  743. AC_MSG_CHECKING([how to create a $1 tar archive])
  744. # Loop over all known methods to create a tar archive until one works.
  745. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  746. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  747. # Do not fold the above two line into one, because Tru64 sh and
  748. # Solaris sh will not grok spaces in the rhs of `-'.
  749. for _am_tool in $_am_tools
  750. do
  751. case $_am_tool in
  752. gnutar)
  753. for _am_tar in tar gnutar gtar;
  754. do
  755. AM_RUN_LOG([$_am_tar --version]) && break
  756. done
  757. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  758. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  759. am__untar="$_am_tar -xf -"
  760. ;;
  761. plaintar)
  762. # Must skip GNU tar: if it does not support --format= it doesn't create
  763. # ustar tarball either.
  764. (tar --version) >/dev/null 2>&1 && continue
  765. am__tar='tar chf - "$$tardir"'
  766. am__tar_='tar chf - "$tardir"'
  767. am__untar='tar xf -'
  768. ;;
  769. pax)
  770. am__tar='pax -L -x $1 -w "$$tardir"'
  771. am__tar_='pax -L -x $1 -w "$tardir"'
  772. am__untar='pax -r'
  773. ;;
  774. cpio)
  775. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  776. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  777. am__untar='cpio -i -H $1 -d'
  778. ;;
  779. none)
  780. am__tar=false
  781. am__tar_=false
  782. am__untar=false
  783. ;;
  784. esac
  785. # If the value was cached, stop now. We just wanted to have am__tar
  786. # and am__untar set.
  787. test -n "${am_cv_prog_tar_$1}" && break
  788. # tar/untar a dummy directory, and stop if the command works
  789. rm -rf conftest.dir
  790. mkdir conftest.dir
  791. echo GrepMe > conftest.dir/file
  792. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  793. rm -rf conftest.dir
  794. if test -s conftest.tar; then
  795. AM_RUN_LOG([$am__untar <conftest.tar])
  796. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  797. fi
  798. done
  799. rm -rf conftest.dir
  800. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  801. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  802. AC_SUBST([am__tar])
  803. AC_SUBST([am__untar])
  804. ]) # _AM_PROG_TAR