aclocal.m4 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008 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. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(AC_AUTOCONF_VERSION, [2.62],,
  14. [m4_warning([this file was generated for autoconf 2.62.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  18. dnl Copyright 2005 Red Hat, Inc
  19. dnl
  20. dnl Permission to use, copy, modify, distribute, and sell this software and its
  21. dnl documentation for any purpose is hereby granted without fee, provided that
  22. dnl the above copyright notice appear in all copies and that both that
  23. dnl copyright notice and this permission notice appear in supporting
  24. dnl documentation.
  25. dnl
  26. dnl The above copyright notice and this permission notice shall be included
  27. dnl in all copies or substantial portions of the Software.
  28. dnl
  29. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  30. dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  31. dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  32. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  33. dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  34. dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  35. dnl OTHER DEALINGS IN THE SOFTWARE.
  36. dnl
  37. dnl Except as contained in this notice, the name of the copyright holders shall
  38. dnl not be used in advertising or otherwise to promote the sale, use or
  39. dnl other dealings in this Software without prior written authorization
  40. dnl from the copyright holders.
  41. dnl
  42. # XORG_RELEASE_VERSION
  43. # --------------------
  44. # Adds --with/without-release-string and changes the PACKAGE and
  45. # PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
  46. # no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
  47. # defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  48. AC_DEFUN([XORG_RELEASE_VERSION],[
  49. AC_ARG_WITH(release-version,
  50. AC_HELP_STRING([--with-release-version=STRING],
  51. [Use release version string in package name]),
  52. [RELEASE_VERSION="$withval"],
  53. [RELEASE_VERSION=""])
  54. if test "x$RELEASE_VERSION" != "x"; then
  55. PACKAGE="$PACKAGE-$RELEASE_VERSION"
  56. PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
  57. AC_MSG_NOTICE([Building with package name set to $PACKAGE])
  58. fi
  59. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
  60. [`echo $PACKAGE_VERSION | cut -d . -f 1`],
  61. [Major version of this package])
  62. PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
  63. if test "x$PVM" = "x"; then
  64. PVM="0"
  65. fi
  66. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
  67. [$PVM],
  68. [Minor version of this package])
  69. PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
  70. if test "x$PVP" = "x"; then
  71. PVP="0"
  72. fi
  73. AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
  74. [$PVP],
  75. [Patch version of this package])
  76. ])
  77. # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
  78. #
  79. # This file is free software; the Free Software Foundation
  80. # gives unlimited permission to copy and/or distribute it,
  81. # with or without modifications, as long as this notice is preserved.
  82. # AM_AUTOMAKE_VERSION(VERSION)
  83. # ----------------------------
  84. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  85. # generated from the m4 files accompanying Automake X.Y.
  86. # (This private macro should not be called outside this file.)
  87. AC_DEFUN([AM_AUTOMAKE_VERSION],
  88. [am__api_version='1.10'
  89. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  90. dnl require some minimum version. Point them to the right macro.
  91. m4_if([$1], [1.10.1], [],
  92. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  93. ])
  94. # _AM_AUTOCONF_VERSION(VERSION)
  95. # -----------------------------
  96. # aclocal traces this macro to find the Autoconf version.
  97. # This is a private macro too. Using m4_define simplifies
  98. # the logic in aclocal, which can simply ignore this definition.
  99. m4_define([_AM_AUTOCONF_VERSION], [])
  100. # AM_SET_CURRENT_AUTOMAKE_VERSION
  101. # -------------------------------
  102. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  103. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  104. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  105. [AM_AUTOMAKE_VERSION([1.10.1])dnl
  106. m4_ifndef([AC_AUTOCONF_VERSION],
  107. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  108. _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
  109. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  110. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  111. #
  112. # This file is free software; the Free Software Foundation
  113. # gives unlimited permission to copy and/or distribute it,
  114. # with or without modifications, as long as this notice is preserved.
  115. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  116. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  117. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  118. #
  119. # Of course, Automake must honor this variable whenever it calls a
  120. # tool from the auxiliary directory. The problem is that $srcdir (and
  121. # therefore $ac_aux_dir as well) can be either absolute or relative,
  122. # depending on how configure is run. This is pretty annoying, since
  123. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  124. # source directory, any form will work fine, but in subdirectories a
  125. # relative path needs to be adjusted first.
  126. #
  127. # $ac_aux_dir/missing
  128. # fails when called from a subdirectory if $ac_aux_dir is relative
  129. # $top_srcdir/$ac_aux_dir/missing
  130. # fails if $ac_aux_dir is absolute,
  131. # fails when called from a subdirectory in a VPATH build with
  132. # a relative $ac_aux_dir
  133. #
  134. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  135. # are both prefixed by $srcdir. In an in-source build this is usually
  136. # harmless because $srcdir is `.', but things will broke when you
  137. # start a VPATH build or use an absolute $srcdir.
  138. #
  139. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  140. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  141. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  142. # and then we would define $MISSING as
  143. # MISSING="\${SHELL} $am_aux_dir/missing"
  144. # This will work as long as MISSING is not called from configure, because
  145. # unfortunately $(top_srcdir) has no meaning in configure.
  146. # However there are other variables, like CC, which are often used in
  147. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  148. #
  149. # Another solution, used here, is to always expand $ac_aux_dir to an
  150. # absolute PATH. The drawback is that using absolute paths prevent a
  151. # configured tree to be moved without reconfiguration.
  152. AC_DEFUN([AM_AUX_DIR_EXPAND],
  153. [dnl Rely on autoconf to set up CDPATH properly.
  154. AC_PREREQ([2.50])dnl
  155. # expand $ac_aux_dir to an absolute path
  156. am_aux_dir=`cd $ac_aux_dir && pwd`
  157. ])
  158. # Do all the work for Automake. -*- Autoconf -*-
  159. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  160. # 2005, 2006, 2008 Free Software Foundation, Inc.
  161. #
  162. # This file is free software; the Free Software Foundation
  163. # gives unlimited permission to copy and/or distribute it,
  164. # with or without modifications, as long as this notice is preserved.
  165. # serial 13
  166. # This macro actually does too much. Some checks are only needed if
  167. # your package does certain things. But this isn't really a big deal.
  168. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  169. # AM_INIT_AUTOMAKE([OPTIONS])
  170. # -----------------------------------------------
  171. # The call with PACKAGE and VERSION arguments is the old style
  172. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  173. # and VERSION should now be passed to AC_INIT and removed from
  174. # the call to AM_INIT_AUTOMAKE.
  175. # We support both call styles for the transition. After
  176. # the next Automake release, Autoconf can make the AC_INIT
  177. # arguments mandatory, and then we can depend on a new Autoconf
  178. # release and drop the old call support.
  179. AC_DEFUN([AM_INIT_AUTOMAKE],
  180. [AC_PREREQ([2.60])dnl
  181. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  182. dnl the ones we care about.
  183. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  184. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  185. AC_REQUIRE([AC_PROG_INSTALL])dnl
  186. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  187. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  188. # is not polluted with repeated "-I."
  189. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  190. # test to see if srcdir already configured
  191. if test -f $srcdir/config.status; then
  192. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  193. fi
  194. fi
  195. # test whether we have cygpath
  196. if test -z "$CYGPATH_W"; then
  197. if (cygpath --version) >/dev/null 2>/dev/null; then
  198. CYGPATH_W='cygpath -w'
  199. else
  200. CYGPATH_W=echo
  201. fi
  202. fi
  203. AC_SUBST([CYGPATH_W])
  204. # Define the identity of the package.
  205. dnl Distinguish between old-style and new-style calls.
  206. m4_ifval([$2],
  207. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  208. AC_SUBST([PACKAGE], [$1])dnl
  209. AC_SUBST([VERSION], [$2])],
  210. [_AM_SET_OPTIONS([$1])dnl
  211. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  212. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  213. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  214. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  215. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  216. _AM_IF_OPTION([no-define],,
  217. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  218. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  219. # Some tools Automake needs.
  220. AC_REQUIRE([AM_SANITY_CHECK])dnl
  221. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  222. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  223. AM_MISSING_PROG(AUTOCONF, autoconf)
  224. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  225. AM_MISSING_PROG(AUTOHEADER, autoheader)
  226. AM_MISSING_PROG(MAKEINFO, makeinfo)
  227. AM_PROG_INSTALL_SH
  228. AM_PROG_INSTALL_STRIP
  229. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  230. # We need awk for the "check" target. The system "awk" is bad on
  231. # some platforms.
  232. AC_REQUIRE([AC_PROG_AWK])dnl
  233. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  234. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  235. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  236. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  237. [_AM_PROG_TAR([v7])])])
  238. _AM_IF_OPTION([no-dependencies],,
  239. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  240. [_AM_DEPENDENCIES(CC)],
  241. [define([AC_PROG_CC],
  242. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  243. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  244. [_AM_DEPENDENCIES(CXX)],
  245. [define([AC_PROG_CXX],
  246. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  247. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  248. [_AM_DEPENDENCIES(OBJC)],
  249. [define([AC_PROG_OBJC],
  250. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  251. ])
  252. ])
  253. # When config.status generates a header, we must update the stamp-h file.
  254. # This file resides in the same directory as the config header
  255. # that is generated. The stamp files are numbered to have different names.
  256. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  257. # loop where config.status creates the headers, so we can generate
  258. # our stamp files there.
  259. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  260. [# Compute $1's index in $config_headers.
  261. _am_arg=$1
  262. _am_stamp_count=1
  263. for _am_header in $config_headers :; do
  264. case $_am_header in
  265. $_am_arg | $_am_arg:* )
  266. break ;;
  267. * )
  268. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  269. esac
  270. done
  271. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  272. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  273. #
  274. # This file is free software; the Free Software Foundation
  275. # gives unlimited permission to copy and/or distribute it,
  276. # with or without modifications, as long as this notice is preserved.
  277. # AM_PROG_INSTALL_SH
  278. # ------------------
  279. # Define $install_sh.
  280. AC_DEFUN([AM_PROG_INSTALL_SH],
  281. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  282. install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  283. AC_SUBST(install_sh)])
  284. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  285. #
  286. # This file is free software; the Free Software Foundation
  287. # gives unlimited permission to copy and/or distribute it,
  288. # with or without modifications, as long as this notice is preserved.
  289. # serial 2
  290. # Check whether the underlying file-system supports filenames
  291. # with a leading dot. For instance MS-DOS doesn't.
  292. AC_DEFUN([AM_SET_LEADING_DOT],
  293. [rm -rf .tst 2>/dev/null
  294. mkdir .tst 2>/dev/null
  295. if test -d .tst; then
  296. am__leading_dot=.
  297. else
  298. am__leading_dot=_
  299. fi
  300. rmdir .tst 2>/dev/null
  301. AC_SUBST([am__leading_dot])])
  302. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  303. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
  304. # Free Software Foundation, Inc.
  305. #
  306. # This file is free software; the Free Software Foundation
  307. # gives unlimited permission to copy and/or distribute it,
  308. # with or without modifications, as long as this notice is preserved.
  309. # serial 5
  310. # AM_MISSING_PROG(NAME, PROGRAM)
  311. # ------------------------------
  312. AC_DEFUN([AM_MISSING_PROG],
  313. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  314. $1=${$1-"${am_missing_run}$2"}
  315. AC_SUBST($1)])
  316. # AM_MISSING_HAS_RUN
  317. # ------------------
  318. # Define MISSING if not defined so far and test if it supports --run.
  319. # If it does, set am_missing_run to use it, otherwise, to nothing.
  320. AC_DEFUN([AM_MISSING_HAS_RUN],
  321. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  322. AC_REQUIRE_AUX_FILE([missing])dnl
  323. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  324. # Use eval to expand $SHELL
  325. if eval "$MISSING --run true"; then
  326. am_missing_run="$MISSING --run "
  327. else
  328. am_missing_run=
  329. AC_MSG_WARN([`missing' script is too old or missing])
  330. fi
  331. ])
  332. # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  333. #
  334. # This file is free software; the Free Software Foundation
  335. # gives unlimited permission to copy and/or distribute it,
  336. # with or without modifications, as long as this notice is preserved.
  337. # AM_PROG_MKDIR_P
  338. # ---------------
  339. # Check for `mkdir -p'.
  340. AC_DEFUN([AM_PROG_MKDIR_P],
  341. [AC_PREREQ([2.60])dnl
  342. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  343. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  344. dnl while keeping a definition of mkdir_p for backward compatibility.
  345. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  346. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  347. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  348. dnl adjustment using top_builddir (which is defined more often than
  349. dnl MKDIR_P).
  350. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  351. case $mkdir_p in
  352. [[\\/$]]* | ?:[[\\/]]*) ;;
  353. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  354. esac
  355. ])
  356. # Helper functions for option handling. -*- Autoconf -*-
  357. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  358. #
  359. # This file is free software; the Free Software Foundation
  360. # gives unlimited permission to copy and/or distribute it,
  361. # with or without modifications, as long as this notice is preserved.
  362. # serial 3
  363. # _AM_MANGLE_OPTION(NAME)
  364. # -----------------------
  365. AC_DEFUN([_AM_MANGLE_OPTION],
  366. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  367. # _AM_SET_OPTION(NAME)
  368. # ------------------------------
  369. # Set option NAME. Presently that only means defining a flag for this option.
  370. AC_DEFUN([_AM_SET_OPTION],
  371. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  372. # _AM_SET_OPTIONS(OPTIONS)
  373. # ----------------------------------
  374. # OPTIONS is a space-separated list of Automake options.
  375. AC_DEFUN([_AM_SET_OPTIONS],
  376. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  377. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  378. # -------------------------------------------
  379. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  380. AC_DEFUN([_AM_IF_OPTION],
  381. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  382. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  383. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  384. # Free Software Foundation, Inc.
  385. #
  386. # This file is free software; the Free Software Foundation
  387. # gives unlimited permission to copy and/or distribute it,
  388. # with or without modifications, as long as this notice is preserved.
  389. # serial 4
  390. # AM_SANITY_CHECK
  391. # ---------------
  392. AC_DEFUN([AM_SANITY_CHECK],
  393. [AC_MSG_CHECKING([whether build environment is sane])
  394. # Just in case
  395. sleep 1
  396. echo timestamp > conftest.file
  397. # Do `set' in a subshell so we don't clobber the current shell's
  398. # arguments. Must try -L first in case configure is actually a
  399. # symlink; some systems play weird games with the mod time of symlinks
  400. # (eg FreeBSD returns the mod time of the symlink's containing
  401. # directory).
  402. if (
  403. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  404. if test "$[*]" = "X"; then
  405. # -L didn't work.
  406. set X `ls -t $srcdir/configure conftest.file`
  407. fi
  408. rm -f conftest.file
  409. if test "$[*]" != "X $srcdir/configure conftest.file" \
  410. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  411. # If neither matched, then we have a broken ls. This can happen
  412. # if, for instance, CONFIG_SHELL is bash and it inherits a
  413. # broken ls alias from the environment. This has actually
  414. # happened. Such a system could not be considered "sane".
  415. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  416. alias in your environment])
  417. fi
  418. test "$[2]" = conftest.file
  419. )
  420. then
  421. # Ok.
  422. :
  423. else
  424. AC_MSG_ERROR([newly created file is older than distributed files!
  425. Check your system clock])
  426. fi
  427. AC_MSG_RESULT(yes)])
  428. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  429. #
  430. # This file is free software; the Free Software Foundation
  431. # gives unlimited permission to copy and/or distribute it,
  432. # with or without modifications, as long as this notice is preserved.
  433. # AM_PROG_INSTALL_STRIP
  434. # ---------------------
  435. # One issue with vendor `install' (even GNU) is that you can't
  436. # specify the program used to strip binaries. This is especially
  437. # annoying in cross-compiling environments, where the build's strip
  438. # is unlikely to handle the host's binaries.
  439. # Fortunately install-sh will honor a STRIPPROG variable, so we
  440. # always use install-sh in `make install-strip', and initialize
  441. # STRIPPROG with the value of the STRIP variable (set by the user).
  442. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  443. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  444. # Installed binaries are usually stripped using `strip' when the user
  445. # run `make install-strip'. However `strip' might not be the right
  446. # tool to use in cross-compilation environments, therefore Automake
  447. # will honor the `STRIP' environment variable to overrule this program.
  448. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  449. if test "$cross_compiling" != no; then
  450. AC_CHECK_TOOL([STRIP], [strip], :)
  451. fi
  452. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  453. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  454. # Copyright (C) 2006 Free Software Foundation, Inc.
  455. #
  456. # This file is free software; the Free Software Foundation
  457. # gives unlimited permission to copy and/or distribute it,
  458. # with or without modifications, as long as this notice is preserved.
  459. # _AM_SUBST_NOTMAKE(VARIABLE)
  460. # ---------------------------
  461. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  462. # This macro is traced by Automake.
  463. AC_DEFUN([_AM_SUBST_NOTMAKE])
  464. # Check how to create a tarball. -*- Autoconf -*-
  465. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  466. #
  467. # This file is free software; the Free Software Foundation
  468. # gives unlimited permission to copy and/or distribute it,
  469. # with or without modifications, as long as this notice is preserved.
  470. # serial 2
  471. # _AM_PROG_TAR(FORMAT)
  472. # --------------------
  473. # Check how to create a tarball in format FORMAT.
  474. # FORMAT should be one of `v7', `ustar', or `pax'.
  475. #
  476. # Substitute a variable $(am__tar) that is a command
  477. # writing to stdout a FORMAT-tarball containing the directory
  478. # $tardir.
  479. # tardir=directory && $(am__tar) > result.tar
  480. #
  481. # Substitute a variable $(am__untar) that extract such
  482. # a tarball read from stdin.
  483. # $(am__untar) < result.tar
  484. AC_DEFUN([_AM_PROG_TAR],
  485. [# Always define AMTAR for backward compatibility.
  486. AM_MISSING_PROG([AMTAR], [tar])
  487. m4_if([$1], [v7],
  488. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  489. [m4_case([$1], [ustar],, [pax],,
  490. [m4_fatal([Unknown tar format])])
  491. AC_MSG_CHECKING([how to create a $1 tar archive])
  492. # Loop over all known methods to create a tar archive until one works.
  493. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  494. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  495. # Do not fold the above two line into one, because Tru64 sh and
  496. # Solaris sh will not grok spaces in the rhs of `-'.
  497. for _am_tool in $_am_tools
  498. do
  499. case $_am_tool in
  500. gnutar)
  501. for _am_tar in tar gnutar gtar;
  502. do
  503. AM_RUN_LOG([$_am_tar --version]) && break
  504. done
  505. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  506. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  507. am__untar="$_am_tar -xf -"
  508. ;;
  509. plaintar)
  510. # Must skip GNU tar: if it does not support --format= it doesn't create
  511. # ustar tarball either.
  512. (tar --version) >/dev/null 2>&1 && continue
  513. am__tar='tar chf - "$$tardir"'
  514. am__tar_='tar chf - "$tardir"'
  515. am__untar='tar xf -'
  516. ;;
  517. pax)
  518. am__tar='pax -L -x $1 -w "$$tardir"'
  519. am__tar_='pax -L -x $1 -w "$tardir"'
  520. am__untar='pax -r'
  521. ;;
  522. cpio)
  523. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  524. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  525. am__untar='cpio -i -H $1 -d'
  526. ;;
  527. none)
  528. am__tar=false
  529. am__tar_=false
  530. am__untar=false
  531. ;;
  532. esac
  533. # If the value was cached, stop now. We just wanted to have am__tar
  534. # and am__untar set.
  535. test -n "${am_cv_prog_tar_$1}" && break
  536. # tar/untar a dummy directory, and stop if the command works
  537. rm -rf conftest.dir
  538. mkdir conftest.dir
  539. echo GrepMe > conftest.dir/file
  540. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  541. rm -rf conftest.dir
  542. if test -s conftest.tar; then
  543. AM_RUN_LOG([$am__untar <conftest.tar])
  544. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  545. fi
  546. done
  547. rm -rf conftest.dir
  548. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  549. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  550. AC_SUBST([am__tar])
  551. AC_SUBST([am__untar])
  552. ]) # _AM_PROG_TAR