1
0

aclocal.m4 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  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])])
  711. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
  712. # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  713. # This program is free software; you can redistribute it and/or modify
  714. # it under the terms of the GNU General Public License as published by
  715. # the Free Software Foundation; either version 2, or (at your option)
  716. # any later version.
  717. # This program is distributed in the hope that it will be useful,
  718. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  719. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  720. # GNU General Public License for more details.
  721. # You should have received a copy of the GNU General Public License
  722. # along with this program; if not, write to the Free Software
  723. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  724. # 02111-1307, USA.
  725. AC_PREREQ([2.52])
  726. # serial 6
  727. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  728. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  729. # Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
  730. # This program is free software; you can redistribute it and/or modify
  731. # it under the terms of the GNU General Public License as published by
  732. # the Free Software Foundation; either version 2, or (at your option)
  733. # any later version.
  734. # This program is distributed in the hope that it will be useful,
  735. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  736. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  737. # GNU General Public License for more details.
  738. # You should have received a copy of the GNU General Public License
  739. # along with this program; if not, write to the Free Software
  740. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  741. # 02111-1307, USA.
  742. # serial 2
  743. AC_DEFUN([AM_C_PROTOTYPES],
  744. [AC_REQUIRE([AM_PROG_CC_STDC])
  745. AC_REQUIRE([AC_PROG_CPP])
  746. AC_MSG_CHECKING([for function prototypes])
  747. if test "$am_cv_prog_cc_stdc" != no; then
  748. AC_MSG_RESULT(yes)
  749. AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
  750. U= ANSI2KNR=
  751. else
  752. AC_MSG_RESULT(no)
  753. U=_ ANSI2KNR=./ansi2knr
  754. fi
  755. # Ensure some checks needed by ansi2knr itself.
  756. AC_HEADER_STDC
  757. AC_CHECK_HEADERS(string.h)
  758. AC_SUBST(U)dnl
  759. AC_SUBST(ANSI2KNR)dnl
  760. ])
  761. AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
  762. # Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  763. # This program is free software; you can redistribute it and/or modify
  764. # it under the terms of the GNU General Public License as published by
  765. # the Free Software Foundation; either version 2, or (at your option)
  766. # any later version.
  767. # This program is distributed in the hope that it will be useful,
  768. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  769. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  770. # GNU General Public License for more details.
  771. # You should have received a copy of the GNU General Public License
  772. # along with this program; if not, write to the Free Software
  773. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  774. # 02111-1307, USA.
  775. # serial 2
  776. # @defmac AC_PROG_CC_STDC
  777. # @maindex PROG_CC_STDC
  778. # @ovindex CC
  779. # If the C compiler in not in ANSI C mode by default, try to add an option
  780. # to output variable @code{CC} to make it so. This macro tries various
  781. # options that select ANSI C on some system or another. It considers the
  782. # compiler to be in ANSI C mode if it handles function prototypes correctly.
  783. #
  784. # If you use this macro, you should check after calling it whether the C
  785. # compiler has been set to accept ANSI C; if not, the shell variable
  786. # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
  787. # code in ANSI C, you can make an un-ANSIfied copy of it by using the
  788. # program @code{ansi2knr}, which comes with Ghostscript.
  789. # @end defmac
  790. AC_DEFUN([AM_PROG_CC_STDC],
  791. [AC_REQUIRE([AC_PROG_CC])
  792. AC_BEFORE([$0], [AC_C_INLINE])
  793. AC_BEFORE([$0], [AC_C_CONST])
  794. dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
  795. dnl a magic option to avoid problems with ANSI preprocessor commands
  796. dnl like #elif.
  797. dnl FIXME: can't do this because then AC_AIX won't work due to a
  798. dnl circular dependency.
  799. dnl AC_BEFORE([$0], [AC_PROG_CPP])
  800. AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
  801. AC_CACHE_VAL(am_cv_prog_cc_stdc,
  802. [am_cv_prog_cc_stdc=no
  803. ac_save_CC="$CC"
  804. # Don't try gcc -ansi; that turns off useful extensions and
  805. # breaks some systems' header files.
  806. # AIX -qlanglvl=ansi
  807. # Ultrix and OSF/1 -std1
  808. # HP-UX 10.20 and later -Ae
  809. # HP-UX older versions -Aa -D_HPUX_SOURCE
  810. # SVR4 -Xc -D__EXTENSIONS__
  811. for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  812. do
  813. CC="$ac_save_CC $ac_arg"
  814. AC_TRY_COMPILE(
  815. [#include <stdarg.h>
  816. #include <stdio.h>
  817. #include <sys/types.h>
  818. #include <sys/stat.h>
  819. /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
  820. struct buf { int x; };
  821. FILE * (*rcsopen) (struct buf *, struct stat *, int);
  822. static char *e (p, i)
  823. char **p;
  824. int i;
  825. {
  826. return p[i];
  827. }
  828. static char *f (char * (*g) (char **, int), char **p, ...)
  829. {
  830. char *s;
  831. va_list v;
  832. va_start (v,p);
  833. s = g (p, va_arg (v,int));
  834. va_end (v);
  835. return s;
  836. }
  837. int test (int i, double x);
  838. struct s1 {int (*f) (int a);};
  839. struct s2 {int (*f) (double a);};
  840. int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
  841. int argc;
  842. char **argv;
  843. ], [
  844. return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
  845. ],
  846. [am_cv_prog_cc_stdc="$ac_arg"; break])
  847. done
  848. CC="$ac_save_CC"
  849. ])
  850. if test -z "$am_cv_prog_cc_stdc"; then
  851. AC_MSG_RESULT([none needed])
  852. else
  853. AC_MSG_RESULT([$am_cv_prog_cc_stdc])
  854. fi
  855. case "x$am_cv_prog_cc_stdc" in
  856. x|xno) ;;
  857. *) CC="$CC $am_cv_prog_cc_stdc" ;;
  858. esac
  859. ])
  860. AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])