aclocal.m4 22 KB

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