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