AC_TRY_COMPILE([],
[
#ifndef __INTEL_COMPILER
- #error Not ICC
+ This is not ICC
#endif
],
bakefile_cv_prog_icc=yes,
[
#if (__GNUC__ < 3) || \
((__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
- #error old gcc
+ This is old gcc
#endif
],
[
powerpc-apple-macos* | \
*-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
+ *-*-mirbsd* | \
*-*-sunos4* | \
*-*-osf* | \
*-*-dgux5* | \
;;
*)
- AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
+ dnl wxWidgets-specific: allow unknown Unix systems
+ dnl AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
esac
if test "x$PIC_FLAG" != "x" ; then
AC_MSG_CHECKING([for dependency tracking method])
+ BK_DEPS=""
if test "x$bk_use_trackdeps" = "xno" ; then
DEPS_TRACKING=0
AC_MSG_RESULT([disabled])
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 ---------------------------------------------------------------------------
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=${AR:-"$CXX"}
+ AC_SUBST(AR)
+ AROPTIONS=${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, :)
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)
GCC_PCH=0
ICC_PCH=0
USE_PCH=0
+ BK_MAKE_PCH=""
case ${BAKEFILE_HOST} in
*-*-cygwin* )
AC_TRY_COMPILE([],
[
#if !defined(__GNUC__) || !defined(__GNUC_MINOR__)
- #error "no pch support"
+ There is no PCH support
#endif
#if (__GNUC__ < 3)
- #error "no pch support"
+ There is no PCH support
#endif
#if (__GNUC__ == 3) && \
((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \
( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \
( defined(__INTEL_COMPILER) )
- #error "no pch support"
+ There is no PCH support
#endif
],
[
[
#if !defined(__INTEL_COMPILER) || \
(__INTEL_COMPILER < 800)
- #error "no pch support"
+ There is no PCH support
#endif
],
[
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)
])
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
AC_BAKEFILE_DEPS
AC_BAKEFILE_RES_COMPILERS
- BAKEFILE_BAKEFILE_M4_VERSION="0.2.0"
+ BAKEFILE_BAKEFILE_M4_VERSION="0.2.1"
dnl includes autoconf_inc.m4:
$1