| 1 | ## -*- Autoconf -*-
|
|---|
| 2 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|---|
| 3 | #
|
|---|
| 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 |
|
|---|
| 8 | # AM_PROG_INSTALL_STRIP
|
|---|
| 9 | # ---------------------
|
|---|
| 10 | # One issue with vendor `install' (even GNU) is that you can't
|
|---|
| 11 | # specify the program used to strip binaries. This is especially
|
|---|
| 12 | # annoying in cross-compiling environments, where the build's strip
|
|---|
| 13 | # is unlikely to handle the host's binaries.
|
|---|
| 14 | # Fortunately install-sh will honor a STRIPPROG variable, so we
|
|---|
| 15 | # always use install-sh in `make install-strip', and initialize
|
|---|
| 16 | # STRIPPROG with the value of the STRIP variable (set by the user).
|
|---|
| 17 | AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
|---|
| 18 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
|---|
| 19 | # Installed binaries are usually stripped using `strip' when the user
|
|---|
| 20 | # run `make install-strip'. However `strip' might not be the right
|
|---|
| 21 | # tool to use in cross-compilation environments, therefore Automake
|
|---|
| 22 | # will honor the `STRIP' environment variable to overrule this program.
|
|---|
| 23 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
|---|
| 24 | if test "$cross_compiling" != no; then
|
|---|
| 25 | AC_CHECK_TOOL([STRIP], [strip], :)
|
|---|
| 26 | fi
|
|---|
| 27 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
|---|
| 28 | AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
|---|