From eb80267db99eb7661a2cab8f0cd1464fb4c35cbc Mon Sep 17 00:00:00 2001 From: Chilledheart Date: Wed, 23 Jul 2014 15:19:58 +0800 Subject: [PATCH] [build] detect darwin platform correctly --- autogen.sh | 13 +++++++++---- configure.ac | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/autogen.sh b/autogen.sh index 44c7348..b6a7d24 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,8 +5,13 @@ : ${AUTOHEADER=autoheader} : ${AUTOMAKE=automake} : ${ACLOCAL=aclocal} -: ${LIBTOOLIZE=libtoolize} -: ${LIBTOOL=libtool} +if test "$(uname -s)" != "Darwin"; then + : ${LIBTOOLIZE=libtoolize} + : ${LIBTOOL=libtool} +else + : ${LIBTOOLIZE=glibtoolize} + : ${LIBTOOL=glibtool} +fi srcdir=`dirname $0` test -z "$srcdir" && srcdir=. @@ -36,7 +41,7 @@ DIE=0 DIE=1 } -if test "${TERM_PROGRAM}" != "Apple_Terminal" ; then +if test "$(uname -s)" != "Darwin"; then (grep "^AC_PROG_LIBTOOL" $CONFIGURE >/dev/null) && { ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { echo @@ -54,7 +59,7 @@ fi if test x"$MSYSTEM" = x"MINGW32"; then autoreconf --install -I/local/share/aclocal -elif test "${TERM_PROGRAM}" = "Apple_Terminal" ; then +elif test "$(uname -s)" = "Darwin"; then autoreconf --install -I/opt/local/share/aclocal else autoreconf --install diff --git a/configure.ac b/configure.ac index 05e0d04..92c5f7d 100644 --- a/configure.ac +++ b/configure.ac @@ -56,7 +56,7 @@ AC_SUBST(WIN32) AC_MSG_CHECKING(for Mac) -if test ${TERM_PROGRAM} = "Apple_Terminal" ; then +if test "$(uname -s)" = "Darwin"; then bmac=yes fi