blob: 3e5e233678e96210d8e6562515c41921842245c4 [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"
gobrye721a522002-03-22 13:38:30 +000055
sewardjde4a1d02002-03-22 01:27:54 +000056AC_PROG_LN_S
57AC_PROG_CC
bart0affa492008-03-18 17:53:09 +000058AM_PROG_CC_C_O
sewardjde4a1d02002-03-22 01:27:54 +000059AC_PROG_CPP
njn25e49d8e72002-09-23 09:36:25 +000060AC_PROG_CXX
sewardjde4a1d02002-03-22 01:27:54 +000061AC_PROG_RANLIB
62
bartcddeaf52008-05-25 15:58:11 +000063# If no AR variable was specified, look up the name of the archiver. Otherwise
64# do not touch the AR variable.
65if test "x$AR" = "x"; then
66 AC_PATH_PROGS([AR], ["${LD%ld}ar" "ar"], [ar])
67fi
68AC_ARG_VAR([AR],[Archiver command])
69
gobrye721a522002-03-22 13:38:30 +000070# Check for the compiler support
71if test "${GCC}" != "yes" ; then
72 AC_MSG_ERROR([Valgrind relies on GCC to be compiled])
73fi
74
sewardj2f685952002-12-22 19:32:23 +000075# figure out where perl lives
76AC_PATH_PROG(PERL, perl)
77
njn9315df32003-04-16 20:50:50 +000078# figure out where gdb lives
79AC_PATH_PROG(GDB, gdb)
njnfe408942004-11-23 17:52:24 +000080AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB])
njn9315df32003-04-16 20:50:50 +000081
daywalker48ccca52002-04-15 00:31:58 +000082# some older automake's don't have it so try something on our own
83ifdef([AM_PROG_AS],[AM_PROG_AS],
84[
gobry1be19852002-03-26 20:44:55 +000085AS="${CC}"
86AC_SUBST(AS)
gobry3b777892002-04-04 09:18:39 +000087
gobry1be19852002-03-26 20:44:55 +000088ASFLAGS=""
89AC_SUBST(ASFLAGS)
daywalker48ccca52002-04-15 00:31:58 +000090])
gobry3b777892002-04-04 09:18:39 +000091
gobry3b777892002-04-04 09:18:39 +000092
sewardj535c50f2005-06-04 23:14:53 +000093# We don't want gcc < 3.0
gobrye721a522002-03-22 13:38:30 +000094AC_MSG_CHECKING([for a supported version of gcc])
95
bart76719bf2008-04-19 07:47:56 +000096[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`]
gobrye721a522002-03-22 13:38:30 +000097
98case "${gcc_version}" in
bart76719bf2008-04-19 07:47:56 +000099 2.*)
gobrye721a522002-03-22 13:38:30 +0000100 AC_MSG_RESULT([no (${gcc_version})])
sewardj535c50f2005-06-04 23:14:53 +0000101 AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
102 ;;
gobrye721a522002-03-22 13:38:30 +0000103 *)
104 AC_MSG_RESULT([ok (${gcc_version})])
105 ;;
106esac
107
gobrye721a522002-03-22 13:38:30 +0000108
sewardj03d86f22006-10-17 00:57:24 +0000109# Checks for the platform, with the aim of setting VG_ARCH. Note
110# that VG_ARCH must be set to reflect the most that this CPU can
111# do: for example if it is a 64-bit capable PowerPC, then it must
112# be set to ppc64 and not ppc32. Ditto for amd64.
113
sewardjde4a1d02002-03-22 01:27:54 +0000114AC_CANONICAL_HOST
115
116AC_MSG_CHECKING([for a supported CPU])
nethercote888ecb72004-08-23 14:54:40 +0000117AC_SUBST(VG_ARCH)
sewardjbc692db2006-01-04 03:31:07 +0000118
sewardj9b0567a2006-01-17 02:56:18 +0000119AC_SUBST(VG_ARCH_ALL)
120VG_ARCH_ALL="amd64 ppc32 ppc64 x86"
121
sewardj45f4e7c2005-09-27 19:20:21 +0000122AC_SUBST(VALT_LOAD_ADDRESS)
sewardjde4a1d02002-03-22 01:27:54 +0000123
gobrye721a522002-03-22 13:38:30 +0000124case "${host_cpu}" in
sewardjde4a1d02002-03-22 01:27:54 +0000125 i?86)
126 AC_MSG_RESULT([ok (${host_cpu})])
nethercote888ecb72004-08-23 14:54:40 +0000127 VG_ARCH="x86"
sewardjd7baad42006-05-20 01:13:38 +0000128 valt_load_address_normal="0x38000000"
129 valt_load_address_inner="0x28000000"
sewardjde4a1d02002-03-22 01:27:54 +0000130 ;;
131
njnfe408942004-11-23 17:52:24 +0000132 x86_64)
133 AC_MSG_RESULT([ok (${host_cpu})])
134 VG_ARCH="amd64"
sewardjd7baad42006-05-20 01:13:38 +0000135 valt_load_address_normal="0x38000000"
136 valt_load_address_inner="0x28000000"
njnfe408942004-11-23 17:52:24 +0000137 ;;
138
sewardj2c48c7b2005-11-29 13:05:56 +0000139 powerpc64)
sewardj03d86f22006-10-17 00:57:24 +0000140# This value can only happen on Linux, not on AIX
sewardj2c48c7b2005-11-29 13:05:56 +0000141 AC_MSG_RESULT([ok (${host_cpu})])
142 VG_ARCH="ppc64"
sewardjd7baad42006-05-20 01:13:38 +0000143 valt_load_address_normal="0x38000000"
144 valt_load_address_inner="0x28000000"
sewardj2c48c7b2005-11-29 13:05:56 +0000145 ;;
146
147 powerpc)
sewardj03d86f22006-10-17 00:57:24 +0000148# Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
149# Whereas in Linux that means only a 32-bit capable CPU.
cerion85665ca2005-06-20 15:51:07 +0000150 AC_MSG_RESULT([ok (${host_cpu})])
sewardj03d86f22006-10-17 00:57:24 +0000151 case "${host_os}" in
152 aix5.*)
153 VG_ARCH="ppc64"
154 ;;
155 *)
156 VG_ARCH="ppc32"
157 ;;
158 esac
sewardjd7baad42006-05-20 01:13:38 +0000159 valt_load_address_normal="0x38000000"
160 valt_load_address_inner="0x28000000"
nethercote9bcc9062004-10-13 13:50:01 +0000161 ;;
162
sewardjde4a1d02002-03-22 01:27:54 +0000163 *)
164 AC_MSG_RESULT([no (${host_cpu})])
nethercote81d5c662004-10-13 13:18:51 +0000165 AC_MSG_ERROR([Unsupported host architecture. Sorry])
sewardjde4a1d02002-03-22 01:27:54 +0000166 ;;
167esac
168
sewardj45f4e7c2005-09-27 19:20:21 +0000169# Check if this should be built as an inner Valgrind, to be run within
170# another Valgrind. Choose the load address accordingly.
sewardj86e992f2006-01-28 18:39:09 +0000171AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
172 [AC_ARG_ENABLE(inner,
173 [ --enable-inner enables self-hosting],
174 [vg_cv_inner=$enableval],
175 [vg_cv_inner=no])])
sewardj45f4e7c2005-09-27 19:20:21 +0000176if test "$vg_cv_inner" = yes; then
177 AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
178 VALT_LOAD_ADDRESS=$valt_load_address_inner
179else
180 VALT_LOAD_ADDRESS=$valt_load_address_normal
181fi
182
sewardj86e992f2006-01-28 18:39:09 +0000183# Sometimes it's convenient to subvert the bi-arch build system and
184# just have a single build even though the underlying platform is
185# capable of both. Hence handle --enable-only64bit and
186# --enable-only32bit. Complain if both are issued :-)
187
188# Check if a 64-bit only build has been requested
189AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
190 [AC_ARG_ENABLE(only64bit,
191 [ --enable-only64bit do a 64-bit only build],
192 [vg_cv_only64bit=$enableval],
193 [vg_cv_only64bit=no])])
194
195# Check if a 32-bit only build has been requested
196AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit,
197 [AC_ARG_ENABLE(only32bit,
198 [ --enable-only32bit do a 32-bit only build],
199 [vg_cv_only32bit=$enableval],
200 [vg_cv_only32bit=no])])
201
202# Stay sane
203if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
204 AC_MSG_ERROR(
205 [Nonsensical: both --enable-only64bit and --enable-only32bit.])
206fi
207
208
209
sewardjde4a1d02002-03-22 01:27:54 +0000210AC_MSG_CHECKING([for a supported OS])
nethercote888ecb72004-08-23 14:54:40 +0000211AC_SUBST(VG_OS)
sewardjde4a1d02002-03-22 01:27:54 +0000212
gobrye721a522002-03-22 13:38:30 +0000213case "${host_os}" in
mueller8c68e042004-01-03 15:21:14 +0000214 *linux*)
sewardjde4a1d02002-03-22 01:27:54 +0000215 AC_MSG_RESULT([ok (${host_os})])
nethercote888ecb72004-08-23 14:54:40 +0000216 VG_OS="linux"
mueller8c68e042004-01-03 15:21:14 +0000217
218 # Ok, this is linux. Check the kernel version
219 AC_MSG_CHECKING([for the kernel version])
220
221 kernel=`uname -r`
222
223 case "${kernel}" in
224 2.6.*)
225 AC_MSG_RESULT([2.6 family (${kernel})])
226 AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
227 ;;
228
229 2.4.*)
230 AC_MSG_RESULT([2.4 family (${kernel})])
231 AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
232 ;;
233
mueller8c68e042004-01-03 15:21:14 +0000234 *)
235 AC_MSG_RESULT([unsupported (${kernel})])
nethercote4fa681f2004-11-08 17:51:39 +0000236 AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
mueller8c68e042004-01-03 15:21:14 +0000237 ;;
238 esac
239
240 ;;
241
sewardj03d86f22006-10-17 00:57:24 +0000242 aix5.1.*)
243 AC_MSG_RESULT([ok (${host_os})])
244 VG_OS="aix5"
245 ;;
246 aix5.2.*)
247 AC_MSG_RESULT([ok (${host_os})])
248 VG_OS="aix5"
249 ;;
250 aix5.3.*)
251 AC_MSG_RESULT([ok (${host_os})])
252 VG_OS="aix5"
253 ;;
254
mueller8c68e042004-01-03 15:21:14 +0000255 *freebsd*)
256 AC_MSG_RESULT([ok (${host_os})])
nethercote888ecb72004-08-23 14:54:40 +0000257 VG_OS="freebsd"
sewardjde4a1d02002-03-22 01:27:54 +0000258 ;;
259
260 *)
261 AC_MSG_RESULT([no (${host_os})])
mueller8c68e042004-01-03 15:21:14 +0000262 AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.])
sewardjde4a1d02002-03-22 01:27:54 +0000263 ;;
264esac
265
tomd6398392006-06-07 17:44:36 +0000266# If we are building on a 64 bit platform test to see if the system
267# supports building 32 bit programs and disable 32 bit support if it
268# does not support building 32 bit programs
269
270case "$VG_ARCH-$VG_OS" in
271 amd64-linux|ppc64-linux)
272 AC_MSG_CHECKING([for 32 bit build support])
273 safe_CFLAGS=$CFLAGS
274 CFLAGS="-m32"
275 AC_TRY_LINK(, [
276 int main () { return 0 ; }
277 ],
278 [
279 AC_MSG_RESULT([yes])
280 ], [
281 vg_cv_only64bit="yes"
282 AC_MSG_RESULT([no])
283 ])
284 CFLAGS=$safe_CFLAGS;;
285esac
286
287if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
288 AC_MSG_ERROR(
289 [--enable-only32bit was specified but system does not support 32 bit builds])
290fi
nethercote888ecb72004-08-23 14:54:40 +0000291
sewardj01262142006-01-04 01:20:28 +0000292# Establish VG_PLATFORM_PRI. This is the primary build target. The
293# entire system, including regression and performance tests, will be
sewardjbc692db2006-01-04 03:31:07 +0000294# built for this target.
sewardj01262142006-01-04 01:20:28 +0000295#
sewardjbc692db2006-01-04 03:31:07 +0000296# Also establish VG_PLATFORM_SEC, the secondary build target, if
sewardj01262142006-01-04 01:20:28 +0000297# possible. The system will also be built for this target, but not
sewardjbc692db2006-01-04 03:31:07 +0000298# the regression or performance tests.
sewardj01262142006-01-04 01:20:28 +0000299#
300AC_MSG_CHECKING([for a supported CPU/OS combination])
nethercote888ecb72004-08-23 14:54:40 +0000301
sewardj01262142006-01-04 01:20:28 +0000302AC_SUBST(VG_PLATFORM_PRI)
303AC_SUBST(VG_PLATFORM_SEC)
304
305case "$VG_ARCH-$VG_OS" in
306 x86-linux)
307 VG_PLATFORM_PRI="X86_LINUX"
308 VG_PLATFORM_SEC=""
sewardj3e38ce02004-11-23 01:17:29 +0000309 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
sewardj01262142006-01-04 01:20:28 +0000310 ;;
311 amd64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000312 if test x$vg_cv_only64bit = xyes; then
313 VG_PLATFORM_PRI="AMD64_LINUX"
314 VG_PLATFORM_SEC=""
315 elif test x$vg_cv_only32bit = xyes; then
316 VG_PLATFORM_PRI="X86_LINUX"
317 VG_PLATFORM_SEC=""
318 else
319 VG_PLATFORM_PRI="AMD64_LINUX"
320 VG_PLATFORM_SEC="X86_LINUX"
321 fi
sewardj01262142006-01-04 01:20:28 +0000322 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
323 ;;
324 ppc32-linux)
325 VG_PLATFORM_PRI="PPC32_LINUX"
326 VG_PLATFORM_SEC=""
327 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
328 ;;
sewardj03d86f22006-10-17 00:57:24 +0000329 ppc64-aix5)
330 if test x$vg_cv_only64bit = xyes; then
331 VG_PLATFORM_PRI="PPC64_AIX5"
332 VG_PLATFORM_SEC=""
333 elif test x$vg_cv_only32bit = xyes; then
334 VG_PLATFORM_PRI="PPC32_AIX5"
335 VG_PLATFORM_SEC=""
336 else
337 VG_PLATFORM_PRI="PPC64_AIX5"
338 VG_PLATFORM_SEC="PPC32_AIX5"
339 fi
340 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
341 ;;
sewardj01262142006-01-04 01:20:28 +0000342 ppc64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000343 if test x$vg_cv_only64bit = xyes; then
344 VG_PLATFORM_PRI="PPC64_LINUX"
345 VG_PLATFORM_SEC=""
346 elif test x$vg_cv_only32bit = xyes; then
347 VG_PLATFORM_PRI="PPC32_LINUX"
348 VG_PLATFORM_SEC=""
349 else
350 VG_PLATFORM_PRI="PPC64_LINUX"
351 VG_PLATFORM_SEC="PPC32_LINUX"
352 fi
sewardj01262142006-01-04 01:20:28 +0000353 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
354 ;;
nethercote888ecb72004-08-23 14:54:40 +0000355 *)
sewardj01262142006-01-04 01:20:28 +0000356 VG_PLATFORM_PRI="unknown"
357 VG_PLATFORM_SEC="unknown"
nethercote888ecb72004-08-23 14:54:40 +0000358 AC_MSG_RESULT([no (${host_cpu}-${host_os})])
sewardj3e38ce02004-11-23 01:17:29 +0000359 AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
nethercote888ecb72004-08-23 14:54:40 +0000360 ;;
361esac
sewardjde4a1d02002-03-22 01:27:54 +0000362
sewardj03d86f22006-10-17 00:57:24 +0000363# Set up VGP_<platform>. Either one or two of these become defined.
sewardj01262142006-01-04 01:20:28 +0000364#
sewardj03d86f22006-10-17 00:57:24 +0000365AM_CONDITIONAL(VGP_X86_LINUX,
sewardjbc692db2006-01-04 03:31:07 +0000366 test x$VG_PLATFORM_PRI = xX86_LINUX \
367 -o x$VG_PLATFORM_SEC = xX86_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000368AM_CONDITIONAL(VGP_AMD64_LINUX,
sewardj01262142006-01-04 01:20:28 +0000369 test x$VG_PLATFORM_PRI = xAMD64_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000370AM_CONDITIONAL(VGP_PPC32_LINUX,
sewardjbc692db2006-01-04 03:31:07 +0000371 test x$VG_PLATFORM_PRI = xPPC32_LINUX \
372 -o x$VG_PLATFORM_SEC = xPPC32_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000373AM_CONDITIONAL(VGP_PPC64_LINUX,
sewardj01262142006-01-04 01:20:28 +0000374 test x$VG_PLATFORM_PRI = xPPC64_LINUX)
sewardj03d86f22006-10-17 00:57:24 +0000375AM_CONDITIONAL(VGP_PPC32_AIX5,
376 test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
377 -o x$VG_PLATFORM_SEC = xPPC32_AIX5)
378AM_CONDITIONAL(VGP_PPC64_AIX5,
379 test x$VG_PLATFORM_PRI = xPPC64_AIX5)
380
381# Similarly, set up VGO_<os>. Exactly one of these becomes defined.
382# Relies on the assumption that the primary and secondary targets are
383# for the same OS, so therefore only necessary to test the primary.
384#
385AM_CONDITIONAL(VGO_LINUX,
386 test x$VG_PLATFORM_PRI = xX86_LINUX \
387 -o x$VG_PLATFORM_PRI = xAMD64_LINUX \
388 -o x$VG_PLATFORM_PRI = xPPC32_LINUX \
389 -o x$VG_PLATFORM_PRI = xPPC64_LINUX)
390AM_CONDITIONAL(VGO_AIX5,
391 test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
392 -o x$VG_PLATFORM_PRI = xPPC64_AIX5)
393
394
395# Sometimes, in the Makefile.am-s, it's useful to know
396# whether or not there is a secondary target.
397#
398AM_CONDITIONAL(VGP_HAVE_SECONDARY,
399 test x$VG_PLATFORM_SEC != x)
tomfb7bcde2005-11-07 15:24:38 +0000400
tomb637bad2005-11-08 12:28:35 +0000401
sewardj01262142006-01-04 01:20:28 +0000402# This variable will collect the individual suppression files
403# depending on the results of autoconf
404DEFAULT_SUPP=""
sewardjde4a1d02002-03-22 01:27:54 +0000405AC_SUBST(DEFAULT_SUPP)
406
sewardj01262142006-01-04 01:20:28 +0000407
dirk07596a22008-04-25 11:33:30 +0000408GLIBC_VERSION=""
sewardjde4a1d02002-03-22 01:27:54 +0000409
sewardjde4a1d02002-03-22 01:27:54 +0000410AC_EGREP_CPP([GLIBC_22], [
411#include <features.h>
412#ifdef __GNU_LIBRARY__
413 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
414 GLIBC_22
415 #endif
416#endif
417],
dirk07596a22008-04-25 11:33:30 +0000418GLIBC_VERSION="2.2")
sewardjde4a1d02002-03-22 01:27:54 +0000419
sewardj08c7f012002-10-07 23:56:55 +0000420AC_EGREP_CPP([GLIBC_23], [
421#include <features.h>
422#ifdef __GNU_LIBRARY__
423 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
424 GLIBC_23
425 #endif
426#endif
427],
dirk07596a22008-04-25 11:33:30 +0000428GLIBC_VERSION="2.3")
sewardj08c7f012002-10-07 23:56:55 +0000429
njn781dba52005-06-30 04:06:38 +0000430AC_EGREP_CPP([GLIBC_24], [
431#include <features.h>
432#ifdef __GNU_LIBRARY__
433 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
434 GLIBC_24
435 #endif
436#endif
437],
dirk07596a22008-04-25 11:33:30 +0000438GLIBC_VERSION="2.4")
njn781dba52005-06-30 04:06:38 +0000439
dirkaece45c2006-10-12 08:17:49 +0000440AC_EGREP_CPP([GLIBC_25], [
441#include <features.h>
442#ifdef __GNU_LIBRARY__
443 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
444 GLIBC_25
445 #endif
446#endif
447],
dirk07596a22008-04-25 11:33:30 +0000448GLIBC_VERSION="2.5")
dirkaece45c2006-10-12 08:17:49 +0000449
dirkc8bd0c52007-05-23 17:39:08 +0000450AC_EGREP_CPP([GLIBC_26], [
451#include <features.h>
452#ifdef __GNU_LIBRARY__
453 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
454 GLIBC_26
455 #endif
456#endif
457],
dirk07596a22008-04-25 11:33:30 +0000458GLIBC_VERSION="2.6")
dirkc8bd0c52007-05-23 17:39:08 +0000459
sewardj68c80c12007-11-18 14:40:02 +0000460AC_EGREP_CPP([GLIBC_27], [
461#include <features.h>
462#ifdef __GNU_LIBRARY__
463 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
464 GLIBC_27
465 #endif
466#endif
467],
dirk07596a22008-04-25 11:33:30 +0000468GLIBC_VERSION="2.7")
469
470AC_EGREP_CPP([GLIBC_28], [
471#include <features.h>
472#ifdef __GNU_LIBRARY__
473 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
474 GLIBC_28
475 #endif
476#endif
477],
478GLIBC_VERSION="2.8")
sewardj68c80c12007-11-18 14:40:02 +0000479
sewardj03d86f22006-10-17 00:57:24 +0000480AC_EGREP_CPP([AIX5_LIBC], [
481#include <standards.h>
482#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
483 AIX5_LIBC
484#endif
485],
dirk07596a22008-04-25 11:33:30 +0000486GLIBC_VERSION="aix5")
daywalkere9212b32003-06-15 22:39:15 +0000487
dirk07596a22008-04-25 11:33:30 +0000488AC_MSG_CHECKING([the GLIBC_VERSION version])
sewardj03d86f22006-10-17 00:57:24 +0000489
dirk07596a22008-04-25 11:33:30 +0000490case "${GLIBC_VERSION}" in
sewardjde4a1d02002-03-22 01:27:54 +0000491 2.2)
492 AC_MSG_RESULT(2.2 family)
daywalker418c7482002-10-16 13:09:26 +0000493 AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000494 DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
495 DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000496 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardjde4a1d02002-03-22 01:27:54 +0000497 ;;
498
sewardj08c7f012002-10-07 23:56:55 +0000499 2.3)
500 AC_MSG_RESULT(2.3 family)
daywalker418c7482002-10-16 13:09:26 +0000501 AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000502 DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000503 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000504 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj08c7f012002-10-07 23:56:55 +0000505 ;;
506
njn781dba52005-06-30 04:06:38 +0000507 2.4)
508 AC_MSG_RESULT(2.4 family)
509 AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000510 DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000511 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000512 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
njn781dba52005-06-30 04:06:38 +0000513 ;;
514
dirkaece45c2006-10-12 08:17:49 +0000515 2.5)
516 AC_MSG_RESULT(2.5 family)
517 AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000518 DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000519 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000520 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
dirkaece45c2006-10-12 08:17:49 +0000521 ;;
dirkc8bd0c52007-05-23 17:39:08 +0000522 2.6)
523 AC_MSG_RESULT(2.6 family)
524 AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000525 DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000526 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000527 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000528 ;;
529 2.7)
530 AC_MSG_RESULT(2.7 family)
531 AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x])
dirk07596a22008-04-25 11:33:30 +0000532 DEFAULT_SUPP="glibc-2.X.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}"
dirkc8bd0c52007-05-23 17:39:08 +0000535 ;;
dirk07596a22008-04-25 11:33:30 +0000536 2.8)
537 AC_MSG_RESULT(2.8 family)
dirkeb939fc2008-04-27 20:38:47 +0000538 AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
dirk07596a22008-04-25 11:33:30 +0000539 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
540 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
541 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
542 ;;
543
sewardj03d86f22006-10-17 00:57:24 +0000544 aix5)
sewardj2f3bcd22006-12-12 01:38:15 +0000545 AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
546 AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
sewardj03d86f22006-10-17 00:57:24 +0000547 DEFAULT_SUPP="aix5libc.supp ${DEFAULT_SUPP}"
548 ;;
dirkaece45c2006-10-12 08:17:49 +0000549
sewardjde4a1d02002-03-22 01:27:54 +0000550 *)
551 AC_MSG_RESULT(unsupported version)
dirk07596a22008-04-25 11:33:30 +0000552 AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.8])
553 AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
sewardjde4a1d02002-03-22 01:27:54 +0000554 ;;
555esac
556
dirk07596a22008-04-25 11:33:30 +0000557AC_SUBST(GLIBC_VERSION)
sewardj535c50f2005-06-04 23:14:53 +0000558
nethercote3d260f62004-10-31 19:39:18 +0000559# We don't know how to detect the X client library version
sewardj03d86f22006-10-17 00:57:24 +0000560# (detecting the server version is easy, but no help). So we
nethercote3d260f62004-10-31 19:39:18 +0000561# just use a hack: always include the suppressions for both
562# versions 3 and 4.
gobrye721a522002-03-22 13:38:30 +0000563AC_PATH_X
gobrye721a522002-03-22 13:38:30 +0000564if test "${no_x}" != 'yes' ; then
sewardj01262142006-01-04 01:20:28 +0000565 DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
566 DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
gobrye721a522002-03-22 13:38:30 +0000567fi
568
sewardj2e10a682003-04-07 19:36:41 +0000569
bart59e2f182008-04-28 16:22:53 +0000570# Check for CLOCK_MONOTONIC
571
572AC_MSG_CHECKING([for CLOCK_MONOTONIC])
573
574AC_TRY_COMPILE(
575[
576#include <time.h>
577], [
578 struct timespec t;
579 clock_gettime(CLOCK_MONOTONIC, &t);
580 return 0;
581],
582[
583AC_MSG_RESULT([yes])
584AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
585 [Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
586], [
587AC_MSG_RESULT([no])
588])
589
bartfea06922008-05-03 09:12:15 +0000590
591# Check for PTHREAD_MUTEX_ADAPTIVE_NP
592
593AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
594
595AC_TRY_COMPILE(
596[
597#define _GNU_SOURCE
598#include <pthread.h>
599], [
600 return (PTHREAD_MUTEX_ADAPTIVE_NP);
601],
602[
603AC_MSG_RESULT([yes])
604AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
605 [Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.])
606], [
607AC_MSG_RESULT([no])
608])
609
610
611# Check for PTHREAD_MUTEX_ERRORCHECK_NP
612
613AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP])
614
615AC_TRY_COMPILE(
616[
617#define _GNU_SOURCE
618#include <pthread.h>
619], [
620 return (PTHREAD_MUTEX_ERRORCHECK_NP);
621],
622[
623AC_MSG_RESULT([yes])
624AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1,
625 [Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.])
626], [
627AC_MSG_RESULT([no])
628])
629
630
631# Check for PTHREAD_MUTEX_RECURSIVE_NP
632
633AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP])
634
635AC_TRY_COMPILE(
636[
637#define _GNU_SOURCE
638#include <pthread.h>
639], [
640 return (PTHREAD_MUTEX_RECURSIVE_NP);
641],
642[
643AC_MSG_RESULT([yes])
644AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1,
645 [Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.])
646], [
647AC_MSG_RESULT([no])
648])
649
650
651# Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
652
653AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP])
654
655AC_TRY_COMPILE(
656[
657#define _GNU_SOURCE
658#include <pthread.h>
659], [
660 pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
661 return 0;
662],
663[
664AC_MSG_RESULT([yes])
665AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1,
666 [Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.])
667], [
668AC_MSG_RESULT([no])
669])
670
671
bart5e389f12008-04-05 12:53:15 +0000672# Check whether pthread_mutex_t has a member called __m_kind.
673
674AC_MSG_CHECKING([for pthread_mutex_t::__m_kind])
675
bart56730cd2008-05-11 06:41:46 +0000676AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000677[
bart56730cd2008-05-11 06:41:46 +0000678 #include <pthread.h>
679], [
bart5e389f12008-04-05 12:53:15 +0000680 pthread_mutex_t m;
681 return m.__m_kind;
bart56730cd2008-05-11 06:41:46 +0000682], [
bart5e389f12008-04-05 12:53:15 +0000683AC_MSG_RESULT([yes])
684AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], 1,
685 [Define to 1 if pthread_mutex_t has a member called __m_kind.])
686], [
687AC_MSG_RESULT([no])
688])
689
690
691# Check whether pthread_mutex_t has a member called __data.__kind.
692
693AC_MSG_CHECKING([for pthread_mutex_t::__data.__kind])
694
bart56730cd2008-05-11 06:41:46 +0000695AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000696[
bart56730cd2008-05-11 06:41:46 +0000697#include <pthread.h>
698], [
bart5e389f12008-04-05 12:53:15 +0000699 pthread_mutex_t m;
700 return m.__data.__kind;
bart56730cd2008-05-11 06:41:46 +0000701], [
bart5e389f12008-04-05 12:53:15 +0000702AC_MSG_RESULT([yes])
703AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], 1,
704 [Define to 1 if pthread_mutex_t has a member __data.__kind.])
705], [
706AC_MSG_RESULT([no])
707])
708
709
bart61111332008-03-10 17:57:41 +0000710# does this compiler support -fopenmp, does it have the include file
711# <omp.h> and does it have libgomp ?
bart29cc9db2008-03-09 15:59:30 +0000712
bart1f52b822008-03-12 17:11:48 +0000713AC_MSG_CHECKING([for OpenMP])
714
bart29cc9db2008-03-09 15:59:30 +0000715safe_CFLAGS=$CFLAGS
716CFLAGS="-fopenmp"
717
bart1f52b822008-03-12 17:11:48 +0000718AC_LINK_IFELSE(
bart29cc9db2008-03-09 15:59:30 +0000719[
bart1f52b822008-03-12 17:11:48 +0000720#include <omp.h>
721int main(int argc, char** argv)
722{
723 omp_set_dynamic(0);
724 return 0;
725}
726],
727[
728ac_have_openmp=yes
bart29cc9db2008-03-09 15:59:30 +0000729AC_MSG_RESULT([yes])
730], [
bart1f52b822008-03-12 17:11:48 +0000731ac_have_openmp=no
bart29cc9db2008-03-09 15:59:30 +0000732AC_MSG_RESULT([no])
733])
734CFLAGS=$safe_CFLAGS
735
bart1f52b822008-03-12 17:11:48 +0000736AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
bart29cc9db2008-03-09 15:59:30 +0000737
738
bart62c370e2008-05-12 18:50:51 +0000739# does this compiler support -maltivec and does it have the include file
740# <altivec.h> ?
741
742AC_MSG_CHECKING([for Altivec])
743
744safe_CFLAGS=$CFLAGS
745CFLAGS="-maltivec"
746
747AC_TRY_COMPILE(
748[
749#include <altivec.h>
750], [
751 vector unsigned int v;
752],
753[
754ac_have_altivec=yes
755AC_MSG_RESULT([yes])
756], [
757ac_have_altivec=no
758AC_MSG_RESULT([no])
759])
760CFLAGS=$safe_CFLAGS
761
762AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
763AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes])
764
765
barta50aa8a2008-04-27 06:06:57 +0000766# Check for eventfd_t, eventfd() and eventfd_read()
767AC_MSG_CHECKING([for eventfd()])
768
769AC_TRY_LINK(
770[
771#include <sys/eventfd.h>
772], [
773 eventfd_t ev;
774 int fd;
775
776 fd = eventfd(5, 0);
777 eventfd_read(fd, &ev);
778 return 0;
779],
780[
781AC_MSG_RESULT([yes])
782AC_DEFINE([HAVE_EVENTFD], 1,
783 [Define to 1 if you have the `eventfd' function.])
784AC_DEFINE([HAVE_EVENTFD_READ], 1,
785 [Define to 1 if you have the `eventfd_read' function.])
786], [
787AC_MSG_RESULT([no])
788])
789
790
sewardj535c50f2005-06-04 23:14:53 +0000791# does this compiler support -m32 ?
792AC_MSG_CHECKING([if gcc accepts -m32])
793
794safe_CFLAGS=$CFLAGS
795CFLAGS="-m32"
796
797AC_TRY_COMPILE(, [
798int main () { return 0 ; }
799],
800[
801FLAG_M32="-m32"
802AC_MSG_RESULT([yes])
803], [
804FLAG_M32=""
805AC_MSG_RESULT([no])
806])
807CFLAGS=$safe_CFLAGS
808
809AC_SUBST(FLAG_M32)
810
811
sewardj03d86f22006-10-17 00:57:24 +0000812# does this compiler support -maix32 ?
813AC_MSG_CHECKING([if gcc accepts -maix32])
814
815safe_CFLAGS=$CFLAGS
816CFLAGS="-maix32"
817
818AC_TRY_COMPILE(, [
819int main () { return 0 ; }
820],
821[
822FLAG_MAIX32="-maix32"
823AC_MSG_RESULT([yes])
824], [
825FLAG_MAIX32=""
826AC_MSG_RESULT([no])
827])
828CFLAGS=$safe_CFLAGS
829
830AC_SUBST(FLAG_MAIX32)
831
832
sewardj01262142006-01-04 01:20:28 +0000833# does this compiler support -m64 ?
834AC_MSG_CHECKING([if gcc accepts -m64])
835
836safe_CFLAGS=$CFLAGS
837CFLAGS="-m64"
838
839AC_TRY_COMPILE(, [
840int main () { return 0 ; }
841],
842[
843FLAG_M64="-m64"
844AC_MSG_RESULT([yes])
845], [
846FLAG_M64=""
847AC_MSG_RESULT([no])
848])
849CFLAGS=$safe_CFLAGS
850
851AC_SUBST(FLAG_M64)
852
853
sewardj03d86f22006-10-17 00:57:24 +0000854# does this compiler support -maix64 ?
855AC_MSG_CHECKING([if gcc accepts -maix64])
856
857safe_CFLAGS=$CFLAGS
858CFLAGS="-maix64"
859
860AC_TRY_COMPILE(, [
861int main () { return 0 ; }
862],
863[
864FLAG_MAIX64="-maix64"
865AC_MSG_RESULT([yes])
866], [
867FLAG_MAIX64=""
868AC_MSG_RESULT([no])
869])
870CFLAGS=$safe_CFLAGS
871
872AC_SUBST(FLAG_MAIX64)
873
874
sewardj67f1fcc2005-07-03 10:41:02 +0000875# does this compiler support -mmmx ?
876AC_MSG_CHECKING([if gcc accepts -mmmx])
877
878safe_CFLAGS=$CFLAGS
879CFLAGS="-mmmx"
880
881AC_TRY_COMPILE(, [
882int main () { return 0 ; }
883],
884[
885FLAG_MMMX="-mmmx"
886AC_MSG_RESULT([yes])
887], [
888FLAG_MMMX=""
889AC_MSG_RESULT([no])
890])
891CFLAGS=$safe_CFLAGS
892
893AC_SUBST(FLAG_MMMX)
894
895
896# does this compiler support -msse ?
897AC_MSG_CHECKING([if gcc accepts -msse])
898
899safe_CFLAGS=$CFLAGS
900CFLAGS="-msse"
901
902AC_TRY_COMPILE(, [
903int main () { return 0 ; }
904],
905[
906FLAG_MSSE="-msse"
907AC_MSG_RESULT([yes])
908], [
909FLAG_MSSE=""
910AC_MSG_RESULT([no])
911])
912CFLAGS=$safe_CFLAGS
913
914AC_SUBST(FLAG_MSSE)
915
916
sewardj5b754b42002-06-03 22:53:35 +0000917# does this compiler support -mpreferred-stack-boundary=2 ?
918AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
919
daywalker3664f562003-10-17 13:43:46 +0000920safe_CFLAGS=$CFLAGS
sewardj5b754b42002-06-03 22:53:35 +0000921CFLAGS="-mpreferred-stack-boundary=2"
922
923AC_TRY_COMPILE(, [
sewardj5b754b42002-06-03 22:53:35 +0000924int main () { return 0 ; }
sewardj5b754b42002-06-03 22:53:35 +0000925],
926[
927PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
daywalker3664f562003-10-17 13:43:46 +0000928AC_MSG_RESULT([yes])
sewardj5b754b42002-06-03 22:53:35 +0000929], [
930PREFERRED_STACK_BOUNDARY=""
931AC_MSG_RESULT([no])
932])
daywalker3664f562003-10-17 13:43:46 +0000933CFLAGS=$safe_CFLAGS
sewardj5b754b42002-06-03 22:53:35 +0000934
935AC_SUBST(PREFERRED_STACK_BOUNDARY)
936
sewardj535c50f2005-06-04 23:14:53 +0000937
sewardjb5f6f512005-03-10 23:59:00 +0000938# does this compiler support -Wno-pointer-sign ?
bart56730cd2008-05-11 06:41:46 +0000939AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign])
sewardjb5f6f512005-03-10 23:59:00 +0000940
941safe_CFLAGS=$CFLAGS
942CFLAGS="-Wno-pointer-sign"
943
944AC_TRY_COMPILE(, [
945int main () { return 0 ; }
946],
947[
948no_pointer_sign=yes
949AC_MSG_RESULT([yes])
950], [
951no_pointer_sign=no
952AC_MSG_RESULT([no])
953])
954CFLAGS=$safe_CFLAGS
955
956if test x$no_pointer_sign = xyes; then
957 CFLAGS="$CFLAGS -Wno-pointer-sign"
958fi
959
sewardj535c50f2005-06-04 23:14:53 +0000960
tom1e946682005-10-12 11:27:33 +0000961# does this compiler support -Wdeclaration-after-statement ?
bart56730cd2008-05-11 06:41:46 +0000962AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement])
tom1e946682005-10-12 11:27:33 +0000963
964safe_CFLAGS=$CFLAGS
965CFLAGS="-Wdeclaration-after-statement"
966
967AC_TRY_COMPILE(, [
968int main () { return 0 ; }
969],
970[
tome9814c32005-10-12 11:30:43 +0000971declaration_after_statement=yes
sewardj72a547e2006-01-25 02:58:28 +0000972FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement"
tom1e946682005-10-12 11:27:33 +0000973AC_MSG_RESULT([yes])
974], [
tome9814c32005-10-12 11:30:43 +0000975declaration_after_statement=no
sewardj72a547e2006-01-25 02:58:28 +0000976FLAG_WDECL_AFTER_STMT=""
tom1e946682005-10-12 11:27:33 +0000977AC_MSG_RESULT([no])
978])
979CFLAGS=$safe_CFLAGS
980
sewardj72a547e2006-01-25 02:58:28 +0000981AC_SUBST(FLAG_WDECL_AFTER_STMT)
982
tome9814c32005-10-12 11:30:43 +0000983if test x$declaration_after_statement = xyes; then
tom1e946682005-10-12 11:27:33 +0000984 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
985fi
986
sewardj00f1e622006-03-12 16:47:10 +0000987
bart9d865fa2008-06-23 12:11:49 +0000988# does this compiler support -Wno-format-zero-length ?
989
990AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
991
992safe_CFLAGS=$CFLAGS
993CFLAGS="-Wno-format-zero-length"
994
995AC_TRY_COMPILE(
996[ ],
997[
998 return 0;
999],
1000[
1001AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
1002AC_MSG_RESULT([yes])
1003],
1004[
1005AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
1006AC_MSG_RESULT([no])
1007])
1008CFLAGS=$safe_CFLAGS
1009
1010
bart56730cd2008-05-11 06:41:46 +00001011# does this compiler support -Wextra or the older -W ?
1012
1013AC_MSG_CHECKING([if gcc accepts -Wextra or -W])
1014
1015safe_CFLAGS=$CFLAGS
1016CFLAGS="-Wextra"
1017
1018AC_TRY_COMPILE(
1019[ ],
1020[
1021 return 0;
1022],
1023[
1024AC_SUBST([FLAG_W_EXTRA], [-Wextra])
1025AC_MSG_RESULT([-Wextra])
1026], [
1027 CFLAGS="-W"
1028 AC_TRY_COMPILE(
1029 [ ],
1030 [
1031 return 0;
1032 ],
1033 [
1034 AC_SUBST([FLAG_W_EXTRA], [-W])
1035 AC_MSG_RESULT([-W])
1036 ], [
1037 AC_SUBST([FLAG_W_EXTRA], [])
1038 AC_MSG_RESULT([not supported])
1039 ])
1040])
1041CFLAGS=$safe_CFLAGS
1042
1043
sewardja72c26d2007-05-01 13:44:08 +00001044# does this compiler support -fno-stack-protector ?
bart56730cd2008-05-11 06:41:46 +00001045AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
sewardja72c26d2007-05-01 13:44:08 +00001046
1047safe_CFLAGS=$CFLAGS
1048CFLAGS="-fno-stack-protector"
1049
1050AC_TRY_COMPILE(, [
1051int main () { return 0 ; }
1052],
1053[
1054no_stack_protector=yes
1055FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
1056AC_MSG_RESULT([yes])
1057], [
1058no_stack_protector=no
1059FLAG_FNO_STACK_PROTECTOR=""
1060AC_MSG_RESULT([no])
1061])
1062CFLAGS=$safe_CFLAGS
1063
1064AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
1065
1066if test x$no_stack_protector = xyes; then
1067 CFLAGS="$CFLAGS -fno-stack-protector"
1068fi
1069
1070
bart56730cd2008-05-11 06:41:46 +00001071# does this compiler support --param inline-unit-growth=... ?
1072
1073AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth])
1074
1075safe_CFLAGS=$CFLAGS
1076CFLAGS="--param inline-unit-growth=900"
1077
1078AC_TRY_COMPILE(
1079[ ],
1080[
1081 return 0;
1082],
1083[
1084AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
1085 ["--param inline-unit-growth=900"])
1086AC_MSG_RESULT([yes])
1087], [
1088AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""])
1089AC_MSG_RESULT([no])
1090])
1091CFLAGS=$safe_CFLAGS
1092
1093
tomd55121e2005-12-19 12:40:13 +00001094# does this compiler support __builtin_expect?
1095AC_MSG_CHECKING([if gcc supports __builtin_expect])
bart56730cd2008-05-11 06:41:46 +00001096
tomd55121e2005-12-19 12:40:13 +00001097AC_TRY_LINK(, [
1098return __builtin_expect(1, 1) ? 1 : 0
1099],
1100[
1101ac_have_builtin_expect=yes
1102AC_MSG_RESULT([yes])
1103], [
1104ac_have_builtin_expect=no
1105AC_MSG_RESULT([no])
1106])
1107if test x$ac_have_builtin_expect = xyes ; then
1108 AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.])
1109fi
1110
tom1e946682005-10-12 11:27:33 +00001111
sewardj00f1e622006-03-12 16:47:10 +00001112# does the ppc assembler support "mtocrf" et al?
1113AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
1114
1115AC_TRY_COMPILE(, [
sewardjdd4cbe12006-03-12 17:27:44 +00001116__asm__ __volatile__("mtocrf 4,0");
1117__asm__ __volatile__("mfocrf 0,4");
sewardj00f1e622006-03-12 16:47:10 +00001118],
1119[
1120ac_have_as_ppc_mftocrf=yes
1121AC_MSG_RESULT([yes])
1122], [
1123ac_have_as_ppc_mftocrf=no
1124AC_MSG_RESULT([no])
1125])
1126if test x$ac_have_as_ppc_mftocrf = xyes ; then
1127 AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.])
1128fi
1129
1130
sewardjf0aabf82007-03-22 00:24:21 +00001131# does the x86/amd64 assembler understand SSE3 instructions?
sewardjfa18a262007-03-22 12:13:13 +00001132# Note, this doesn't generate a C-level symbol. It generates a
1133# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
sewardjf0aabf82007-03-22 00:24:21 +00001134AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
1135
1136AC_TRY_COMPILE(, [
1137 do { long long int x;
1138 __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
1139 while (0)
1140],
1141[
1142ac_have_as_sse3=yes
1143AC_MSG_RESULT([yes])
1144], [
1145ac_have_as_sse3=no
1146AC_MSG_RESULT([no])
1147])
sewardjfa18a262007-03-22 12:13:13 +00001148
1149AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
sewardjf0aabf82007-03-22 00:24:21 +00001150
1151
sewardj6d6da5b2008-02-09 12:07:40 +00001152# Ditto for SSSE3 instructions (note extra S)
1153# Note, this doesn't generate a C-level symbol. It generates a
1154# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
1155AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
1156
1157AC_TRY_COMPILE(, [
1158 do { long long int x;
1159 __asm__ __volatile__(
1160 "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
1161 while (0)
1162],
1163[
1164ac_have_as_ssse3=yes
1165AC_MSG_RESULT([yes])
1166], [
1167ac_have_as_ssse3=no
1168AC_MSG_RESULT([no])
1169])
1170
1171AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
1172
1173
sewardjb5f6f512005-03-10 23:59:00 +00001174# Check for TLS support in the compiler and linker
bartca9f2ad2008-06-02 07:14:20 +00001175if test "x${cross_compiling}" = "xno"; then
1176# Native compilation: check whether running a program using TLS succeeds.
1177# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
1178# succeeds but running programs using TLS fails.
1179AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1180 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1181 [vg_cv_tls=$enableval],
1182 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
1183 [[return foo;]])],
1184 [vg_cv_tls=yes],
1185 [vg_cv_tls=no])])])
1186else
1187# Cross-compiling: check whether linking a program using TLS succeeds.
sewardjb5f6f512005-03-10 23:59:00 +00001188AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1189 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1190 [vg_cv_tls=$enableval],
bartcddeaf52008-05-25 15:58:11 +00001191 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
sewardjb5f6f512005-03-10 23:59:00 +00001192 [[return foo;]])],
1193 [vg_cv_tls=yes],
1194 [vg_cv_tls=no])])])
bartca9f2ad2008-06-02 07:14:20 +00001195fi
sewardjb5f6f512005-03-10 23:59:00 +00001196
1197if test "$vg_cv_tls" = yes; then
1198AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
1199fi
sewardj5b754b42002-06-03 22:53:35 +00001200
sewardj535c50f2005-06-04 23:14:53 +00001201
sewardjde4a1d02002-03-22 01:27:54 +00001202# Checks for header files.
1203AC_HEADER_STDC
bartf5ceec82008-04-26 07:45:10 +00001204AC_CHECK_HEADERS([ \
1205 endian.h \
1206 mqueue.h \
1207 sys/endian.h \
1208 sys/epoll.h \
1209 sys/eventfd.h \
bartce48fa92008-04-26 10:59:46 +00001210 sys/klog.h \
bartf5ceec82008-04-26 07:45:10 +00001211 sys/poll.h \
bart71bad292008-04-27 11:43:23 +00001212 sys/signal.h \
bartf5ceec82008-04-26 07:45:10 +00001213 sys/signalfd.h \
bart71bad292008-04-27 11:43:23 +00001214 sys/syscall.h \
1215 sys/time.h \
1216 sys/types.h \
bartf5ceec82008-04-26 07:45:10 +00001217 ])
sewardjde4a1d02002-03-22 01:27:54 +00001218
sewardj535c50f2005-06-04 23:14:53 +00001219
sewardjde4a1d02002-03-22 01:27:54 +00001220# Checks for typedefs, structures, and compiler characteristics.
sewardjde4a1d02002-03-22 01:27:54 +00001221AC_TYPE_UID_T
1222AC_TYPE_OFF_T
1223AC_TYPE_SIZE_T
1224AC_HEADER_TIME
1225
sewardj535c50f2005-06-04 23:14:53 +00001226
sewardjde4a1d02002-03-22 01:27:54 +00001227# Checks for library functions.
1228AC_FUNC_MEMCMP
1229AC_FUNC_MMAP
1230AC_TYPE_SIGNAL
1231
bart71bad292008-04-27 11:43:23 +00001232AC_CHECK_LIB([rt], [clock_gettime])
1233
bartf5ceec82008-04-26 07:45:10 +00001234AC_CHECK_FUNCS([ \
bart71bad292008-04-27 11:43:23 +00001235 clock_gettime\
bartf5ceec82008-04-26 07:45:10 +00001236 epoll_create \
1237 epoll_pwait \
bartf5ceec82008-04-26 07:45:10 +00001238 floor \
bartce48fa92008-04-26 10:59:46 +00001239 klogctl \
bartf5ceec82008-04-26 07:45:10 +00001240 mallinfo \
1241 memchr \
1242 memset \
1243 mkdir \
1244 ppoll \
1245 semtimedop \
1246 signalfd \
bart71bad292008-04-27 11:43:23 +00001247 syscall \
bartf5ceec82008-04-26 07:45:10 +00001248 strchr \
1249 strdup \
1250 strpbrk \
1251 strrchr \
1252 strstr \
1253 timerfd \
1254 utimensat \
1255 ])
sewardjde4a1d02002-03-22 01:27:54 +00001256
sewardj80637752006-03-02 13:48:21 +00001257
sewardj03d86f22006-10-17 00:57:24 +00001258# Do we have a useable MPI setup on the primary and/or secondary targets?
1259# On Linux, by default, assumes mpicc and -m32/-m64
1260# On AIX, by default, assumes mpxlc and -q32/-q64
sewardje9fa5062006-03-12 18:29:18 +00001261# Note: this is a kludge in that it assumes the specified mpicc
sewardj03d86f22006-10-17 00:57:24 +00001262# understands -m32/-m64/-q32/-q64 regardless of what is specified using
1263# --with-mpicc=.
sewardj0ad46092006-03-02 17:09:16 +00001264MPI_CC="mpicc"
sewardj03d86f22006-10-17 00:57:24 +00001265if test x$VG_PLATFORM_PRI = xPPC32_AIX5 \
1266 -o x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
1267 MPI_CC="mpxlc"
1268fi
1269
sewardje9fa5062006-03-12 18:29:18 +00001270mflag_primary=
1271if test x$VG_PLATFORM_PRI = xX86_LINUX \
1272 -o x$VG_PLATFORM_PRI = xPPC32_LINUX ; then
1273 mflag_primary=$FLAG_M32
1274elif test x$VG_PLATFORM_PRI = xAMD64_LINUX \
1275 -o x$VG_PLATFORM_PRI = xPPC64_LINUX ; then
1276 mflag_primary=$FLAG_M64
sewardj03d86f22006-10-17 00:57:24 +00001277elif test x$VG_PLATFORM_PRI = xPPC32_AIX5 ; then
1278 mflag_primary=-q32
1279elif test x$VG_PLATFORM_PRI = xPPC64_AIX5 ; then
1280 mflag_primary=-q64
sewardje9fa5062006-03-12 18:29:18 +00001281fi
1282
sewardj03d86f22006-10-17 00:57:24 +00001283mflag_secondary=
1284if test x$VG_PLATFORM_SEC = xX86_LINUX \
1285 -o x$VG_PLATFORM_SEC = xPPC32_LINUX ; then
1286 mflag_secondary=$FLAG_M32
1287elif test x$VG_PLATFORM_SEC = xPPC32_AIX5 ; then
1288 mflag_secondary=-q32
1289fi
1290
1291
sewardj0ad46092006-03-02 17:09:16 +00001292AC_ARG_WITH(mpicc,
sewardjb70a6132006-05-27 21:14:09 +00001293 [ --with-mpicc= Specify name of MPI2-ised C compiler],
sewardj0ad46092006-03-02 17:09:16 +00001294 MPI_CC=$withval
1295)
sewardj03d86f22006-10-17 00:57:24 +00001296AC_SUBST(MPI_CC)
1297
1298## See if MPI_CC works for the primary target
1299##
1300AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
sewardj0ad46092006-03-02 17:09:16 +00001301saved_CC=$CC
sewardjde4f3842006-03-09 02:41:41 +00001302saved_CFLAGS=$CFLAGS
sewardj0ad46092006-03-02 17:09:16 +00001303CC=$MPI_CC
sewardje9fa5062006-03-12 18:29:18 +00001304CFLAGS=$mflag_primary
sewardjd3fcc642006-03-09 02:49:56 +00001305AC_TRY_LINK([
sewardj1a85e602006-03-08 15:26:10 +00001306#include <mpi.h>
1307#include <stdio.h>
sewardjde4f3842006-03-09 02:41:41 +00001308],[
1309 int r = MPI_Init(NULL,NULL);
1310 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1311 return r;
1312], [
sewardj03d86f22006-10-17 00:57:24 +00001313ac_have_mpi2_pri=yes
sewardj1a85e602006-03-08 15:26:10 +00001314AC_MSG_RESULT([yes, $MPI_CC])
sewardj80637752006-03-02 13:48:21 +00001315], [
sewardj03d86f22006-10-17 00:57:24 +00001316ac_have_mpi2_pri=no
sewardj80637752006-03-02 13:48:21 +00001317AC_MSG_RESULT([no])
1318])
sewardj0ad46092006-03-02 17:09:16 +00001319CC=$saved_CC
sewardjde4f3842006-03-09 02:41:41 +00001320CFLAGS=$saved_CFLAGS
sewardj03d86f22006-10-17 00:57:24 +00001321AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
sewardj80637752006-03-02 13:48:21 +00001322
sewardj03d86f22006-10-17 00:57:24 +00001323## See if MPI_CC works for the secondary target. Complication: what if
1324## there is no secondary target? We need this to then fail.
1325## Kludge this by making MPI_CC something which will surely fail in
1326## such a case.
1327##
1328AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
1329saved_CC=$CC
1330saved_CFLAGS=$CFLAGS
1331if test x$VG_PLATFORM_SEC = x ; then
1332 CC="$MPI_CC this will surely fail"
1333else
1334 CC=$MPI_CC
1335fi
1336CFLAGS=$mflag_secondary
1337AC_TRY_LINK([
1338#include <mpi.h>
1339#include <stdio.h>
1340],[
1341 int r = MPI_Init(NULL,NULL);
1342 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1343 return r;
1344], [
1345ac_have_mpi2_sec=yes
1346AC_MSG_RESULT([yes, $MPI_CC])
1347], [
1348ac_have_mpi2_sec=no
1349AC_MSG_RESULT([no])
1350])
1351CC=$saved_CC
1352CFLAGS=$saved_CFLAGS
1353AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
sewardj80637752006-03-02 13:48:21 +00001354
1355
1356# -------------------- ok. We're done. --------------------
1357
gobrye721a522002-03-22 13:38:30 +00001358AC_OUTPUT(
sewardjde4a1d02002-03-22 01:27:54 +00001359 Makefile
njn25cac76cb2002-09-23 11:21:57 +00001360 valgrind.spec
muellerbddd6072003-11-19 21:50:07 +00001361 valgrind.pc
dirk07596a22008-04-25 11:33:30 +00001362 glibc-2.X.supp
njn254d542432002-09-23 16:09:39 +00001363 docs/Makefile
njn3e986b22004-11-30 10:43:45 +00001364 docs/lib/Makefile
1365 docs/images/Makefile
njnf7c00b12005-07-19 21:46:19 +00001366 docs/internals/Makefile
njn3e986b22004-11-30 10:43:45 +00001367 docs/xml/Makefile
njn254d542432002-09-23 16:09:39 +00001368 tests/Makefile
njnc2e7f482002-09-27 08:44:17 +00001369 tests/vg_regtest
njnec0c27a2005-12-10 23:11:28 +00001370 perf/Makefile
1371 perf/vg_perf
njn254d542432002-09-23 16:09:39 +00001372 include/Makefile
sewardj0f8881b2006-10-18 01:16:57 +00001373 include/vki/Makefile
njn7a6e7462002-11-09 17:53:30 +00001374 auxprogs/Makefile
njn25ab726032002-09-23 16:24:41 +00001375 coregrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001376 memcheck/Makefile
1377 memcheck/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001378 memcheck/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001379 memcheck/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001380 memcheck/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001381 memcheck/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001382 memcheck/docs/Makefile
1383 cachegrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001384 cachegrind/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001385 cachegrind/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001386 cachegrind/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001387 cachegrind/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001388 cachegrind/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001389 cachegrind/docs/Makefile
njnf2df9b52002-10-04 11:35:47 +00001390 cachegrind/cg_annotate
weidendoa17f2a32006-03-20 10:27:30 +00001391 callgrind/Makefile
1392 callgrind/callgrind_annotate
1393 callgrind/callgrind_control
1394 callgrind/tests/Makefile
1395 callgrind/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001396 helgrind/Makefile
njnf2df9b52002-10-04 11:35:47 +00001397 helgrind/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001398 helgrind/docs/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001399 massif/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001400 massif/tests/Makefile
njn734b8052007-11-01 04:40:37 +00001401 massif/perf/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001402 massif/docs/Makefile
njnd5a8d242007-11-02 20:44:57 +00001403 massif/ms_print
njn25cac76cb2002-09-23 11:21:57 +00001404 lackey/Makefile
njnf2df9b52002-10-04 11:35:47 +00001405 lackey/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001406 lackey/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001407 none/Makefile
1408 none/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001409 none/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001410 none/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001411 none/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001412 none/tests/x86/Makefile
njn9bc8c002002-10-02 13:49:13 +00001413 none/docs/Makefile
sewardj99a2ceb2007-11-09 12:30:36 +00001414 exp-omega/Makefile
1415 exp-omega/tests/Makefile
1416 exp-omega/docs/Makefile
sewardjbbec7722007-11-25 14:08:53 +00001417 exp-drd/Makefile
1418 exp-drd/docs/Makefile
bart0b2b4622008-06-17 19:19:16 +00001419 exp-drd/scripts/download-and-build-splash2
sewardjbbec7722007-11-25 14:08:53 +00001420 exp-drd/tests/Makefile
bart0b2b4622008-06-17 19:19:16 +00001421)
gobry3b777892002-04-04 09:18:39 +00001422
1423cat<<EOF
1424
sewardj01262142006-01-04 01:20:28 +00001425 Primary build target: ${VG_PLATFORM_PRI}
sewardj80637752006-03-02 13:48:21 +00001426 Secondary build target: ${VG_PLATFORM_SEC}
sewardj01262142006-01-04 01:20:28 +00001427 Default supp files: ${DEFAULT_SUPP}
gobry3b777892002-04-04 09:18:39 +00001428
gobry3b777892002-04-04 09:18:39 +00001429EOF
1430
1431cat<<EOF > default.supp
1432# This is a generated file, composed of the following suppression rules:
1433#
1434# ${DEFAULT_SUPP}
1435#
1436
1437EOF
1438
1439for file in ${DEFAULT_SUPP} ; do
1440 cat ${srcdir}/$file >> default.supp
1441done