Use uname command to detect Darwin platform

This commit is contained in:
Chilledheart 2014-06-08 14:55:16 +08:00
parent 41e8968929
commit 9ee615bce0
3 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${ACLOCAL=aclocal}
if test "${TERM_PROGRAM}" != "Apple_Terminal" ; then
if test "$(uname)" != "Darwin"; then
: ${LIBTOOLIZE=libtoolize}
else
: ${LIBTOOLIZE=glibtoolize}
@ -51,7 +51,7 @@ DIE=0
DIE=1
}
if [[ ! ${TERM_PROGRAM} =~ ^Apple ]] ; then
if test "$(uname)" != "Darwin"; then
(grep "^AC_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
echo
@ -97,7 +97,7 @@ aclocalinclude="$aclocalinclude -I m4"
if test x"$MSYSTEM" = x"MINGW32"; then
aclocalinclude="$aclocalinclude -I /local/share/aclocal"
elif [[ ${TERM_PROGRAM} =~ ^Apple ]] ; then
elif test "$(uname)" = "Darwin"; then
aclocalinclude="$aclocalinclude -I /opt/local/share/aclocal"
fi

View File

@ -43,7 +43,7 @@ else
fi
AC_MSG_CHECKING(for Mac)
if test "$TERM_PROGRAM" = "Apple_Terminal"; then
if test "$(uname)" = "Darwin"; then
bmac=true
AC_MSG_RESULT(compile in mac)
else

View File

@ -8,7 +8,7 @@ fi
old_ver=$1
new_ver=$2
if [[ "${TERM_PROGRAM}" =~ ^Apple ]]; then
if test "$(uname)" = "Darwin"; then
sed -i '' -e "s|$old_ver|$new_ver|" web/setup_mac.py
sed -i '' -e "s|VERSION=$old_ver|VERSION=$new_ver|" setupmac.sh
sed -i '' -e "s|<string>$old_ver</string>|<string>$new_ver</string>|" gui/mac/seafile/seafile/*.plist