aclocal.m4 31 KB

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