aclocal.m4 29 KB

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