##------------------------------------------------------------##
# Process this file with autoconf to produce a configure script.
-AC_INIT(Valgrind, 3.6.0.SVN, valgrind-users@lists.sourceforge.net)
+AC_INIT([Valgrind],[3.9.0.SVN],[valgrind-users@lists.sourceforge.net])
AC_CONFIG_SRCDIR(coregrind/m_main.c)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
#----------------------------------------------------------------------------
# Checks for various programs.
#----------------------------------------------------------------------------
-CFLAGS="-Wno-long-long"
+CFLAGS="-Wno-long-long $CFLAGS"
AC_PROG_LN_S
AC_PROG_CC
# AC_SUBST([OBJCFLAGS])
# ])
AC_PROG_RANLIB
+# provide a very basic definition for AC_PROG_SED if it's not provided by
+# autoconf (as e.g. in autoconf 2.59).
+m4_ifndef([AC_PROG_SED],
+ [AC_DEFUN([AC_PROG_SED],
+ [AC_ARG_VAR([SED])
+ AC_CHECK_PROGS([SED],[gsed sed])])])
+AC_PROG_SED
# If no AR variable was specified, look up the name of the archiver. Otherwise
# do not touch the AR variable.
if test "x$AR" = "x"; then
- AC_PATH_PROGS([AR], [`echo $LD | sed 's/ld$/ar/'` "ar"], [ar])
+ AC_PATH_PROGS([AR], [`echo $LD | $SED 's/ld$/ar/'` "ar"], [ar])
fi
AC_ARG_VAR([AR],[Archiver command])
AC_MSG_CHECKING([for diff -u])
AC_SUBST(DIFF)
-# Comparing two identical files results in 0, unless -u isn't supported (as
-# it's not on AIX).
+# Comparing two identical files results in 0.
tmpfile="tmp-xxx-yyy-zzz"
touch $tmpfile;
if diff -u $tmpfile $tmpfile ; then
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
-[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
+# Obtain the compiler version.
+#
+# A few examples of how the ${CC} --version output looks like:
+#
+# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2
+# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2
+# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
+# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2
+# MontaVista Linux for ARM: arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3
+# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
+# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
+# Clang: clang version 2.9 (tags/RELEASE_29/final)
+# Apple clang: Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
+# FreeBSD clang: FreeBSD clang version 3.1 (branches/release_31 156863) 20120523
+#
+[
+if test "x`${CC} --version | $SED -n -e 's/.*\(clang\) version.*/\1/p'`" = "xclang" ; then
+ is_clang="clang"
+ # Don't use -dumpversion with clang: it will always produce "4.2.1".
+ gcc_version=`${CC} --version | $SED -n -e 's/.*clang version \([0-9.]*\).*$/\1/p'`
+else
+ is_clang="notclang"
+ gcc_version=`${CC} -dumpversion 2>/dev/null`
+ if test "x$gcc_version" = x; then
+ gcc_version=`${CC} --version | $SED -n -e 's/[^ ]*gcc[^ ]* ([^)]*) \([0-9.]*\).*$/\1/p'`
+ fi
+fi
+]
-case "${gcc_version}" in
- 2.*)
- AC_MSG_RESULT([no (${gcc_version})])
- AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
+case "${is_clang}-${gcc_version}" in
+ notclang-3.*)
+ AC_MSG_RESULT([ok (${gcc_version})])
;;
- *)
+ notclang-4.*)
AC_MSG_RESULT([ok (${gcc_version})])
;;
+ clang-2.9|clang-3.*|clang-4.*)
+ AC_MSG_RESULT([ok (clang-${gcc_version})])
+ ;;
+ *)
+ AC_MSG_RESULT([no (${gcc_version})])
+ AC_MSG_ERROR([please use gcc >= 3.0 or clang >= 2.9])
+ ;;
esac
#----------------------------------------------------------------------------
;;
powerpc64)
- # This value can only happen on Linux, not on AIX
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="ppc64"
;;
powerpc)
- # Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
- # Whereas in Linux that means only a 32-bit capable CPU.
+ # On Linux this means only a 32-bit capable CPU.
AC_MSG_RESULT([ok (${host_cpu})])
- case "${host_os}" in
- aix5.*)
- ARCH_MAX="ppc64"
- ;;
- *)
- ARCH_MAX="ppc32"
- ;;
- esac
+ ARCH_MAX="ppc32"
+ ;;
+
+ s390x)
+ AC_MSG_RESULT([ok (${host_cpu})])
+ ARCH_MAX="s390x"
;;
armv7*)
ARCH_MAX="arm"
;;
+ mips)
+ AC_MSG_RESULT([ok (${host_cpu})])
+ ARCH_MAX="mips32"
+ ;;
+
+ mipsel)
+ AC_MSG_RESULT([ok (${host_cpu})])
+ ARCH_MAX="mips32"
+ ;;
+
+ mipsisa32r2)
+ AC_MSG_RESULT([ok (${host_cpu})])
+ ARCH_MAX="mips32"
+ ;;
+
*)
AC_MSG_RESULT([no (${host_cpu})])
AC_MSG_ERROR([Unsupported host architecture. Sorry])
kernel=`uname -r`
case "${kernel}" in
- 2.6.*)
- AC_MSG_RESULT([2.6 family (${kernel})])
- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
+ 2.6.*|3.*)
+ AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
;;
2.4.*)
;;
- aix5.1.*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="aix5"
- ;;
- aix5.2.*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="aix5"
- ;;
- aix5.3.*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="aix5"
- ;;
-
- *freebsd*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="freebsd"
- ;;
-
*darwin*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="darwin"
+ AC_DEFINE([DARWIN_10_5], 100500, [DARWIN_VERS value for Mac OS X 10.5])
+ AC_DEFINE([DARWIN_10_6], 100600, [DARWIN_VERS value for Mac OS X 10.6])
+ AC_DEFINE([DARWIN_10_7], 100700, [DARWIN_VERS value for Mac OS X 10.7])
+ AC_DEFINE([DARWIN_10_8], 100800, [DARWIN_VERS value for Mac OS X 10.8])
AC_MSG_CHECKING([for the kernel version])
kernel=`uname -r`
# Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin
# has only one relevant version, the OS version. The `uname` check
# is a good way to get that version (i.e. "Darwin 9.6.0" is Mac OS
- # X 10.5.6, and "Darwin 10.x" would presumably be Mac OS X 10.6.x
- # Snow Leopard and darwin10.supp), and we don't know of an macros
- # similar to __GLIBC__ to get that info.
+ # X 10.5.6, and "Darwin 10.x" is Mac OS X 10.6.x Snow Leopard,
+ # and possibly "Darwin 11.x" is Mac OS X 10.7.x Lion),
+ # and we don't know of an macros similar to __GLIBC__ to get that info.
#
# XXX: `uname -r` won't do the right thing for cross-compiles, but
# that's not a problem yet.
+ #
+ # jseward 21 Sept 2011: I seriously doubt whether V 3.7.0 will work
+ # on OS X 10.5.x; I haven't tested yet, and only plan to test 3.7.0
+ # on 10.6.8 and 10.7.1. Although tempted to delete the configure
+ # time support for 10.5 (the 9.* pattern just below), I'll leave it
+ # in for now, just in case anybody wants to give it a try. But I'm
+ # assuming that 3.7.0 is a Snow Leopard and Lion-only release.
case "${kernel}" in
9.*)
AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
;;
- *)
+ 10.*)
+ AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version])
+ DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 11.*)
+ AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version])
+ DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 12.*)
+ AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version])
+ DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ *)
AC_MSG_RESULT([unsupported (${kernel})])
- AC_MSG_ERROR([Valgrind works on Darwin 9.x (Mac OS X 10.5)])
+ AC_MSG_ERROR([Valgrind works on Darwin 10.x and 11.x (Mac OS X 10.6/7)])
;;
esac
;;
*)
AC_MSG_RESULT([no (${host_os})])
- AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.])
+ AC_MSG_ERROR([Valgrind is operating system specific. Sorry.])
;;
esac
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
CFLAGS="-m32"
- AC_TRY_LINK(, [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
- ],
- [
+ ]])], [
AC_MSG_RESULT([yes])
], [
vg_cv_only64bit="yes"
AC_MSG_CHECKING([for a supported CPU/OS combination])
+# NB. The load address for a given platform may be specified in more
+# than one place, in some cases, depending on whether we're doing a biarch,
+# 32-bit only or 64-bit only build. eg see case for amd64-linux below.
+# Be careful to give consistent values in all subcases. Also, all four
+# valt_load_addres_{pri,sec}_{norml,inner} values must always be set,
+# even if it is to "0xUNSET".
+#
case "$ARCH_MAX-$VGCONF_OS" in
x86-linux)
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
amd64-linux)
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
elif test x$vg_cv_only32bit = xyes; then
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
else
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC="x86"
VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0x38000000"
+ valt_load_address_sec_inner="0x28000000"
fi
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
ppc32-linux)
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
- AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
- ;;
- ppc64-aix5)
- if test x$vg_cv_only64bit = xyes; then
- VGCONF_ARCH_PRI="ppc64"
- VGCONF_ARCH_SEC=""
- VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
- VGCONF_PLATFORM_SEC_CAPS=""
- elif test x$vg_cv_only32bit = xyes; then
- VGCONF_ARCH_PRI="ppc32"
- VGCONF_ARCH_SEC=""
- VGCONF_PLATFORM_PRI_CAPS="PPC32_AIX5"
- VGCONF_PLATFORM_SEC_CAPS=""
- else
- VGCONF_ARCH_PRI="ppc64"
- VGCONF_ARCH_SEC="ppc32"
- VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
- VGCONF_PLATFORM_SEC_CAPS="PPC32_AIX5"
- fi
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
ppc64-linux)
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="ppc64"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
elif test x$vg_cv_only32bit = xyes; then
VGCONF_ARCH_PRI="ppc32"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
else
VGCONF_ARCH_PRI="ppc64"
VGCONF_ARCH_SEC="ppc32"
VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0x38000000"
+ valt_load_address_sec_inner="0x28000000"
fi
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
- AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
- ;;
- x86-darwin)
- VGCONF_ARCH_PRI="x86"
- VGCONF_ARCH_SEC=""
- VGCONF_PLATFORM_PRI_CAPS="X86_DARWIN"
- VGCONF_PLATFORM_SEC_CAPS=""
- valt_load_address_normal="0x0"
- valt_load_address_inner="0x0"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
- amd64-darwin)
+ # Darwin gets identified as 32-bit even when it supports 64-bit.
+ # (Not sure why, possibly because 'uname' returns "i386"?) Just about
+ # all Macs support both 32-bit and 64-bit, so we just build both. If
+ # someone has a really old 32-bit only machine they can (hopefully?)
+ # build with --enable-only32bit. See bug 243362.
+ x86-darwin|amd64-darwin)
+ ARCH_MAX="amd64"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="AMD64_DARWIN"
VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x138000000"
+ valt_load_address_pri_inner="0x128000000"
elif test x$vg_cv_only32bit = xyes; then
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_DARWIN"
VGCONF_PLATFORM_SEC_CAPS=""
VGCONF_ARCH_PRI_CAPS="x86"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
else
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC="x86"
VGCONF_PLATFORM_PRI_CAPS="AMD64_DARWIN"
VGCONF_PLATFORM_SEC_CAPS="X86_DARWIN"
+ valt_load_address_pri_norml="0x138000000"
+ valt_load_address_pri_inner="0x128000000"
+ valt_load_address_sec_norml="0x38000000"
+ valt_load_address_sec_inner="0x28000000"
fi
- valt_load_address_normal="0x0"
- valt_load_address_inner="0x0"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
arm-linux)
VGCONF_ARCH_PRI="arm"
VGCONF_PLATFORM_PRI_CAPS="ARM_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
- valt_load_address_normal="0x38000000"
- valt_load_address_inner="0x28000000"
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
+ s390x-linux)
+ VGCONF_ARCH_PRI="s390x"
+ VGCONF_ARCH_SEC=""
+ VGCONF_PLATFORM_PRI_CAPS="S390X_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
+ # we want to have the generated code close to the dispatcher
+ valt_load_address_pri_norml="0x401000000"
+ valt_load_address_pri_inner="0x410000000"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
+ AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
+ ;;
+ mips32-linux)
+ VGCONF_ARCH_PRI="mips32"
+ VGCONF_PLATFORM_PRI_CAPS="MIPS32_LINUX"
+ VGCONF_PLATFORM_SEC_CAPS=""
+ valt_load_address_pri_norml="0x38000000"
+ valt_load_address_pri_inner="0x28000000"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
+ AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
+ AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
+ ;;
*)
VGCONF_ARCH_PRI="unknown"
VGCONF_ARCH_SEC="unknown"
VGCONF_PLATFORM_PRI_CAPS="UNKNOWN"
VGCONF_PLATFORM_SEC_CAPS="UNKNOWN"
+ valt_load_address_pri_norml="0xUNSET"
+ valt_load_address_pri_inner="0xUNSET"
+ valt_load_address_sec_norml="0xUNSET"
+ valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([no (${ARCH_MAX}-${VGCONF_OS})])
AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
;;
-o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN )
AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC32,
test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 )
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX )
AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 )
+ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX )
AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_ARM,
test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_S390X,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX )
+AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_MIPS32,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX )
# Set up VGCONF_PLATFORMS_INCLUDE_<platform>. Either one or two of these
# become defined.
test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_ARM_LINUX,
test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX)
-
-AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5)
-AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_S390X_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX \
+ -o x$VGCONF_PLATFORM_SEC_CAPS = xS390X_LINUX)
+AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX,
+ test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX)
AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_DARWIN,
test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN \
test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN)
-# Similarly, set up VGCONF_OF_IS_<os>. Exactly one of these becomes defined.
+# Similarly, set up VGCONF_OS_IS_<os>. Exactly one of these becomes defined.
# Relies on the assumption that the primary and secondary targets are
# for the same OS, so therefore only necessary to test the primary.
AM_CONDITIONAL(VGCONF_OS_IS_LINUX,
-o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
-o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
-o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX )
-AM_CONDITIONAL(VGCONF_OS_IS_AIX5,
- test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX)
AM_CONDITIONAL(VGCONF_OS_IS_DARWIN,
test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN \
-o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN)
AM_CONDITIONAL(VGCONF_HAVE_PLATFORM_SEC,
test x$VGCONF_PLATFORM_SEC_CAPS != x)
+dnl automake-1.10 does not have AM_COND_IF (added in 1.11), so we supply a
+dnl fallback definition
+dnl The macro is courtesy of Dave Hart:
+dnl https://lists.gnu.org/archive/html/automake/2010-12/msg00045.html
+m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
+if test -z "$$1_TRUE"; then :
+ m4_n([$2])[]dnl
+m4_ifval([$3],
+[else
+ $3
+])dnl
+fi[]dnl
+])])
#----------------------------------------------------------------------------
# Inner Valgrind?
# Check if this should be built as an inner Valgrind, to be run within
# another Valgrind. Choose the load address accordingly.
-AC_SUBST(VALT_LOAD_ADDRESS)
+AC_SUBST(VALT_LOAD_ADDRESS_PRI)
+AC_SUBST(VALT_LOAD_ADDRESS_SEC)
AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
[AC_ARG_ENABLE(inner,
[ --enable-inner enables self-hosting],
[vg_cv_inner=no])])
if test "$vg_cv_inner" = yes; then
AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
- VALT_LOAD_ADDRESS=$valt_load_address_inner
+ VALT_LOAD_ADDRESS_PRI=$valt_load_address_pri_inner
+ VALT_LOAD_ADDRESS_SEC=$valt_load_address_sec_inner
else
- VALT_LOAD_ADDRESS=$valt_load_address_normal
+ VALT_LOAD_ADDRESS_PRI=$valt_load_address_pri_norml
+ VALT_LOAD_ADDRESS_SEC=$valt_load_address_sec_norml
fi
#----------------------------------------------------------------------------
-# Libc and suppressions
+# Define MIPS_PAGE_SHIFT (--with-pagesize)
#----------------------------------------------------------------------------
-# This variable will collect the suppression files to be used.
-AC_SUBST(DEFAULT_SUPP)
-
-GLIBC_VERSION=""
-
-AC_EGREP_CPP([GLIBC_22], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
- GLIBC_22
- #endif
-#endif
-],
-GLIBC_VERSION="2.2")
+AC_ARG_WITH(pagesize,
+ [ --with-pagesize= override detected page size (4, 16 or 64)],
+ [psize=$withval],
+ [psize=0]
+)
+
+if test "$psize" = "0"; then
+ psizer=`getconf PAGESIZE`
+ let "psize=${psizer}/1024"
+fi
-AC_EGREP_CPP([GLIBC_23], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
- GLIBC_23
- #endif
-#endif
-],
-GLIBC_VERSION="2.3")
+if test "$psize" = "4"; then
+ AC_DEFINE([MIPS_PAGE_SHIFT], 12, [configured page size 4k])
+elif test "$psize" = "16"; then
+ AC_DEFINE([MIPS_PAGE_SHIFT], 14, [configured page size 16k])
+elif test "$psize" = "64"; then
+ AC_DEFINE([MIPS_PAGE_SHIFT], 16, [configured page size 64k])
+else
+ AC_DEFINE([MIPS_PAGE_SHIFT], 12, [configured default page size 4k])
+fi
+AC_MSG_RESULT([checking for Pagesize... ${psize}k])
-AC_EGREP_CPP([GLIBC_24], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
- GLIBC_24
- #endif
-#endif
-],
-GLIBC_VERSION="2.4")
+#----------------------------------------------------------------------------
+# Define shm_align for MIPS (--shared-memory-alignment)
+#----------------------------------------------------------------------------
+AC_ARG_WITH(alignment,
+ [ --with-alignment= shared memory alignment for MIPS],
+ [align=$withval],
+ [align=-1]
+)
-AC_EGREP_CPP([GLIBC_25], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
- GLIBC_25
- #endif
-#endif
-],
-GLIBC_VERSION="2.5")
+mod=`expr $align % 1024`
+
+let "psz=psize*1024*2"
+
+if test "$align" = "-1"; then
+ AC_DEFINE([SHM_ALIGNMENT], 2*(1UL << MIPS_PAGE_SHIFT),
+ [configured memory alignment 2*PAGE_SIZE])
+ AC_MSG_RESULT([checking for shared memory alignment... 2*PAGE_SIZE])
+elif test "$mod" = "0"; then
+ if test $align -lt $psz;
+ then
+ AC_MSG_ERROR([Alignment must be >= PAGE_SIZE])
+ else
+ AC_DEFINE_UNQUOTED([SHM_ALIGNMENT], ${align},
+ [configured memory alignment 2*PAGE_SIZE])
+ AC_MSG_RESULT([checking for shared memory alignment... ${align}])
+ fi
+else
+ AC_MSG_ERROR([Alignment % 1024 must be zero])
+fi
-AC_EGREP_CPP([GLIBC_26], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
- GLIBC_26
- #endif
-#endif
-],
-GLIBC_VERSION="2.6")
-AC_EGREP_CPP([GLIBC_27], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
- GLIBC_27
- #endif
-#endif
-],
-GLIBC_VERSION="2.7")
+#----------------------------------------------------------------------------
+# Extra fine-tuning of installation directories
+#----------------------------------------------------------------------------
+AC_ARG_WITH(tmpdir,
+ [ --with-tmpdir=PATH Specify path for temporary files],
+ tmpdir="$withval",
+ tmpdir="/tmp")
+AC_DEFINE_UNQUOTED(VG_TMPDIR, "$tmpdir", [Temporary files directory])
-AC_EGREP_CPP([GLIBC_28], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
- GLIBC_28
- #endif
-#endif
-],
-GLIBC_VERSION="2.8")
-AC_EGREP_CPP([GLIBC_29], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
- GLIBC_29
- #endif
-#endif
-],
-GLIBC_VERSION="2.9")
+#----------------------------------------------------------------------------
+# Libc and suppressions
+#----------------------------------------------------------------------------
+# This variable will collect the suppression files to be used.
+AC_SUBST(DEFAULT_SUPP)
-AC_EGREP_CPP([GLIBC_210], [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 10)
- GLIBC_210
- #endif
-#endif
-],
-GLIBC_VERSION="2.10")
+AC_CHECK_HEADER([features.h])
-AC_EGREP_CPP([GLIBC_211], [
+if test x$ac_cv_header_features_h = xyes; then
+ rm -f conftest.$ac_ext
+ cat <<_ACEOF >conftest.$ac_ext
#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
- GLIBC_211
- #endif
-#endif
-],
-GLIBC_VERSION="2.11")
-
-AC_EGREP_CPP([AIX5_LIBC], [
-#include <standards.h>
-#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
- AIX5_LIBC
+#if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+glibc version is: __GLIBC__ __GLIBC_MINOR__
#endif
-],
-GLIBC_VERSION="aix5")
+_ACEOF
+ GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is: //p' | $SED 's/ /./g'`"
+fi
# not really a version check
AC_EGREP_CPP([DARWIN_LIBC], [
],
GLIBC_VERSION="darwin")
+# not really a version check
+AC_EGREP_CPP([BIONIC_LIBC], [
+#if defined(__ANDROID__)
+ BIONIC_LIBC
+#endif
+],
+GLIBC_VERSION="bionic")
+
+
AC_MSG_CHECKING([the GLIBC_VERSION version])
case "${GLIBC_VERSION}" in
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 2.12)
+ AC_MSG_RESULT(2.12 family)
+ AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
- aix5)
- AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
- AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
- DEFAULT_SUPP="aix5libc.supp ${DEFAULT_SUPP}"
+ 2.13)
+ AC_MSG_RESULT(2.13 family)
+ AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 2.14)
+ AC_MSG_RESULT(2.14 family)
+ AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 2.15)
+ AC_MSG_RESULT(2.15 family)
+ AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
+ 2.16)
+ AC_MSG_RESULT(2.16 family)
+ AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
darwin)
AC_MSG_RESULT(Darwin)
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
# DEFAULT_SUPP set by kernel version check above.
;;
+ bionic)
+ AC_MSG_RESULT(Bionic)
+ AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
+ DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
+ ;;
*)
- AC_MSG_RESULT(unsupported version)
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.11])
- AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
+ AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
AC_MSG_ERROR([or Darwin libc])
;;
esac
DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
-# Add glibc and X11 suppressions for exp-ptrcheck
-DEFAULT_SUPP="exp-ptrcheck.supp ${DEFAULT_SUPP}"
+# Add glibc and X11 suppressions for exp-sgcheck
+DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}"
+
+
+#----------------------------------------------------------------------------
+# Platform variants?
+#----------------------------------------------------------------------------
+
+# Normally the PLAT = (ARCH, OS) characterisation of the platform is enough.
+# But there are times where we need a bit more control. The motivating
+# and currently only case is Android: this is almost identical to
+# {x86,arm}-linux, but not quite. So this introduces the concept of platform
+# variant tags, which get passed in the compile as -DVGPV_<arch>_<os>_<variant>
+# along with the main -DVGP_<arch>_<os> definition.
+#
+# In almost all cases, the <variant> bit is "vanilla". But for Android
+# it is "android" instead.
+#
+# Consequently (eg), plain arm-linux would build with
+#
+# -DVGP_arm_linux -DVGPV_arm_linux_vanilla
+#
+# whilst an Android build would have
+#
+# -DVGP_arm_linux -DVGPV_arm_linux_android
+#
+# Same for x86. The setup of the platform variant is pushed relatively far
+# down this file in order that we can inspect any of the variables set above.
+
+# In the normal case ..
+VGCONF_PLATVARIANT="vanilla"
+
+# Android ?
+if test "$GLIBC_VERSION" = "bionic";
+then
+ VGCONF_PLATVARIANT="android"
+fi
+
+AC_SUBST(VGCONF_PLATVARIANT)
+
+
+# FIXME: do we also want to define automake variables
+# VGCONF_PLATVARIANT_IS_<WHATEVER>, where WHATEVER is (currently)
+# VANILLA or ANDROID ? This would be in the style of VGCONF_ARCHS_INCLUDE,
+# VGCONF_PLATFORMS_INCLUDE and VGCONF_OS_IS above? Could easily enough
+# do that. Problem is that we can't do and-ing in Makefile.am's, but
+# that's what we'd need to do to use this, since what we'd want to write
+# is something like
+#
+# VGCONF_PLATFORMS_INCLUDE_ARM_LINUX && VGCONF_PLATVARIANT_IS_ANDROID
+#
+# Hmm. Can't think of a nice clean solution to this.
+
+AM_CONDITIONAL(VGCONF_PLATVARIANT_IS_VANILLA,
+ test x$VGCONF_PLATVARIANT = xvanilla)
+AM_CONDITIONAL(VGCONF_PLATVARIANT_IS_ANDROID,
+ test x$VGCONF_PLATVARIANT = xandroid)
#----------------------------------------------------------------------------
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
-], [
+]], [[
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
[Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
])
+# Check for PTHREAD_RWLOCK_T
+
+AC_MSG_CHECKING([for pthread_rwlock_t])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#define _GNU_SOURCE
+#include <pthread.h>
+]], [[
+ pthread_rwlock_t rwl;
+]])], [
+AC_MSG_RESULT([yes])
+AC_DEFINE([HAVE_PTHREAD_RWLOCK_T], 1,
+ [Define to 1 if you have the `pthread_rwlock_t' type.])
+], [
+AC_MSG_RESULT([no])
+])
+
+
# Check for PTHREAD_MUTEX_ADAPTIVE_NP
AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_ADAPTIVE_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.])
AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_ERRORCHECK_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.])
AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
return (PTHREAD_MUTEX_RECURSIVE_NP);
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1,
[Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.])
AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
-], [
+]], [[
pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1,
[Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.])
safe_CFLAGS=$CFLAGS
CFLAGS="-maltivec"
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <altivec.h>
-], [
+]], [[
vector unsigned int v;
-],
-[
+]])], [
ac_have_altivec=yes
AC_MSG_RESULT([yes])
+AC_DEFINE([HAS_ALTIVEC], 1,
+ [Define to 1 if gcc/as can do Altivec.])
], [
ac_have_altivec=no
AC_MSG_RESULT([no])
CFLAGS=$safe_CFLAGS
AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
-AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes])
+
+
+# Check that both: the compiler supports -mvsx and that the assembler
+# understands VSX instructions. If either of those doesn't work,
+# conclude that we can't do VSX. NOTE: basically this is a kludge
+# in that it conflates two things that should be separate -- whether
+# the compiler understands the flag vs whether the assembler
+# understands the opcodes. This really ought to be cleaned up
+# and done properly, like it is for x86/x86_64.
+
+AC_MSG_CHECKING([for VSX])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mvsx"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <altivec.h>
+]], [[
+ vector unsigned int v;
+ __asm__ __volatile__("xsmaddadp 32, 32, 33" ::: "memory","cc");
+]])], [
+ac_have_vsx=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_vsx=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AM_CONDITIONAL(HAS_VSX, test x$ac_have_vsx = xyes)
+
+
+AC_MSG_CHECKING([that assembler knows DFP])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ __asm__ __volatile__("dadd 1, 2, 3");
+ __asm__ __volatile__("dcffix 1, 2");
+]])], [
+ac_asm_have_dfp=yes
+AC_MSG_RESULT([yes])
+], [
+ac_asm_have_dfp=no
+AC_MSG_RESULT([no])
+])
+
+
+AC_MSG_CHECKING([that compiler knows -mhard-dfp switch])
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mhard-dfp"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ __asm__ __volatile__("dadd 1, 2, 3");
+ __asm__ __volatile__("dcffix 1, 2");
+]])], [
+ac_gcc_have_dfp=yes
+AC_MSG_RESULT([yes])
+], [
+ac_gcc_have_dfp=no
+AC_MSG_RESULT([no])
+])
+
+CFLAGS=$safe_CFLAGS
+
+AM_CONDITIONAL(HAS_DFP, test x$ac_asm_have_dfp = xyes -a x$ac_gcc_have_dfp = xyes)
+
+
+AC_MSG_CHECKING([that compiler knows DFP datatypes])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ _Decimal64 x = 0.0DD;
+]])], [
+ac_gcc_have_dfp_type=yes
+AC_MSG_RESULT([yes])
+], [
+ac_gcc_have_dfp_type=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_DFP_TESTS, test x$ac_gcc_have_dfp_type = xyes)
# Check for pthread_create@GLIBC2.0
safe_CFLAGS=$CFLAGS
CFLAGS="-lpthread"
-AC_TRY_LINK(
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
extern int pthread_create_glibc_2_0(void*, const void*,
void *(*)(void*), void*);
__asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
-], [
+]], [[
#ifdef __powerpc__
/*
* Apparently on PowerPC linking this program succeeds and generates an
pthread_create_glibc_2_0(0, 0, 0, 0);
#endif
return 0;
-],
-[
+]])], [
ac_have_pthread_create_glibc_2_0=yes
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_CREATE_GLIBC_2_0], 1,
# Check for eventfd_t, eventfd() and eventfd_read()
AC_MSG_CHECKING([for eventfd()])
-AC_TRY_LINK(
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/eventfd.h>
-], [
+]], [[
eventfd_t ev;
int fd;
fd = eventfd(5, 0);
eventfd_read(fd, &ev);
return 0;
-],
-[
+]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_EVENTFD], 1,
[Define to 1 if you have the `eventfd' function.])
safe_CFLAGS=$CFLAGS
CFLAGS="-m32"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_M32="-m32"
AC_MSG_RESULT([yes])
], [
AC_SUBST(FLAG_M32)
-# does this compiler support -maix32 ?
-AC_MSG_CHECKING([if gcc accepts -maix32])
+# does this compiler support -m64 ?
+AC_MSG_CHECKING([if gcc accepts -m64])
safe_CFLAGS=$CFLAGS
-CFLAGS="-maix32"
+CFLAGS="-m64"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
-FLAG_MAIX32="-maix32"
+]])], [
+FLAG_M64="-m64"
AC_MSG_RESULT([yes])
], [
-FLAG_MAIX32=""
+FLAG_M64=""
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
-AC_SUBST(FLAG_MAIX32)
-
-
-# does this compiler support -m64 ?
-AC_MSG_CHECKING([if gcc accepts -m64])
-
-safe_CFLAGS=$CFLAGS
-CFLAGS="-m64"
-
-AC_TRY_COMPILE(, [
- return 0;
-],
-[
-FLAG_M64="-m64"
-AC_MSG_RESULT([yes])
-], [
-FLAG_M64=""
-AC_MSG_RESULT([no])
-])
-CFLAGS=$safe_CFLAGS
-
-AC_SUBST(FLAG_M64)
-
-
-# does this compiler support -maix64 ?
-AC_MSG_CHECKING([if gcc accepts -maix64])
-
-safe_CFLAGS=$CFLAGS
-CFLAGS="-maix64"
-
-AC_TRY_COMPILE(, [
- return 0;
-],
-[
-FLAG_MAIX64="-maix64"
-AC_MSG_RESULT([yes])
-], [
-FLAG_MAIX64=""
-AC_MSG_RESULT([no])
-])
-CFLAGS=$safe_CFLAGS
-
-AC_SUBST(FLAG_MAIX64)
+AC_SUBST(FLAG_M64)
# does this compiler support -mmmx ?
safe_CFLAGS=$CFLAGS
CFLAGS="-mmmx"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_MMMX="-mmmx"
AC_MSG_RESULT([yes])
], [
safe_CFLAGS=$CFLAGS
CFLAGS="-msse"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
FLAG_MSSE="-msse"
AC_MSG_RESULT([yes])
], [
safe_CFLAGS=$CFLAGS
CFLAGS="-mpreferred-stack-boundary=2"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
AC_MSG_RESULT([yes])
], [
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-pointer-sign"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
no_pointer_sign=yes
AC_MSG_RESULT([yes])
], [
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-empty-body"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_EMPTY_BODY], [-Wno-empty-body])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_EMPTY_BODY], [])
AC_MSG_RESULT([no])
])
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-format-zero-length"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
+# does this compiler support -Wno-nonnull ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-nonnull])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-nonnull"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+]])], [
+AC_SUBST([FLAG_W_NO_NONNULL], [-Wno-nonnull])
+AC_MSG_RESULT([yes])
+], [
+AC_SUBST([FLAG_W_NO_NONNULL], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
+# does this compiler support -Wno-overflow ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-overflow])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-overflow"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+]])], [
+AC_SUBST([FLAG_W_NO_OVERFLOW], [-Wno-overflow])
+AC_MSG_RESULT([yes])
+], [
+AC_SUBST([FLAG_W_NO_OVERFLOW], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
# does this compiler support -Wno-uninitialized ?
AC_MSG_CHECKING([if gcc accepts -Wno-uninitialized])
safe_CFLAGS=$CFLAGS
CFLAGS="-Wno-uninitialized"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_NO_UNINITIALIZED], [-Wno-uninitialized])
AC_MSG_RESULT([yes])
-],
-[
+], [
AC_SUBST([FLAG_W_NO_UNINITIALIZED], [])
AC_MSG_RESULT([no])
])
safe_CFLAGS=$CFLAGS
CFLAGS="-Wextra"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_W_EXTRA], [-Wextra])
AC_MSG_RESULT([-Wextra])
], [
CFLAGS="-W"
- AC_TRY_COMPILE(
- [ ],
- [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
- ],
- [
+ ]])], [
AC_SUBST([FLAG_W_EXTRA], [-W])
AC_MSG_RESULT([-W])
], [
safe_CFLAGS=$CFLAGS
CFLAGS="-fno-stack-protector"
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
-],
-[
+]])], [
no_stack_protector=yes
FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
AC_MSG_RESULT([yes])
safe_CFLAGS=$CFLAGS
CFLAGS="--param inline-unit-growth=900"
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
return 0;
-],
-[
+]])], [
AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
["--param inline-unit-growth=900"])
AC_MSG_RESULT([yes])
CFLAGS=$safe_CFLAGS
+# does this compiler support -gdwarf-4 -fdebug-types-section ?
+
+AC_MSG_CHECKING([if gcc accepts -gdwarf-4 -fdebug-types-section])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-gdwarf-4 -fdebug-types-section"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+]])], [
+ac_have_dwarf4=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_dwarf4=no
+AC_MSG_RESULT([no])
+])
+AM_CONDITIONAL(DWARF4, test x$ac_have_dwarf4 = xyes)
+CFLAGS=$safe_CFLAGS
+
+
+# does the linker support -Wl,--build-id=none ? Note, it's
+# important that we test indirectly via whichever C compiler
+# is selected, rather than testing /usr/bin/ld or whatever
+# directly.
+
+AC_MSG_CHECKING([if the linker accepts -Wl,--build-id=none])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wl,--build-id=none"
+
+AC_LINK_IFELSE(
+[AC_LANG_PROGRAM([ ], [return 0;])],
+[
+ AC_SUBST([FLAG_NO_BUILD_ID], ["-Wl,--build-id=none"])
+ AC_MSG_RESULT([yes])
+], [
+ AC_SUBST([FLAG_NO_BUILD_ID], [""])
+ AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
# does the ppc assembler support "mtocrf" et al?
AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
__asm__ __volatile__("mtocrf 4,0");
__asm__ __volatile__("mfocrf 0,4");
-],
-[
+]])], [
ac_have_as_ppc_mftocrf=yes
AC_MSG_RESULT([yes])
], [
fi
+CFLAGS=$safe_CFLAGS
+
# does the x86/amd64 assembler understand SSE3 instructions?
# Note, this doesn't generate a C-level symbol. It generates a
# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
-AC_TRY_COMPILE(, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
while (0)
-],
-[
+]])], [
ac_have_as_sse3=yes
AC_MSG_RESULT([yes])
], [
# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
-AC_TRY_COMPILE(, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -msse"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
do { long long int x;
__asm__ __volatile__(
"pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
while (0)
-],
-[
+]])], [
ac_have_as_ssse3=yes
AC_MSG_RESULT([yes])
], [
ac_have_as_ssse3=no
AC_MSG_RESULT([no])
])
+CFLAGS="$save_CFLAGS"
AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
+# does the x86/amd64 assembler understand the PCLMULQDQ instruction?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_PCLMULQDQ_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler supports 'pclmulqdq'])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do {
+ __asm__ __volatile__(
+ "pclmulqdq \$17,%%xmm6,%%xmm7" : : : "xmm6", "xmm7" ); }
+ while (0)
+]])], [
+ac_have_as_pclmulqdq=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_pclmulqdq=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_PCLMULQDQ_TESTS, test x$ac_have_as_pclmulqdq = xyes)
+
+
+# does the x86/amd64 assembler understand the VPCLMULQDQ instruction?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_VPCLMULQDQ_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler supports 'vpclmulqdq'])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do {
+ /*
+ * Carry-less multiplication of xmm1 with xmm2 and store the result in
+ * xmm3. The immediate is used to determine which quadwords of xmm1 and
+ * xmm2 should be used.
+ */
+ __asm__ __volatile__(
+ "vpclmulqdq \$0,%%xmm1,%%xmm2,%%xmm3" : : : );
+ } while (0)
+]])], [
+ac_have_as_vpclmulqdq=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_vpclmulqdq=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_VPCLMULQDQ_TESTS, test x$ac_have_as_vpclmulqdq = xyes)
+
+
+# does the x86/amd64 assembler understand the LZCNT instruction?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_LZCNT_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt'])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do {
+ __asm__ __volatile__("lzcnt %%rax,%%rax" : : : "rax");
+ } while (0)
+]])], [
+ ac_have_as_lzcnt=yes
+ AC_MSG_RESULT([yes])
+], [
+ ac_have_as_lzcnt=no
+ AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL([BUILD_LZCNT_TESTS], [test x$ac_have_as_lzcnt = xyes])
+
+
+# does the x86/amd64 assembler understand SSE 4.2 instructions?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_SSE42_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE4.2])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do { long long int x;
+ __asm__ __volatile__(
+ "crc32q %%r15,%%r15" : : : "r15" );
+ __asm__ __volatile__(
+ "pblendvb (%%rcx), %%xmm11" : : : "memory", "xmm11");
+ __asm__ __volatile__(
+ "aesdec %%xmm2, %%xmm1" : : : "xmm2", "xmm1"); }
+ while (0)
+]])], [
+ac_have_as_sse42=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_sse42=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_SSE42_TESTS, test x$ac_have_as_sse42 = xyes)
+
+
+# does the x86/amd64 assembler understand AVX instructions?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_AVX_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler speaks AVX])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do { long long int x;
+ __asm__ __volatile__(
+ "vmovupd (%%rsp), %%ymm7" : : : "xmm7" );
+ __asm__ __volatile__(
+ "vaddpd %%ymm6,%%ymm7,%%ymm8" : : : "xmm6","xmm7","xmm8"); }
+ while (0)
+]])], [
+ac_have_as_avx=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_avx=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_AVX_TESTS, test x$ac_have_as_avx = xyes)
+
+
+# does the x86/amd64 assembler understand MOVBE?
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_MOVBE_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if x86/amd64 assembler knows the MOVBE insn])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ do { long long int x;
+ __asm__ __volatile__(
+ "movbe (%%rsp), %%r15" : : : "memory", "r15" ); }
+ while (0)
+]])], [
+ac_have_as_movbe=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_movbe=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_MOVBE_TESTS, test x$ac_have_as_movbe = xyes)
+
+
+# Does the C compiler support the "ifunc" attribute
+# Note, this doesn't generate a C-level symbol. It generates a
+# automake-level symbol (BUILD_IFUNC_TESTS), used in test Makefile.am's
+AC_MSG_CHECKING([if gcc supports the ifunc attribute])
+
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+static void mytest(void) {}
+
+static void (*resolve_test(void))(void)
+{
+ return (void (*)(void))&mytest;
+}
+
+void test(void) __attribute__((ifunc("resolve_test")));
+
+int main()
+{
+ test();
+ return 0;
+}
+]])], [
+ac_have_ifunc_attr=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_ifunc_attr=no
+AC_MSG_RESULT([no])
+])
+
+AM_CONDITIONAL(BUILD_IFUNC_TESTS, test x$ac_have_ifunc_attr = xyes)
+
+
+# XXX JRS 2010 Oct 13: what is this for? For sure, we don't need this
+# when building the tool executables. I think we should get rid of it.
+#
# Check for TLS support in the compiler and linker
-if test "x${cross_compiling}" = "xno"; then
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
+ [[return foo;]])],
+ [vg_cv_linktime_tls=yes],
+ [vg_cv_linktime_tls=no])
# Native compilation: check whether running a program using TLS succeeds.
# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
# succeeds but running programs using TLS fails.
-AC_CACHE_CHECK([for TLS support], vg_cv_tls,
- [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
- [vg_cv_tls=$enableval],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
- [[return foo;]])],
- [vg_cv_tls=yes],
- [vg_cv_tls=no])])])
-else
# Cross-compiling: check whether linking a program using TLS succeeds.
AC_CACHE_CHECK([for TLS support], vg_cv_tls,
[AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
[vg_cv_tls=$enableval],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
[[return foo;]])],
[vg_cv_tls=yes],
- [vg_cv_tls=no])])])
-fi
+ [vg_cv_tls=no],
+ [vg_cv_tls=$vg_cv_linktime_tls])])])
if test "$vg_cv_tls" = yes; then
AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
sys/types.h \
])
+# Verify whether the <linux/futex.h> header is usable.
+AC_MSG_CHECKING([if <linux/futex.h> is usable])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <linux/futex.h>
+]], [[
+ return FUTEX_WAIT;
+]])], [
+ac_have_usable_linux_futex_h=yes
+AC_DEFINE([HAVE_USABLE_LINUX_FUTEX_H], 1,
+ [Define to 1 if you have a usable <linux/futex.h> header file.])
+AC_MSG_RESULT([yes])
+], [
+ac_have_usable_linux_futex_h=no
+AC_MSG_RESULT([no])
+])
+
#----------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
AC_FUNC_MEMCMP
AC_FUNC_MMAP
-AC_TYPE_SIGNAL
+AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_FUNCS([ \
clock_gettime\
epoll_create \
epoll_pwait \
- floor \
klogctl \
mallinfo \
memchr \
strrchr \
strstr \
syscall \
- timerfd \
utimensat \
+ process_vm_readv \
+ process_vm_writev \
])
# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
#----------------------------------------------------------------------------
# Do we have a useable MPI setup on the primary and/or secondary targets?
# On Linux, by default, assumes mpicc and -m32/-m64
-# On AIX, by default, assumes mpxlc and -q32/-q64
# Note: this is a kludge in that it assumes the specified mpicc
-# understands -m32/-m64/-q32/-q64 regardless of what is specified using
+# understands -m32/-m64 regardless of what is specified using
# --with-mpicc=.
MPI_CC="mpicc"
-if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
- MPI_CC="mpxlc"
-fi
mflag_primary=
if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX ; then
mflag_primary=$FLAG_M32
elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
- -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
+ -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX ; then
mflag_primary=$FLAG_M64
-elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
- mflag_primary=-q32
-elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
- mflag_primary=-q64
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN ; then
+ mflag_primary="$FLAG_M32 -arch i386"
+elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN ; then
+ mflag_primary="$FLAG_M64 -arch x86_64"
fi
mflag_secondary=
if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
-o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
mflag_secondary=$FLAG_M32
-elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
- mflag_secondary=-q32
+elif test x$VGCONF_PLATFORM_SEC_CAPS = xX86_DARWIN ; then
+ mflag_secondary="$FLAG_M32 -arch i386"
fi
)
AC_SUBST(MPI_CC)
+## We AM_COND_IF here instead of automake "if" in mpi/Makefile.am so that we can
+## use these values in the check for a functioning mpicc.
+##
+## We leave the MPI_FLAG_M3264_ logic in mpi/Makefile.am and assume that
+## mflag_primary/mflag_secondary are sufficient approximations of that behavior
+AM_COND_IF([VGCONF_OS_IS_LINUX],
+ [CFLAGS_MPI="-g -O -fno-omit-frame-pointer -Wall -fpic"
+ LDFLAGS_MPI="-fpic -shared"])
+AM_COND_IF([VGCONF_OS_IS_DARWIN],
+ [CFLAGS_MPI="-g -O -fno-omit-frame-pointer -Wall -dynamic"
+ LDFLAGS_MPI="-dynamic -dynamiclib -all_load"])
+
+AC_SUBST([CFLAGS_MPI])
+AC_SUBST([LDFLAGS_MPI])
+
+
## See if MPI_CC works for the primary target
##
AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
CC=$MPI_CC
-CFLAGS=$mflag_primary
-AC_TRY_LINK([
+CFLAGS="$CFLAGS_MPI $mflag_primary"
+saved_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS_MPI $mflag_primary"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mpi.h>
#include <stdio.h>
-],[
+]], [[
+ int ni, na, nd, comb;
int r = MPI_Init(NULL,NULL);
- r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
+ r |= MPI_Type_get_envelope( MPI_INT, &ni, &na, &nd, &comb );
+ r |= MPI_Finalize();
return r;
-], [
+]])], [
ac_have_mpi2_pri=yes
AC_MSG_RESULT([yes, $MPI_CC])
], [
])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
+LDFLAGS="$saved_LDFLAGS"
AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
## See if MPI_CC works for the secondary target. Complication: what if
AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
+saved_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS_MPI $mflag_secondary"
if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
CC="$MPI_CC this will surely fail"
else
CC=$MPI_CC
fi
-CFLAGS=$mflag_secondary
-AC_TRY_LINK([
+CFLAGS="$CFLAGS_MPI $mflag_secondary"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mpi.h>
#include <stdio.h>
-],[
+]], [[
+ int ni, na, nd, comb;
int r = MPI_Init(NULL,NULL);
- r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
+ r |= MPI_Type_get_envelope( MPI_INT, &ni, &na, &nd, &comb );
+ r |= MPI_Finalize();
return r;
-], [
+]])], [
ac_have_mpi2_sec=yes
AC_MSG_RESULT([yes, $MPI_CC])
], [
])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
+LDFLAGS="$saved_LDFLAGS"
AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
#----------------------------------------------------------------------------
# Other library checks
#----------------------------------------------------------------------------
-# There now follow some tests for QtCore, Boost, and OpenMP. These
+# There now follow some tests for Boost, and OpenMP. These
# tests are present because Drd has some regression tests that use
# these packages. All regression test programs all compiled only
# for the primary target. And so it is important that the configure
# NEEDED BY THE REGRESSION TEST PROGRAMS.
-# The test below verifies whether the QtCore package been installed.
-# This test works as follows:
-# - If pkg-config was not installed at the time autogen.sh was run,
-# the definition of the PKG_CHECK_EXISTS() macro will not be found by
-# autogen.sh. Augogen.sh will generate a configure script that prints
-# a warning about pkg-config and proceeds as if Qt4 has not been installed.
-# - If pkg-config was installed at the time autogen.sh was run,
-# the generated configure script will try to detect the presence of the
-# Qt4 QtCore library by looking up compile and linker flags in the file
-# called QtCore.pc.
-# - pkg-config settings can be overridden via the configure variables
-# QTCORE_CFLAGS and QTCORE_LIBS (added by the pkg-config m4 macro's to the
-# configure script -- see also ./configure --help).
-# - The QTCORE_CFLAGS and QTCORE_LIBS configure variables can be used even if
-# the pkg-config executable is not present on the system on which the
-# configure script is run.
-
-ifdef(
- [PKG_CHECK_EXISTS],
- [PKG_CHECK_EXISTS(
- [QtCore],
- [
- PKG_CHECK_MODULES([QTCORE], [QtCore])
- # Paranoia: don't trust the result reported by pkg-config, but when
- # pkg-config reports that QtCore has been found, verify whether linking
- # programs with QtCore succeeds.
- AC_LANG(C++)
- safe_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
- AC_TRY_LINK(
- [#include <QMutex>],
- [QMutex Mutex;],
- [ac_have_qtcore=yes],
- [
- AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
- ac_have_qtcore=no
- ]
- )
- CXXFLAGS="${safe_CXXFLAGS}"
- ],
- [
- ac_have_qtcore=no
- ]
- )
- ],
- AC_MSG_WARN([pkg-config has not been installed or is too old.])
- AC_MSG_WARN([Detection of Qt4 will be skipped.])
- [ac_have_qtcore=no]
-)
-
-AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])
-
-
-# Test for QMutex::tryLock(int), which has been introduced in Qt 4.3.
-# See also http://doc.trolltech.com/4.3/qmutex.html.
-if test x$ac_have_qtcore = xyes; then
- AC_MSG_CHECKING([for Qt4 QMutex::tryLock(int)])
- AC_LANG(C++)
- safe_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary"
- AC_TRY_COMPILE([
- #include <QtCore/QMutex>
- ],
- [
- QMutex M;
- M.tryLock(1);
- M.unlock();
- return 0;
- ],
- [
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_QTCORE_QMUTEX_TRYLOCK_INT], [1], [Define to 1 if the installed version of Qt4 provides QMutex::tryLock(int).])
- ],
- [
- AC_MSG_RESULT([no])
- ])
- CXXFLAGS="${safe_CXXFLAGS}"
- AC_LANG(C)
-fi
-
-
-# Test for QAtomicInt, which has been introduced in Qt 4.4.
-# See also http://doc.trolltech.com/4.4/qatomicint.html.
-if test x$ac_have_qtcore = xyes; then
- AC_MSG_CHECKING([for Qt4 QAtomicInt])
- AC_LANG(C++)
- safe_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary"
- AC_TRY_COMPILE([
- #include <QtCore/QAtomicInt>
- ],
- [
- QAtomicInt I;
- I.testAndSetOrdered(0, 1);
- return 0;
- ],
- [
- ac_have_qtcore_qatomicint=yes
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_QTCORE_QATOMICINT], [1], [Define to 1 if the installed version of Qt4 provides QAtomicInt.])
- ],
- [
- ac_have_qtcore_qatomicint=no
- AC_MSG_RESULT([no])
- ])
- CXXFLAGS="${safe_CXXFLAGS}"
- AC_LANG(C)
-fi
-
-AM_CONDITIONAL([HAVE_QTCORE_QATOMICINT], [test x$ac_have_qtcore_qatomicint = xyes])
-
-
-
# Check whether the boost library 1.35 or later has been installed.
# The Boost.Threads library has undergone a major rewrite in version 1.35.0.
AC_LANG(C++)
safe_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-lboost_thread-mt $mflag_primary"
+CXXFLAGS="$mflag_primary"
+safe_LIBS="$LIBS"
+LIBS="-lboost_thread-mt $LIBS"
-AC_LINK_IFELSE(
-[
+AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <boost/thread.hpp>
static void thread_func(void)
{ }
boost::thread t(thread_func);
return 0;
}
-],
+])],
[
ac_have_boost_1_35=yes
AC_SUBST([BOOST_CFLAGS], [])
-AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"])
+AC_SUBST([BOOST_LIBS], [-lboost_thread-mt])
AC_MSG_RESULT([yes])
], [
ac_have_boost_1_35=no
AC_MSG_RESULT([no])
])
+LIBS="$safe_LIBS"
CXXFLAGS=$safe_CXXFLAGS
AC_LANG(C)
safe_CFLAGS=$CFLAGS
CFLAGS="-fopenmp $mflag_primary"
-AC_LINK_IFELSE(
-[
+AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <omp.h>
int main(int argc, char** argv)
{
omp_set_dynamic(0);
return 0;
}
-],
+])],
[
ac_have_openmp=yes
AC_MSG_RESULT([yes])
AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
-# does this compiler have built-in functions for atomic memory access ?
-AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
+# does this compiler have built-in functions for atomic memory access for the
+# primary target ?
+AC_MSG_CHECKING([if gcc supports __sync_add_and_fetch for the primary target])
safe_CFLAGS=$CFLAGS
CFLAGS="$mflag_primary"
-AC_TRY_LINK(,
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int variable = 1;
return (__sync_bool_compare_and_swap(&variable, 1, 2)
&& __sync_add_and_fetch(&variable, 1) ? 1 : 0)
-],
-[
- ac_have_builtin_atomic=yes
+]])], [
+ ac_have_builtin_atomic_primary=yes
AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
-],
-[
- ac_have_builtin_atomic=no
+ AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() and __sync_add_and_fetch() for the primary target])
+], [
+ ac_have_builtin_atomic_primary=no
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
-AM_CONDITIONAL([HAVE_BUILTIN_ATOMIC], [test x$ac_have_builtin_atomic = xyes])
+AM_CONDITIONAL([HAVE_BUILTIN_ATOMIC],
+ [test x$ac_have_builtin_atomic_primary = xyes])
+
+
+# does this compiler have built-in functions for atomic memory access for the
+# secondary target ?
+
+if test x$VGCONF_PLATFORM_SEC_CAPS != x; then
+
+AC_MSG_CHECKING([if gcc supports __sync_add_and_fetch for the secondary target])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="$mflag_secondary"
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+ int variable = 1;
+ return (__sync_add_and_fetch(&variable, 1) ? 1 : 0)
+]])], [
+ ac_have_builtin_atomic_secondary=yes
+ AC_MSG_RESULT([yes])
+], [
+ ac_have_builtin_atomic_secondary=no
+ AC_MSG_RESULT([no])
+])
+
+CFLAGS=$safe_CFLAGS
+
+fi
+
+AM_CONDITIONAL([HAVE_BUILTIN_ATOMIC_SECONDARY],
+ [test x$ac_have_builtin_atomic_secondary = xyes])
+
+# does this compiler have built-in functions for atomic memory access on
+# 64-bit integers for all targets ?
+
+AC_MSG_CHECKING([if gcc supports __sync_add_and_fetch on uint64_t for all targets])
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdint.h>
+]], [[
+ uint64_t variable = 1;
+ return __sync_add_and_fetch(&variable, 1)
+]])], [
+ ac_have_builtin_atomic64_primary=yes
+], [
+ ac_have_builtin_atomic64_primary=no
+])
+
+if test x$VGCONF_PLATFORM_SEC_CAPS != x; then
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="$mflag_secondary"
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdint.h>
+]], [[
+ uint64_t variable = 1;
+ return __sync_add_and_fetch(&variable, 1)
+]])], [
+ ac_have_builtin_atomic64_secondary=yes
+], [
+ ac_have_builtin_atomic64_secondary=no
+])
+
+CFLAGS=$safe_CFLAGS
+
+fi
+
+if test x$ac_have_builtin_atomic64_primary = xyes && \
+ test x$VGCONF_PLATFORM_SEC_CAPS = x \
+ -o x$ac_have_builtin_atomic64_secondary = xyes; then
+ AC_MSG_RESULT([yes])
+ ac_have_builtin_atomic64=yes
+else
+ AC_MSG_RESULT([no])
+ ac_have_builtin_atomic64=no
+fi
+
+AM_CONDITIONAL([HAVE_BUILTIN_ATOMIC64],
+ [test x$ac_have_builtin_atomic64 = xyes])
+
+
+# does g++ have built-in functions for atomic memory access ?
+AC_MSG_CHECKING([if g++ supports __sync_add_and_fetch])
+
+safe_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$mflag_primary"
+
+AC_LANG_PUSH(C++)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+ int variable = 1;
+ return (__sync_bool_compare_and_swap(&variable, 1, 2)
+ && __sync_add_and_fetch(&variable, 1) ? 1 : 0)
+]])], [
+ ac_have_builtin_atomic_cxx=yes
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_BUILTIN_ATOMIC_CXX, 1, [Define to 1 if g++ supports __sync_bool_compare_and_swap() and __sync_add_and_fetch()])
+], [
+ ac_have_builtin_atomic_cxx=no
+ AC_MSG_RESULT([no])
+])
+AC_LANG_POP(C++)
+
+CXXFLAGS=$safe_CXXFLAGS
+
+AM_CONDITIONAL([HAVE_BUILTIN_ATOMIC_CXX], [test x$ac_have_builtin_atomic_cxx = xyes])
+
+
+if test x$ac_have_usable_linux_futex_h = xyes \
+ -a x$ac_have_builtin_atomic_primary = xyes; then
+ ac_enable_linux_ticket_lock_primary=yes
+fi
+AM_CONDITIONAL([ENABLE_LINUX_TICKET_LOCK_PRIMARY],
+ [test x$ac_enable_linux_ticket_lock_primary = xyes])
+
+if test x$VGCONF_PLATFORM_SEC_CAPS != x \
+ -a x$ac_have_usable_linux_futex_h = xyes \
+ -a x$ac_have_builtin_atomic_secondary = xyes; then
+ ac_enable_linux_ticket_lock_secondary=yes
+fi
+AM_CONDITIONAL([ENABLE_LINUX_TICKET_LOCK_SECONDARY],
+ [test x$ac_enable_linux_ticket_lock_secondary = xyes])
+
+
+# does libstdc++ support annotating shared pointers ?
+AC_MSG_CHECKING([if libstdc++ supports annotating shared pointers])
+
+safe_CXXFLAGS=$CFLAGS
+CXXFLAGS="-std=c++0x"
+
+AC_LANG_PUSH(C++)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <memory>
+]], [[
+ std::shared_ptr<int> p
+]])], [
+ ac_have_shared_ptr=yes
+], [
+ ac_have_shared_ptr=no
+])
+if test x$ac_have_shared_ptr = xyes; then
+ # If compilation of the program below fails because of a syntax error
+ # triggered by substituting one of the annotation macros then that
+ # means that libstdc++ supports these macros.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(a) (a)----
+ #define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(a) (a)----
+ #include <memory>
+ ]], [[
+ std::shared_ptr<int> p
+ ]])], [
+ ac_have_shared_pointer_annotation=no
+ AC_MSG_RESULT([no])
+ ], [
+ ac_have_shared_pointer_annotation=yes
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_SHARED_POINTER_ANNOTATION, 1,
+ [Define to 1 if libstd++ supports annotating shared pointers])
+ ])
+else
+ ac_have_shared_pointer_annotation=no
+ AC_MSG_RESULT([no])
+fi
+AC_LANG_POP(C++)
+
+CXXFLAGS=$safe_CXXFLAGS
+
+AM_CONDITIONAL([HAVE_SHARED_POINTER_ANNOTATION],
+ [test x$ac_have_shared_pointer_annotation = xyes])
#----------------------------------------------------------------------------
tests/vg_regtest
perf/Makefile
perf/vg_perf
+ gdbserver_tests/Makefile
include/Makefile
auxprogs/Makefile
mpi/Makefile
memcheck/tests/x86/Makefile
memcheck/tests/linux/Makefile
memcheck/tests/darwin/Makefile
+ memcheck/tests/amd64-linux/Makefile
memcheck/tests/x86-linux/Makefile
- memcheck/perf/Makefile
+ memcheck/tests/ppc32/Makefile
+ memcheck/tests/ppc64/Makefile
+ memcheck/tests/s390x/Makefile
+ memcheck/tests/vbit-test/Makefile
cachegrind/Makefile
cachegrind/tests/Makefile
cachegrind/tests/x86/Makefile
cachegrind/cg_annotate
+ cachegrind/cg_diff
callgrind/Makefile
callgrind/callgrind_annotate
callgrind/callgrind_control
helgrind/tests/Makefile
massif/Makefile
massif/tests/Makefile
- massif/perf/Makefile
massif/ms_print
lackey/Makefile
lackey/tests/Makefile
none/tests/ppc64/Makefile
none/tests/x86/Makefile
none/tests/arm/Makefile
+ none/tests/s390x/Makefile
+ none/tests/mips32/Makefile
none/tests/linux/Makefile
none/tests/darwin/Makefile
none/tests/x86-linux/Makefile
- exp-ptrcheck/Makefile
- exp-ptrcheck/tests/Makefile
+ exp-sgcheck/Makefile
+ exp-sgcheck/tests/Makefile
drd/Makefile
drd/scripts/download-and-build-splash2
drd/tests/Makefile
exp-bbv/tests/amd64-linux/Makefile
exp-bbv/tests/ppc32-linux/Makefile
exp-bbv/tests/arm-linux/Makefile
+ exp-dhat/Makefile
+ exp-dhat/tests/Makefile
])
+AC_CONFIG_FILES([coregrind/link_tool_exe_linux],
+ [chmod +x coregrind/link_tool_exe_linux])
+AC_CONFIG_FILES([coregrind/link_tool_exe_darwin],
+ [chmod +x coregrind/link_tool_exe_darwin])
AC_OUTPUT
cat<<EOF
Build OS: ${VGCONF_OS}
Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
+ Platform variant: ${VGCONF_PLATVARIANT}
+ Primary -DVGPV string: -DVGPV_${VGCONF_ARCH_PRI}_${VGCONF_OS}_${VGCONF_PLATVARIANT}=1
Default supp files: ${DEFAULT_SUPP}
EOF