aclocal.m4 32 KB

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