diff options
author | Alexey Neyman <stilor@att.net> | 2018-02-17 10:37:18 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-04-07 12:03:17 -0700 |
commit | 66821508f4064904995189f4b46652eb6257b1ea (patch) | |
tree | bac14450df1be9d1d07759caad96115e7f4c1b0e /m4/ctng_prog_install.m4 | |
parent | 7655fc2a3c64fce46517d4a2af047d4c6e663f50 (diff) | |
download | crosstool-ng-66821508f4064904995189f4b46652eb6257b1ea.tar.gz crosstool-ng-66821508f4064904995189f4b46652eb6257b1ea.tar.bz2 crosstool-ng-66821508f4064904995189f4b46652eb6257b1ea.zip |
Fix install --strip-program check after merge
Also, fix the use of AC_CACHE_CHECK in stat format checker.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'm4/ctng_prog_install.m4')
-rw-r--r-- | m4/ctng_prog_install.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/ctng_prog_install.m4 b/m4/ctng_prog_install.m4 new file mode 100644 index 00000000..61cd3580 --- /dev/null +++ b/m4/ctng_prog_install.m4 @@ -0,0 +1,26 @@ +# Additional checks for install(1) + +# Check if install(1) supports --strip-program=... +AC_DEFUN( + [CTNG_INSTALL_STRIP_PROGRAM], + [AC_CACHE_CHECK([whether install takes --strip-program option], + [ctng_cv_install_with_strip_program], + [touch conftest + mkdir conftest.dir + AS_IF([$INSTALL --strip-program=true -s conftest conftest.dir/conftest 2>/dev/null], + [ctng_cv_install_with_strip_program=yes], + [ctng_cv_install_with_strip_program=no]) + rm -rf conftest.dir + rm -f conftest + ]) + AS_IF([test "$ctng_cv_install_with_strip_program" = yes], [$1], [$2]) + ]) + +AC_DEFUN([CTNG_PROG_INSTALL], + [CTNG_WITH_DEPRECATED([install], [INSTALL]) + AC_ARG_VAR([INSTALL], [Specify the full path to a BSD-compatible install]) + AC_PROG_INSTALL + CTNG_INSTALL_STRIP_PROGRAM( + [CTNG_SET_KCONFIG_OPTION([install_with_strip_program], [y])], + [CTNG_SET_KCONFIG_OPTION([install_with_strip_program])]) + ]) |