blob: e5d696c3d8de41527348bba714dc2d03ed87d06d [file] [log] [blame]
sewardj01262142006-01-04 01:20:28 +00001
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
sewardjde4a1d02002-03-22 01:27:54 +000010# Process this file with autoconf to produce a configure script.
sewardj17c4eb12007-12-11 00:50:54 +000011AC_INIT(Valgrind, 3.4.0.SVN, valgrind-users@lists.sourceforge.net)
njn04e16982005-05-31 00:23:43 +000012AC_CONFIG_SRCDIR(coregrind/m_main.c)
sewardjde4a1d02002-03-22 01:27:54 +000013AM_CONFIG_HEADER(config.h)
bart3a2dac02008-03-18 17:40:38 +000014AM_INIT_AUTOMAKE([foreign])
sewardjde4a1d02002-03-22 01:27:54 +000015
gobryb0ed4672002-03-27 20:58:58 +000016AM_MAINTAINER_MODE
17
njn8738c282004-11-23 16:31:56 +000018# Where is VEX ?
njnfe408942004-11-23 17:52:24 +000019# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
20# older autoconfs don't support it... here's what it would say:
21#
sewardj85a9dca2005-07-26 10:42:57 +000022# AS_HELP_STRING([--with-vex], [Vex directory]),
njnfe408942004-11-23 17:52:24 +000023#
njn8738c282004-11-23 16:31:56 +000024AC_ARG_WITH(vex,
sewardj85a9dca2005-07-26 10:42:57 +000025 [ --with-vex=/path/to/vex/dir Vex directory],
njn8738c282004-11-23 16:31:56 +000026[
27 AC_CHECK_FILE($withval/pub/libvex.h,
28 [VEX_DIR=$withval],
29 [AC_MSG_ERROR([Directory '$withval' does not exist, or does not contain Vex])])
30],
31[
njn17adf1e2005-09-16 03:59:37 +000032 VEX_DIR='$(top_srcdir)/VEX'
njn8738c282004-11-23 16:31:56 +000033])
sewardj50629ec2004-11-22 13:44:11 +000034AC_SUBST(VEX_DIR)
35
njn657d9512005-06-24 15:20:52 +000036# "make distcheck" first builds a tarball, then extracts it.
37# Then it creates a build directory different from the extracted sources
38# (called _build), and issues
39#
40# ../configure $(DISTCHECK_CONFIGURE_FLAGS)
41#
42# and then builds, runs "make check", installs using DESTDIR, runs make
43# installcheck, uninstalls, checks whether the installed base is empty
44# again, then does yet another "make dist" and compares the resulting
45# tarball with the one it started off with for identical content. Then it
46# tests "make distclean" for no leftover files.
47#
48# So this line means: when doing "make dist", use the same --with-vex value
49# that you used when running configure to configure this tree in the first
50# place.
51AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
52
sewardjde4a1d02002-03-22 01:27:54 +000053# Checks for programs.
sewardjb5f6f512005-03-10 23:59:00 +000054CFLAGS="-Wno-long-long"
bart69953752008-07-08 08:53:15 +000055CXXFLAGS="-I/usr/include/qt4"
56CPPFLAGS="-I/usr/include/qt4"
gobrye721a522002-03-22 13:38:30 +000057
sewardjde4a1d02002-03-22 01:27:54 +000058AC_PROG_LN_S
59AC_PROG_CC
bart0affa492008-03-18 17:53:09 +000060AM_PROG_CC_C_O
sewardjde4a1d02002-03-22 01:27:54 +000061AC_PROG_CPP
njn25e49d8e72002-09-23 09:36:25 +000062AC_PROG_CXX
sewardjde4a1d02002-03-22 01:27:54 +000063AC_PROG_RANLIB
64
bartcddeaf52008-05-25 15:58:11 +000065# If no AR variable was specified, look up the name of the archiver. Otherwise
66# do not touch the AR variable.
67if test "x$AR" = "x"; then
68 AC_PATH_PROGS([AR], ["${LD%ld}ar" "ar"], [ar])
69fi
70AC_ARG_VAR([AR],[Archiver command])
71
gobrye721a522002-03-22 13:38:30 +000072# Check for the compiler support
73if test "${GCC}" != "yes" ; then
74 AC_MSG_ERROR([Valgrind relies on GCC to be compiled])
75fi
76
sewardj2f685952002-12-22 19:32:23 +000077# figure out where perl lives
78AC_PATH_PROG(PERL, perl)
79
njn9315df32003-04-16 20:50:50 +000080# figure out where gdb lives
81AC_PATH_PROG(GDB, gdb)
njnfe408942004-11-23 17:52:24 +000082AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB])
njn9315df32003-04-16 20:50:50 +000083
daywalker48ccca52002-04-15 00:31:58 +000084# some older automake's don't have it so try something on our own
85ifdef([AM_PROG_AS],[AM_PROG_AS],
86[
gobry1be19852002-03-26 20:44:55 +000087AS="${CC}"
88AC_SUBST(AS)
gobry3b777892002-04-04 09:18:39 +000089
gobry1be19852002-03-26 20:44:55 +000090ASFLAGS=""
91AC_SUBST(ASFLAGS)
daywalker48ccca52002-04-15 00:31:58 +000092])
gobry3b777892002-04-04 09:18:39 +000093
gobry3b777892002-04-04 09:18:39 +000094
sewardjf33b4332008-07-18 18:20:42 +000095# Check we have GNU sed: some of the stuff done by "make install" relies
96# on some pretty fancy sed expressions, and AIX sed doesn't produce the
97# same results, causing install to fail
98
99AC_MSG_CHECKING([for GNU sed])
100
101[sed_firstline=`sed --version | head -n 1`]
102
103case "${sed_firstline}" in
104 GNU*)
105 AC_MSG_RESULT([ok, looks like GNU sed])
106 ;;
107 *)
108 AC_MSG_RESULT([please ensure first 'sed' in your path is GNU sed])
109 AC_MSG_RESULT([note: GNU sed is only required at build/install time])
110 AC_MSG_ERROR([build/install requires that 'sed' is GNU sed])
111 ;;
112esac
113
114
sewardj535c50f2005-06-04 23:14:53 +0000115# We don't want gcc < 3.0
gobrye721a522002-03-22 13:38:30 +0000116AC_MSG_CHECKING([for a supported version of gcc])
117
sewardjf33b4332008-07-18 18:20:42 +0000118[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
gobrye721a522002-03-22 13:38:30 +0000119
120case "${gcc_version}" in
bart76719bf2008-04-19 07:47:56 +0000121 2.*)
gobrye721a522002-03-22 13:38:30 +0000122 AC_MSG_RESULT([no (${gcc_version})])
sewardj535c50f2005-06-04 23:14:53 +0000123 AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
124 ;;
gobrye721a522002-03-22 13:38:30 +0000125 *)
126 AC_MSG_RESULT([ok (${gcc_version})])
127 ;;
128esac
129
gobrye721a522002-03-22 13:38:30 +0000130
sewardj03d86f22006-10-17 00:57:24 +0000131# Checks for the platform, with the aim of setting VG_ARCH. Note
132# that VG_ARCH must be set to reflect the most that this CPU can
133# do: for example if it is a 64-bit capable PowerPC, then it must
134# be set to ppc64 and not ppc32. Ditto for amd64.
135
sewardjde4a1d02002-03-22 01:27:54 +0000136AC_CANONICAL_HOST
137
138AC_MSG_CHECKING([for a supported CPU])
nethercote888ecb72004-08-23 14:54:40 +0000139AC_SUBST(VG_ARCH)
sewardjbc692db2006-01-04 03:31:07 +0000140
sewardj9b0567a2006-01-17 02:56:18 +0000141AC_SUBST(VG_ARCH_ALL)
142VG_ARCH_ALL="amd64 ppc32 ppc64 x86"
143
sewardj45f4e7c2005-09-27 19:20:21 +0000144AC_SUBST(VALT_LOAD_ADDRESS)
sewardjde4a1d02002-03-22 01:27:54 +0000145
gobrye721a522002-03-22 13:38:30 +0000146case "${host_cpu}" in
sewardjde4a1d02002-03-22 01:27:54 +0000147 i?86)
148 AC_MSG_RESULT([ok (${host_cpu})])
nethercote888ecb72004-08-23 14:54:40 +0000149 VG_ARCH="x86"
sewardjd7baad42006-05-20 01:13:38 +0000150 valt_load_address_normal="0x38000000"
151 valt_load_address_inner="0x28000000"
sewardjde4a1d02002-03-22 01:27:54 +0000152 ;;
153
njnfe408942004-11-23 17:52:24 +0000154 x86_64)
155 AC_MSG_RESULT([ok (${host_cpu})])
156 VG_ARCH="amd64"
sewardjd7baad42006-05-20 01:13:38 +0000157 valt_load_address_normal="0x38000000"
158 valt_load_address_inner="0x28000000"
njnfe408942004-11-23 17:52:24 +0000159 ;;
160
sewardj2c48c7b2005-11-29 13:05:56 +0000161 powerpc64)
sewardj03d86f22006-10-17 00:57:24 +0000162# This value can only happen on Linux, not on AIX
sewardj2c48c7b2005-11-29 13:05:56 +0000163 AC_MSG_RESULT([ok (${host_cpu})])
164 VG_ARCH="ppc64"
sewardjd7baad42006-05-20 01:13:38 +0000165 valt_load_address_normal="0x38000000"
166 valt_load_address_inner="0x28000000"
sewardj2c48c7b2005-11-29 13:05:56 +0000167 ;;
168
169 powerpc)
sewardj03d86f22006-10-17 00:57:24 +0000170# Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
171# Whereas in Linux that means only a 32-bit capable CPU.
cerion85665ca2005-06-20 15:51:07 +0000172 AC_MSG_RESULT([ok (${host_cpu})])
sewardj03d86f22006-10-17 00:57:24 +0000173 case "${host_os}" in
174 aix5.*)
175 VG_ARCH="ppc64"
176 ;;
177 *)
178 VG_ARCH="ppc32"
179 ;;
180 esac
sewardjd7baad42006-05-20 01:13:38 +0000181 valt_load_address_normal="0x38000000"
182 valt_load_address_inner="0x28000000"
nethercote9bcc9062004-10-13 13:50:01 +0000183 ;;
184
sewardjde4a1d02002-03-22 01:27:54 +0000185 *)
186 AC_MSG_RESULT([no (${host_cpu})])
nethercote81d5c662004-10-13 13:18:51 +0000187 AC_MSG_ERROR([Unsupported host architecture. Sorry])
sewardjde4a1d02002-03-22 01:27:54 +0000188 ;;
189esac
190
sewardj45f4e7c2005-09-27 19:20:21 +0000191# Check if this should be built as an inner Valgrind, to be run within
192# another Valgrind. Choose the load address accordingly.
sewardj86e992f2006-01-28 18:39:09 +0000193AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
194 [AC_ARG_ENABLE(inner,
195 [ --enable-inner enables self-hosting],
196 [vg_cv_inner=$enableval],
197 [vg_cv_inner=no])])
sewardj45f4e7c2005-09-27 19:20:21 +0000198if test "$vg_cv_inner" = yes; then
199 AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
200 VALT_LOAD_ADDRESS=$valt_load_address_inner
201else
202 VALT_LOAD_ADDRESS=$valt_load_address_normal
203fi
204
sewardj86e992f2006-01-28 18:39:09 +0000205# Sometimes it's convenient to subvert the bi-arch build system and
206# just have a single build even though the underlying platform is
207# capable of both. Hence handle --enable-only64bit and
208# --enable-only32bit. Complain if both are issued :-)
209
210# Check if a 64-bit only build has been requested
211AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
212 [AC_ARG_ENABLE(only64bit,
213 [ --enable-only64bit do a 64-bit only build],
214 [vg_cv_only64bit=$enableval],
215 [vg_cv_only64bit=no])])
216
217# Check if a 32-bit only build has been requested
218AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit,
219 [AC_ARG_ENABLE(only32bit,
220 [ --enable-only32bit do a 32-bit only build],
221 [vg_cv_only32bit=$enableval],
222 [vg_cv_only32bit=no])])
223
224# Stay sane
225if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
226 AC_MSG_ERROR(
227 [Nonsensical: both --enable-only64bit and --enable-only32bit.])
228fi
229
230
231
sewardjde4a1d02002-03-22 01:27:54 +0000232AC_MSG_CHECKING([for a supported OS])
nethercote888ecb72004-08-23 14:54:40 +0000233AC_SUBST(VG_OS)
sewardjde4a1d02002-03-22 01:27:54 +0000234
gobrye721a522002-03-22 13:38:30 +0000235case "${host_os}" in
mueller8c68e042004-01-03 15:21:14 +0000236 *linux*)
sewardjde4a1d02002-03-22 01:27:54 +0000237 AC_MSG_RESULT([ok (${host_os})])
nethercote888ecb72004-08-23 14:54:40 +0000238 VG_OS="linux"
mueller8c68e042004-01-03 15:21:14 +0000239
240 # Ok, this is linux. Check the kernel version
241 AC_MSG_CHECKING([for the kernel version])
242
243 kernel=`uname -r`
244
245 case "${kernel}" in
246 2.6.*)
247 AC_MSG_RESULT([2.6 family (${kernel})])
248 AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
249 ;;
250
251 2.4.*)
252 AC_MSG_RESULT([2.4 family (${kernel})])
253 AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
254 ;;
255
mueller8c68e042004-01-03 15:21:14 +0000256 *)
257 AC_MSG_RESULT([unsupported (${kernel})])
nethercote4fa681f2004-11-08 17:51:39 +0000258 AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
mueller8c68e042004-01-03 15:21:14 +0000259 ;;
260 esac
261
262 ;;
263
sewardj03d86f22006-10-17 00:57:24 +0000264 aix5.1.*)
265 AC_MSG_RESULT([ok (${host_os})])
266 VG_OS="aix5"
267 ;;
268 aix5.2.*)
269 AC_MSG_RESULT([ok (${host_os})])
270 VG_OS="aix5"
271 ;;
272 aix5.3.*)
273 AC_MSG_RESULT([ok (${host_os})])
274 VG_OS="aix5"
275 ;;
276
mueller8c68e042004-01-03 15:21:14 +0000277 *freebsd*)
278 AC_MSG_RESULT([ok (${host_os})])
nethercote888ecb72004-08-23 14:54:40 +0000279 VG_OS="freebsd"
sewardjde4a1d02002-03-22 01:27:54 +0000280 ;;
281
282 *)
283 AC_MSG_RESULT([no (${host_os})])
mueller8c68e042004-01-03 15:21:14 +0000284 AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.])
sewardjde4a1d02002-03-22 01:27:54 +0000285 ;;
286esac
287
tomd6398392006-06-07 17:44:36 +0000288# If we are building on a 64 bit platform test to see if the system
289# supports building 32 bit programs and disable 32 bit support if it
290# does not support building 32 bit programs
291
292case "$VG_ARCH-$VG_OS" in
293 amd64-linux|ppc64-linux)
294 AC_MSG_CHECKING([for 32 bit build support])
295 safe_CFLAGS=$CFLAGS
296 CFLAGS="-m32"
297 AC_TRY_LINK(, [
298 int main () { return 0 ; }
299 ],
300 [
301 AC_MSG_RESULT([yes])
302 ], [
303 vg_cv_only64bit="yes"
304 AC_MSG_RESULT([no])
305 ])
306 CFLAGS=$safe_CFLAGS;;
307esac
308
309if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
310 AC_MSG_ERROR(
311 [--enable-only32bit was specified but system does not support 32 bit builds])
312fi
nethercote888ecb72004-08-23 14:54:40 +0000313
sewardj01262142006-01-04 01:20:28 +0000314# Establish VG_PLATFORM_PRI. This is the primary build target. The
315# entire system, including regression and performance tests, will be
sewardjbc692db2006-01-04 03:31:07 +0000316# built for this target.
sewardj01262142006-01-04 01:20:28 +0000317#
sewardjbc692db2006-01-04 03:31:07 +0000318# Also establish VG_PLATFORM_SEC, the secondary build target, if
sewardj01262142006-01-04 01:20:28 +0000319# possible. The system will also be built for this target, but not
sewardjbc692db2006-01-04 03:31:07 +0000320# the regression or performance tests.
sewardj01262142006-01-04 01:20:28 +0000321#
322AC_MSG_CHECKING([for a supported CPU/OS combination])
nethercote888ecb72004-08-23 14:54:40 +0000323
sewardj01262142006-01-04 01:20:28 +0000324AC_SUBST(VG_PLATFORM_PRI)
325AC_SUBST(VG_PLATFORM_SEC)
326
327case "$VG_ARCH-$VG_OS" in
328 x86-linux)
329 VG_PLATFORM_PRI="X86_LINUX"
330 VG_PLATFORM_SEC=""
sewardj3e38ce02004-11-23 01:17:29 +0000331 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
sewardj01262142006-01-04 01:20:28 +0000332 ;;
333 amd64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000334 if test x$vg_cv_only64bit = xyes; then
335 VG_PLATFORM_PRI="AMD64_LINUX"
336 VG_PLATFORM_SEC=""
337 elif test x$vg_cv_only32bit = xyes; then
338 VG_PLATFORM_PRI="X86_LINUX"
339 VG_PLATFORM_SEC=""
340 else
341 VG_PLATFORM_PRI="AMD64_LINUX"
342 VG_PLATFORM_SEC="X86_LINUX"
343 fi
sewardj01262142006-01-04 01:20:28 +0000344 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
345 ;;
346 ppc32-linux)
347 VG_PLATFORM_PRI="PPC32_LINUX"
348 VG_PLATFORM_SEC=""
349 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
350 ;;
sewardj03d86f22006-10-17 00:57:24 +0000351 ppc64-aix5)
352 if test x$vg_cv_only64bit = xyes; then
353 VG_PLATFORM_PRI="PPC64_AIX5"
354 VG_PLATFORM_SEC=""
355 elif test x$vg_cv_only32bit = xyes; then
356 VG_PLATFORM_PRI="PPC32_AIX5"
357 VG_PLATFORM_SEC=""
358 else
359 VG_PLATFORM_PRI="PPC64_AIX5"
360 VG_PLATFORM_SEC="PPC32_AIX5"
361 fi
362 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
363 ;;
sewardj01262142006-01-04 01:20:28 +0000364 ppc64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000365 if test x$vg_cv_only64bit = xyes; then
366 VG_PLATFORM_PRI="PPC64_LINUX"
367 VG_PLATFORM_SEC=""
368 elif test x$vg_cv_only32bit = xyes; then
369 VG_PLATFORM_PRI="PPC32_LINUX"
370 VG_PLATFORM_SEC=""
371 else
372 VG_PLATFORM_PRI="PPC64_LINUX"
373 VG_PLATFORM_SEC="PPC32_LINUX"
374 fi
sewardj01262142006-01-04 01:20:28 +0000375 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
376 ;;
nethercote888ecb72004-08-23 14:54:40 +0000377 *)
sewardj01262142006-01-04 01:20:28 +0000378 VG_PLATFORM_PRI="unknown"
379 VG_PLATFORM_SEC="unknown"
nethercote888ecb72004-08-23 14:54:40 +0000380 AC_MSG_RESULT([no (${host_cpu}-${host_os})])
sewardj3e38ce02004-11-23 01:17:29 +0000381 AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
nethercote888ecb72004-08-23 14:54:40 +0000382 ;;
383esac
sewardjde4a1d02002-03-22 01:27:54 +0000384
sewardj03d86f22006-10-17 00:57:24 +0000385# Set up VGP_<platform>. Either one or two of these become defined.
sewardj01262142006-01-04 01:20:28 +0000386#
sewardj03d86f22006-10-17 00:57:24 +0000387AM_CONDITIONAL(VGP_X86_LINUX,
sewardjbc692db2006-01-04 03:31:07 +0000388 test x$VG_PLATFORM_PRI = xX86_LINUX \
389 -o x$VG_PLATFORM_SEC = xX86_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000390AM_CONDITIONAL(VGP_AMD64_LINUX,
sewardj01262142006-01-04 01:20:28 +0000391 test x$VG_PLATFORM_PRI = xAMD64_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000392AM_CONDITIONAL(VGP_PPC32_LINUX,
sewardjbc692db2006-01-04 03:31:07 +0000393 test x$VG_PLATFORM_PRI = xPPC32_LINUX \
394 -o x$VG_PLATFORM_SEC = xPPC32_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000395AM_CONDITIONAL(VGP_PPC64_LINUX,
sewardj01262142006-01-04 01:20:28 +0000396 test x$VG_PLATFORM_PRI = xPPC64_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000397AM_CONDITIONAL(VGP_PPC32_AIX5,
398 test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
399 -o x$VG_PLATFORM_SEC = xPPC32_AIX5)
400AM_CONDITIONAL(VGP_PPC64_AIX5,
401 test x$VG_PLATFORM_PRI = xPPC64_AIX5)
402
403# Similarly, set up VGO_<os>. Exactly one of these becomes defined.
404# Relies on the assumption that the primary and secondary targets are
405# for the same OS, so therefore only necessary to test the primary.
406#
407AM_CONDITIONAL(VGO_LINUX,
408 test x$VG_PLATFORM_PRI = xX86_LINUX \
409 -o x$VG_PLATFORM_PRI = xAMD64_LINUX \
410 -o x$VG_PLATFORM_PRI = xPPC32_LINUX \
411 -o x$VG_PLATFORM_PRI = xPPC64_LINUX)
412AM_CONDITIONAL(VGO_AIX5,
413 test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
414 -o x$VG_PLATFORM_PRI = xPPC64_AIX5)
415
416
417# Sometimes, in the Makefile.am-s, it's useful to know
418# whether or not there is a secondary target.
419#
420AM_CONDITIONAL(VGP_HAVE_SECONDARY,
421 test x$VG_PLATFORM_SEC != x)
tomfb7bcde2005-11-07 15:24:38 +0000422
tomb637bad2005-11-08 12:28:35 +0000423
sewardj01262142006-01-04 01:20:28 +0000424# This variable will collect the individual suppression files
425# depending on the results of autoconf
426DEFAULT_SUPP=""
sewardjde4a1d02002-03-22 01:27:54 +0000427AC_SUBST(DEFAULT_SUPP)
428
sewardj01262142006-01-04 01:20:28 +0000429
dirk07596a22008-04-25 11:33:30 +0000430GLIBC_VERSION=""
sewardjde4a1d02002-03-22 01:27:54 +0000431
sewardjde4a1d02002-03-22 01:27:54 +0000432AC_EGREP_CPP([GLIBC_22], [
433#include <features.h>
434#ifdef __GNU_LIBRARY__
435 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
436 GLIBC_22
437 #endif
438#endif
439],
dirk07596a22008-04-25 11:33:30 +0000440GLIBC_VERSION="2.2")
sewardjde4a1d02002-03-22 01:27:54 +0000441
sewardj08c7f012002-10-07 23:56:55 +0000442AC_EGREP_CPP([GLIBC_23], [
443#include <features.h>
444#ifdef __GNU_LIBRARY__
445 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
446 GLIBC_23
447 #endif
448#endif
449],
dirk07596a22008-04-25 11:33:30 +0000450GLIBC_VERSION="2.3")
sewardj08c7f012002-10-07 23:56:55 +0000451
njn781dba52005-06-30 04:06:38 +0000452AC_EGREP_CPP([GLIBC_24], [
453#include <features.h>
454#ifdef __GNU_LIBRARY__
455 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
456 GLIBC_24
457 #endif
458#endif
459],
dirk07596a22008-04-25 11:33:30 +0000460GLIBC_VERSION="2.4")
njn781dba52005-06-30 04:06:38 +0000461
dirkaece45c2006-10-12 08:17:49 +0000462AC_EGREP_CPP([GLIBC_25], [
463#include <features.h>
464#ifdef __GNU_LIBRARY__
465 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
466 GLIBC_25
467 #endif
468#endif
469],
dirk07596a22008-04-25 11:33:30 +0000470GLIBC_VERSION="2.5")
dirkaece45c2006-10-12 08:17:49 +0000471
dirkc8bd0c52007-05-23 17:39:08 +0000472AC_EGREP_CPP([GLIBC_26], [
473#include <features.h>
474#ifdef __GNU_LIBRARY__
475 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
476 GLIBC_26
477 #endif
478#endif
479],
dirk07596a22008-04-25 11:33:30 +0000480GLIBC_VERSION="2.6")
dirkc8bd0c52007-05-23 17:39:08 +0000481
sewardj68c80c12007-11-18 14:40:02 +0000482AC_EGREP_CPP([GLIBC_27], [
483#include <features.h>
484#ifdef __GNU_LIBRARY__
485 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
486 GLIBC_27
487 #endif
488#endif
489],
dirk07596a22008-04-25 11:33:30 +0000490GLIBC_VERSION="2.7")
491
492AC_EGREP_CPP([GLIBC_28], [
493#include <features.h>
494#ifdef __GNU_LIBRARY__
495 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
496 GLIBC_28
497 #endif
498#endif
499],
500GLIBC_VERSION="2.8")
sewardj68c80c12007-11-18 14:40:02 +0000501
sewardj03d86f22006-10-17 00:57:24 +0000502AC_EGREP_CPP([AIX5_LIBC], [
503#include <standards.h>
504#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
505 AIX5_LIBC
506#endif
507],
dirk07596a22008-04-25 11:33:30 +0000508GLIBC_VERSION="aix5")
daywalkere9212b32003-06-15 22:39:15 +0000509
dirk07596a22008-04-25 11:33:30 +0000510AC_MSG_CHECKING([the GLIBC_VERSION version])
sewardj03d86f22006-10-17 00:57:24 +0000511
dirk07596a22008-04-25 11:33:30 +0000512case "${GLIBC_VERSION}" in
sewardjde4a1d02002-03-22 01:27:54 +0000513 2.2)
514 AC_MSG_RESULT(2.2 family)
daywalker418c7482002-10-16 13:09:26 +0000515 AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000516 DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
517 DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000518 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardjde4a1d02002-03-22 01:27:54 +0000519 ;;
520
sewardj08c7f012002-10-07 23:56:55 +0000521 2.3)
522 AC_MSG_RESULT(2.3 family)
daywalker418c7482002-10-16 13:09:26 +0000523 AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000524 DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000525 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000526 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj08c7f012002-10-07 23:56:55 +0000527 ;;
528
njn781dba52005-06-30 04:06:38 +0000529 2.4)
530 AC_MSG_RESULT(2.4 family)
531 AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000532 DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000533 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000534 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
njn781dba52005-06-30 04:06:38 +0000535 ;;
536
dirkaece45c2006-10-12 08:17:49 +0000537 2.5)
538 AC_MSG_RESULT(2.5 family)
539 AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000540 DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000541 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000542 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
dirkaece45c2006-10-12 08:17:49 +0000543 ;;
dirkc8bd0c52007-05-23 17:39:08 +0000544 2.6)
545 AC_MSG_RESULT(2.6 family)
546 AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000547 DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000548 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000549 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000550 ;;
551 2.7)
552 AC_MSG_RESULT(2.7 family)
553 AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x])
dirk07596a22008-04-25 11:33:30 +0000554 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000555 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000556 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
dirkc8bd0c52007-05-23 17:39:08 +0000557 ;;
dirk07596a22008-04-25 11:33:30 +0000558 2.8)
559 AC_MSG_RESULT(2.8 family)
dirkeb939fc2008-04-27 20:38:47 +0000560 AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
dirk07596a22008-04-25 11:33:30 +0000561 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
562 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
563 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
564 ;;
565
sewardj03d86f22006-10-17 00:57:24 +0000566 aix5)
sewardj2f3bcd22006-12-12 01:38:15 +0000567 AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
568 AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
sewardj03d86f22006-10-17 00:57:24 +0000569 DEFAULT_SUPP="aix5libc.supp ${DEFAULT_SUPP}"
570 ;;
dirkaece45c2006-10-12 08:17:49 +0000571
sewardjde4a1d02002-03-22 01:27:54 +0000572 *)
573 AC_MSG_RESULT(unsupported version)
dirk07596a22008-04-25 11:33:30 +0000574 AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.8])
575 AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
sewardjde4a1d02002-03-22 01:27:54 +0000576 ;;
577esac
578
dirk07596a22008-04-25 11:33:30 +0000579AC_SUBST(GLIBC_VERSION)
sewardj535c50f2005-06-04 23:14:53 +0000580
nethercote3d260f62004-10-31 19:39:18 +0000581# We don't know how to detect the X client library version
sewardj03d86f22006-10-17 00:57:24 +0000582# (detecting the server version is easy, but no help). So we
nethercote3d260f62004-10-31 19:39:18 +0000583# just use a hack: always include the suppressions for both
584# versions 3 and 4.
gobrye721a522002-03-22 13:38:30 +0000585AC_PATH_X
gobrye721a522002-03-22 13:38:30 +0000586if test "${no_x}" != 'yes' ; then
sewardj01262142006-01-04 01:20:28 +0000587 DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
588 DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
gobrye721a522002-03-22 13:38:30 +0000589fi
590
sewardj2e10a682003-04-07 19:36:41 +0000591
bart59e2f182008-04-28 16:22:53 +0000592# Check for CLOCK_MONOTONIC
593
594AC_MSG_CHECKING([for CLOCK_MONOTONIC])
595
596AC_TRY_COMPILE(
597[
598#include <time.h>
599], [
600 struct timespec t;
601 clock_gettime(CLOCK_MONOTONIC, &t);
602 return 0;
603],
604[
605AC_MSG_RESULT([yes])
606AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
607 [Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
608], [
609AC_MSG_RESULT([no])
610])
611
bartfea06922008-05-03 09:12:15 +0000612
613# Check for PTHREAD_MUTEX_ADAPTIVE_NP
614
615AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
616
617AC_TRY_COMPILE(
618[
619#define _GNU_SOURCE
620#include <pthread.h>
621], [
622 return (PTHREAD_MUTEX_ADAPTIVE_NP);
623],
624[
625AC_MSG_RESULT([yes])
626AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
627 [Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.])
628], [
629AC_MSG_RESULT([no])
630])
631
632
633# Check for PTHREAD_MUTEX_ERRORCHECK_NP
634
635AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP])
636
637AC_TRY_COMPILE(
638[
639#define _GNU_SOURCE
640#include <pthread.h>
641], [
642 return (PTHREAD_MUTEX_ERRORCHECK_NP);
643],
644[
645AC_MSG_RESULT([yes])
646AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1,
647 [Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.])
648], [
649AC_MSG_RESULT([no])
650])
651
652
653# Check for PTHREAD_MUTEX_RECURSIVE_NP
654
655AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP])
656
657AC_TRY_COMPILE(
658[
659#define _GNU_SOURCE
660#include <pthread.h>
661], [
662 return (PTHREAD_MUTEX_RECURSIVE_NP);
663],
664[
665AC_MSG_RESULT([yes])
666AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1,
667 [Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.])
668], [
669AC_MSG_RESULT([no])
670])
671
672
673# Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
674
675AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP])
676
677AC_TRY_COMPILE(
678[
679#define _GNU_SOURCE
680#include <pthread.h>
681], [
682 pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
683 return 0;
684],
685[
686AC_MSG_RESULT([yes])
687AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1,
688 [Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.])
689], [
690AC_MSG_RESULT([no])
691])
692
693
bart5e389f12008-04-05 12:53:15 +0000694# Check whether pthread_mutex_t has a member called __m_kind.
695
696AC_MSG_CHECKING([for pthread_mutex_t::__m_kind])
697
bart56730cd2008-05-11 06:41:46 +0000698AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000699[
bart56730cd2008-05-11 06:41:46 +0000700 #include <pthread.h>
701], [
bart5e389f12008-04-05 12:53:15 +0000702 pthread_mutex_t m;
703 return m.__m_kind;
bart56730cd2008-05-11 06:41:46 +0000704], [
bart5e389f12008-04-05 12:53:15 +0000705AC_MSG_RESULT([yes])
706AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], 1,
707 [Define to 1 if pthread_mutex_t has a member called __m_kind.])
708], [
709AC_MSG_RESULT([no])
710])
711
712
713# Check whether pthread_mutex_t has a member called __data.__kind.
714
715AC_MSG_CHECKING([for pthread_mutex_t::__data.__kind])
716
bart56730cd2008-05-11 06:41:46 +0000717AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000718[
bart56730cd2008-05-11 06:41:46 +0000719#include <pthread.h>
720], [
bart5e389f12008-04-05 12:53:15 +0000721 pthread_mutex_t m;
722 return m.__data.__kind;
bart56730cd2008-05-11 06:41:46 +0000723], [
bart5e389f12008-04-05 12:53:15 +0000724AC_MSG_RESULT([yes])
725AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], 1,
726 [Define to 1 if pthread_mutex_t has a member __data.__kind.])
727], [
728AC_MSG_RESULT([no])
729])
730
731
bart61111332008-03-10 17:57:41 +0000732# does this compiler support -fopenmp, does it have the include file
733# <omp.h> and does it have libgomp ?
bart29cc9db2008-03-09 15:59:30 +0000734
bart1f52b822008-03-12 17:11:48 +0000735AC_MSG_CHECKING([for OpenMP])
736
bart29cc9db2008-03-09 15:59:30 +0000737safe_CFLAGS=$CFLAGS
738CFLAGS="-fopenmp"
739
bart1f52b822008-03-12 17:11:48 +0000740AC_LINK_IFELSE(
bart29cc9db2008-03-09 15:59:30 +0000741[
bart1f52b822008-03-12 17:11:48 +0000742#include <omp.h>
743int main(int argc, char** argv)
744{
745 omp_set_dynamic(0);
746 return 0;
747}
748],
749[
750ac_have_openmp=yes
bart29cc9db2008-03-09 15:59:30 +0000751AC_MSG_RESULT([yes])
752], [
bart1f52b822008-03-12 17:11:48 +0000753ac_have_openmp=no
bart29cc9db2008-03-09 15:59:30 +0000754AC_MSG_RESULT([no])
755])
756CFLAGS=$safe_CFLAGS
757
bart1f52b822008-03-12 17:11:48 +0000758AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
bart29cc9db2008-03-09 15:59:30 +0000759
760
bart62c370e2008-05-12 18:50:51 +0000761# does this compiler support -maltivec and does it have the include file
762# <altivec.h> ?
763
764AC_MSG_CHECKING([for Altivec])
765
766safe_CFLAGS=$CFLAGS
767CFLAGS="-maltivec"
768
769AC_TRY_COMPILE(
770[
771#include <altivec.h>
772], [
773 vector unsigned int v;
774],
775[
776ac_have_altivec=yes
777AC_MSG_RESULT([yes])
778], [
779ac_have_altivec=no
780AC_MSG_RESULT([no])
781])
782CFLAGS=$safe_CFLAGS
783
784AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
785AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes])
786
787
barta50aa8a2008-04-27 06:06:57 +0000788# Check for eventfd_t, eventfd() and eventfd_read()
789AC_MSG_CHECKING([for eventfd()])
790
791AC_TRY_LINK(
792[
793#include <sys/eventfd.h>
794], [
795 eventfd_t ev;
796 int fd;
797
798 fd = eventfd(5, 0);
799 eventfd_read(fd, &ev);
800 return 0;
801],
802[
803AC_MSG_RESULT([yes])
804AC_DEFINE([HAVE_EVENTFD], 1,
805 [Define to 1 if you have the `eventfd' function.])
806AC_DEFINE([HAVE_EVENTFD_READ], 1,
807 [Define to 1 if you have the `eventfd_read' function.])
808], [
809AC_MSG_RESULT([no])
810])
811
812
sewardj535c50f2005-06-04 23:14:53 +0000813# does this compiler support -m32 ?
814AC_MSG_CHECKING([if gcc accepts -m32])
815
816safe_CFLAGS=$CFLAGS
817CFLAGS="-m32"
818
819AC_TRY_COMPILE(, [
820int main () { return 0 ; }
821],
822[
823FLAG_M32="-m32"
824AC_MSG_RESULT([yes])
825], [
826FLAG_M32=""
827AC_MSG_RESULT([no])
828])
829CFLAGS=$safe_CFLAGS
830
831AC_SUBST(FLAG_M32)
832
833
sewardj03d86f22006-10-17 00:57:24 +0000834# does this compiler support -maix32 ?
835AC_MSG_CHECKING([if gcc accepts -maix32])
836
837safe_CFLAGS=$CFLAGS
838CFLAGS="-maix32"
839
840AC_TRY_COMPILE(, [
841int main () { return 0 ; }
842],
843[
844FLAG_MAIX32="-maix32"
845AC_MSG_RESULT([yes])
846], [
847FLAG_MAIX32=""
848AC_MSG_RESULT([no])
849])
850CFLAGS=$safe_CFLAGS
851
852AC_SUBST(FLAG_MAIX32)
853
854
sewardj01262142006-01-04 01:20:28 +0000855# does this compiler support -m64 ?
856AC_MSG_CHECKING([if gcc accepts -m64])
857
858safe_CFLAGS=$CFLAGS
859CFLAGS="-m64"
860
861AC_TRY_COMPILE(, [
862int main () { return 0 ; }
863],
864[
865FLAG_M64="-m64"
866AC_MSG_RESULT([yes])
867], [
868FLAG_M64=""
869AC_MSG_RESULT([no])
870])
871CFLAGS=$safe_CFLAGS
872
873AC_SUBST(FLAG_M64)
874
875
sewardj03d86f22006-10-17 00:57:24 +0000876# does this compiler support -maix64 ?
877AC_MSG_CHECKING([if gcc accepts -maix64])
878
879safe_CFLAGS=$CFLAGS
880CFLAGS="-maix64"
881
882AC_TRY_COMPILE(, [
883int main () { return 0 ; }
884],
885[
886FLAG_MAIX64="-maix64"
887AC_MSG_RESULT([yes])
888], [
889FLAG_MAIX64=""
890AC_MSG_RESULT([no])
891])
892CFLAGS=$safe_CFLAGS
893
894AC_SUBST(FLAG_MAIX64)
895
896
sewardj67f1fcc2005-07-03 10:41:02 +0000897# does this compiler support -mmmx ?
898AC_MSG_CHECKING([if gcc accepts -mmmx])
899
900safe_CFLAGS=$CFLAGS
901CFLAGS="-mmmx"
902
903AC_TRY_COMPILE(, [
904int main () { return 0 ; }
905],
906[
907FLAG_MMMX="-mmmx"
908AC_MSG_RESULT([yes])
909], [
910FLAG_MMMX=""
911AC_MSG_RESULT([no])
912])
913CFLAGS=$safe_CFLAGS
914
915AC_SUBST(FLAG_MMMX)
916
917
918# does this compiler support -msse ?
919AC_MSG_CHECKING([if gcc accepts -msse])
920
921safe_CFLAGS=$CFLAGS
922CFLAGS="-msse"
923
924AC_TRY_COMPILE(, [
925int main () { return 0 ; }
926],
927[
928FLAG_MSSE="-msse"
929AC_MSG_RESULT([yes])
930], [
931FLAG_MSSE=""
932AC_MSG_RESULT([no])
933])
934CFLAGS=$safe_CFLAGS
935
936AC_SUBST(FLAG_MSSE)
937
938
sewardj5b754b42002-06-03 22:53:35 +0000939# does this compiler support -mpreferred-stack-boundary=2 ?
940AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
941
daywalker3664f562003-10-17 13:43:46 +0000942safe_CFLAGS=$CFLAGS
sewardj5b754b42002-06-03 22:53:35 +0000943CFLAGS="-mpreferred-stack-boundary=2"
944
945AC_TRY_COMPILE(, [
sewardj5b754b42002-06-03 22:53:35 +0000946int main () { return 0 ; }
sewardj5b754b42002-06-03 22:53:35 +0000947],
948[
949PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
daywalker3664f562003-10-17 13:43:46 +0000950AC_MSG_RESULT([yes])
sewardj5b754b42002-06-03 22:53:35 +0000951], [
952PREFERRED_STACK_BOUNDARY=""
953AC_MSG_RESULT([no])
954])
daywalker3664f562003-10-17 13:43:46 +0000955CFLAGS=$safe_CFLAGS
sewardj5b754b42002-06-03 22:53:35 +0000956
957AC_SUBST(PREFERRED_STACK_BOUNDARY)
958
sewardj535c50f2005-06-04 23:14:53 +0000959
sewardjb5f6f512005-03-10 23:59:00 +0000960# does this compiler support -Wno-pointer-sign ?
bart56730cd2008-05-11 06:41:46 +0000961AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign])
sewardjb5f6f512005-03-10 23:59:00 +0000962
963safe_CFLAGS=$CFLAGS
964CFLAGS="-Wno-pointer-sign"
965
966AC_TRY_COMPILE(, [
967int main () { return 0 ; }
968],
969[
970no_pointer_sign=yes
971AC_MSG_RESULT([yes])
972], [
973no_pointer_sign=no
974AC_MSG_RESULT([no])
975])
976CFLAGS=$safe_CFLAGS
977
978if test x$no_pointer_sign = xyes; then
979 CFLAGS="$CFLAGS -Wno-pointer-sign"
980fi
981
sewardj535c50f2005-06-04 23:14:53 +0000982
tom1e946682005-10-12 11:27:33 +0000983# does this compiler support -Wdeclaration-after-statement ?
bart56730cd2008-05-11 06:41:46 +0000984AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement])
tom1e946682005-10-12 11:27:33 +0000985
986safe_CFLAGS=$CFLAGS
987CFLAGS="-Wdeclaration-after-statement"
988
989AC_TRY_COMPILE(, [
990int main () { return 0 ; }
991],
992[
tome9814c32005-10-12 11:30:43 +0000993declaration_after_statement=yes
sewardj72a547e2006-01-25 02:58:28 +0000994FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement"
tom1e946682005-10-12 11:27:33 +0000995AC_MSG_RESULT([yes])
996], [
tome9814c32005-10-12 11:30:43 +0000997declaration_after_statement=no
sewardj72a547e2006-01-25 02:58:28 +0000998FLAG_WDECL_AFTER_STMT=""
tom1e946682005-10-12 11:27:33 +0000999AC_MSG_RESULT([no])
1000])
1001CFLAGS=$safe_CFLAGS
1002
sewardj72a547e2006-01-25 02:58:28 +00001003AC_SUBST(FLAG_WDECL_AFTER_STMT)
1004
tome9814c32005-10-12 11:30:43 +00001005if test x$declaration_after_statement = xyes; then
tom1e946682005-10-12 11:27:33 +00001006 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1007fi
1008
sewardj00f1e622006-03-12 16:47:10 +00001009
bart9d865fa2008-06-23 12:11:49 +00001010# does this compiler support -Wno-format-zero-length ?
1011
1012AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
1013
1014safe_CFLAGS=$CFLAGS
1015CFLAGS="-Wno-format-zero-length"
1016
1017AC_TRY_COMPILE(
1018[ ],
1019[
1020 return 0;
1021],
1022[
1023AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
1024AC_MSG_RESULT([yes])
1025],
1026[
1027AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
1028AC_MSG_RESULT([no])
1029])
1030CFLAGS=$safe_CFLAGS
1031
1032
bart56730cd2008-05-11 06:41:46 +00001033# does this compiler support -Wextra or the older -W ?
1034
1035AC_MSG_CHECKING([if gcc accepts -Wextra or -W])
1036
1037safe_CFLAGS=$CFLAGS
1038CFLAGS="-Wextra"
1039
1040AC_TRY_COMPILE(
1041[ ],
1042[
1043 return 0;
1044],
1045[
1046AC_SUBST([FLAG_W_EXTRA], [-Wextra])
1047AC_MSG_RESULT([-Wextra])
1048], [
1049 CFLAGS="-W"
1050 AC_TRY_COMPILE(
1051 [ ],
1052 [
1053 return 0;
1054 ],
1055 [
1056 AC_SUBST([FLAG_W_EXTRA], [-W])
1057 AC_MSG_RESULT([-W])
1058 ], [
1059 AC_SUBST([FLAG_W_EXTRA], [])
1060 AC_MSG_RESULT([not supported])
1061 ])
1062])
1063CFLAGS=$safe_CFLAGS
1064
1065
sewardja72c26d2007-05-01 13:44:08 +00001066# does this compiler support -fno-stack-protector ?
bart56730cd2008-05-11 06:41:46 +00001067AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
sewardja72c26d2007-05-01 13:44:08 +00001068
1069safe_CFLAGS=$CFLAGS
1070CFLAGS="-fno-stack-protector"
1071
1072AC_TRY_COMPILE(, [
1073int main () { return 0 ; }
1074],
1075[
1076no_stack_protector=yes
1077FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
1078AC_MSG_RESULT([yes])
1079], [
1080no_stack_protector=no
1081FLAG_FNO_STACK_PROTECTOR=""
1082AC_MSG_RESULT([no])
1083])
1084CFLAGS=$safe_CFLAGS
1085
1086AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
1087
1088if test x$no_stack_protector = xyes; then
1089 CFLAGS="$CFLAGS -fno-stack-protector"
1090fi
1091
1092
bart56730cd2008-05-11 06:41:46 +00001093# does this compiler support --param inline-unit-growth=... ?
1094
1095AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth])
1096
1097safe_CFLAGS=$CFLAGS
1098CFLAGS="--param inline-unit-growth=900"
1099
1100AC_TRY_COMPILE(
1101[ ],
1102[
1103 return 0;
1104],
1105[
1106AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
1107 ["--param inline-unit-growth=900"])
1108AC_MSG_RESULT([yes])
1109], [
1110AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""])
1111AC_MSG_RESULT([no])
1112])
1113CFLAGS=$safe_CFLAGS
1114
1115
tomd55121e2005-12-19 12:40:13 +00001116# does this compiler support __builtin_expect?
1117AC_MSG_CHECKING([if gcc supports __builtin_expect])
bart56730cd2008-05-11 06:41:46 +00001118
tomd55121e2005-12-19 12:40:13 +00001119AC_TRY_LINK(, [
1120return __builtin_expect(1, 1) ? 1 : 0
1121],
1122[
1123ac_have_builtin_expect=yes
1124AC_MSG_RESULT([yes])
1125], [
1126ac_have_builtin_expect=no
1127AC_MSG_RESULT([no])
1128])
1129if test x$ac_have_builtin_expect = xyes ; then
1130 AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.])
1131fi
1132
tom1e946682005-10-12 11:27:33 +00001133
bartcd529dc2008-06-26 08:43:12 +00001134# does this compiler have built-in functions for atomic memory access ?
1135AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
1136
1137AC_TRY_LINK(,
1138[
1139 int variable = 1;
1140 return __sync_bool_compare_and_swap(&variable, 1, 2) ? 1 : 0
1141],
1142[
1143 AC_MSG_RESULT([yes])
1144 AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
1145],
1146[
1147 AC_MSG_RESULT([no])
1148])
1149
1150
sewardj00f1e622006-03-12 16:47:10 +00001151# does the ppc assembler support "mtocrf" et al?
1152AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
1153
1154AC_TRY_COMPILE(, [
sewardjdd4cbe12006-03-12 17:27:44 +00001155__asm__ __volatile__("mtocrf 4,0");
1156__asm__ __volatile__("mfocrf 0,4");
sewardj00f1e622006-03-12 16:47:10 +00001157],
1158[
1159ac_have_as_ppc_mftocrf=yes
1160AC_MSG_RESULT([yes])
1161], [
1162ac_have_as_ppc_mftocrf=no
1163AC_MSG_RESULT([no])
1164])
1165if test x$ac_have_as_ppc_mftocrf = xyes ; then
1166 AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.])
1167fi
1168
1169
sewardjf0aabf82007-03-22 00:24:21 +00001170# does the x86/amd64 assembler understand SSE3 instructions?
sewardjfa18a262007-03-22 12:13:13 +00001171# Note, this doesn't generate a C-level symbol. It generates a
1172# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
sewardjf0aabf82007-03-22 00:24:21 +00001173AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
1174
1175AC_TRY_COMPILE(, [
1176 do { long long int x;
1177 __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
1178 while (0)
1179],
1180[
1181ac_have_as_sse3=yes
1182AC_MSG_RESULT([yes])
1183], [
1184ac_have_as_sse3=no
1185AC_MSG_RESULT([no])
1186])
sewardjfa18a262007-03-22 12:13:13 +00001187
1188AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
sewardjf0aabf82007-03-22 00:24:21 +00001189
1190
sewardj6d6da5b2008-02-09 12:07:40 +00001191# Ditto for SSSE3 instructions (note extra S)
1192# Note, this doesn't generate a C-level symbol. It generates a
1193# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
1194AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
1195
1196AC_TRY_COMPILE(, [
1197 do { long long int x;
1198 __asm__ __volatile__(
1199 "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
1200 while (0)
1201],
1202[
1203ac_have_as_ssse3=yes
1204AC_MSG_RESULT([yes])
1205], [
1206ac_have_as_ssse3=no
1207AC_MSG_RESULT([no])
1208])
1209
1210AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
1211
1212
sewardjb5f6f512005-03-10 23:59:00 +00001213# Check for TLS support in the compiler and linker
bartca9f2ad2008-06-02 07:14:20 +00001214if test "x${cross_compiling}" = "xno"; then
1215# Native compilation: check whether running a program using TLS succeeds.
1216# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
1217# succeeds but running programs using TLS fails.
1218AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1219 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1220 [vg_cv_tls=$enableval],
1221 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
1222 [[return foo;]])],
1223 [vg_cv_tls=yes],
1224 [vg_cv_tls=no])])])
1225else
1226# Cross-compiling: check whether linking a program using TLS succeeds.
sewardjb5f6f512005-03-10 23:59:00 +00001227AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1228 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1229 [vg_cv_tls=$enableval],
bartcddeaf52008-05-25 15:58:11 +00001230 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
sewardjb5f6f512005-03-10 23:59:00 +00001231 [[return foo;]])],
1232 [vg_cv_tls=yes],
1233 [vg_cv_tls=no])])])
bartca9f2ad2008-06-02 07:14:20 +00001234fi
sewardjb5f6f512005-03-10 23:59:00 +00001235
1236if test "$vg_cv_tls" = yes; then
1237AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
1238fi
sewardj5b754b42002-06-03 22:53:35 +00001239
sewardj535c50f2005-06-04 23:14:53 +00001240
sewardjde4a1d02002-03-22 01:27:54 +00001241# Checks for header files.
1242AC_HEADER_STDC
bartf5ceec82008-04-26 07:45:10 +00001243AC_CHECK_HEADERS([ \
1244 endian.h \
1245 mqueue.h \
1246 sys/endian.h \
1247 sys/epoll.h \
1248 sys/eventfd.h \
bartce48fa92008-04-26 10:59:46 +00001249 sys/klog.h \
bartf5ceec82008-04-26 07:45:10 +00001250 sys/poll.h \
bart71bad292008-04-27 11:43:23 +00001251 sys/signal.h \
bartf5ceec82008-04-26 07:45:10 +00001252 sys/signalfd.h \
bart71bad292008-04-27 11:43:23 +00001253 sys/syscall.h \
1254 sys/time.h \
1255 sys/types.h \
bartf5ceec82008-04-26 07:45:10 +00001256 ])
sewardjde4a1d02002-03-22 01:27:54 +00001257
bart41ac62a2008-07-07 16:58:03 +00001258AC_LANG(C++)
1259AC_CHECK_HEADERS([ \
1260 QtCore/QMutex \
1261 QtCore/QSemaphore \
1262 QtCore/QThread \
1263 ])
1264AC_LANG(C)
sewardj535c50f2005-06-04 23:14:53 +00001265
sewardjde4a1d02002-03-22 01:27:54 +00001266# Checks for typedefs, structures, and compiler characteristics.
sewardjde4a1d02002-03-22 01:27:54 +00001267AC_TYPE_UID_T
1268AC_TYPE_OFF_T
1269AC_TYPE_SIZE_T
1270AC_HEADER_TIME
1271
sewardj535c50f2005-06-04 23:14:53 +00001272
sewardjde4a1d02002-03-22 01:27:54 +00001273# Checks for library functions.
1274AC_FUNC_MEMCMP
1275AC_FUNC_MMAP
1276AC_TYPE_SIGNAL
1277
bart71bad292008-04-27 11:43:23 +00001278AC_CHECK_LIB([rt], [clock_gettime])
bart41ac62a2008-07-07 16:58:03 +00001279AC_CHECK_LIB([QtCore], [_ZN6QMutex4lockEv]) # QMutex::lock()
1280
1281# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
1282# libraries with any shared object and/or executable. This is NOT what we
1283# want for e.g. vgpreload_core-x86-linux.so
1284LIBS=""
bart71bad292008-04-27 11:43:23 +00001285
bartf5ceec82008-04-26 07:45:10 +00001286AC_CHECK_FUNCS([ \
bart71bad292008-04-27 11:43:23 +00001287 clock_gettime\
bartf5ceec82008-04-26 07:45:10 +00001288 epoll_create \
1289 epoll_pwait \
bartf5ceec82008-04-26 07:45:10 +00001290 floor \
bartce48fa92008-04-26 10:59:46 +00001291 klogctl \
bartf5ceec82008-04-26 07:45:10 +00001292 mallinfo \
1293 memchr \
1294 memset \
1295 mkdir \
1296 ppoll \
1297 semtimedop \
1298 signalfd \
bart71bad292008-04-27 11:43:23 +00001299 syscall \
bartf5ceec82008-04-26 07:45:10 +00001300 strchr \
1301 strdup \
1302 strpbrk \
1303 strrchr \
1304 strstr \
1305 timerfd \
1306 utimensat \
1307 ])
sewardjde4a1d02002-03-22 01:27:54 +00001308
sewardj80637752006-03-02 13:48:21 +00001309
sewardj03d86f22006-10-17 00:57:24 +00001310# Do we have a useable MPI setup on the primary and/or secondary targets?
1311# On Linux, by default, assumes mpicc and -m32/-m64
1312# On AIX, by default, assumes mpxlc and -q32/-q64
sewardje9fa5062006-03-12 18:29:18 +00001313# Note: this is a kludge in that it assumes the specified mpicc
sewardj03d86f22006-10-17 00:57:24 +00001314# understands -m32/-m64/-q32/-q64 regardless of what is specified using
1315# --with-mpicc=.
sewardj0ad46092006-03-02 17:09:16 +00001316MPI_CC="mpicc"
sewardj03d86f22006-10-17 00:57:24 +00001317if test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
1318 -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
1319 MPI_CC="mpxlc"
1320fi
1321
sewardje9fa5062006-03-12 18:29:18 +00001322mflag_primary=
1323if test x$VG_PLATFORM_PRI = xX86_LINUX \
1324 -o x$VG_PLATFORM_PRI = xPPC32_LINUX ; then
1325 mflag_primary=$FLAG_M32
1326elif test x$VG_PLATFORM_PRI = xAMD64_LINUX \
1327 -o x$VG_PLATFORM_PRI = xPPC64_LINUX ; then
1328 mflag_primary=$FLAG_M64
sewardj03d86f22006-10-17 00:57:24 +00001329elif test x$VG_PLATFORM_PRI = xPPC32_AIX5 ; then
1330 mflag_primary=-q32
1331elif test x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
1332 mflag_primary=-q64
sewardje9fa5062006-03-12 18:29:18 +00001333fi
1334
sewardj03d86f22006-10-17 00:57:24 +00001335mflag_secondary=
1336if test x$VG_PLATFORM_SEC = xX86_LINUX \
1337 -o x$VG_PLATFORM_SEC = xPPC32_LINUX ; then
1338 mflag_secondary=$FLAG_M32
1339elif test x$VG_PLATFORM_SEC = xPPC32_AIX5 ; then
1340 mflag_secondary=-q32
1341fi
1342
1343
sewardj0ad46092006-03-02 17:09:16 +00001344AC_ARG_WITH(mpicc,
sewardjb70a6132006-05-27 21:14:09 +00001345 [ --with-mpicc= Specify name of MPI2-ised C compiler],
sewardj0ad46092006-03-02 17:09:16 +00001346 MPI_CC=$withval
1347)
sewardj03d86f22006-10-17 00:57:24 +00001348AC_SUBST(MPI_CC)
1349
1350## See if MPI_CC works for the primary target
1351##
1352AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
sewardj0ad46092006-03-02 17:09:16 +00001353saved_CC=$CC
sewardjde4f3842006-03-09 02:41:41 +00001354saved_CFLAGS=$CFLAGS
sewardj0ad46092006-03-02 17:09:16 +00001355CC=$MPI_CC
sewardje9fa5062006-03-12 18:29:18 +00001356CFLAGS=$mflag_primary
sewardjd3fcc642006-03-09 02:49:56 +00001357AC_TRY_LINK([
sewardj1a85e602006-03-08 15:26:10 +00001358#include <mpi.h>
1359#include <stdio.h>
sewardjde4f3842006-03-09 02:41:41 +00001360],[
1361 int r = MPI_Init(NULL,NULL);
1362 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1363 return r;
1364], [
sewardj03d86f22006-10-17 00:57:24 +00001365ac_have_mpi2_pri=yes
sewardj1a85e602006-03-08 15:26:10 +00001366AC_MSG_RESULT([yes, $MPI_CC])
sewardj80637752006-03-02 13:48:21 +00001367], [
sewardj03d86f22006-10-17 00:57:24 +00001368ac_have_mpi2_pri=no
sewardj80637752006-03-02 13:48:21 +00001369AC_MSG_RESULT([no])
1370])
sewardj0ad46092006-03-02 17:09:16 +00001371CC=$saved_CC
sewardjde4f3842006-03-09 02:41:41 +00001372CFLAGS=$saved_CFLAGS
sewardj03d86f22006-10-17 00:57:24 +00001373AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
sewardj80637752006-03-02 13:48:21 +00001374
sewardj03d86f22006-10-17 00:57:24 +00001375## See if MPI_CC works for the secondary target. Complication: what if
1376## there is no secondary target? We need this to then fail.
1377## Kludge this by making MPI_CC something which will surely fail in
1378## such a case.
1379##
1380AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
1381saved_CC=$CC
1382saved_CFLAGS=$CFLAGS
1383if test x$VG_PLATFORM_SEC = x ; then
1384 CC="$MPI_CC this will surely fail"
1385else
1386 CC=$MPI_CC
1387fi
1388CFLAGS=$mflag_secondary
1389AC_TRY_LINK([
1390#include <mpi.h>
1391#include <stdio.h>
1392],[
1393 int r = MPI_Init(NULL,NULL);
1394 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1395 return r;
1396], [
1397ac_have_mpi2_sec=yes
1398AC_MSG_RESULT([yes, $MPI_CC])
1399], [
1400ac_have_mpi2_sec=no
1401AC_MSG_RESULT([no])
1402])
1403CC=$saved_CC
1404CFLAGS=$saved_CFLAGS
1405AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
sewardj80637752006-03-02 13:48:21 +00001406
1407
bart41ac62a2008-07-07 16:58:03 +00001408# does this compiler have the include file <Qt/qmutex.h> and does it have
1409# libQtCore.so ?
1410
1411AC_MSG_CHECKING([for Qt4 core library])
1412
bart69953752008-07-08 08:53:15 +00001413AC_TRY_COMPILE([ ],
1414[
1415#if ! defined(HAVE_LIBQTCORE) || ! defined(HAVE_QTCORE_QMUTEX)
1416#error Qt4 not supported.
1417#endif
1418 return 0;
1419],
1420[
bart41ac62a2008-07-07 16:58:03 +00001421 ac_have_qtcore=yes
1422 AC_MSG_RESULT([yes])
bart69953752008-07-08 08:53:15 +00001423],
1424[
bart41ac62a2008-07-07 16:58:03 +00001425 ac_have_qtcore=no
1426 AC_MSG_RESULT([no])
bart69953752008-07-08 08:53:15 +00001427])
bart41ac62a2008-07-07 16:58:03 +00001428
1429AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])
1430
1431
sewardj80637752006-03-02 13:48:21 +00001432# -------------------- ok. We're done. --------------------
1433
gobrye721a522002-03-22 13:38:30 +00001434AC_OUTPUT(
sewardjde4a1d02002-03-22 01:27:54 +00001435 Makefile
njn25cac76cb2002-09-23 11:21:57 +00001436 valgrind.spec
muellerbddd6072003-11-19 21:50:07 +00001437 valgrind.pc
dirk07596a22008-04-25 11:33:30 +00001438 glibc-2.X.supp
njn254d542432002-09-23 16:09:39 +00001439 docs/Makefile
njn3e986b22004-11-30 10:43:45 +00001440 docs/lib/Makefile
1441 docs/images/Makefile
njnf7c00b12005-07-19 21:46:19 +00001442 docs/internals/Makefile
njn3e986b22004-11-30 10:43:45 +00001443 docs/xml/Makefile
njn254d542432002-09-23 16:09:39 +00001444 tests/Makefile
njnc2e7f482002-09-27 08:44:17 +00001445 tests/vg_regtest
njnec0c27a2005-12-10 23:11:28 +00001446 perf/Makefile
1447 perf/vg_perf
njn254d542432002-09-23 16:09:39 +00001448 include/Makefile
sewardj0f8881b2006-10-18 01:16:57 +00001449 include/vki/Makefile
njn7a6e7462002-11-09 17:53:30 +00001450 auxprogs/Makefile
njn25ab726032002-09-23 16:24:41 +00001451 coregrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001452 memcheck/Makefile
1453 memcheck/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001454 memcheck/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001455 memcheck/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001456 memcheck/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001457 memcheck/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001458 memcheck/docs/Makefile
1459 cachegrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001460 cachegrind/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001461 cachegrind/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001462 cachegrind/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001463 cachegrind/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001464 cachegrind/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001465 cachegrind/docs/Makefile
njnf2df9b52002-10-04 11:35:47 +00001466 cachegrind/cg_annotate
weidendoa17f2a32006-03-20 10:27:30 +00001467 callgrind/Makefile
1468 callgrind/callgrind_annotate
1469 callgrind/callgrind_control
1470 callgrind/tests/Makefile
1471 callgrind/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001472 helgrind/Makefile
njnf2df9b52002-10-04 11:35:47 +00001473 helgrind/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001474 helgrind/docs/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001475 massif/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001476 massif/tests/Makefile
njn734b8052007-11-01 04:40:37 +00001477 massif/perf/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001478 massif/docs/Makefile
njnd5a8d242007-11-02 20:44:57 +00001479 massif/ms_print
njn25cac76cb2002-09-23 11:21:57 +00001480 lackey/Makefile
njnf2df9b52002-10-04 11:35:47 +00001481 lackey/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001482 lackey/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001483 none/Makefile
1484 none/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001485 none/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001486 none/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001487 none/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001488 none/tests/x86/Makefile
njn9bc8c002002-10-02 13:49:13 +00001489 none/docs/Makefile
sewardj99a2ceb2007-11-09 12:30:36 +00001490 exp-omega/Makefile
1491 exp-omega/tests/Makefile
1492 exp-omega/docs/Makefile
bartccf17de2008-07-04 15:14:35 +00001493 drd/Makefile
1494 drd/docs/Makefile
1495 drd/scripts/download-and-build-splash2
1496 drd/tests/Makefile
bart0b2b4622008-06-17 19:19:16 +00001497)
gobry3b777892002-04-04 09:18:39 +00001498
1499cat<<EOF
1500
sewardj01262142006-01-04 01:20:28 +00001501 Primary build target: ${VG_PLATFORM_PRI}
sewardj80637752006-03-02 13:48:21 +00001502 Secondary build target: ${VG_PLATFORM_SEC}
sewardj01262142006-01-04 01:20:28 +00001503 Default supp files: ${DEFAULT_SUPP}
gobry3b777892002-04-04 09:18:39 +00001504
gobry3b777892002-04-04 09:18:39 +00001505EOF
1506
1507cat<<EOF > default.supp
1508# This is a generated file, composed of the following suppression rules:
1509#
1510# ${DEFAULT_SUPP}
1511#
1512
1513EOF
1514
1515for file in ${DEFAULT_SUPP} ; do
1516 cat ${srcdir}/$file >> default.supp
1517done