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