diff --git a/build/aclocal/bakefile.m4 b/build/aclocal/bakefile.m4 index 6fe4dcdead..66e3d5f204 100644 --- a/build/aclocal/bakefile.m4 +++ b/build/aclocal/bakefile.m4 @@ -430,8 +430,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD], ;; *) - dnl wxWidgets specific: allow unknown unix systems - dnl AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.) + AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.) esac if test "x$PIC_FLAG" != "x" ; then @@ -522,6 +521,7 @@ AC_DEFUN([AC_BAKEFILE_DEPS], AC_MSG_CHECKING([for dependency tracking method]) + BK_DEPS="" if test "x$bk_use_trackdeps" = "xno" ; then DEPS_TRACKING=0 AC_MSG_RESULT([disabled]) @@ -569,10 +569,14 @@ AC_DEFUN([AC_BAKEFILE_DEPS], if test $DEPS_TRACKING = 1 ; then AC_BAKEFILE_CREATE_FILE_BK_DEPS chmod +x bk-deps + dnl FIXME: make this $(top_builddir)/bk-deps once autoconf-2.60 + dnl is required (and so top_builddir is never empty): + BK_DEPS="`pwd`/bk-deps" fi fi AC_SUBST(DEPS_TRACKING) + AC_SUBST(BK_DEPS) ]) dnl --------------------------------------------------------------------------- @@ -591,7 +595,19 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF], AC_PROG_MAKE_SET AC_SUBST(MAKE_SET) - AC_CHECK_TOOL(AR, ar, ar) + if test "x$SUNCXX" = "xyes"; then + dnl Sun C++ compiler requires special way of creating static libs; + dnl see here for more details: + dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863 + AR=$CXX + AC_SUBST(AR) + AROPTIONS="-xar -o" + else + AC_CHECK_TOOL(AR, ar, ar) + AROPTIONS=rcu + fi + AC_SUBST(AROPTIONS) + AC_CHECK_TOOL(STRIP, strip, :) AC_CHECK_TOOL(NM, nm, :) @@ -601,7 +617,10 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF], dnl use it there INSTALL_DIR="mkdir -p" ;; - *) INSTALL_DIR="$INSTALL -d" + * ) + dnl we must refer to makefile's $(INSTALL) variable and not + dnl current value of shell variable, hence the single quoting: + INSTALL_DIR='$(INSTALL) -d' ;; esac AC_SUBST(INSTALL_DIR) @@ -657,6 +676,7 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS], GCC_PCH=0 ICC_PCH=0 USE_PCH=0 + BK_MAKE_PCH="" case ${BAKEFILE_HOST} in *-*-cygwin* ) @@ -710,12 +730,17 @@ AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS], USE_PCH=1 AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH chmod +x bk-make-pch + dnl FIXME: make this $(top_builddir)/bk-make-pch once + dnl autoconf-2.60 is required (and so top_builddir is + dnl never empty): + BK_MAKE_PCH="`pwd`/bk-make-pch" fi fi fi AC_SUBST(GCC_PCH) AC_SUBST(ICC_PCH) + AC_SUBST(BK_MAKE_PCH) ]) @@ -743,7 +768,7 @@ dnl --------------------------------------------------------------------------- AC_DEFUN([AC_BAKEFILE], [ - AC_PREREQ(2.58) + AC_PREREQ([2.58]) if test "x$BAKEFILE_HOST" = "x"; then if test "x${host}" = "x" ; then