sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 1 | |
| 2 | ##------------------------------------------------------------## |
| 3 | # |
| 4 | # The multiple-architecture stuff in this file is pretty |
| 5 | # cryptic. Read docs/internals/multiple-architectures.txt |
| 6 | # for at least a partial explanation of what is going on. |
| 7 | # |
| 8 | ##------------------------------------------------------------## |
| 9 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 10 | # Process this file with autoconf to produce a configure script. |
sewardj | 8d37f36 | 2009-01-05 17:14:12 +0000 | [diff] [blame] | 11 | AC_INIT(Valgrind, 3.5.0.SVN, valgrind-users@lists.sourceforge.net) |
njn | 04e1698 | 2005-05-31 00:23:43 +0000 | [diff] [blame] | 12 | AC_CONFIG_SRCDIR(coregrind/m_main.c) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 13 | AM_CONFIG_HEADER(config.h) |
bart | 3a2dac0 | 2008-03-18 17:40:38 +0000 | [diff] [blame] | 14 | AM_INIT_AUTOMAKE([foreign]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 15 | |
gobry | b0ed467 | 2002-03-27 20:58:58 +0000 | [diff] [blame] | 16 | AM_MAINTAINER_MODE |
| 17 | |
njn | 8738c28 | 2004-11-23 16:31:56 +0000 | [diff] [blame] | 18 | # Where is VEX ? |
njn | fe40894 | 2004-11-23 17:52:24 +0000 | [diff] [blame] | 19 | # Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but |
| 20 | # older autoconfs don't support it... here's what it would say: |
| 21 | # |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 22 | # AS_HELP_STRING([--with-vex], [Vex directory]), |
njn | fe40894 | 2004-11-23 17:52:24 +0000 | [diff] [blame] | 23 | # |
njn | 8738c28 | 2004-11-23 16:31:56 +0000 | [diff] [blame] | 24 | AC_ARG_WITH(vex, |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 25 | [ --with-vex=/path/to/vex/dir Vex directory], |
njn | 8738c28 | 2004-11-23 16:31:56 +0000 | [diff] [blame] | 26 | [ |
| 27 | AC_CHECK_FILE($withval/pub/libvex.h, |
| 28 | [VEX_DIR=$withval], |
| 29 | [AC_MSG_ERROR([Directory '$withval' does not exist, or does not contain Vex])]) |
| 30 | ], |
| 31 | [ |
njn | 17adf1e | 2005-09-16 03:59:37 +0000 | [diff] [blame] | 32 | VEX_DIR='$(top_srcdir)/VEX' |
njn | 8738c28 | 2004-11-23 16:31:56 +0000 | [diff] [blame] | 33 | ]) |
sewardj | 50629ec | 2004-11-22 13:44:11 +0000 | [diff] [blame] | 34 | AC_SUBST(VEX_DIR) |
| 35 | |
njn | 657d951 | 2005-06-24 15:20:52 +0000 | [diff] [blame] | 36 | # "make distcheck" first builds a tarball, then extracts it. |
| 37 | # Then it creates a build directory different from the extracted sources |
| 38 | # (called _build), and issues |
| 39 | # |
| 40 | # ../configure $(DISTCHECK_CONFIGURE_FLAGS) |
| 41 | # |
| 42 | # and then builds, runs "make check", installs using DESTDIR, runs make |
| 43 | # installcheck, uninstalls, checks whether the installed base is empty |
| 44 | # again, then does yet another "make dist" and compares the resulting |
| 45 | # tarball with the one it started off with for identical content. Then it |
| 46 | # tests "make distclean" for no leftover files. |
| 47 | # |
| 48 | # So this line means: when doing "make dist", use the same --with-vex value |
| 49 | # that you used when running configure to configure this tree in the first |
| 50 | # place. |
| 51 | AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR]) |
| 52 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 53 | # Checks for programs. |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 54 | CFLAGS="-Wno-long-long" |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 55 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 56 | AC_PROG_LN_S |
| 57 | AC_PROG_CC |
bart | 0affa49 | 2008-03-18 17:53:09 +0000 | [diff] [blame] | 58 | AM_PROG_CC_C_O |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 59 | AC_PROG_CPP |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 60 | AC_PROG_CXX |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 61 | AC_PROG_RANLIB |
| 62 | |
bart | cddeaf5 | 2008-05-25 15:58:11 +0000 | [diff] [blame] | 63 | # If no AR variable was specified, look up the name of the archiver. Otherwise |
| 64 | # do not touch the AR variable. |
| 65 | if test "x$AR" = "x"; then |
| 66 | AC_PATH_PROGS([AR], ["${LD%ld}ar" "ar"], [ar]) |
| 67 | fi |
| 68 | AC_ARG_VAR([AR],[Archiver command]) |
| 69 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 70 | # Check for the compiler support |
| 71 | if test "${GCC}" != "yes" ; then |
| 72 | AC_MSG_ERROR([Valgrind relies on GCC to be compiled]) |
| 73 | fi |
| 74 | |
sewardj | 2f68595 | 2002-12-22 19:32:23 +0000 | [diff] [blame] | 75 | # figure out where perl lives |
| 76 | AC_PATH_PROG(PERL, perl) |
| 77 | |
njn | 9315df3 | 2003-04-16 20:50:50 +0000 | [diff] [blame] | 78 | # figure out where gdb lives |
sewardj | f8722ca | 2008-11-17 00:20:45 +0000 | [diff] [blame] | 79 | AC_PATH_PROG(GDB, gdb, "/no/gdb/was/found/at/configure/time") |
njn | fe40894 | 2004-11-23 17:52:24 +0000 | [diff] [blame] | 80 | AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB]) |
njn | 9315df3 | 2003-04-16 20:50:50 +0000 | [diff] [blame] | 81 | |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 82 | # some older automake's don't have it so try something on our own |
| 83 | ifdef([AM_PROG_AS],[AM_PROG_AS], |
| 84 | [ |
gobry | 1be1985 | 2002-03-26 20:44:55 +0000 | [diff] [blame] | 85 | AS="${CC}" |
| 86 | AC_SUBST(AS) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 87 | |
gobry | 1be1985 | 2002-03-26 20:44:55 +0000 | [diff] [blame] | 88 | ASFLAGS="" |
| 89 | AC_SUBST(ASFLAGS) |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 90 | ]) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 91 | |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 92 | |
sewardj | f33b433 | 2008-07-18 18:20:42 +0000 | [diff] [blame] | 93 | # Check we have GNU sed: some of the stuff done by "make install" relies |
| 94 | # on some pretty fancy sed expressions, and AIX sed doesn't produce the |
| 95 | # same results, causing install to fail |
| 96 | |
| 97 | AC_MSG_CHECKING([for GNU sed]) |
| 98 | |
| 99 | [sed_firstline=`sed --version | head -n 1`] |
| 100 | |
| 101 | case "${sed_firstline}" in |
| 102 | GNU*) |
| 103 | AC_MSG_RESULT([ok, looks like GNU sed]) |
| 104 | ;; |
| 105 | *) |
| 106 | AC_MSG_RESULT([please ensure first 'sed' in your path is GNU sed]) |
| 107 | AC_MSG_RESULT([note: GNU sed is only required at build/install time]) |
| 108 | AC_MSG_ERROR([build/install requires that 'sed' is GNU sed]) |
| 109 | ;; |
| 110 | esac |
| 111 | |
| 112 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 113 | # We don't want gcc < 3.0 |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 114 | AC_MSG_CHECKING([for a supported version of gcc]) |
| 115 | |
sewardj | f33b433 | 2008-07-18 18:20:42 +0000 | [diff] [blame] | 116 | [gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`] |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 117 | |
| 118 | case "${gcc_version}" in |
bart | 76719bf | 2008-04-19 07:47:56 +0000 | [diff] [blame] | 119 | 2.*) |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 120 | AC_MSG_RESULT([no (${gcc_version})]) |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 121 | AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc]) |
| 122 | ;; |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 123 | *) |
| 124 | AC_MSG_RESULT([ok (${gcc_version})]) |
| 125 | ;; |
| 126 | esac |
| 127 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 128 | |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 129 | # Checks for the platform, with the aim of setting VG_ARCH_MAX. Note |
| 130 | # that VG_ARCH_MAX must be set to reflect the most that this CPU can |
| 131 | # do: for example if it is a 64-bit capable PowerPC, then it must be |
| 132 | # set to ppc64 and not ppc32. Ditto for amd64. |
| 133 | # |
| 134 | # We will later in this file set VG_ARCH_PRI, which is the arch for |
| 135 | # the primary target. For example, suppose we do a build on an amd64 |
| 136 | # machine, but --enable-only32bit has been requested. Then |
| 137 | # VG_ARCH_MAX will be "amd64" since that reflects the most that this |
| 138 | # cpu can do, but VG_ARCH_PRI will be "x86", since that reflects the |
| 139 | # arch corresponding to the primary build (VG_PLATFORM_PRI). |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 140 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 141 | AC_CANONICAL_HOST |
| 142 | |
| 143 | AC_MSG_CHECKING([for a supported CPU]) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 144 | AC_SUBST(VG_ARCH_MAX) |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 145 | |
sewardj | 9b0567a | 2006-01-17 02:56:18 +0000 | [diff] [blame] | 146 | AC_SUBST(VG_ARCH_ALL) |
| 147 | VG_ARCH_ALL="amd64 ppc32 ppc64 x86" |
| 148 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 149 | case "${host_cpu}" in |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 150 | i?86) |
| 151 | AC_MSG_RESULT([ok (${host_cpu})]) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 152 | VG_ARCH_MAX="x86" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 153 | ;; |
| 154 | |
njn | fe40894 | 2004-11-23 17:52:24 +0000 | [diff] [blame] | 155 | x86_64) |
| 156 | AC_MSG_RESULT([ok (${host_cpu})]) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 157 | VG_ARCH_MAX="amd64" |
njn | fe40894 | 2004-11-23 17:52:24 +0000 | [diff] [blame] | 158 | ;; |
| 159 | |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 160 | powerpc64) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 161 | # This value can only happen on Linux, not on AIX |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 162 | AC_MSG_RESULT([ok (${host_cpu})]) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 163 | VG_ARCH_MAX="ppc64" |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 164 | ;; |
| 165 | |
| 166 | powerpc) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 167 | # Complexity. 'powerpc' on AIX implies a 64-bit capable CPU. |
| 168 | # Whereas in Linux that means only a 32-bit capable CPU. |
cerion | 85665ca | 2005-06-20 15:51:07 +0000 | [diff] [blame] | 169 | AC_MSG_RESULT([ok (${host_cpu})]) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 170 | case "${host_os}" in |
| 171 | aix5.*) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 172 | VG_ARCH_MAX="ppc64" |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 173 | ;; |
| 174 | *) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 175 | VG_ARCH_MAX="ppc32" |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 176 | ;; |
| 177 | esac |
nethercote | 9bcc906 | 2004-10-13 13:50:01 +0000 | [diff] [blame] | 178 | ;; |
| 179 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 180 | *) |
| 181 | AC_MSG_RESULT([no (${host_cpu})]) |
nethercote | 81d5c66 | 2004-10-13 13:18:51 +0000 | [diff] [blame] | 182 | AC_MSG_ERROR([Unsupported host architecture. Sorry]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 183 | ;; |
| 184 | esac |
| 185 | |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 186 | # Sometimes it's convenient to subvert the bi-arch build system and |
| 187 | # just have a single build even though the underlying platform is |
| 188 | # capable of both. Hence handle --enable-only64bit and |
| 189 | # --enable-only32bit. Complain if both are issued :-) |
| 190 | |
| 191 | # Check if a 64-bit only build has been requested |
| 192 | AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit, |
| 193 | [AC_ARG_ENABLE(only64bit, |
| 194 | [ --enable-only64bit do a 64-bit only build], |
| 195 | [vg_cv_only64bit=$enableval], |
| 196 | [vg_cv_only64bit=no])]) |
| 197 | |
| 198 | # Check if a 32-bit only build has been requested |
| 199 | AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit, |
| 200 | [AC_ARG_ENABLE(only32bit, |
| 201 | [ --enable-only32bit do a 32-bit only build], |
| 202 | [vg_cv_only32bit=$enableval], |
| 203 | [vg_cv_only32bit=no])]) |
| 204 | |
| 205 | # Stay sane |
| 206 | if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then |
| 207 | AC_MSG_ERROR( |
| 208 | [Nonsensical: both --enable-only64bit and --enable-only32bit.]) |
| 209 | fi |
| 210 | |
| 211 | |
njn | cfc000e | 2009-01-20 06:56:26 +0000 | [diff] [blame] | 212 | # This variable will collect the individual suppression files |
| 213 | # depending on the results of autoconf |
| 214 | DEFAULT_SUPP="" |
| 215 | AC_SUBST(DEFAULT_SUPP) |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 216 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 217 | AC_MSG_CHECKING([for a supported OS]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 218 | AC_SUBST(VG_OS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 219 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 220 | case "${host_os}" in |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 221 | *linux*) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 222 | AC_MSG_RESULT([ok (${host_os})]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 223 | VG_OS="linux" |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 224 | |
| 225 | # Ok, this is linux. Check the kernel version |
| 226 | AC_MSG_CHECKING([for the kernel version]) |
| 227 | |
| 228 | kernel=`uname -r` |
| 229 | |
| 230 | case "${kernel}" in |
| 231 | 2.6.*) |
| 232 | AC_MSG_RESULT([2.6 family (${kernel})]) |
| 233 | AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x]) |
| 234 | ;; |
| 235 | |
| 236 | 2.4.*) |
| 237 | AC_MSG_RESULT([2.4 family (${kernel})]) |
| 238 | AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x]) |
| 239 | ;; |
| 240 | |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 241 | *) |
| 242 | AC_MSG_RESULT([unsupported (${kernel})]) |
nethercote | 4fa681f | 2004-11-08 17:51:39 +0000 | [diff] [blame] | 243 | AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6]) |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 244 | ;; |
| 245 | esac |
| 246 | |
| 247 | ;; |
| 248 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 249 | aix5.1.*) |
| 250 | AC_MSG_RESULT([ok (${host_os})]) |
| 251 | VG_OS="aix5" |
| 252 | ;; |
| 253 | aix5.2.*) |
| 254 | AC_MSG_RESULT([ok (${host_os})]) |
| 255 | VG_OS="aix5" |
| 256 | ;; |
| 257 | aix5.3.*) |
| 258 | AC_MSG_RESULT([ok (${host_os})]) |
| 259 | VG_OS="aix5" |
| 260 | ;; |
| 261 | |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 262 | *freebsd*) |
| 263 | AC_MSG_RESULT([ok (${host_os})]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 264 | VG_OS="freebsd" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 265 | ;; |
| 266 | |
| 267 | *) |
| 268 | AC_MSG_RESULT([no (${host_os})]) |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 269 | AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 270 | ;; |
| 271 | esac |
| 272 | |
tom | d639839 | 2006-06-07 17:44:36 +0000 | [diff] [blame] | 273 | # If we are building on a 64 bit platform test to see if the system |
| 274 | # supports building 32 bit programs and disable 32 bit support if it |
| 275 | # does not support building 32 bit programs |
| 276 | |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 277 | case "$VG_ARCH_MAX-$VG_OS" in |
tom | d639839 | 2006-06-07 17:44:36 +0000 | [diff] [blame] | 278 | amd64-linux|ppc64-linux) |
| 279 | AC_MSG_CHECKING([for 32 bit build support]) |
| 280 | safe_CFLAGS=$CFLAGS |
| 281 | CFLAGS="-m32" |
| 282 | AC_TRY_LINK(, [ |
| 283 | int main () { return 0 ; } |
| 284 | ], |
| 285 | [ |
| 286 | AC_MSG_RESULT([yes]) |
| 287 | ], [ |
| 288 | vg_cv_only64bit="yes" |
| 289 | AC_MSG_RESULT([no]) |
| 290 | ]) |
| 291 | CFLAGS=$safe_CFLAGS;; |
| 292 | esac |
| 293 | |
| 294 | if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then |
| 295 | AC_MSG_ERROR( |
| 296 | [--enable-only32bit was specified but system does not support 32 bit builds]) |
| 297 | fi |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 298 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 299 | # Establish VG_PLATFORM_PRI. This is the primary build target. The |
| 300 | # entire system, including regression and performance tests, will be |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 301 | # built for this target. |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 302 | # |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 303 | # Also establish VG_PLATFORM_SEC, the secondary build target, if |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 304 | # possible. The system will also be built for this target, but not |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 305 | # the regression or performance tests. |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 306 | # |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 307 | # Also establish VG_ARCH_PRI, which is the arch for the primary |
| 308 | # build target. The various makefiles building regression tests |
| 309 | # sometimes need to see this. |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 310 | AC_MSG_CHECKING([for a supported CPU/OS combination]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 311 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 312 | AC_SUBST(VG_PLATFORM_PRI) |
| 313 | AC_SUBST(VG_PLATFORM_SEC) |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 314 | AC_SUBST(VG_ARCH_PRI) |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 315 | |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 316 | # By default, the primary arch is the same as the "max" arch, as |
| 317 | # commented above (at the definition of VG_ARCH_MAX). We may choose |
| 318 | # to downgrade it in the big case statement just below here, in the |
| 319 | # case where we're building on a 64 bit machine but have been |
| 320 | # requested only to do a 32 bit build. |
| 321 | VG_ARCH_PRI=$VG_ARCH_MAX |
| 322 | |
| 323 | case "$VG_ARCH_MAX-$VG_OS" in |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 324 | x86-linux) |
| 325 | VG_PLATFORM_PRI="X86_LINUX" |
| 326 | VG_PLATFORM_SEC="" |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 327 | valt_load_address_normal="0x38000000" |
| 328 | valt_load_address_inner="0x28000000" |
sewardj | 3e38ce0 | 2004-11-23 01:17:29 +0000 | [diff] [blame] | 329 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 330 | ;; |
| 331 | amd64-linux) |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 332 | if test x$vg_cv_only64bit = xyes; then |
| 333 | VG_PLATFORM_PRI="AMD64_LINUX" |
| 334 | VG_PLATFORM_SEC="" |
| 335 | elif test x$vg_cv_only32bit = xyes; then |
| 336 | VG_PLATFORM_PRI="X86_LINUX" |
| 337 | VG_PLATFORM_SEC="" |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 338 | VG_ARCH_PRI="x86" |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 339 | else |
| 340 | VG_PLATFORM_PRI="AMD64_LINUX" |
| 341 | VG_PLATFORM_SEC="X86_LINUX" |
| 342 | fi |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 343 | valt_load_address_normal="0x38000000" |
| 344 | valt_load_address_inner="0x28000000" |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 345 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
| 346 | ;; |
| 347 | ppc32-linux) |
| 348 | VG_PLATFORM_PRI="PPC32_LINUX" |
| 349 | VG_PLATFORM_SEC="" |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 350 | valt_load_address_normal="0x38000000" |
| 351 | valt_load_address_inner="0x28000000" |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 352 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
| 353 | ;; |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 354 | ppc64-aix5) |
| 355 | if test x$vg_cv_only64bit = xyes; then |
| 356 | VG_PLATFORM_PRI="PPC64_AIX5" |
| 357 | VG_PLATFORM_SEC="" |
| 358 | elif test x$vg_cv_only32bit = xyes; then |
| 359 | VG_PLATFORM_PRI="PPC32_AIX5" |
| 360 | VG_PLATFORM_SEC="" |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 361 | VG_ARCH_PRI="ppc32" |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 362 | else |
| 363 | VG_PLATFORM_PRI="PPC64_AIX5" |
| 364 | VG_PLATFORM_SEC="PPC32_AIX5" |
| 365 | fi |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 366 | valt_load_address_normal="0x38000000" |
| 367 | valt_load_address_inner="0x28000000" |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 368 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
| 369 | ;; |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 370 | ppc64-linux) |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 371 | if test x$vg_cv_only64bit = xyes; then |
| 372 | VG_PLATFORM_PRI="PPC64_LINUX" |
| 373 | VG_PLATFORM_SEC="" |
| 374 | elif test x$vg_cv_only32bit = xyes; then |
| 375 | VG_PLATFORM_PRI="PPC32_LINUX" |
| 376 | VG_PLATFORM_SEC="" |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 377 | VG_ARCH_PRI="ppc32" |
sewardj | 86e992f | 2006-01-28 18:39:09 +0000 | [diff] [blame] | 378 | else |
| 379 | VG_PLATFORM_PRI="PPC64_LINUX" |
| 380 | VG_PLATFORM_SEC="PPC32_LINUX" |
| 381 | fi |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 382 | valt_load_address_normal="0x38000000" |
| 383 | valt_load_address_inner="0x28000000" |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 384 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
| 385 | ;; |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 386 | *) |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 387 | VG_PLATFORM_PRI="unknown" |
| 388 | VG_PLATFORM_SEC="unknown" |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 389 | AC_MSG_RESULT([no (${host_cpu}-${host_os})]) |
sewardj | 3e38ce0 | 2004-11-23 01:17:29 +0000 | [diff] [blame] | 390 | AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 391 | ;; |
| 392 | esac |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 393 | |
njn | a454ec0 | 2009-01-19 03:16:59 +0000 | [diff] [blame] | 394 | # Set up VGA_<arch>. Either one or two of these become defined. |
| 395 | # |
| 396 | AM_CONDITIONAL(VGA_X86, |
| 397 | test x$VG_PLATFORM_PRI = xX86_LINUX \ |
| 398 | -o x$VG_PLATFORM_SEC = xX86_LINUX ) |
| 399 | AM_CONDITIONAL(VGA_AMD64, |
| 400 | test x$VG_PLATFORM_PRI = xAMD64_LINUX ) |
| 401 | AM_CONDITIONAL(VGA_PPC32, |
| 402 | test x$VG_PLATFORM_PRI = xPPC32_LINUX \ |
| 403 | -o x$VG_PLATFORM_SEC = xPPC32_LINUX \ |
| 404 | -o x$VG_PLATFORM_PRI = xPPC32_AIX5 \ |
| 405 | -o x$VG_PLATFORM_SEC = xPPC32_AIX5 ) |
| 406 | AM_CONDITIONAL(VGA_PPC64, |
| 407 | test x$VG_PLATFORM_PRI = xPPC64_LINUX \ |
| 408 | -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ) |
| 409 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 410 | # Set up VGP_<platform>. Either one or two of these become defined. |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 411 | # |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 412 | AM_CONDITIONAL(VGP_X86_LINUX, |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 413 | test x$VG_PLATFORM_PRI = xX86_LINUX \ |
| 414 | -o x$VG_PLATFORM_SEC = xX86_LINUX) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 415 | AM_CONDITIONAL(VGP_AMD64_LINUX, |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 416 | test x$VG_PLATFORM_PRI = xAMD64_LINUX) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 417 | AM_CONDITIONAL(VGP_PPC32_LINUX, |
sewardj | bc692db | 2006-01-04 03:31:07 +0000 | [diff] [blame] | 418 | test x$VG_PLATFORM_PRI = xPPC32_LINUX \ |
| 419 | -o x$VG_PLATFORM_SEC = xPPC32_LINUX) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 420 | AM_CONDITIONAL(VGP_PPC64_LINUX, |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 421 | test x$VG_PLATFORM_PRI = xPPC64_LINUX) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 422 | AM_CONDITIONAL(VGP_PPC32_AIX5, |
| 423 | test x$VG_PLATFORM_PRI = xPPC32_AIX5 \ |
| 424 | -o x$VG_PLATFORM_SEC = xPPC32_AIX5) |
| 425 | AM_CONDITIONAL(VGP_PPC64_AIX5, |
| 426 | test x$VG_PLATFORM_PRI = xPPC64_AIX5) |
| 427 | |
| 428 | # Similarly, set up VGO_<os>. Exactly one of these becomes defined. |
| 429 | # Relies on the assumption that the primary and secondary targets are |
| 430 | # for the same OS, so therefore only necessary to test the primary. |
| 431 | # |
| 432 | AM_CONDITIONAL(VGO_LINUX, |
| 433 | test x$VG_PLATFORM_PRI = xX86_LINUX \ |
| 434 | -o x$VG_PLATFORM_PRI = xAMD64_LINUX \ |
| 435 | -o x$VG_PLATFORM_PRI = xPPC32_LINUX \ |
| 436 | -o x$VG_PLATFORM_PRI = xPPC64_LINUX) |
| 437 | AM_CONDITIONAL(VGO_AIX5, |
| 438 | test x$VG_PLATFORM_PRI = xPPC32_AIX5 \ |
| 439 | -o x$VG_PLATFORM_PRI = xPPC64_AIX5) |
| 440 | |
| 441 | |
| 442 | # Sometimes, in the Makefile.am-s, it's useful to know |
| 443 | # whether or not there is a secondary target. |
| 444 | # |
| 445 | AM_CONDITIONAL(VGP_HAVE_SECONDARY, |
| 446 | test x$VG_PLATFORM_SEC != x) |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 447 | |
tom | b637bad | 2005-11-08 12:28:35 +0000 | [diff] [blame] | 448 | |
njn | d74b0ef | 2009-01-20 06:06:52 +0000 | [diff] [blame] | 449 | # Check if this should be built as an inner Valgrind, to be run within |
| 450 | # another Valgrind. Choose the load address accordingly. |
| 451 | AC_SUBST(VALT_LOAD_ADDRESS) |
| 452 | AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner, |
| 453 | [AC_ARG_ENABLE(inner, |
| 454 | [ --enable-inner enables self-hosting], |
| 455 | [vg_cv_inner=$enableval], |
| 456 | [vg_cv_inner=no])]) |
| 457 | if test "$vg_cv_inner" = yes; then |
| 458 | AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind]) |
| 459 | VALT_LOAD_ADDRESS=$valt_load_address_inner |
| 460 | else |
| 461 | VALT_LOAD_ADDRESS=$valt_load_address_normal |
| 462 | fi |
| 463 | |
| 464 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 465 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 466 | |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 467 | GLIBC_VERSION="" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 468 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 469 | AC_EGREP_CPP([GLIBC_22], [ |
| 470 | #include <features.h> |
| 471 | #ifdef __GNU_LIBRARY__ |
| 472 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2) |
| 473 | GLIBC_22 |
| 474 | #endif |
| 475 | #endif |
| 476 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 477 | GLIBC_VERSION="2.2") |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 478 | |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 479 | AC_EGREP_CPP([GLIBC_23], [ |
| 480 | #include <features.h> |
| 481 | #ifdef __GNU_LIBRARY__ |
| 482 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3) |
| 483 | GLIBC_23 |
| 484 | #endif |
| 485 | #endif |
| 486 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 487 | GLIBC_VERSION="2.3") |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 488 | |
njn | 781dba5 | 2005-06-30 04:06:38 +0000 | [diff] [blame] | 489 | AC_EGREP_CPP([GLIBC_24], [ |
| 490 | #include <features.h> |
| 491 | #ifdef __GNU_LIBRARY__ |
| 492 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4) |
| 493 | GLIBC_24 |
| 494 | #endif |
| 495 | #endif |
| 496 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 497 | GLIBC_VERSION="2.4") |
njn | 781dba5 | 2005-06-30 04:06:38 +0000 | [diff] [blame] | 498 | |
dirk | aece45c | 2006-10-12 08:17:49 +0000 | [diff] [blame] | 499 | AC_EGREP_CPP([GLIBC_25], [ |
| 500 | #include <features.h> |
| 501 | #ifdef __GNU_LIBRARY__ |
| 502 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5) |
| 503 | GLIBC_25 |
| 504 | #endif |
| 505 | #endif |
| 506 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 507 | GLIBC_VERSION="2.5") |
dirk | aece45c | 2006-10-12 08:17:49 +0000 | [diff] [blame] | 508 | |
dirk | c8bd0c5 | 2007-05-23 17:39:08 +0000 | [diff] [blame] | 509 | AC_EGREP_CPP([GLIBC_26], [ |
| 510 | #include <features.h> |
| 511 | #ifdef __GNU_LIBRARY__ |
| 512 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6) |
| 513 | GLIBC_26 |
| 514 | #endif |
| 515 | #endif |
| 516 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 517 | GLIBC_VERSION="2.6") |
dirk | c8bd0c5 | 2007-05-23 17:39:08 +0000 | [diff] [blame] | 518 | |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 519 | AC_EGREP_CPP([GLIBC_27], [ |
| 520 | #include <features.h> |
| 521 | #ifdef __GNU_LIBRARY__ |
| 522 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7) |
| 523 | GLIBC_27 |
| 524 | #endif |
| 525 | #endif |
| 526 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 527 | GLIBC_VERSION="2.7") |
| 528 | |
| 529 | AC_EGREP_CPP([GLIBC_28], [ |
| 530 | #include <features.h> |
| 531 | #ifdef __GNU_LIBRARY__ |
| 532 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8) |
| 533 | GLIBC_28 |
| 534 | #endif |
| 535 | #endif |
| 536 | ], |
| 537 | GLIBC_VERSION="2.8") |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 538 | |
dirk | d2e31eb | 2008-11-19 23:58:36 +0000 | [diff] [blame] | 539 | AC_EGREP_CPP([GLIBC_29], [ |
| 540 | #include <features.h> |
| 541 | #ifdef __GNU_LIBRARY__ |
| 542 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9) |
| 543 | GLIBC_29 |
| 544 | #endif |
| 545 | #endif |
| 546 | ], |
| 547 | GLIBC_VERSION="2.9") |
| 548 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 549 | AC_EGREP_CPP([AIX5_LIBC], [ |
| 550 | #include <standards.h> |
| 551 | #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530) |
| 552 | AIX5_LIBC |
| 553 | #endif |
| 554 | ], |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 555 | GLIBC_VERSION="aix5") |
daywalker | e9212b3 | 2003-06-15 22:39:15 +0000 | [diff] [blame] | 556 | |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 557 | AC_MSG_CHECKING([the GLIBC_VERSION version]) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 558 | |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 559 | case "${GLIBC_VERSION}" in |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 560 | 2.2) |
| 561 | AC_MSG_RESULT(2.2 family) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 562 | AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x]) |
sewardj | 2c4f3dd | 2007-11-11 06:13:01 +0000 | [diff] [blame] | 563 | DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" |
| 564 | DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 565 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 566 | ;; |
| 567 | |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 568 | 2.3) |
| 569 | AC_MSG_RESULT(2.3 family) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 570 | AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x]) |
sewardj | 2c4f3dd | 2007-11-11 06:13:01 +0000 | [diff] [blame] | 571 | DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 572 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 573 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 574 | ;; |
| 575 | |
njn | 781dba5 | 2005-06-30 04:06:38 +0000 | [diff] [blame] | 576 | 2.4) |
| 577 | AC_MSG_RESULT(2.4 family) |
| 578 | AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x]) |
sewardj | 2c4f3dd | 2007-11-11 06:13:01 +0000 | [diff] [blame] | 579 | DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 580 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 581 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
njn | 781dba5 | 2005-06-30 04:06:38 +0000 | [diff] [blame] | 582 | ;; |
| 583 | |
dirk | aece45c | 2006-10-12 08:17:49 +0000 | [diff] [blame] | 584 | 2.5) |
| 585 | AC_MSG_RESULT(2.5 family) |
| 586 | AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x]) |
sewardj | 2c4f3dd | 2007-11-11 06:13:01 +0000 | [diff] [blame] | 587 | DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 588 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 589 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
dirk | aece45c | 2006-10-12 08:17:49 +0000 | [diff] [blame] | 590 | ;; |
dirk | c8bd0c5 | 2007-05-23 17:39:08 +0000 | [diff] [blame] | 591 | 2.6) |
| 592 | AC_MSG_RESULT(2.6 family) |
| 593 | AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x]) |
sewardj | 2c4f3dd | 2007-11-11 06:13:01 +0000 | [diff] [blame] | 594 | DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 595 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 596 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 597 | ;; |
| 598 | 2.7) |
| 599 | AC_MSG_RESULT(2.7 family) |
| 600 | AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x]) |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 601 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 602 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
tom | 0a0fcee | 2008-01-05 00:12:45 +0000 | [diff] [blame] | 603 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
dirk | c8bd0c5 | 2007-05-23 17:39:08 +0000 | [diff] [blame] | 604 | ;; |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 605 | 2.8) |
| 606 | AC_MSG_RESULT(2.8 family) |
dirk | eb939fc | 2008-04-27 20:38:47 +0000 | [diff] [blame] | 607 | AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x]) |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 608 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" |
| 609 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
| 610 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
| 611 | ;; |
dirk | d2e31eb | 2008-11-19 23:58:36 +0000 | [diff] [blame] | 612 | 2.9) |
| 613 | AC_MSG_RESULT(2.9 family) |
| 614 | AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x]) |
| 615 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" |
| 616 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
| 617 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
| 618 | ;; |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 619 | aix5) |
sewardj | 2f3bcd2 | 2006-12-12 01:38:15 +0000 | [diff] [blame] | 620 | AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3) |
| 621 | AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3]) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 622 | DEFAULT_SUPP="aix5libc.supp ${DEFAULT_SUPP}" |
| 623 | ;; |
dirk | aece45c | 2006-10-12 08:17:49 +0000 | [diff] [blame] | 624 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 625 | *) |
| 626 | AC_MSG_RESULT(unsupported version) |
dirk | d2e31eb | 2008-11-19 23:58:36 +0000 | [diff] [blame] | 627 | AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.9]) |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 628 | AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 629 | ;; |
| 630 | esac |
| 631 | |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 632 | AC_SUBST(GLIBC_VERSION) |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 633 | |
sewardj | 414f358 | 2008-07-18 20:46:00 +0000 | [diff] [blame] | 634 | |
| 635 | # Add default suppressions for the X client libraries. Make no |
| 636 | # attempt to detect whether such libraries are installed on the |
| 637 | # build machine (or even if any X facilities are present); just |
| 638 | # add the suppressions antidisirregardless. |
| 639 | DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}" |
| 640 | DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}" |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 641 | |
sewardj | 5744c02 | 2008-10-19 18:58:13 +0000 | [diff] [blame] | 642 | # Add glibc and X11 suppressions for exp-ptrcheck |
| 643 | DEFAULT_SUPP="exp-ptrcheck.supp ${DEFAULT_SUPP}" |
| 644 | |
sewardj | 2e10a68 | 2003-04-07 19:36:41 +0000 | [diff] [blame] | 645 | |
bart | 59e2f18 | 2008-04-28 16:22:53 +0000 | [diff] [blame] | 646 | # Check for CLOCK_MONOTONIC |
| 647 | |
| 648 | AC_MSG_CHECKING([for CLOCK_MONOTONIC]) |
| 649 | |
| 650 | AC_TRY_COMPILE( |
| 651 | [ |
| 652 | #include <time.h> |
| 653 | ], [ |
| 654 | struct timespec t; |
| 655 | clock_gettime(CLOCK_MONOTONIC, &t); |
| 656 | return 0; |
| 657 | ], |
| 658 | [ |
| 659 | AC_MSG_RESULT([yes]) |
| 660 | AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1, |
| 661 | [Define to 1 if you have the `CLOCK_MONOTONIC' constant.]) |
| 662 | ], [ |
| 663 | AC_MSG_RESULT([no]) |
| 664 | ]) |
| 665 | |
bart | fea0692 | 2008-05-03 09:12:15 +0000 | [diff] [blame] | 666 | |
| 667 | # Check for PTHREAD_MUTEX_ADAPTIVE_NP |
| 668 | |
| 669 | AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP]) |
| 670 | |
| 671 | AC_TRY_COMPILE( |
| 672 | [ |
| 673 | #define _GNU_SOURCE |
| 674 | #include <pthread.h> |
| 675 | ], [ |
| 676 | return (PTHREAD_MUTEX_ADAPTIVE_NP); |
| 677 | ], |
| 678 | [ |
| 679 | AC_MSG_RESULT([yes]) |
| 680 | AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1, |
| 681 | [Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.]) |
| 682 | ], [ |
| 683 | AC_MSG_RESULT([no]) |
| 684 | ]) |
| 685 | |
| 686 | |
| 687 | # Check for PTHREAD_MUTEX_ERRORCHECK_NP |
| 688 | |
| 689 | AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP]) |
| 690 | |
| 691 | AC_TRY_COMPILE( |
| 692 | [ |
| 693 | #define _GNU_SOURCE |
| 694 | #include <pthread.h> |
| 695 | ], [ |
| 696 | return (PTHREAD_MUTEX_ERRORCHECK_NP); |
| 697 | ], |
| 698 | [ |
| 699 | AC_MSG_RESULT([yes]) |
| 700 | AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1, |
| 701 | [Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.]) |
| 702 | ], [ |
| 703 | AC_MSG_RESULT([no]) |
| 704 | ]) |
| 705 | |
| 706 | |
| 707 | # Check for PTHREAD_MUTEX_RECURSIVE_NP |
| 708 | |
| 709 | AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP]) |
| 710 | |
| 711 | AC_TRY_COMPILE( |
| 712 | [ |
| 713 | #define _GNU_SOURCE |
| 714 | #include <pthread.h> |
| 715 | ], [ |
| 716 | return (PTHREAD_MUTEX_RECURSIVE_NP); |
| 717 | ], |
| 718 | [ |
| 719 | AC_MSG_RESULT([yes]) |
| 720 | AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1, |
| 721 | [Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.]) |
| 722 | ], [ |
| 723 | AC_MSG_RESULT([no]) |
| 724 | ]) |
| 725 | |
| 726 | |
| 727 | # Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP |
| 728 | |
| 729 | AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP]) |
| 730 | |
| 731 | AC_TRY_COMPILE( |
| 732 | [ |
| 733 | #define _GNU_SOURCE |
| 734 | #include <pthread.h> |
| 735 | ], [ |
| 736 | pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; |
| 737 | return 0; |
| 738 | ], |
| 739 | [ |
| 740 | AC_MSG_RESULT([yes]) |
| 741 | AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1, |
| 742 | [Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.]) |
| 743 | ], [ |
| 744 | AC_MSG_RESULT([no]) |
| 745 | ]) |
| 746 | |
| 747 | |
bart | e8900ff | 2008-10-13 19:22:35 +0000 | [diff] [blame] | 748 | # Check whether FILE has a member called _lock and whether it's a pointer. |
| 749 | |
| 750 | AC_MSG_CHECKING([for FILE::_lock]) |
| 751 | |
| 752 | AC_TRY_COMPILE( |
| 753 | [ |
| 754 | #include <stdio.h> |
| 755 | ], [ |
| 756 | void *p; |
| 757 | p = stdout->_lock; |
| 758 | return 0; |
| 759 | ], [ |
| 760 | AC_MSG_RESULT([yes]) |
| 761 | AC_DEFINE([HAVE_LIBC_FILE_LOCK], 1, |
| 762 | [Define to 1 if FILE has a member called _lock.]) |
| 763 | ], [ |
| 764 | AC_MSG_RESULT([no]) |
| 765 | ]) |
| 766 | |
| 767 | |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 768 | # Check whether pthread_mutex_t has a member called __m_kind. |
| 769 | |
| 770 | AC_MSG_CHECKING([for pthread_mutex_t::__m_kind]) |
| 771 | |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 772 | AC_TRY_COMPILE( |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 773 | [ |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 774 | #include <pthread.h> |
| 775 | ], [ |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 776 | pthread_mutex_t m; |
| 777 | return m.__m_kind; |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 778 | ], [ |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 779 | AC_MSG_RESULT([yes]) |
| 780 | AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], 1, |
| 781 | [Define to 1 if pthread_mutex_t has a member called __m_kind.]) |
| 782 | ], [ |
| 783 | AC_MSG_RESULT([no]) |
| 784 | ]) |
| 785 | |
| 786 | |
| 787 | # Check whether pthread_mutex_t has a member called __data.__kind. |
| 788 | |
| 789 | AC_MSG_CHECKING([for pthread_mutex_t::__data.__kind]) |
| 790 | |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 791 | AC_TRY_COMPILE( |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 792 | [ |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 793 | #include <pthread.h> |
| 794 | ], [ |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 795 | pthread_mutex_t m; |
| 796 | return m.__data.__kind; |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 797 | ], [ |
bart | 5e389f1 | 2008-04-05 12:53:15 +0000 | [diff] [blame] | 798 | AC_MSG_RESULT([yes]) |
| 799 | AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], 1, |
| 800 | [Define to 1 if pthread_mutex_t has a member __data.__kind.]) |
| 801 | ], [ |
| 802 | AC_MSG_RESULT([no]) |
| 803 | ]) |
| 804 | |
| 805 | |
bart | 62c370e | 2008-05-12 18:50:51 +0000 | [diff] [blame] | 806 | # does this compiler support -maltivec and does it have the include file |
| 807 | # <altivec.h> ? |
| 808 | |
| 809 | AC_MSG_CHECKING([for Altivec]) |
| 810 | |
| 811 | safe_CFLAGS=$CFLAGS |
| 812 | CFLAGS="-maltivec" |
| 813 | |
| 814 | AC_TRY_COMPILE( |
| 815 | [ |
| 816 | #include <altivec.h> |
| 817 | ], [ |
| 818 | vector unsigned int v; |
| 819 | ], |
| 820 | [ |
| 821 | ac_have_altivec=yes |
| 822 | AC_MSG_RESULT([yes]) |
| 823 | ], [ |
| 824 | ac_have_altivec=no |
| 825 | AC_MSG_RESULT([no]) |
| 826 | ]) |
| 827 | CFLAGS=$safe_CFLAGS |
| 828 | |
| 829 | AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes]) |
| 830 | AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes]) |
| 831 | |
| 832 | |
bart | a50aa8a | 2008-04-27 06:06:57 +0000 | [diff] [blame] | 833 | # Check for eventfd_t, eventfd() and eventfd_read() |
| 834 | AC_MSG_CHECKING([for eventfd()]) |
| 835 | |
| 836 | AC_TRY_LINK( |
| 837 | [ |
| 838 | #include <sys/eventfd.h> |
| 839 | ], [ |
| 840 | eventfd_t ev; |
| 841 | int fd; |
| 842 | |
| 843 | fd = eventfd(5, 0); |
| 844 | eventfd_read(fd, &ev); |
| 845 | return 0; |
| 846 | ], |
| 847 | [ |
| 848 | AC_MSG_RESULT([yes]) |
| 849 | AC_DEFINE([HAVE_EVENTFD], 1, |
| 850 | [Define to 1 if you have the `eventfd' function.]) |
| 851 | AC_DEFINE([HAVE_EVENTFD_READ], 1, |
| 852 | [Define to 1 if you have the `eventfd_read' function.]) |
| 853 | ], [ |
| 854 | AC_MSG_RESULT([no]) |
| 855 | ]) |
| 856 | |
| 857 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 858 | # does this compiler support -m32 ? |
| 859 | AC_MSG_CHECKING([if gcc accepts -m32]) |
| 860 | |
| 861 | safe_CFLAGS=$CFLAGS |
| 862 | CFLAGS="-m32" |
| 863 | |
| 864 | AC_TRY_COMPILE(, [ |
| 865 | int main () { return 0 ; } |
| 866 | ], |
| 867 | [ |
| 868 | FLAG_M32="-m32" |
| 869 | AC_MSG_RESULT([yes]) |
| 870 | ], [ |
| 871 | FLAG_M32="" |
| 872 | AC_MSG_RESULT([no]) |
| 873 | ]) |
| 874 | CFLAGS=$safe_CFLAGS |
| 875 | |
| 876 | AC_SUBST(FLAG_M32) |
| 877 | |
| 878 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 879 | # does this compiler support -maix32 ? |
| 880 | AC_MSG_CHECKING([if gcc accepts -maix32]) |
| 881 | |
| 882 | safe_CFLAGS=$CFLAGS |
| 883 | CFLAGS="-maix32" |
| 884 | |
| 885 | AC_TRY_COMPILE(, [ |
| 886 | int main () { return 0 ; } |
| 887 | ], |
| 888 | [ |
| 889 | FLAG_MAIX32="-maix32" |
| 890 | AC_MSG_RESULT([yes]) |
| 891 | ], [ |
| 892 | FLAG_MAIX32="" |
| 893 | AC_MSG_RESULT([no]) |
| 894 | ]) |
| 895 | CFLAGS=$safe_CFLAGS |
| 896 | |
| 897 | AC_SUBST(FLAG_MAIX32) |
| 898 | |
| 899 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 900 | # does this compiler support -m64 ? |
| 901 | AC_MSG_CHECKING([if gcc accepts -m64]) |
| 902 | |
| 903 | safe_CFLAGS=$CFLAGS |
| 904 | CFLAGS="-m64" |
| 905 | |
| 906 | AC_TRY_COMPILE(, [ |
| 907 | int main () { return 0 ; } |
| 908 | ], |
| 909 | [ |
| 910 | FLAG_M64="-m64" |
| 911 | AC_MSG_RESULT([yes]) |
| 912 | ], [ |
| 913 | FLAG_M64="" |
| 914 | AC_MSG_RESULT([no]) |
| 915 | ]) |
| 916 | CFLAGS=$safe_CFLAGS |
| 917 | |
| 918 | AC_SUBST(FLAG_M64) |
| 919 | |
| 920 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 921 | # does this compiler support -maix64 ? |
| 922 | AC_MSG_CHECKING([if gcc accepts -maix64]) |
| 923 | |
| 924 | safe_CFLAGS=$CFLAGS |
| 925 | CFLAGS="-maix64" |
| 926 | |
| 927 | AC_TRY_COMPILE(, [ |
| 928 | int main () { return 0 ; } |
| 929 | ], |
| 930 | [ |
| 931 | FLAG_MAIX64="-maix64" |
| 932 | AC_MSG_RESULT([yes]) |
| 933 | ], [ |
| 934 | FLAG_MAIX64="" |
| 935 | AC_MSG_RESULT([no]) |
| 936 | ]) |
| 937 | CFLAGS=$safe_CFLAGS |
| 938 | |
| 939 | AC_SUBST(FLAG_MAIX64) |
| 940 | |
| 941 | |
sewardj | 67f1fcc | 2005-07-03 10:41:02 +0000 | [diff] [blame] | 942 | # does this compiler support -mmmx ? |
| 943 | AC_MSG_CHECKING([if gcc accepts -mmmx]) |
| 944 | |
| 945 | safe_CFLAGS=$CFLAGS |
| 946 | CFLAGS="-mmmx" |
| 947 | |
| 948 | AC_TRY_COMPILE(, [ |
| 949 | int main () { return 0 ; } |
| 950 | ], |
| 951 | [ |
| 952 | FLAG_MMMX="-mmmx" |
| 953 | AC_MSG_RESULT([yes]) |
| 954 | ], [ |
| 955 | FLAG_MMMX="" |
| 956 | AC_MSG_RESULT([no]) |
| 957 | ]) |
| 958 | CFLAGS=$safe_CFLAGS |
| 959 | |
| 960 | AC_SUBST(FLAG_MMMX) |
| 961 | |
| 962 | |
| 963 | # does this compiler support -msse ? |
| 964 | AC_MSG_CHECKING([if gcc accepts -msse]) |
| 965 | |
| 966 | safe_CFLAGS=$CFLAGS |
| 967 | CFLAGS="-msse" |
| 968 | |
| 969 | AC_TRY_COMPILE(, [ |
| 970 | int main () { return 0 ; } |
| 971 | ], |
| 972 | [ |
| 973 | FLAG_MSSE="-msse" |
| 974 | AC_MSG_RESULT([yes]) |
| 975 | ], [ |
| 976 | FLAG_MSSE="" |
| 977 | AC_MSG_RESULT([no]) |
| 978 | ]) |
| 979 | CFLAGS=$safe_CFLAGS |
| 980 | |
| 981 | AC_SUBST(FLAG_MSSE) |
| 982 | |
| 983 | |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 984 | # does this compiler support -mpreferred-stack-boundary=2 ? |
| 985 | AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary]) |
| 986 | |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 987 | safe_CFLAGS=$CFLAGS |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 988 | CFLAGS="-mpreferred-stack-boundary=2" |
| 989 | |
| 990 | AC_TRY_COMPILE(, [ |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 991 | int main () { return 0 ; } |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 992 | ], |
| 993 | [ |
| 994 | PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2" |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 995 | AC_MSG_RESULT([yes]) |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 996 | ], [ |
| 997 | PREFERRED_STACK_BOUNDARY="" |
| 998 | AC_MSG_RESULT([no]) |
| 999 | ]) |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 1000 | CFLAGS=$safe_CFLAGS |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 1001 | |
| 1002 | AC_SUBST(PREFERRED_STACK_BOUNDARY) |
| 1003 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 1004 | |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1005 | # does this compiler support -Wno-pointer-sign ? |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1006 | AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign]) |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1007 | |
| 1008 | safe_CFLAGS=$CFLAGS |
| 1009 | CFLAGS="-Wno-pointer-sign" |
| 1010 | |
| 1011 | AC_TRY_COMPILE(, [ |
| 1012 | int main () { return 0 ; } |
| 1013 | ], |
| 1014 | [ |
| 1015 | no_pointer_sign=yes |
| 1016 | AC_MSG_RESULT([yes]) |
| 1017 | ], [ |
| 1018 | no_pointer_sign=no |
| 1019 | AC_MSG_RESULT([no]) |
| 1020 | ]) |
| 1021 | CFLAGS=$safe_CFLAGS |
| 1022 | |
| 1023 | if test x$no_pointer_sign = xyes; then |
| 1024 | CFLAGS="$CFLAGS -Wno-pointer-sign" |
| 1025 | fi |
| 1026 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 1027 | |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1028 | # does this compiler support -Wdeclaration-after-statement ? |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1029 | AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement]) |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1030 | |
| 1031 | safe_CFLAGS=$CFLAGS |
| 1032 | CFLAGS="-Wdeclaration-after-statement" |
| 1033 | |
| 1034 | AC_TRY_COMPILE(, [ |
| 1035 | int main () { return 0 ; } |
| 1036 | ], |
| 1037 | [ |
tom | e9814c3 | 2005-10-12 11:30:43 +0000 | [diff] [blame] | 1038 | declaration_after_statement=yes |
sewardj | 72a547e | 2006-01-25 02:58:28 +0000 | [diff] [blame] | 1039 | FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement" |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1040 | AC_MSG_RESULT([yes]) |
| 1041 | ], [ |
tom | e9814c3 | 2005-10-12 11:30:43 +0000 | [diff] [blame] | 1042 | declaration_after_statement=no |
sewardj | 72a547e | 2006-01-25 02:58:28 +0000 | [diff] [blame] | 1043 | FLAG_WDECL_AFTER_STMT="" |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1044 | AC_MSG_RESULT([no]) |
| 1045 | ]) |
| 1046 | CFLAGS=$safe_CFLAGS |
| 1047 | |
sewardj | 72a547e | 2006-01-25 02:58:28 +0000 | [diff] [blame] | 1048 | AC_SUBST(FLAG_WDECL_AFTER_STMT) |
| 1049 | |
tom | e9814c3 | 2005-10-12 11:30:43 +0000 | [diff] [blame] | 1050 | if test x$declaration_after_statement = xyes; then |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1051 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" |
| 1052 | fi |
| 1053 | |
sewardj | 00f1e62 | 2006-03-12 16:47:10 +0000 | [diff] [blame] | 1054 | |
bart | 9d865fa | 2008-06-23 12:11:49 +0000 | [diff] [blame] | 1055 | # does this compiler support -Wno-format-zero-length ? |
| 1056 | |
| 1057 | AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length]) |
| 1058 | |
| 1059 | safe_CFLAGS=$CFLAGS |
| 1060 | CFLAGS="-Wno-format-zero-length" |
| 1061 | |
| 1062 | AC_TRY_COMPILE( |
| 1063 | [ ], |
| 1064 | [ |
| 1065 | return 0; |
| 1066 | ], |
| 1067 | [ |
| 1068 | AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length]) |
| 1069 | AC_MSG_RESULT([yes]) |
| 1070 | ], |
| 1071 | [ |
| 1072 | AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], []) |
| 1073 | AC_MSG_RESULT([no]) |
| 1074 | ]) |
| 1075 | CFLAGS=$safe_CFLAGS |
| 1076 | |
| 1077 | |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1078 | # does this compiler support -Wextra or the older -W ? |
| 1079 | |
| 1080 | AC_MSG_CHECKING([if gcc accepts -Wextra or -W]) |
| 1081 | |
| 1082 | safe_CFLAGS=$CFLAGS |
| 1083 | CFLAGS="-Wextra" |
| 1084 | |
| 1085 | AC_TRY_COMPILE( |
| 1086 | [ ], |
| 1087 | [ |
| 1088 | return 0; |
| 1089 | ], |
| 1090 | [ |
| 1091 | AC_SUBST([FLAG_W_EXTRA], [-Wextra]) |
| 1092 | AC_MSG_RESULT([-Wextra]) |
| 1093 | ], [ |
| 1094 | CFLAGS="-W" |
| 1095 | AC_TRY_COMPILE( |
| 1096 | [ ], |
| 1097 | [ |
| 1098 | return 0; |
| 1099 | ], |
| 1100 | [ |
| 1101 | AC_SUBST([FLAG_W_EXTRA], [-W]) |
| 1102 | AC_MSG_RESULT([-W]) |
| 1103 | ], [ |
| 1104 | AC_SUBST([FLAG_W_EXTRA], []) |
| 1105 | AC_MSG_RESULT([not supported]) |
| 1106 | ]) |
| 1107 | ]) |
| 1108 | CFLAGS=$safe_CFLAGS |
| 1109 | |
| 1110 | |
sewardj | a72c26d | 2007-05-01 13:44:08 +0000 | [diff] [blame] | 1111 | # does this compiler support -fno-stack-protector ? |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1112 | AC_MSG_CHECKING([if gcc accepts -fno-stack-protector]) |
sewardj | a72c26d | 2007-05-01 13:44:08 +0000 | [diff] [blame] | 1113 | |
| 1114 | safe_CFLAGS=$CFLAGS |
| 1115 | CFLAGS="-fno-stack-protector" |
| 1116 | |
| 1117 | AC_TRY_COMPILE(, [ |
| 1118 | int main () { return 0 ; } |
| 1119 | ], |
| 1120 | [ |
| 1121 | no_stack_protector=yes |
| 1122 | FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector" |
| 1123 | AC_MSG_RESULT([yes]) |
| 1124 | ], [ |
| 1125 | no_stack_protector=no |
| 1126 | FLAG_FNO_STACK_PROTECTOR="" |
| 1127 | AC_MSG_RESULT([no]) |
| 1128 | ]) |
| 1129 | CFLAGS=$safe_CFLAGS |
| 1130 | |
| 1131 | AC_SUBST(FLAG_FNO_STACK_PROTECTOR) |
| 1132 | |
| 1133 | if test x$no_stack_protector = xyes; then |
| 1134 | CFLAGS="$CFLAGS -fno-stack-protector" |
| 1135 | fi |
| 1136 | |
| 1137 | |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1138 | # does this compiler support --param inline-unit-growth=... ? |
| 1139 | |
| 1140 | AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth]) |
| 1141 | |
| 1142 | safe_CFLAGS=$CFLAGS |
| 1143 | CFLAGS="--param inline-unit-growth=900" |
| 1144 | |
| 1145 | AC_TRY_COMPILE( |
| 1146 | [ ], |
| 1147 | [ |
| 1148 | return 0; |
| 1149 | ], |
| 1150 | [ |
| 1151 | AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], |
| 1152 | ["--param inline-unit-growth=900"]) |
| 1153 | AC_MSG_RESULT([yes]) |
| 1154 | ], [ |
| 1155 | AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""]) |
| 1156 | AC_MSG_RESULT([no]) |
| 1157 | ]) |
| 1158 | CFLAGS=$safe_CFLAGS |
| 1159 | |
| 1160 | |
tom | d55121e | 2005-12-19 12:40:13 +0000 | [diff] [blame] | 1161 | # does this compiler support __builtin_expect? |
| 1162 | AC_MSG_CHECKING([if gcc supports __builtin_expect]) |
bart | 56730cd | 2008-05-11 06:41:46 +0000 | [diff] [blame] | 1163 | |
tom | d55121e | 2005-12-19 12:40:13 +0000 | [diff] [blame] | 1164 | AC_TRY_LINK(, [ |
| 1165 | return __builtin_expect(1, 1) ? 1 : 0 |
| 1166 | ], |
| 1167 | [ |
| 1168 | ac_have_builtin_expect=yes |
| 1169 | AC_MSG_RESULT([yes]) |
| 1170 | ], [ |
| 1171 | ac_have_builtin_expect=no |
| 1172 | AC_MSG_RESULT([no]) |
| 1173 | ]) |
| 1174 | if test x$ac_have_builtin_expect = xyes ; then |
| 1175 | AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.]) |
| 1176 | fi |
| 1177 | |
tom | 1e94668 | 2005-10-12 11:27:33 +0000 | [diff] [blame] | 1178 | |
bart | cd529dc | 2008-06-26 08:43:12 +0000 | [diff] [blame] | 1179 | # does this compiler have built-in functions for atomic memory access ? |
| 1180 | AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap]) |
| 1181 | |
| 1182 | AC_TRY_LINK(, |
| 1183 | [ |
| 1184 | int variable = 1; |
bart | 99ae610 | 2008-09-21 11:24:00 +0000 | [diff] [blame] | 1185 | return (__sync_bool_compare_and_swap(&variable, 1, 2) |
bart | d5a131f | 2008-12-21 16:09:03 +0000 | [diff] [blame] | 1186 | && __sync_add_and_fetch(&variable, 1) ? 1 : 0) |
bart | cd529dc | 2008-06-26 08:43:12 +0000 | [diff] [blame] | 1187 | ], |
| 1188 | [ |
| 1189 | AC_MSG_RESULT([yes]) |
| 1190 | AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.]) |
| 1191 | ], |
| 1192 | [ |
| 1193 | AC_MSG_RESULT([no]) |
| 1194 | ]) |
| 1195 | |
| 1196 | |
sewardj | 00f1e62 | 2006-03-12 16:47:10 +0000 | [diff] [blame] | 1197 | # does the ppc assembler support "mtocrf" et al? |
| 1198 | AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) |
| 1199 | |
| 1200 | AC_TRY_COMPILE(, [ |
sewardj | dd4cbe1 | 2006-03-12 17:27:44 +0000 | [diff] [blame] | 1201 | __asm__ __volatile__("mtocrf 4,0"); |
| 1202 | __asm__ __volatile__("mfocrf 0,4"); |
sewardj | 00f1e62 | 2006-03-12 16:47:10 +0000 | [diff] [blame] | 1203 | ], |
| 1204 | [ |
| 1205 | ac_have_as_ppc_mftocrf=yes |
| 1206 | AC_MSG_RESULT([yes]) |
| 1207 | ], [ |
| 1208 | ac_have_as_ppc_mftocrf=no |
| 1209 | AC_MSG_RESULT([no]) |
| 1210 | ]) |
| 1211 | if test x$ac_have_as_ppc_mftocrf = xyes ; then |
| 1212 | AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.]) |
| 1213 | fi |
| 1214 | |
| 1215 | |
sewardj | f0aabf8 | 2007-03-22 00:24:21 +0000 | [diff] [blame] | 1216 | # does the x86/amd64 assembler understand SSE3 instructions? |
sewardj | fa18a26 | 2007-03-22 12:13:13 +0000 | [diff] [blame] | 1217 | # Note, this doesn't generate a C-level symbol. It generates a |
| 1218 | # automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's |
sewardj | f0aabf8 | 2007-03-22 00:24:21 +0000 | [diff] [blame] | 1219 | AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3]) |
| 1220 | |
| 1221 | AC_TRY_COMPILE(, [ |
| 1222 | do { long long int x; |
| 1223 | __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); } |
| 1224 | while (0) |
| 1225 | ], |
| 1226 | [ |
| 1227 | ac_have_as_sse3=yes |
| 1228 | AC_MSG_RESULT([yes]) |
| 1229 | ], [ |
| 1230 | ac_have_as_sse3=no |
| 1231 | AC_MSG_RESULT([no]) |
| 1232 | ]) |
sewardj | fa18a26 | 2007-03-22 12:13:13 +0000 | [diff] [blame] | 1233 | |
| 1234 | AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes) |
sewardj | f0aabf8 | 2007-03-22 00:24:21 +0000 | [diff] [blame] | 1235 | |
| 1236 | |
sewardj | 6d6da5b | 2008-02-09 12:07:40 +0000 | [diff] [blame] | 1237 | # Ditto for SSSE3 instructions (note extra S) |
| 1238 | # Note, this doesn't generate a C-level symbol. It generates a |
| 1239 | # automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's |
| 1240 | AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3]) |
| 1241 | |
| 1242 | AC_TRY_COMPILE(, [ |
| 1243 | do { long long int x; |
| 1244 | __asm__ __volatile__( |
| 1245 | "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); } |
| 1246 | while (0) |
| 1247 | ], |
| 1248 | [ |
| 1249 | ac_have_as_ssse3=yes |
| 1250 | AC_MSG_RESULT([yes]) |
| 1251 | ], [ |
| 1252 | ac_have_as_ssse3=no |
| 1253 | AC_MSG_RESULT([no]) |
| 1254 | ]) |
| 1255 | |
| 1256 | AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes) |
| 1257 | |
| 1258 | |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1259 | # Check for TLS support in the compiler and linker |
bart | ca9f2ad | 2008-06-02 07:14:20 +0000 | [diff] [blame] | 1260 | if test "x${cross_compiling}" = "xno"; then |
| 1261 | # Native compilation: check whether running a program using TLS succeeds. |
| 1262 | # Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs |
| 1263 | # succeeds but running programs using TLS fails. |
| 1264 | AC_CACHE_CHECK([for TLS support], vg_cv_tls, |
| 1265 | [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS], |
| 1266 | [vg_cv_tls=$enableval], |
| 1267 | [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]], |
| 1268 | [[return foo;]])], |
| 1269 | [vg_cv_tls=yes], |
| 1270 | [vg_cv_tls=no])])]) |
| 1271 | else |
| 1272 | # Cross-compiling: check whether linking a program using TLS succeeds. |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1273 | AC_CACHE_CHECK([for TLS support], vg_cv_tls, |
| 1274 | [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS], |
| 1275 | [vg_cv_tls=$enableval], |
bart | cddeaf5 | 2008-05-25 15:58:11 +0000 | [diff] [blame] | 1276 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]], |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1277 | [[return foo;]])], |
| 1278 | [vg_cv_tls=yes], |
| 1279 | [vg_cv_tls=no])])]) |
bart | ca9f2ad | 2008-06-02 07:14:20 +0000 | [diff] [blame] | 1280 | fi |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 1281 | |
| 1282 | if test "$vg_cv_tls" = yes; then |
| 1283 | AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables]) |
| 1284 | fi |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 1285 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 1286 | |
bart | 62f54e4 | 2008-07-28 11:35:10 +0000 | [diff] [blame] | 1287 | # Checks for C header files. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1288 | AC_HEADER_STDC |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1289 | AC_CHECK_HEADERS([ \ |
bart | 1f2b143 | 2009-01-16 12:06:54 +0000 | [diff] [blame] | 1290 | asm/unistd.h \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1291 | endian.h \ |
| 1292 | mqueue.h \ |
| 1293 | sys/endian.h \ |
| 1294 | sys/epoll.h \ |
| 1295 | sys/eventfd.h \ |
bart | ce48fa9 | 2008-04-26 10:59:46 +0000 | [diff] [blame] | 1296 | sys/klog.h \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1297 | sys/poll.h \ |
bart | 71bad29 | 2008-04-27 11:43:23 +0000 | [diff] [blame] | 1298 | sys/signal.h \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1299 | sys/signalfd.h \ |
bart | 71bad29 | 2008-04-27 11:43:23 +0000 | [diff] [blame] | 1300 | sys/syscall.h \ |
| 1301 | sys/time.h \ |
| 1302 | sys/types.h \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1303 | ]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1304 | |
| 1305 | # Checks for typedefs, structures, and compiler characteristics. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1306 | AC_TYPE_UID_T |
| 1307 | AC_TYPE_OFF_T |
| 1308 | AC_TYPE_SIZE_T |
| 1309 | AC_HEADER_TIME |
| 1310 | |
sewardj | 535c50f | 2005-06-04 23:14:53 +0000 | [diff] [blame] | 1311 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1312 | # Checks for library functions. |
| 1313 | AC_FUNC_MEMCMP |
| 1314 | AC_FUNC_MMAP |
| 1315 | AC_TYPE_SIGNAL |
| 1316 | |
bart | 71bad29 | 2008-04-27 11:43:23 +0000 | [diff] [blame] | 1317 | AC_CHECK_LIB([rt], [clock_gettime]) |
bart | 41ac62a | 2008-07-07 16:58:03 +0000 | [diff] [blame] | 1318 | |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1319 | AC_CHECK_FUNCS([ \ |
bart | 71bad29 | 2008-04-27 11:43:23 +0000 | [diff] [blame] | 1320 | clock_gettime\ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1321 | epoll_create \ |
| 1322 | epoll_pwait \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1323 | floor \ |
bart | ce48fa9 | 2008-04-26 10:59:46 +0000 | [diff] [blame] | 1324 | klogctl \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1325 | mallinfo \ |
| 1326 | memchr \ |
| 1327 | memset \ |
| 1328 | mkdir \ |
| 1329 | ppoll \ |
bart | 6d45e92 | 2009-01-20 13:45:38 +0000 | [diff] [blame] | 1330 | pthread_barrier_init \ |
| 1331 | pthread_condattr_setclock \ |
| 1332 | pthread_mutex_timedlock \ |
| 1333 | pthread_rwlock_timedrdlock \ |
| 1334 | pthread_rwlock_timedwrlock \ |
| 1335 | pthread_spin_lock \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1336 | semtimedop \ |
| 1337 | signalfd \ |
bart | 71bad29 | 2008-04-27 11:43:23 +0000 | [diff] [blame] | 1338 | syscall \ |
bart | f5ceec8 | 2008-04-26 07:45:10 +0000 | [diff] [blame] | 1339 | strchr \ |
| 1340 | strdup \ |
| 1341 | strpbrk \ |
| 1342 | strrchr \ |
| 1343 | strstr \ |
| 1344 | timerfd \ |
| 1345 | utimensat \ |
| 1346 | ]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1347 | |
bart | 623eec3 | 2008-07-29 17:54:49 +0000 | [diff] [blame] | 1348 | # AC_CHECK_LIB adds any library found to the variable LIBS, and links these |
| 1349 | # libraries with any shared object and/or executable. This is NOT what we |
| 1350 | # want for e.g. vgpreload_core-x86-linux.so |
| 1351 | LIBS="" |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1352 | |
bart | 6d45e92 | 2009-01-20 13:45:38 +0000 | [diff] [blame] | 1353 | AM_CONDITIONAL([HAVE_PTHREAD_BARRIER], |
| 1354 | [test x$ac_cv_func_pthread_barrier_init = xyes]) |
bart | 2eaa8f2 | 2009-01-20 14:01:16 +0000 | [diff] [blame] | 1355 | AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK], |
| 1356 | [test x$ac_cv_func_pthread_mutex_timedlock = xyes]) |
bart | 6d45e92 | 2009-01-20 13:45:38 +0000 | [diff] [blame] | 1357 | AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK], |
| 1358 | [test x$ac_cv_func_pthread_spin_lock = xyes]) |
| 1359 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1360 | # Do we have a useable MPI setup on the primary and/or secondary targets? |
| 1361 | # On Linux, by default, assumes mpicc and -m32/-m64 |
| 1362 | # On AIX, by default, assumes mpxlc and -q32/-q64 |
sewardj | e9fa506 | 2006-03-12 18:29:18 +0000 | [diff] [blame] | 1363 | # Note: this is a kludge in that it assumes the specified mpicc |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1364 | # understands -m32/-m64/-q32/-q64 regardless of what is specified using |
| 1365 | # --with-mpicc=. |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1366 | MPI_CC="mpicc" |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1367 | if test x$VG_PLATFORM_PRI = xPPC32_AIX5 \ |
| 1368 | -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then |
| 1369 | MPI_CC="mpxlc" |
| 1370 | fi |
| 1371 | |
sewardj | e9fa506 | 2006-03-12 18:29:18 +0000 | [diff] [blame] | 1372 | mflag_primary= |
| 1373 | if test x$VG_PLATFORM_PRI = xX86_LINUX \ |
| 1374 | -o x$VG_PLATFORM_PRI = xPPC32_LINUX ; then |
| 1375 | mflag_primary=$FLAG_M32 |
| 1376 | elif test x$VG_PLATFORM_PRI = xAMD64_LINUX \ |
| 1377 | -o x$VG_PLATFORM_PRI = xPPC64_LINUX ; then |
| 1378 | mflag_primary=$FLAG_M64 |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1379 | elif test x$VG_PLATFORM_PRI = xPPC32_AIX5 ; then |
| 1380 | mflag_primary=-q32 |
| 1381 | elif test x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then |
| 1382 | mflag_primary=-q64 |
sewardj | e9fa506 | 2006-03-12 18:29:18 +0000 | [diff] [blame] | 1383 | fi |
| 1384 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1385 | mflag_secondary= |
| 1386 | if test x$VG_PLATFORM_SEC = xX86_LINUX \ |
| 1387 | -o x$VG_PLATFORM_SEC = xPPC32_LINUX ; then |
| 1388 | mflag_secondary=$FLAG_M32 |
| 1389 | elif test x$VG_PLATFORM_SEC = xPPC32_AIX5 ; then |
| 1390 | mflag_secondary=-q32 |
| 1391 | fi |
| 1392 | |
| 1393 | |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1394 | AC_ARG_WITH(mpicc, |
sewardj | b70a613 | 2006-05-27 21:14:09 +0000 | [diff] [blame] | 1395 | [ --with-mpicc= Specify name of MPI2-ised C compiler], |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1396 | MPI_CC=$withval |
| 1397 | ) |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1398 | AC_SUBST(MPI_CC) |
| 1399 | |
| 1400 | ## See if MPI_CC works for the primary target |
| 1401 | ## |
| 1402 | AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h]) |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1403 | saved_CC=$CC |
sewardj | de4f384 | 2006-03-09 02:41:41 +0000 | [diff] [blame] | 1404 | saved_CFLAGS=$CFLAGS |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1405 | CC=$MPI_CC |
sewardj | e9fa506 | 2006-03-12 18:29:18 +0000 | [diff] [blame] | 1406 | CFLAGS=$mflag_primary |
sewardj | d3fcc64 | 2006-03-09 02:49:56 +0000 | [diff] [blame] | 1407 | AC_TRY_LINK([ |
sewardj | 1a85e60 | 2006-03-08 15:26:10 +0000 | [diff] [blame] | 1408 | #include <mpi.h> |
| 1409 | #include <stdio.h> |
sewardj | de4f384 | 2006-03-09 02:41:41 +0000 | [diff] [blame] | 1410 | ],[ |
| 1411 | int r = MPI_Init(NULL,NULL); |
| 1412 | r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL ); |
| 1413 | return r; |
| 1414 | ], [ |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1415 | ac_have_mpi2_pri=yes |
sewardj | 1a85e60 | 2006-03-08 15:26:10 +0000 | [diff] [blame] | 1416 | AC_MSG_RESULT([yes, $MPI_CC]) |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1417 | ], [ |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1418 | ac_have_mpi2_pri=no |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1419 | AC_MSG_RESULT([no]) |
| 1420 | ]) |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 1421 | CC=$saved_CC |
sewardj | de4f384 | 2006-03-09 02:41:41 +0000 | [diff] [blame] | 1422 | CFLAGS=$saved_CFLAGS |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1423 | AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes) |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1424 | |
sewardj | 03d86f2 | 2006-10-17 00:57:24 +0000 | [diff] [blame] | 1425 | ## See if MPI_CC works for the secondary target. Complication: what if |
| 1426 | ## there is no secondary target? We need this to then fail. |
| 1427 | ## Kludge this by making MPI_CC something which will surely fail in |
| 1428 | ## such a case. |
| 1429 | ## |
| 1430 | AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h]) |
| 1431 | saved_CC=$CC |
| 1432 | saved_CFLAGS=$CFLAGS |
| 1433 | if test x$VG_PLATFORM_SEC = x ; then |
| 1434 | CC="$MPI_CC this will surely fail" |
| 1435 | else |
| 1436 | CC=$MPI_CC |
| 1437 | fi |
| 1438 | CFLAGS=$mflag_secondary |
| 1439 | AC_TRY_LINK([ |
| 1440 | #include <mpi.h> |
| 1441 | #include <stdio.h> |
| 1442 | ],[ |
| 1443 | int r = MPI_Init(NULL,NULL); |
| 1444 | r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL ); |
| 1445 | return r; |
| 1446 | ], [ |
| 1447 | ac_have_mpi2_sec=yes |
| 1448 | AC_MSG_RESULT([yes, $MPI_CC]) |
| 1449 | ], [ |
| 1450 | ac_have_mpi2_sec=no |
| 1451 | AC_MSG_RESULT([no]) |
| 1452 | ]) |
| 1453 | CC=$saved_CC |
| 1454 | CFLAGS=$saved_CFLAGS |
| 1455 | AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes) |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1456 | |
| 1457 | |
sewardj | 493c4ef | 2008-12-13 16:45:19 +0000 | [diff] [blame] | 1458 | # There now follow some tests for QtCore, Boost, and OpenMP. These |
| 1459 | # tests are present because Drd has some regression tests that use |
| 1460 | # these packages. All regression test programs all compiled only |
| 1461 | # for the primary target. And so it is important that the configure |
| 1462 | # checks that follow, use the correct -m32 or -m64 flag for the |
| 1463 | # primary target (called $mflag_primary). Otherwise, we can end up |
| 1464 | # in a situation (eg) where, on amd64-linux, the test for Boost checks |
| 1465 | # for usable 64-bit Boost facilities, but because we are doing a 32-bit |
| 1466 | # only build (meaning, the primary target is x86-linux), the build |
| 1467 | # of the regtest programs that use Boost fails, because they are |
| 1468 | # build as 32-bit (IN THIS EXAMPLE). |
| 1469 | # |
| 1470 | # Hence: ALWAYS USE $mflag_primary FOR CONFIGURE TESTS FOR FACILITIES |
| 1471 | # NEEDED BY THE REGRESSION TEST PROGRAMS. |
| 1472 | |
| 1473 | |
bart | 21d3cfc | 2008-08-02 09:08:17 +0000 | [diff] [blame] | 1474 | # The test below verifies whether the QtCore package been installed. |
| 1475 | # This test works as follows: |
| 1476 | # - If pkg-config was not installed at the time autogen.sh was run, |
| 1477 | # the definition of the PKG_CHECK_EXISTS() macro will not be found by |
| 1478 | # autogen.sh. Augogen.sh will generate a configure script that prints |
| 1479 | # a warning about pkg-config and proceeds as if Qt4 has not been installed. |
| 1480 | # - If pkg-config was installed at the time autogen.sh was run, |
| 1481 | # the generated configure script will try to detect the presence of the |
| 1482 | # Qt4 QtCore library by looking up compile and linker flags in the file |
| 1483 | # called QtCore.pc. |
| 1484 | # - pkg-config settings can be overridden via the configure variables |
| 1485 | # QTCORE_CFLAGS and QTCORE_LIBS (added by the pkg-config m4 macro's to the |
| 1486 | # configure script -- see also ./configure --help). |
| 1487 | # - The QTCORE_CFLAGS and QTCORE_LIBS configure variables can be used even if |
| 1488 | # the pkg-config executable is not present on the system on which the |
| 1489 | # configure script is run. |
bart | 41ac62a | 2008-07-07 16:58:03 +0000 | [diff] [blame] | 1490 | |
bart | 21d3cfc | 2008-08-02 09:08:17 +0000 | [diff] [blame] | 1491 | ifdef( |
| 1492 | [PKG_CHECK_EXISTS], |
| 1493 | [PKG_CHECK_EXISTS( |
| 1494 | [QtCore], |
| 1495 | [ |
| 1496 | PKG_CHECK_MODULES([QTCORE], [QtCore]) |
bart | 11fbd89 | 2008-09-21 15:00:58 +0000 | [diff] [blame] | 1497 | # Paranoia: don't trust the result reported by pkg-config, but when |
| 1498 | # pkg-config reports that QtCore has been found, verify whether linking |
| 1499 | # programs with QtCore succeeds. |
| 1500 | AC_LANG(C++) |
| 1501 | safe_CXXFLAGS="${CXXFLAGS}" |
sewardj | 493c4ef | 2008-12-13 16:45:19 +0000 | [diff] [blame] | 1502 | CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary" |
bart | 11fbd89 | 2008-09-21 15:00:58 +0000 | [diff] [blame] | 1503 | AC_TRY_LINK( |
| 1504 | [#include <QMutex>], |
| 1505 | [QMutex Mutex;], |
| 1506 | [ac_have_qtcore=yes], |
| 1507 | [ |
| 1508 | AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.]) |
| 1509 | ac_have_qtcore=no |
| 1510 | ] |
| 1511 | ) |
| 1512 | CXXFLAGS="${safe_CXXFLAGS}" |
bart | 21d3cfc | 2008-08-02 09:08:17 +0000 | [diff] [blame] | 1513 | ], |
| 1514 | [ |
| 1515 | ac_have_qtcore=no |
| 1516 | ] |
| 1517 | ) |
| 1518 | ], |
| 1519 | AC_MSG_WARN([pkg-config has not been installed or is too old.]) |
| 1520 | AC_MSG_WARN([Detection of Qt4 will be skipped.]) |
| 1521 | [ac_have_qtcore=no] |
| 1522 | ) |
bart | 41ac62a | 2008-07-07 16:58:03 +0000 | [diff] [blame] | 1523 | |
| 1524 | AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes]) |
| 1525 | |
| 1526 | |
bart | 62f54e4 | 2008-07-28 11:35:10 +0000 | [diff] [blame] | 1527 | # Test for QMutex::tryLock(int), which has been introduced in Qt 4.3. |
| 1528 | # See also http://doc.trolltech.com/4.3/qmutex.html. |
| 1529 | if test x$ac_have_qtcore = xyes; then |
| 1530 | AC_MSG_CHECKING([for Qt4 QMutex::tryLock(int)]) |
| 1531 | AC_LANG(C++) |
bart | 21d3cfc | 2008-08-02 09:08:17 +0000 | [diff] [blame] | 1532 | safe_CXXFLAGS="${CXXFLAGS}" |
sewardj | 493c4ef | 2008-12-13 16:45:19 +0000 | [diff] [blame] | 1533 | CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary" |
bart | 62f54e4 | 2008-07-28 11:35:10 +0000 | [diff] [blame] | 1534 | AC_TRY_COMPILE([ |
| 1535 | #include <QtCore/QMutex> |
| 1536 | ], |
| 1537 | [ |
| 1538 | QMutex M; |
| 1539 | M.tryLock(1); |
| 1540 | M.unlock(); |
| 1541 | return 0; |
| 1542 | ], |
| 1543 | [ |
| 1544 | AC_MSG_RESULT([yes]) |
| 1545 | AC_DEFINE([HAVE_QTCORE_QMUTEX_TRYLOCK_INT], [1], [Define to 1 if the installed version of Qt4 provides QMutex::tryLock(int).]) |
| 1546 | ], |
| 1547 | [ |
| 1548 | AC_MSG_RESULT([no]) |
| 1549 | ]) |
bart | 21d3cfc | 2008-08-02 09:08:17 +0000 | [diff] [blame] | 1550 | CXXFLAGS="${safe_CXXFLAGS}" |
bart | 62f54e4 | 2008-07-28 11:35:10 +0000 | [diff] [blame] | 1551 | AC_LANG(C) |
| 1552 | fi |
| 1553 | |
| 1554 | |
sewardj | 493c4ef | 2008-12-13 16:45:19 +0000 | [diff] [blame] | 1555 | # Check whether the boost library 1.35 or later has been installed. |
| 1556 | # The Boost.Threads library has undergone a major rewrite in version 1.35.0. |
| 1557 | |
| 1558 | AC_MSG_CHECKING([for boost]) |
| 1559 | |
| 1560 | AC_LANG(C++) |
| 1561 | safe_CXXFLAGS=$CXXFLAGS |
| 1562 | CXXFLAGS="-lboost_thread-mt $mflag_primary" |
| 1563 | |
| 1564 | AC_LINK_IFELSE( |
| 1565 | [ |
| 1566 | #include <boost/thread.hpp> |
| 1567 | static void thread_func(void) |
| 1568 | { } |
| 1569 | int main(int argc, char** argv) |
| 1570 | { |
| 1571 | boost::thread t(thread_func); |
| 1572 | return 0; |
| 1573 | } |
| 1574 | ], |
| 1575 | [ |
| 1576 | ac_have_boost_1_35=yes |
| 1577 | AC_SUBST([BOOST_CFLAGS], []) |
| 1578 | AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"]) |
| 1579 | AC_MSG_RESULT([yes]) |
| 1580 | ], [ |
| 1581 | ac_have_boost_1_35=no |
| 1582 | AC_MSG_RESULT([no]) |
| 1583 | ]) |
| 1584 | |
| 1585 | CXXFLAGS=$safe_CXXFLAGS |
| 1586 | AC_LANG(C) |
| 1587 | |
| 1588 | AM_CONDITIONAL([HAVE_BOOST_1_35], [test x$ac_have_boost_1_35 = xyes]) |
| 1589 | |
| 1590 | |
| 1591 | # does this compiler support -fopenmp, does it have the include file |
| 1592 | # <omp.h> and does it have libgomp ? |
| 1593 | |
| 1594 | AC_MSG_CHECKING([for OpenMP]) |
| 1595 | |
| 1596 | safe_CFLAGS=$CFLAGS |
| 1597 | CFLAGS="-fopenmp" |
| 1598 | |
| 1599 | AC_LINK_IFELSE( |
| 1600 | [ |
| 1601 | #include <omp.h> |
| 1602 | int main(int argc, char** argv) |
| 1603 | { |
| 1604 | omp_set_dynamic(0); |
| 1605 | return 0; |
| 1606 | } |
| 1607 | ], |
| 1608 | [ |
| 1609 | ac_have_openmp=yes |
| 1610 | AC_MSG_RESULT([yes]) |
| 1611 | ], [ |
| 1612 | ac_have_openmp=no |
| 1613 | AC_MSG_RESULT([no]) |
| 1614 | ]) |
| 1615 | CFLAGS=$safe_CFLAGS |
| 1616 | |
| 1617 | AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes]) |
| 1618 | |
| 1619 | |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 1620 | # -------------------- ok. We're done. -------------------- |
| 1621 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 1622 | AC_OUTPUT( |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1623 | Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1624 | valgrind.spec |
mueller | bddd607 | 2003-11-19 21:50:07 +0000 | [diff] [blame] | 1625 | valgrind.pc |
dirk | 07596a2 | 2008-04-25 11:33:30 +0000 | [diff] [blame] | 1626 | glibc-2.X.supp |
njn25 | 4d54243 | 2002-09-23 16:09:39 +0000 | [diff] [blame] | 1627 | docs/Makefile |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 1628 | docs/lib/Makefile |
| 1629 | docs/images/Makefile |
njn | f7c00b1 | 2005-07-19 21:46:19 +0000 | [diff] [blame] | 1630 | docs/internals/Makefile |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 1631 | docs/xml/Makefile |
njn25 | 4d54243 | 2002-09-23 16:09:39 +0000 | [diff] [blame] | 1632 | tests/Makefile |
njn | c2e7f48 | 2002-09-27 08:44:17 +0000 | [diff] [blame] | 1633 | tests/vg_regtest |
njn | ec0c27a | 2005-12-10 23:11:28 +0000 | [diff] [blame] | 1634 | perf/Makefile |
| 1635 | perf/vg_perf |
njn25 | 4d54243 | 2002-09-23 16:09:39 +0000 | [diff] [blame] | 1636 | include/Makefile |
sewardj | 0f8881b | 2006-10-18 01:16:57 +0000 | [diff] [blame] | 1637 | include/vki/Makefile |
njn | 7a6e746 | 2002-11-09 17:53:30 +0000 | [diff] [blame] | 1638 | auxprogs/Makefile |
njn25 | ab72603 | 2002-09-23 16:24:41 +0000 | [diff] [blame] | 1639 | coregrind/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1640 | memcheck/Makefile |
| 1641 | memcheck/tests/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1642 | memcheck/tests/amd64/Makefile |
cerion | 85665ca | 2005-06-20 15:51:07 +0000 | [diff] [blame] | 1643 | memcheck/tests/ppc32/Makefile |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 1644 | memcheck/tests/ppc64/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1645 | memcheck/tests/x86/Makefile |
njn | 3b3b76d | 2009-01-19 03:44:19 +0000 | [diff] [blame] | 1646 | memcheck/tests/linux/Makefile |
njn | a454ec0 | 2009-01-19 03:16:59 +0000 | [diff] [blame] | 1647 | memcheck/tests/x86-linux/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1648 | memcheck/docs/Makefile |
| 1649 | cachegrind/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1650 | cachegrind/tests/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1651 | cachegrind/tests/amd64/Makefile |
cerion | 85665ca | 2005-06-20 15:51:07 +0000 | [diff] [blame] | 1652 | cachegrind/tests/ppc32/Makefile |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 1653 | cachegrind/tests/ppc64/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1654 | cachegrind/tests/x86/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1655 | cachegrind/docs/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 1656 | cachegrind/cg_annotate |
weidendo | a17f2a3 | 2006-03-20 10:27:30 +0000 | [diff] [blame] | 1657 | callgrind/Makefile |
| 1658 | callgrind/callgrind_annotate |
| 1659 | callgrind/callgrind_control |
| 1660 | callgrind/tests/Makefile |
| 1661 | callgrind/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1662 | helgrind/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 1663 | helgrind/tests/Makefile |
njn | 83157fc | 2002-10-03 10:07:34 +0000 | [diff] [blame] | 1664 | helgrind/docs/Makefile |
nethercote | c9f3692 | 2004-02-14 16:40:02 +0000 | [diff] [blame] | 1665 | massif/Makefile |
nethercote | c9f3692 | 2004-02-14 16:40:02 +0000 | [diff] [blame] | 1666 | massif/tests/Makefile |
njn | 734b805 | 2007-11-01 04:40:37 +0000 | [diff] [blame] | 1667 | massif/perf/Makefile |
nethercote | c9f3692 | 2004-02-14 16:40:02 +0000 | [diff] [blame] | 1668 | massif/docs/Makefile |
njn | d5a8d24 | 2007-11-02 20:44:57 +0000 | [diff] [blame] | 1669 | massif/ms_print |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1670 | lackey/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 1671 | lackey/tests/Makefile |
njn | 83157fc | 2002-10-03 10:07:34 +0000 | [diff] [blame] | 1672 | lackey/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 1673 | none/Makefile |
| 1674 | none/tests/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1675 | none/tests/amd64/Makefile |
cerion | 85665ca | 2005-06-20 15:51:07 +0000 | [diff] [blame] | 1676 | none/tests/ppc32/Makefile |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 1677 | none/tests/ppc64/Makefile |
njn | c616819 | 2004-11-29 13:54:10 +0000 | [diff] [blame] | 1678 | none/tests/x86/Makefile |
njn | 9bc8c00 | 2002-10-02 13:49:13 +0000 | [diff] [blame] | 1679 | none/docs/Makefile |
sewardj | 99a2ceb | 2007-11-09 12:30:36 +0000 | [diff] [blame] | 1680 | exp-omega/Makefile |
| 1681 | exp-omega/tests/Makefile |
| 1682 | exp-omega/docs/Makefile |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 1683 | exp-ptrcheck/Makefile |
| 1684 | exp-ptrcheck/tests/Makefile |
| 1685 | exp-ptrcheck/docs/Makefile |
bart | ccf17de | 2008-07-04 15:14:35 +0000 | [diff] [blame] | 1686 | drd/Makefile |
| 1687 | drd/docs/Makefile |
| 1688 | drd/scripts/download-and-build-splash2 |
| 1689 | drd/tests/Makefile |
bart | 0b2b462 | 2008-06-17 19:19:16 +0000 | [diff] [blame] | 1690 | ) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 1691 | |
| 1692 | cat<<EOF |
| 1693 | |
sewardj | e95d94f | 2008-09-19 09:02:19 +0000 | [diff] [blame] | 1694 | configure.in: VG_ARCH_MAX = ${VG_ARCH_MAX} |
| 1695 | configure.in: VG_ARCH_PRI = ${VG_ARCH_PRI} |
| 1696 | |
| 1697 | Primary build target: ${VG_PLATFORM_PRI} |
| 1698 | Secondary build target: ${VG_PLATFORM_SEC} |
| 1699 | Default supp files: ${DEFAULT_SUPP} |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 1700 | |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 1701 | EOF |