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