when finding the installer, check that -s works (doesn't work on Minix 3?)

This commit is contained in:
david parsons
2017-11-15 20:10:00 +00:00
parent beeb569412
commit 88913580f1
+16 -1
View File
@@ -1490,6 +1490,8 @@ AC_CC_SHLIBS () {
#
AC_PROG_INSTALL () {
if [ $PROG_INSTALL ]; then return; fi
DEST=`acLookFor install`
LOGN "looking for install"
@@ -1523,8 +1525,21 @@ AC_PROG_INSTALL () {
PROG_INSTALL="$DEST"
fi
# see if we can strip binaries
echo 'main() { puts("hello, sailor!"); }' > ngc$$.c
if $AC_CC -o ngc$$ ngc$$.c; then
if $PROG_INSTALL -s -m ngc$$ inst$$; then
_strip="-s"
else
unset _strip
LOG "(install -s does not appear to work?)"
fi
rm -f inst$$
fi
rm -f ngc$$ ngc$$.c
AC_SUB 'INSTALL' "$PROG_INSTALL"
AC_SUB 'INSTALL_PROGRAM' "$PROG_INSTALL -s -m 755"
AC_SUB 'INSTALL_PROGRAM' "$PROG_INSTALL $_strip -m 755"
AC_SUB 'INSTALL_DATA' "$PROG_INSTALL -m 444"
# finally build a little directory installer