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