koffice-i18n
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aclocal.m4 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  106. # Free Software Foundation, Inc.
  107. #
  108. # This file is free software; the Free Software Foundation
  109. # gives unlimited permission to copy and/or distribute it,
  110. # with or without modifications, as long as this notice is preserved.
  111. # serial 8
  112. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  113. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  114. # Do all the work for Automake. -*- Autoconf -*-
  115. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  116. # Free Software Foundation, Inc.
  117. #
  118. # This file is free software; the Free Software Foundation
  119. # gives unlimited permission to copy and/or distribute it,
  120. # with or without modifications, as long as this notice is preserved.
  121. # serial 12
  122. # This macro actually does too much. Some checks are only needed if
  123. # your package does certain things. But this isn't really a big deal.
  124. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  125. # AM_INIT_AUTOMAKE([OPTIONS])
  126. # -----------------------------------------------
  127. # The call with PACKAGE and VERSION arguments is the old style
  128. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  129. # and VERSION should now be passed to AC_INIT and removed from
  130. # the call to AM_INIT_AUTOMAKE.
  131. # We support both call styles for the transition. After
  132. # the next Automake release, Autoconf can make the AC_INIT
  133. # arguments mandatory, and then we can depend on a new Autoconf
  134. # release and drop the old call support.
  135. AC_DEFUN([AM_INIT_AUTOMAKE],
  136. [AC_PREREQ([2.58])dnl
  137. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  138. dnl the ones we care about.
  139. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  140. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  141. AC_REQUIRE([AC_PROG_INSTALL])dnl
  142. # test to see if srcdir already configured
  143. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  144. test -f $srcdir/config.status; then
  145. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  146. fi
  147. # test whether we have cygpath
  148. if test -z "$CYGPATH_W"; then
  149. if (cygpath --version) >/dev/null 2>/dev/null; then
  150. CYGPATH_W='cygpath -w'
  151. else
  152. CYGPATH_W=echo
  153. fi
  154. fi
  155. AC_SUBST([CYGPATH_W])
  156. # Define the identity of the package.
  157. dnl Distinguish between old-style and new-style calls.
  158. m4_ifval([$2],
  159. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  160. AC_SUBST([PACKAGE], [$1])dnl
  161. AC_SUBST([VERSION], [$2])],
  162. [_AM_SET_OPTIONS([$1])dnl
  163. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  164. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  165. _AM_IF_OPTION([no-define],,
  166. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  167. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  168. # Some tools Automake needs.
  169. AC_REQUIRE([AM_SANITY_CHECK])dnl
  170. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  171. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  172. AM_MISSING_PROG(AUTOCONF, autoconf)
  173. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  174. AM_MISSING_PROG(AUTOHEADER, autoheader)
  175. AM_MISSING_PROG(MAKEINFO, makeinfo)
  176. AM_PROG_INSTALL_SH
  177. AM_PROG_INSTALL_STRIP
  178. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  179. # We need awk for the "check" target. The system "awk" is bad on
  180. # some platforms.
  181. AC_REQUIRE([AC_PROG_AWK])dnl
  182. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  183. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  184. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  185. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  186. [_AM_PROG_TAR([v7])])])
  187. _AM_IF_OPTION([no-dependencies],,
  188. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  189. [_AM_DEPENDENCIES(CC)],
  190. [define([AC_PROG_CC],
  191. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  192. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  193. [_AM_DEPENDENCIES(CXX)],
  194. [define([AC_PROG_CXX],
  195. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  196. ])
  197. ])
  198. # When config.status generates a header, we must update the stamp-h file.
  199. # This file resides in the same directory as the config header
  200. # that is generated. The stamp files are numbered to have different names.
  201. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  202. # loop where config.status creates the headers, so we can generate
  203. # our stamp files there.
  204. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  205. [# Compute $1's index in $config_headers.
  206. _am_stamp_count=1
  207. for _am_header in $config_headers :; do
  208. case $_am_header in
  209. $1 | $1:* )
  210. break ;;
  211. * )
  212. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  213. esac
  214. done
  215. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  216. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  217. #
  218. # This file is free software; the Free Software Foundation
  219. # gives unlimited permission to copy and/or distribute it,
  220. # with or without modifications, as long as this notice is preserved.
  221. # AM_PROG_INSTALL_SH
  222. # ------------------
  223. # Define $install_sh.
  224. AC_DEFUN([AM_PROG_INSTALL_SH],
  225. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  226. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  227. AC_SUBST(install_sh)])
  228. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  229. #
  230. # This file is free software; the Free Software Foundation
  231. # gives unlimited permission to copy and/or distribute it,
  232. # with or without modifications, as long as this notice is preserved.
  233. # serial 2
  234. # Check whether the underlying file-system supports filenames
  235. # with a leading dot. For instance MS-DOS doesn't.
  236. AC_DEFUN([AM_SET_LEADING_DOT],
  237. [rm -rf .tst 2>/dev/null
  238. mkdir .tst 2>/dev/null
  239. if test -d .tst; then
  240. am__leading_dot=.
  241. else
  242. am__leading_dot=_
  243. fi
  244. rmdir .tst 2>/dev/null
  245. AC_SUBST([am__leading_dot])])
  246. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  247. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  248. # Free Software Foundation, Inc.
  249. #
  250. # This file is free software; the Free Software Foundation
  251. # gives unlimited permission to copy and/or distribute it,
  252. # with or without modifications, as long as this notice is preserved.
  253. # serial 4
  254. # AM_MISSING_PROG(NAME, PROGRAM)
  255. # ------------------------------
  256. AC_DEFUN([AM_MISSING_PROG],
  257. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  258. $1=${$1-"${am_missing_run}$2"}
  259. AC_SUBST($1)])
  260. # AM_MISSING_HAS_RUN
  261. # ------------------
  262. # Define MISSING if not defined so far and test if it supports --run.
  263. # If it does, set am_missing_run to use it, otherwise, to nothing.
  264. AC_DEFUN([AM_MISSING_HAS_RUN],
  265. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  266. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  267. # Use eval to expand $SHELL
  268. if eval "$MISSING --run true"; then
  269. am_missing_run="$MISSING --run "
  270. else
  271. am_missing_run=
  272. AC_MSG_WARN([`missing' script is too old or missing])
  273. fi
  274. ])
  275. # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  276. #
  277. # This file is free software; the Free Software Foundation
  278. # gives unlimited permission to copy and/or distribute it,
  279. # with or without modifications, as long as this notice is preserved.
  280. # AM_PROG_MKDIR_P
  281. # ---------------
  282. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  283. #
  284. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  285. # created by `make install' are always world readable, even if the
  286. # installer happens to have an overly restrictive umask (e.g. 077).
  287. # This was a mistake. There are at least two reasons why we must not
  288. # use `-m 0755':
  289. # - it causes special bits like SGID to be ignored,
  290. # - it may be too restrictive (some setups expect 775 directories).
  291. #
  292. # Do not use -m 0755 and let people choose whatever they expect by
  293. # setting umask.
  294. #
  295. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  296. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  297. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  298. # concurrently, both version can detect that a/ is missing, but only
  299. # one can create it and the other will error out. Consequently we
  300. # restrict ourselves to GNU make (using the --version option ensures
  301. # this.)
  302. AC_DEFUN([AM_PROG_MKDIR_P],
  303. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  304. # We used to keeping the `.' as first argument, in order to
  305. # allow $(mkdir_p) to be used without argument. As in
  306. # $(mkdir_p) $(somedir)
  307. # where $(somedir) is conditionally defined. However this is wrong
  308. # for two reasons:
  309. # 1. if the package is installed by a user who cannot write `.'
  310. # make install will fail,
  311. # 2. the above comment should most certainly read
  312. # $(mkdir_p) $(DESTDIR)$(somedir)
  313. # so it does not work when $(somedir) is undefined and
  314. # $(DESTDIR) is not.
  315. # To support the latter case, we have to write
  316. # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  317. # so the `.' trick is pointless.
  318. mkdir_p='mkdir -p --'
  319. else
  320. # On NextStep and OpenStep, the `mkdir' command does not
  321. # recognize any option. It will interpret all options as
  322. # directories to create, and then abort because `.' already
  323. # exists.
  324. for d in ./-p ./--version;
  325. do
  326. test -d $d && rmdir $d
  327. done
  328. # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  329. if test -f "$ac_aux_dir/mkinstalldirs"; then
  330. mkdir_p='$(mkinstalldirs)'
  331. else
  332. mkdir_p='$(install_sh) -d'
  333. fi
  334. fi
  335. AC_SUBST([mkdir_p])])
  336. # Helper functions for option handling. -*- Autoconf -*-
  337. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  338. #
  339. # This file is free software; the Free Software Foundation
  340. # gives unlimited permission to copy and/or distribute it,
  341. # with or without modifications, as long as this notice is preserved.
  342. # serial 3
  343. # _AM_MANGLE_OPTION(NAME)
  344. # -----------------------
  345. AC_DEFUN([_AM_MANGLE_OPTION],
  346. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  347. # _AM_SET_OPTION(NAME)
  348. # ------------------------------
  349. # Set option NAME. Presently that only means defining a flag for this option.
  350. AC_DEFUN([_AM_SET_OPTION],
  351. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  352. # _AM_SET_OPTIONS(OPTIONS)
  353. # ----------------------------------
  354. # OPTIONS is a space-separated list of Automake options.
  355. AC_DEFUN([_AM_SET_OPTIONS],
  356. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  357. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  358. # -------------------------------------------
  359. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  360. AC_DEFUN([_AM_IF_OPTION],
  361. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  362. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  363. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  364. # Free Software Foundation, Inc.
  365. #
  366. # This file is free software; the Free Software Foundation
  367. # gives unlimited permission to copy and/or distribute it,
  368. # with or without modifications, as long as this notice is preserved.
  369. # serial 4
  370. # AM_SANITY_CHECK
  371. # ---------------
  372. AC_DEFUN([AM_SANITY_CHECK],
  373. [AC_MSG_CHECKING([whether build environment is sane])
  374. # Just in case
  375. sleep 1
  376. echo timestamp > conftest.file
  377. # Do `set' in a subshell so we don't clobber the current shell's
  378. # arguments. Must try -L first in case configure is actually a
  379. # symlink; some systems play weird games with the mod time of symlinks
  380. # (eg FreeBSD returns the mod time of the symlink's containing
  381. # directory).
  382. if (
  383. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  384. if test "$[*]" = "X"; then
  385. # -L didn't work.
  386. set X `ls -t $srcdir/configure conftest.file`
  387. fi
  388. rm -f conftest.file
  389. if test "$[*]" != "X $srcdir/configure conftest.file" \
  390. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  391. # If neither matched, then we have a broken ls. This can happen
  392. # if, for instance, CONFIG_SHELL is bash and it inherits a
  393. # broken ls alias from the environment. This has actually
  394. # happened. Such a system could not be considered "sane".
  395. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  396. alias in your environment])
  397. fi
  398. test "$[2]" = conftest.file
  399. )
  400. then
  401. # Ok.
  402. :
  403. else
  404. AC_MSG_ERROR([newly created file is older than distributed files!
  405. Check your system clock])
  406. fi
  407. AC_MSG_RESULT(yes)])
  408. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  409. #
  410. # This file is free software; the Free Software Foundation
  411. # gives unlimited permission to copy and/or distribute it,
  412. # with or without modifications, as long as this notice is preserved.
  413. # AM_PROG_INSTALL_STRIP
  414. # ---------------------
  415. # One issue with vendor `install' (even GNU) is that you can't
  416. # specify the program used to strip binaries. This is especially
  417. # annoying in cross-compiling environments, where the build's strip
  418. # is unlikely to handle the host's binaries.
  419. # Fortunately install-sh will honor a STRIPPROG variable, so we
  420. # always use install-sh in `make install-strip', and initialize
  421. # STRIPPROG with the value of the STRIP variable (set by the user).
  422. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  423. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  424. # Installed binaries are usually stripped using `strip' when the user
  425. # run `make install-strip'. However `strip' might not be the right
  426. # tool to use in cross-compilation environments, therefore Automake
  427. # will honor the `STRIP' environment variable to overrule this program.
  428. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  429. if test "$cross_compiling" != no; then
  430. AC_CHECK_TOOL([STRIP], [strip], :)
  431. fi
  432. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  433. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  434. # Check how to create a tarball. -*- Autoconf -*-
  435. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  436. #
  437. # This file is free software; the Free Software Foundation
  438. # gives unlimited permission to copy and/or distribute it,
  439. # with or without modifications, as long as this notice is preserved.
  440. # serial 2
  441. # _AM_PROG_TAR(FORMAT)
  442. # --------------------
  443. # Check how to create a tarball in format FORMAT.
  444. # FORMAT should be one of `v7', `ustar', or `pax'.
  445. #
  446. # Substitute a variable $(am__tar) that is a command
  447. # writing to stdout a FORMAT-tarball containing the directory
  448. # $tardir.
  449. # tardir=directory && $(am__tar) > result.tar
  450. #
  451. # Substitute a variable $(am__untar) that extract such
  452. # a tarball read from stdin.
  453. # $(am__untar) < result.tar
  454. AC_DEFUN([_AM_PROG_TAR],
  455. [# Always define AMTAR for backward compatibility.
  456. AM_MISSING_PROG([AMTAR], [tar])
  457. m4_if([$1], [v7],
  458. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  459. [m4_case([$1], [ustar],, [pax],,
  460. [m4_fatal([Unknown tar format])])
  461. AC_MSG_CHECKING([how to create a $1 tar archive])
  462. # Loop over all known methods to create a tar archive until one works.
  463. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  464. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  465. # Do not fold the above two line into one, because Tru64 sh and
  466. # Solaris sh will not grok spaces in the rhs of `-'.
  467. for _am_tool in $_am_tools
  468. do
  469. case $_am_tool in
  470. gnutar)
  471. for _am_tar in tar gnutar gtar;
  472. do
  473. AM_RUN_LOG([$_am_tar --version]) && break
  474. done
  475. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  476. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  477. am__untar="$_am_tar -xf -"
  478. ;;
  479. plaintar)
  480. # Must skip GNU tar: if it does not support --format= it doesn't create
  481. # ustar tarball either.
  482. (tar --version) >/dev/null 2>&1 && continue
  483. am__tar='tar chf - "$$tardir"'
  484. am__tar_='tar chf - "$tardir"'
  485. am__untar='tar xf -'
  486. ;;
  487. pax)
  488. am__tar='pax -L -x $1 -w "$$tardir"'
  489. am__tar_='pax -L -x $1 -w "$tardir"'
  490. am__untar='pax -r'
  491. ;;
  492. cpio)
  493. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  494. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  495. am__untar='cpio -i -H $1 -d'
  496. ;;
  497. none)
  498. am__tar=false
  499. am__tar_=false
  500. am__untar=false
  501. ;;
  502. esac
  503. # If the value was cached, stop now. We just wanted to have am__tar
  504. # and am__untar set.
  505. test -n "${am_cv_prog_tar_$1}" && break
  506. # tar/untar a dummy directory, and stop if the command works
  507. rm -rf conftest.dir
  508. mkdir conftest.dir
  509. echo GrepMe > conftest.dir/file
  510. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  511. rm -rf conftest.dir
  512. if test -s conftest.tar; then
  513. AM_RUN_LOG([$am__untar <conftest.tar])
  514. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  515. fi
  516. done
  517. rm -rf conftest.dir
  518. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  519. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  520. AC_SUBST([am__tar])
  521. AC_SUBST([am__untar])
  522. ]) # _AM_PROG_TAR
  523. m4_include([acinclude.m4])