aclocal.m4 34 KB

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