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