aclocal.m4 30 KB

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