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