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