blob: 01bbcd34fea4d7314b8a5a4f2310b7657c956642 [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.
sewardj8d37f362009-01-05 17:14:12 +000011AC_INIT(Valgrind, 3.5.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
njn7fd6d382009-01-22 21:56:32 +000018#----------------------------------------------------------------------------
njn8738c282004-11-23 16:31:56 +000019# Where is VEX ?
njn7fd6d382009-01-22 21:56:32 +000020#----------------------------------------------------------------------------
njnfe408942004-11-23 17:52:24 +000021# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
22# older autoconfs don't support it... here's what it would say:
23#
sewardj85a9dca2005-07-26 10:42:57 +000024# AS_HELP_STRING([--with-vex], [Vex directory]),
njnfe408942004-11-23 17:52:24 +000025#
njn8738c282004-11-23 16:31:56 +000026AC_ARG_WITH(vex,
sewardj85a9dca2005-07-26 10:42:57 +000027 [ --with-vex=/path/to/vex/dir Vex directory],
njn8738c282004-11-23 16:31:56 +000028[
29 AC_CHECK_FILE($withval/pub/libvex.h,
30 [VEX_DIR=$withval],
31 [AC_MSG_ERROR([Directory '$withval' does not exist, or does not contain Vex])])
32],
33[
njn17adf1e2005-09-16 03:59:37 +000034 VEX_DIR='$(top_srcdir)/VEX'
njn8738c282004-11-23 16:31:56 +000035])
sewardj50629ec2004-11-22 13:44:11 +000036AC_SUBST(VEX_DIR)
37
njn657d9512005-06-24 15:20:52 +000038# "make distcheck" first builds a tarball, then extracts it.
39# Then it creates a build directory different from the extracted sources
40# (called _build), and issues
41#
42# ../configure $(DISTCHECK_CONFIGURE_FLAGS)
43#
44# and then builds, runs "make check", installs using DESTDIR, runs make
45# installcheck, uninstalls, checks whether the installed base is empty
46# again, then does yet another "make dist" and compares the resulting
47# tarball with the one it started off with for identical content. Then it
48# tests "make distclean" for no leftover files.
49#
50# So this line means: when doing "make dist", use the same --with-vex value
51# that you used when running configure to configure this tree in the first
52# place.
53AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
54
njn7fd6d382009-01-22 21:56:32 +000055#----------------------------------------------------------------------------
56# Checks for various programs.
57#----------------------------------------------------------------------------
sewardjb5f6f512005-03-10 23:59:00 +000058CFLAGS="-Wno-long-long"
gobrye721a522002-03-22 13:38:30 +000059
sewardjde4a1d02002-03-22 01:27:54 +000060AC_PROG_LN_S
61AC_PROG_CC
bart0affa492008-03-18 17:53:09 +000062AM_PROG_CC_C_O
sewardjde4a1d02002-03-22 01:27:54 +000063AC_PROG_CPP
njn25e49d8e72002-09-23 09:36:25 +000064AC_PROG_CXX
sewardjde4a1d02002-03-22 01:27:54 +000065AC_PROG_RANLIB
66
bartcddeaf52008-05-25 15:58:11 +000067# If no AR variable was specified, look up the name of the archiver. Otherwise
68# do not touch the AR variable.
69if test "x$AR" = "x"; then
bart325cd972009-04-04 14:36:51 +000070 AC_PATH_PROGS([AR], [`echo $LD | sed 's/ld$/ar/'` "ar"], [ar])
bartcddeaf52008-05-25 15:58:11 +000071fi
72AC_ARG_VAR([AR],[Archiver command])
73
gobrye721a522002-03-22 13:38:30 +000074# Check for the compiler support
75if test "${GCC}" != "yes" ; then
76 AC_MSG_ERROR([Valgrind relies on GCC to be compiled])
77fi
78
sewardj2f685952002-12-22 19:32:23 +000079# figure out where perl lives
80AC_PATH_PROG(PERL, perl)
81
njn9315df32003-04-16 20:50:50 +000082# figure out where gdb lives
sewardjf8722ca2008-11-17 00:20:45 +000083AC_PATH_PROG(GDB, gdb, "/no/gdb/was/found/at/configure/time")
njnfe408942004-11-23 17:52:24 +000084AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB])
njn9315df32003-04-16 20:50:50 +000085
daywalker48ccca52002-04-15 00:31:58 +000086# some older automake's don't have it so try something on our own
87ifdef([AM_PROG_AS],[AM_PROG_AS],
88[
gobry1be19852002-03-26 20:44:55 +000089AS="${CC}"
90AC_SUBST(AS)
gobry3b777892002-04-04 09:18:39 +000091
gobry1be19852002-03-26 20:44:55 +000092ASFLAGS=""
93AC_SUBST(ASFLAGS)
daywalker48ccca52002-04-15 00:31:58 +000094])
gobry3b777892002-04-04 09:18:39 +000095
gobry3b777892002-04-04 09:18:39 +000096
sewardjf33b4332008-07-18 18:20:42 +000097# Check we have GNU sed: some of the stuff done by "make install" relies
98# on some pretty fancy sed expressions, and AIX sed doesn't produce the
99# same results, causing install to fail
100
101AC_MSG_CHECKING([for GNU sed])
102
103[sed_firstline=`sed --version | head -n 1`]
104
105case "${sed_firstline}" in
106 GNU*)
107 AC_MSG_RESULT([ok, looks like GNU sed])
108 ;;
109 *)
110 AC_MSG_RESULT([please ensure first 'sed' in your path is GNU sed])
111 AC_MSG_RESULT([note: GNU sed is only required at build/install time])
112 AC_MSG_ERROR([build/install requires that 'sed' is GNU sed])
113 ;;
114esac
115
116
njn0d2e58f2009-02-25 04:57:56 +0000117# Check if 'diff' supports -u (universal diffs) and use it if possible.
118
119AC_MSG_CHECKING([for diff -u])
120AC_SUBST(DIFF)
121
122# Comparing two identical files results in 0, unless -u isn't supported (as
123# it's not on AIX).
njn31f665e2009-02-26 21:25:50 +0000124tmpfile="tmp-xxx-yyy-zzz"
125touch $tmpfile;
126if diff -u $tmpfile $tmpfile ; then
njn0d2e58f2009-02-25 04:57:56 +0000127 AC_MSG_RESULT([yes])
128 DIFF="diff -u"
129else
130 AC_MSG_RESULT([no])
131 DIFF="diff"
132fi
njn31f665e2009-02-26 21:25:50 +0000133rm $tmpfile
njn0d2e58f2009-02-25 04:57:56 +0000134
135
sewardj535c50f2005-06-04 23:14:53 +0000136# We don't want gcc < 3.0
gobrye721a522002-03-22 13:38:30 +0000137AC_MSG_CHECKING([for a supported version of gcc])
138
sewardjf33b4332008-07-18 18:20:42 +0000139[gcc_version=`${CC} --version | head -n 1 | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
gobrye721a522002-03-22 13:38:30 +0000140
141case "${gcc_version}" in
bart76719bf2008-04-19 07:47:56 +0000142 2.*)
gobrye721a522002-03-22 13:38:30 +0000143 AC_MSG_RESULT([no (${gcc_version})])
sewardj535c50f2005-06-04 23:14:53 +0000144 AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
145 ;;
gobrye721a522002-03-22 13:38:30 +0000146 *)
147 AC_MSG_RESULT([ok (${gcc_version})])
148 ;;
149esac
150
njn7fd6d382009-01-22 21:56:32 +0000151#----------------------------------------------------------------------------
152# Arch/OS/platform tests.
153#----------------------------------------------------------------------------
154# We create a number of arch/OS/platform-related variables. We prefix them
155# all with "VGCONF_" which indicates that they are defined at
156# configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
157# variables used when compiling C files.
sewardj03d86f22006-10-17 00:57:24 +0000158
sewardjde4a1d02002-03-22 01:27:54 +0000159AC_CANONICAL_HOST
160
161AC_MSG_CHECKING([for a supported CPU])
sewardjbc692db2006-01-04 03:31:07 +0000162
njn7fd6d382009-01-22 21:56:32 +0000163# ARCH_MAX reflects the most that this CPU can do: for example if it
164# is a 64-bit capable PowerPC, then it must be set to ppc64 and not ppc32.
165# Ditto for amd64. It is used for more configuration below, but is not used
166# outside this file.
gobrye721a522002-03-22 13:38:30 +0000167case "${host_cpu}" in
sewardjde4a1d02002-03-22 01:27:54 +0000168 i?86)
169 AC_MSG_RESULT([ok (${host_cpu})])
njn7fd6d382009-01-22 21:56:32 +0000170 ARCH_MAX="x86"
sewardjde4a1d02002-03-22 01:27:54 +0000171 ;;
172
njnfe408942004-11-23 17:52:24 +0000173 x86_64)
174 AC_MSG_RESULT([ok (${host_cpu})])
njn7fd6d382009-01-22 21:56:32 +0000175 ARCH_MAX="amd64"
njnfe408942004-11-23 17:52:24 +0000176 ;;
177
sewardj2c48c7b2005-11-29 13:05:56 +0000178 powerpc64)
njn7fd6d382009-01-22 21:56:32 +0000179 # This value can only happen on Linux, not on AIX
sewardj2c48c7b2005-11-29 13:05:56 +0000180 AC_MSG_RESULT([ok (${host_cpu})])
njn7fd6d382009-01-22 21:56:32 +0000181 ARCH_MAX="ppc64"
sewardj2c48c7b2005-11-29 13:05:56 +0000182 ;;
183
184 powerpc)
njn7fd6d382009-01-22 21:56:32 +0000185 # Complexity. 'powerpc' on AIX implies a 64-bit capable CPU.
186 # Whereas in Linux that means only a 32-bit capable CPU.
cerion85665ca2005-06-20 15:51:07 +0000187 AC_MSG_RESULT([ok (${host_cpu})])
sewardj03d86f22006-10-17 00:57:24 +0000188 case "${host_os}" in
189 aix5.*)
njn7fd6d382009-01-22 21:56:32 +0000190 ARCH_MAX="ppc64"
sewardj03d86f22006-10-17 00:57:24 +0000191 ;;
192 *)
njn7fd6d382009-01-22 21:56:32 +0000193 ARCH_MAX="ppc32"
sewardj03d86f22006-10-17 00:57:24 +0000194 ;;
195 esac
nethercote9bcc9062004-10-13 13:50:01 +0000196 ;;
197
sewardjde4a1d02002-03-22 01:27:54 +0000198 *)
199 AC_MSG_RESULT([no (${host_cpu})])
nethercote81d5c662004-10-13 13:18:51 +0000200 AC_MSG_ERROR([Unsupported host architecture. Sorry])
sewardjde4a1d02002-03-22 01:27:54 +0000201 ;;
202esac
203
njn7fd6d382009-01-22 21:56:32 +0000204#----------------------------------------------------------------------------
205
sewardj86e992f2006-01-28 18:39:09 +0000206# Sometimes it's convenient to subvert the bi-arch build system and
207# just have a single build even though the underlying platform is
208# capable of both. Hence handle --enable-only64bit and
209# --enable-only32bit. Complain if both are issued :-)
njn7fd6d382009-01-22 21:56:32 +0000210# [Actually, if either of these options are used, I think both get built,
211# but only one gets installed. So if you use an in-place build, both can be
212# used. --njn]
sewardj86e992f2006-01-28 18:39:09 +0000213
214# Check if a 64-bit only build has been requested
215AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
216 [AC_ARG_ENABLE(only64bit,
217 [ --enable-only64bit do a 64-bit only build],
218 [vg_cv_only64bit=$enableval],
219 [vg_cv_only64bit=no])])
220
221# Check if a 32-bit only build has been requested
222AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit,
223 [AC_ARG_ENABLE(only32bit,
224 [ --enable-only32bit do a 32-bit only build],
225 [vg_cv_only32bit=$enableval],
226 [vg_cv_only32bit=no])])
227
228# Stay sane
229if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
230 AC_MSG_ERROR(
231 [Nonsensical: both --enable-only64bit and --enable-only32bit.])
232fi
233
njn7fd6d382009-01-22 21:56:32 +0000234#----------------------------------------------------------------------------
sewardj86e992f2006-01-28 18:39:09 +0000235
njn311303f2009-02-06 03:46:50 +0000236# VGCONF_OS is the primary build OS, eg. "linux". It is passed in to
237# compilation of many C files via -VGO_$(VGCONF_OS) and
238# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
sewardjde4a1d02002-03-22 01:27:54 +0000239AC_MSG_CHECKING([for a supported OS])
njn7fd6d382009-01-22 21:56:32 +0000240AC_SUBST(VGCONF_OS)
sewardjde4a1d02002-03-22 01:27:54 +0000241
gobrye721a522002-03-22 13:38:30 +0000242case "${host_os}" in
mueller8c68e042004-01-03 15:21:14 +0000243 *linux*)
sewardjde4a1d02002-03-22 01:27:54 +0000244 AC_MSG_RESULT([ok (${host_os})])
njn7fd6d382009-01-22 21:56:32 +0000245 VGCONF_OS="linux"
mueller8c68e042004-01-03 15:21:14 +0000246
247 # Ok, this is linux. Check the kernel version
248 AC_MSG_CHECKING([for the kernel version])
249
250 kernel=`uname -r`
251
252 case "${kernel}" in
253 2.6.*)
254 AC_MSG_RESULT([2.6 family (${kernel})])
255 AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
256 ;;
257
258 2.4.*)
259 AC_MSG_RESULT([2.4 family (${kernel})])
260 AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
261 ;;
262
mueller8c68e042004-01-03 15:21:14 +0000263 *)
264 AC_MSG_RESULT([unsupported (${kernel})])
nethercote4fa681f2004-11-08 17:51:39 +0000265 AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
mueller8c68e042004-01-03 15:21:14 +0000266 ;;
267 esac
268
269 ;;
270
sewardj03d86f22006-10-17 00:57:24 +0000271 aix5.1.*)
272 AC_MSG_RESULT([ok (${host_os})])
njn7fd6d382009-01-22 21:56:32 +0000273 VGCONF_OS="aix5"
sewardj03d86f22006-10-17 00:57:24 +0000274 ;;
275 aix5.2.*)
276 AC_MSG_RESULT([ok (${host_os})])
njn7fd6d382009-01-22 21:56:32 +0000277 VGCONF_OS="aix5"
sewardj03d86f22006-10-17 00:57:24 +0000278 ;;
279 aix5.3.*)
280 AC_MSG_RESULT([ok (${host_os})])
njn7fd6d382009-01-22 21:56:32 +0000281 VGCONF_OS="aix5"
sewardj03d86f22006-10-17 00:57:24 +0000282 ;;
283
mueller8c68e042004-01-03 15:21:14 +0000284 *freebsd*)
285 AC_MSG_RESULT([ok (${host_os})])
njn7fd6d382009-01-22 21:56:32 +0000286 VGCONF_OS="freebsd"
sewardjde4a1d02002-03-22 01:27:54 +0000287 ;;
288
289 *)
290 AC_MSG_RESULT([no (${host_os})])
mueller8c68e042004-01-03 15:21:14 +0000291 AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.])
sewardjde4a1d02002-03-22 01:27:54 +0000292 ;;
293esac
294
njn7fd6d382009-01-22 21:56:32 +0000295#----------------------------------------------------------------------------
296
tomd6398392006-06-07 17:44:36 +0000297# If we are building on a 64 bit platform test to see if the system
298# supports building 32 bit programs and disable 32 bit support if it
299# does not support building 32 bit programs
300
njn7fd6d382009-01-22 21:56:32 +0000301case "$ARCH_MAX-$VGCONF_OS" in
tomd6398392006-06-07 17:44:36 +0000302 amd64-linux|ppc64-linux)
303 AC_MSG_CHECKING([for 32 bit build support])
304 safe_CFLAGS=$CFLAGS
305 CFLAGS="-m32"
306 AC_TRY_LINK(, [
njn9890ee12009-01-21 22:25:50 +0000307 return 0;
tomd6398392006-06-07 17:44:36 +0000308 ],
309 [
310 AC_MSG_RESULT([yes])
311 ], [
312 vg_cv_only64bit="yes"
313 AC_MSG_RESULT([no])
314 ])
315 CFLAGS=$safe_CFLAGS;;
316esac
317
318if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
319 AC_MSG_ERROR(
320 [--enable-only32bit was specified but system does not support 32 bit builds])
321fi
nethercote888ecb72004-08-23 14:54:40 +0000322
njn7fd6d382009-01-22 21:56:32 +0000323#----------------------------------------------------------------------------
324
njn311303f2009-02-06 03:46:50 +0000325# VGCONF_ARCH_PRI is the arch for the primary build target, eg. "amd64". By
326# default it's the same as ARCH_MAX. But if, say, we do a build on an amd64
327# machine, but --enable-only32bit has been requested, then ARCH_MAX (see
328# above) will be "amd64" since that reflects the most that this cpu can do,
329# but VGCONF_ARCH_PRI will be downgraded to "x86", since that reflects the
330# arch corresponding to the primary build (VGCONF_PLATFORM_PRI_CAPS). It is
njn7fd6d382009-01-22 21:56:32 +0000331# passed in to compilation of many C files via -VGA_$(VGCONF_ARCH_PRI) and
332# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
333AC_SUBST(VGCONF_ARCH_PRI)
334
njn311303f2009-02-06 03:46:50 +0000335# VGCONF_PLATFORM_PRI_CAPS is the primary build target, eg. "AMD64_LINUX".
336# The entire system, including regression and performance tests, will be
337# built for this target. The "_CAPS" indicates that the name is in capital
338# letters, and it also uses '_' rather than '-' as a separator, because it's
njn7fd6d382009-01-22 21:56:32 +0000339# used to create various Makefile variables, which are all in caps by
njn311303f2009-02-06 03:46:50 +0000340# convention and cannot contain '-' characters. This is in contrast to
341# VGCONF_ARCH_PRI and VGCONF_OS which are not in caps.
njn7fd6d382009-01-22 21:56:32 +0000342AC_SUBST(VGCONF_PLATFORM_PRI_CAPS)
343
344# VGCONF_PLATFORM_SEC_CAPS is the secondary build target, if there is one.
345# Valgrind and tools will also be built for this target, but not the
346# regression or performance tests.
sewardj01262142006-01-04 01:20:28 +0000347#
njn7fd6d382009-01-22 21:56:32 +0000348# By default, the primary arch is the same as the "max" arch, as commented
349# above (at the definition of ARCH_MAX). We may choose to downgrade it in
350# the big case statement just below here, in the case where we're building
351# on a 64 bit machine but have been requested only to do a 32 bit build.
352AC_SUBST(VGCONF_PLATFORM_SEC_CAPS)
353
sewardj01262142006-01-04 01:20:28 +0000354AC_MSG_CHECKING([for a supported CPU/OS combination])
nethercote888ecb72004-08-23 14:54:40 +0000355
njn7fd6d382009-01-22 21:56:32 +0000356case "$ARCH_MAX-$VGCONF_OS" in
sewardj01262142006-01-04 01:20:28 +0000357 x86-linux)
njn7fd6d382009-01-22 21:56:32 +0000358 VGCONF_ARCH_PRI="x86"
359 VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
360 VGCONF_PLATFORM_SEC_CAPS=""
njnd74b0ef2009-01-20 06:06:52 +0000361 valt_load_address_normal="0x38000000"
362 valt_load_address_inner="0x28000000"
sewardj3e38ce02004-11-23 01:17:29 +0000363 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
sewardj01262142006-01-04 01:20:28 +0000364 ;;
365 amd64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000366 if test x$vg_cv_only64bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000367 VGCONF_ARCH_PRI="amd64"
368 VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
369 VGCONF_PLATFORM_SEC_CAPS=""
sewardj86e992f2006-01-28 18:39:09 +0000370 elif test x$vg_cv_only32bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000371 VGCONF_ARCH_PRI="x86"
372 VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
373 VGCONF_PLATFORM_SEC_CAPS=""
sewardj86e992f2006-01-28 18:39:09 +0000374 else
njn7fd6d382009-01-22 21:56:32 +0000375 VGCONF_ARCH_PRI="amd64"
376 VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
377 VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
sewardj86e992f2006-01-28 18:39:09 +0000378 fi
njnd74b0ef2009-01-20 06:06:52 +0000379 valt_load_address_normal="0x38000000"
380 valt_load_address_inner="0x28000000"
sewardj01262142006-01-04 01:20:28 +0000381 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
382 ;;
383 ppc32-linux)
njn7fd6d382009-01-22 21:56:32 +0000384 VGCONF_ARCH_PRI="ppc32"
385 VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
386 VGCONF_PLATFORM_SEC_CAPS=""
njnd74b0ef2009-01-20 06:06:52 +0000387 valt_load_address_normal="0x38000000"
388 valt_load_address_inner="0x28000000"
sewardj01262142006-01-04 01:20:28 +0000389 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
390 ;;
sewardj03d86f22006-10-17 00:57:24 +0000391 ppc64-aix5)
392 if test x$vg_cv_only64bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000393 VGCONF_ARCH_PRI="ppc64"
394 VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
395 VGCONF_PLATFORM_SEC_CAPS=""
sewardj03d86f22006-10-17 00:57:24 +0000396 elif test x$vg_cv_only32bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000397 VGCONF_ARCH_PRI="ppc32"
398 VGCONF_PLATFORM_PRI_CAPS="PPC32_AIX5"
399 VGCONF_PLATFORM_SEC_CAPS=""
sewardj03d86f22006-10-17 00:57:24 +0000400 else
njn7fd6d382009-01-22 21:56:32 +0000401 VGCONF_ARCH_PRI="ppc64"
402 VGCONF_PLATFORM_PRI_CAPS="PPC64_AIX5"
403 VGCONF_PLATFORM_SEC_CAPS="PPC32_AIX5"
sewardj03d86f22006-10-17 00:57:24 +0000404 fi
njnd74b0ef2009-01-20 06:06:52 +0000405 valt_load_address_normal="0x38000000"
406 valt_load_address_inner="0x28000000"
sewardj03d86f22006-10-17 00:57:24 +0000407 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
408 ;;
sewardj01262142006-01-04 01:20:28 +0000409 ppc64-linux)
sewardj86e992f2006-01-28 18:39:09 +0000410 if test x$vg_cv_only64bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000411 VGCONF_ARCH_PRI="ppc64"
412 VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
413 VGCONF_PLATFORM_SEC_CAPS=""
sewardj86e992f2006-01-28 18:39:09 +0000414 elif test x$vg_cv_only32bit = xyes; then
njn7fd6d382009-01-22 21:56:32 +0000415 VGCONF_ARCH_PRI="ppc32"
416 VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
417 VGCONF_PLATFORM_SEC_CAPS=""
418 VGCONF_ARCH_PRI="ppc32"
sewardj86e992f2006-01-28 18:39:09 +0000419 else
njn7fd6d382009-01-22 21:56:32 +0000420 VGCONF_ARCH_PRI="ppc64"
421 VGCONF_PLATFORM_PRI_CAPS="PPC64_LINUX"
422 VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
sewardj86e992f2006-01-28 18:39:09 +0000423 fi
njnd74b0ef2009-01-20 06:06:52 +0000424 valt_load_address_normal="0x38000000"
425 valt_load_address_inner="0x28000000"
sewardj01262142006-01-04 01:20:28 +0000426 AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
427 ;;
nethercote888ecb72004-08-23 14:54:40 +0000428 *)
njn7fd6d382009-01-22 21:56:32 +0000429 VGCONF_ARCH_PRI="unknown"
430 VGCONF_PLATFORM_PRI_CAPS="UNKNOWN"
431 VGCONF_PLATFORM_SEC_CAPS="UNKNOWN"
nethercote888ecb72004-08-23 14:54:40 +0000432 AC_MSG_RESULT([no (${host_cpu}-${host_os})])
sewardj3e38ce02004-11-23 01:17:29 +0000433 AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.])
nethercote888ecb72004-08-23 14:54:40 +0000434 ;;
435esac
sewardjde4a1d02002-03-22 01:27:54 +0000436
njn7fd6d382009-01-22 21:56:32 +0000437#----------------------------------------------------------------------------
njna454ec02009-01-19 03:16:59 +0000438
njn7fd6d382009-01-22 21:56:32 +0000439# Set up VGCONF_ARCHS_INCLUDE_<arch>. Either one or two of these become
440# defined.
441AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_X86,
442 test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
443 -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX )
444AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_AMD64,
445 test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX )
446AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC32,
447 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
448 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX \
449 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
450 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 )
451AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64,
452 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \
453 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 )
sewardj03d86f22006-10-17 00:57:24 +0000454
njn7fd6d382009-01-22 21:56:32 +0000455# Set up VGCONF_PLATFORMS_INCLUDE_<platform>. Either one or two of these
456# become defined.
457AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_LINUX,
458 test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
459 -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX)
460AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX,
461 test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX)
462AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX,
463 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
464 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX)
465AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX,
466 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
467AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5,
468 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
469 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5)
470AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5,
471 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
472
473# Similarly, set up VGCONF_OF_IS_<os>. Exactly one of these becomes defined.
sewardj03d86f22006-10-17 00:57:24 +0000474# Relies on the assumption that the primary and secondary targets are
475# for the same OS, so therefore only necessary to test the primary.
njn7fd6d382009-01-22 21:56:32 +0000476AM_CONDITIONAL(VGCONF_OS_IS_LINUX,
477 test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
478 -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
479 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \
480 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX)
481AM_CONDITIONAL(VGCONF_OS_IS_AIX5,
482 test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
483 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5)
sewardj03d86f22006-10-17 00:57:24 +0000484
485
njn7fd6d382009-01-22 21:56:32 +0000486# Sometimes, in the Makefile.am files, it's useful to know whether or not
487# there is a secondary target.
488AM_CONDITIONAL(VGCONF_HAVE_PLATFORM_SEC_CAPS,
489 test x$VGCONF_PLATFORM_SEC_CAPS != x)
tomfb7bcde2005-11-07 15:24:38 +0000490
tomb637bad2005-11-08 12:28:35 +0000491
njn7fd6d382009-01-22 21:56:32 +0000492#----------------------------------------------------------------------------
493# Inner Valgrind?
494#----------------------------------------------------------------------------
495
njnd74b0ef2009-01-20 06:06:52 +0000496# Check if this should be built as an inner Valgrind, to be run within
497# another Valgrind. Choose the load address accordingly.
498AC_SUBST(VALT_LOAD_ADDRESS)
499AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
500 [AC_ARG_ENABLE(inner,
501 [ --enable-inner enables self-hosting],
502 [vg_cv_inner=$enableval],
503 [vg_cv_inner=no])])
504if test "$vg_cv_inner" = yes; then
505 AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
506 VALT_LOAD_ADDRESS=$valt_load_address_inner
507else
508 VALT_LOAD_ADDRESS=$valt_load_address_normal
509fi
510
511
njn7fd6d382009-01-22 21:56:32 +0000512#----------------------------------------------------------------------------
513# Libc and suppressions
514#----------------------------------------------------------------------------
515# This variable will collect the suppression files to be used.
516DEFAULT_SUPP=""
517AC_SUBST(DEFAULT_SUPP)
sewardj01262142006-01-04 01:20:28 +0000518
dirk07596a22008-04-25 11:33:30 +0000519GLIBC_VERSION=""
sewardjde4a1d02002-03-22 01:27:54 +0000520
sewardjde4a1d02002-03-22 01:27:54 +0000521AC_EGREP_CPP([GLIBC_22], [
522#include <features.h>
523#ifdef __GNU_LIBRARY__
524 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)
525 GLIBC_22
526 #endif
527#endif
528],
dirk07596a22008-04-25 11:33:30 +0000529GLIBC_VERSION="2.2")
sewardjde4a1d02002-03-22 01:27:54 +0000530
sewardj08c7f012002-10-07 23:56:55 +0000531AC_EGREP_CPP([GLIBC_23], [
532#include <features.h>
533#ifdef __GNU_LIBRARY__
534 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3)
535 GLIBC_23
536 #endif
537#endif
538],
dirk07596a22008-04-25 11:33:30 +0000539GLIBC_VERSION="2.3")
sewardj08c7f012002-10-07 23:56:55 +0000540
njn781dba52005-06-30 04:06:38 +0000541AC_EGREP_CPP([GLIBC_24], [
542#include <features.h>
543#ifdef __GNU_LIBRARY__
544 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 4)
545 GLIBC_24
546 #endif
547#endif
548],
dirk07596a22008-04-25 11:33:30 +0000549GLIBC_VERSION="2.4")
njn781dba52005-06-30 04:06:38 +0000550
dirkaece45c2006-10-12 08:17:49 +0000551AC_EGREP_CPP([GLIBC_25], [
552#include <features.h>
553#ifdef __GNU_LIBRARY__
554 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 5)
555 GLIBC_25
556 #endif
557#endif
558],
dirk07596a22008-04-25 11:33:30 +0000559GLIBC_VERSION="2.5")
dirkaece45c2006-10-12 08:17:49 +0000560
dirkc8bd0c52007-05-23 17:39:08 +0000561AC_EGREP_CPP([GLIBC_26], [
562#include <features.h>
563#ifdef __GNU_LIBRARY__
564 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 6)
565 GLIBC_26
566 #endif
567#endif
568],
dirk07596a22008-04-25 11:33:30 +0000569GLIBC_VERSION="2.6")
dirkc8bd0c52007-05-23 17:39:08 +0000570
sewardj68c80c12007-11-18 14:40:02 +0000571AC_EGREP_CPP([GLIBC_27], [
572#include <features.h>
573#ifdef __GNU_LIBRARY__
574 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 7)
575 GLIBC_27
576 #endif
577#endif
578],
dirk07596a22008-04-25 11:33:30 +0000579GLIBC_VERSION="2.7")
580
581AC_EGREP_CPP([GLIBC_28], [
582#include <features.h>
583#ifdef __GNU_LIBRARY__
584 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
585 GLIBC_28
586 #endif
587#endif
588],
589GLIBC_VERSION="2.8")
sewardj68c80c12007-11-18 14:40:02 +0000590
dirkd2e31eb2008-11-19 23:58:36 +0000591AC_EGREP_CPP([GLIBC_29], [
592#include <features.h>
593#ifdef __GNU_LIBRARY__
594 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
595 GLIBC_29
596 #endif
597#endif
598],
599GLIBC_VERSION="2.9")
600
sewardj5d425e82009-02-01 19:01:11 +0000601AC_EGREP_CPP([GLIBC_210], [
602#include <features.h>
603#ifdef __GNU_LIBRARY__
604 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 10)
605 GLIBC_210
606 #endif
607#endif
608],
609GLIBC_VERSION="2.10")
610
sewardj03d86f22006-10-17 00:57:24 +0000611AC_EGREP_CPP([AIX5_LIBC], [
612#include <standards.h>
613#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
614 AIX5_LIBC
615#endif
616],
dirk07596a22008-04-25 11:33:30 +0000617GLIBC_VERSION="aix5")
daywalkere9212b32003-06-15 22:39:15 +0000618
dirk07596a22008-04-25 11:33:30 +0000619AC_MSG_CHECKING([the GLIBC_VERSION version])
sewardj03d86f22006-10-17 00:57:24 +0000620
dirk07596a22008-04-25 11:33:30 +0000621case "${GLIBC_VERSION}" in
sewardjde4a1d02002-03-22 01:27:54 +0000622 2.2)
623 AC_MSG_RESULT(2.2 family)
daywalker418c7482002-10-16 13:09:26 +0000624 AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000625 DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
626 DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000627 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardjde4a1d02002-03-22 01:27:54 +0000628 ;;
629
sewardj08c7f012002-10-07 23:56:55 +0000630 2.3)
631 AC_MSG_RESULT(2.3 family)
daywalker418c7482002-10-16 13:09:26 +0000632 AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000633 DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000634 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000635 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj08c7f012002-10-07 23:56:55 +0000636 ;;
637
njn781dba52005-06-30 04:06:38 +0000638 2.4)
639 AC_MSG_RESULT(2.4 family)
640 AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000641 DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000642 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000643 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
njn781dba52005-06-30 04:06:38 +0000644 ;;
645
dirkaece45c2006-10-12 08:17:49 +0000646 2.5)
647 AC_MSG_RESULT(2.5 family)
648 AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000649 DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000650 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000651 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
dirkaece45c2006-10-12 08:17:49 +0000652 ;;
dirkc8bd0c52007-05-23 17:39:08 +0000653 2.6)
654 AC_MSG_RESULT(2.6 family)
655 AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x])
sewardj2c4f3dd2007-11-11 06:13:01 +0000656 DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000657 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000658 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000659 ;;
660 2.7)
661 AC_MSG_RESULT(2.7 family)
662 AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x])
dirk07596a22008-04-25 11:33:30 +0000663 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
sewardj68c80c12007-11-18 14:40:02 +0000664 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
tom0a0fcee2008-01-05 00:12:45 +0000665 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
dirkc8bd0c52007-05-23 17:39:08 +0000666 ;;
dirk07596a22008-04-25 11:33:30 +0000667 2.8)
668 AC_MSG_RESULT(2.8 family)
dirkeb939fc2008-04-27 20:38:47 +0000669 AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
dirk07596a22008-04-25 11:33:30 +0000670 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
671 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
672 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
673 ;;
dirkd2e31eb2008-11-19 23:58:36 +0000674 2.9)
675 AC_MSG_RESULT(2.9 family)
676 AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x])
677 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
678 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
679 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
680 ;;
sewardj5d425e82009-02-01 19:01:11 +0000681 2.10)
682 AC_MSG_RESULT(2.10 family)
683 AC_DEFINE([GLIBC_2_10], 1, [Define to 1 if you're using glibc 2.10.x])
684 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
685 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
686 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
687 ;;
sewardj03d86f22006-10-17 00:57:24 +0000688 aix5)
sewardj2f3bcd22006-12-12 01:38:15 +0000689 AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
690 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 +0000691 DEFAULT_SUPP="aix5libc.supp ${DEFAULT_SUPP}"
692 ;;
dirkaece45c2006-10-12 08:17:49 +0000693
sewardjde4a1d02002-03-22 01:27:54 +0000694 *)
695 AC_MSG_RESULT(unsupported version)
sewardj5d425e82009-02-01 19:01:11 +0000696 AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.10])
dirk07596a22008-04-25 11:33:30 +0000697 AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
sewardjde4a1d02002-03-22 01:27:54 +0000698 ;;
699esac
700
dirk07596a22008-04-25 11:33:30 +0000701AC_SUBST(GLIBC_VERSION)
sewardj535c50f2005-06-04 23:14:53 +0000702
sewardj414f3582008-07-18 20:46:00 +0000703
704# Add default suppressions for the X client libraries. Make no
705# attempt to detect whether such libraries are installed on the
706# build machine (or even if any X facilities are present); just
707# add the suppressions antidisirregardless.
708DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
709DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
gobrye721a522002-03-22 13:38:30 +0000710
sewardj5744c022008-10-19 18:58:13 +0000711# Add glibc and X11 suppressions for exp-ptrcheck
712DEFAULT_SUPP="exp-ptrcheck.supp ${DEFAULT_SUPP}"
713
sewardj2e10a682003-04-07 19:36:41 +0000714
njn7fd6d382009-01-22 21:56:32 +0000715#----------------------------------------------------------------------------
716# Checking for various library functions and other definitions
717#----------------------------------------------------------------------------
718
bart59e2f182008-04-28 16:22:53 +0000719# Check for CLOCK_MONOTONIC
720
721AC_MSG_CHECKING([for CLOCK_MONOTONIC])
722
723AC_TRY_COMPILE(
724[
725#include <time.h>
726], [
727 struct timespec t;
728 clock_gettime(CLOCK_MONOTONIC, &t);
729 return 0;
730],
731[
732AC_MSG_RESULT([yes])
733AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
734 [Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
735], [
736AC_MSG_RESULT([no])
737])
738
bartfea06922008-05-03 09:12:15 +0000739
740# Check for PTHREAD_MUTEX_ADAPTIVE_NP
741
742AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
743
744AC_TRY_COMPILE(
745[
746#define _GNU_SOURCE
747#include <pthread.h>
748], [
749 return (PTHREAD_MUTEX_ADAPTIVE_NP);
750],
751[
752AC_MSG_RESULT([yes])
753AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
754 [Define to 1 if you have the `PTHREAD_MUTEX_ADAPTIVE_NP' constant.])
755], [
756AC_MSG_RESULT([no])
757])
758
759
760# Check for PTHREAD_MUTEX_ERRORCHECK_NP
761
762AC_MSG_CHECKING([for PTHREAD_MUTEX_ERRORCHECK_NP])
763
764AC_TRY_COMPILE(
765[
766#define _GNU_SOURCE
767#include <pthread.h>
768], [
769 return (PTHREAD_MUTEX_ERRORCHECK_NP);
770],
771[
772AC_MSG_RESULT([yes])
773AC_DEFINE([HAVE_PTHREAD_MUTEX_ERRORCHECK_NP], 1,
774 [Define to 1 if you have the `PTHREAD_MUTEX_ERRORCHECK_NP' constant.])
775], [
776AC_MSG_RESULT([no])
777])
778
779
780# Check for PTHREAD_MUTEX_RECURSIVE_NP
781
782AC_MSG_CHECKING([for PTHREAD_MUTEX_RECURSIVE_NP])
783
784AC_TRY_COMPILE(
785[
786#define _GNU_SOURCE
787#include <pthread.h>
788], [
789 return (PTHREAD_MUTEX_RECURSIVE_NP);
790],
791[
792AC_MSG_RESULT([yes])
793AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1,
794 [Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE_NP' constant.])
795], [
796AC_MSG_RESULT([no])
797])
798
799
800# Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
801
802AC_MSG_CHECKING([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP])
803
804AC_TRY_COMPILE(
805[
806#define _GNU_SOURCE
807#include <pthread.h>
808], [
809 pthread_mutex_t m = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
810 return 0;
811],
812[
813AC_MSG_RESULT([yes])
814AC_DEFINE([HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], 1,
815 [Define to 1 if you have the `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' constant.])
816], [
817AC_MSG_RESULT([no])
818])
819
820
bart5e389f12008-04-05 12:53:15 +0000821# Check whether pthread_mutex_t has a member called __m_kind.
822
823AC_MSG_CHECKING([for pthread_mutex_t::__m_kind])
824
bart56730cd2008-05-11 06:41:46 +0000825AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000826[
bart56730cd2008-05-11 06:41:46 +0000827 #include <pthread.h>
828], [
bart5e389f12008-04-05 12:53:15 +0000829 pthread_mutex_t m;
830 return m.__m_kind;
bart56730cd2008-05-11 06:41:46 +0000831], [
bart5e389f12008-04-05 12:53:15 +0000832AC_MSG_RESULT([yes])
833AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], 1,
834 [Define to 1 if pthread_mutex_t has a member called __m_kind.])
835], [
836AC_MSG_RESULT([no])
837])
838
839
840# Check whether pthread_mutex_t has a member called __data.__kind.
841
842AC_MSG_CHECKING([for pthread_mutex_t::__data.__kind])
843
bart56730cd2008-05-11 06:41:46 +0000844AC_TRY_COMPILE(
bart5e389f12008-04-05 12:53:15 +0000845[
bart56730cd2008-05-11 06:41:46 +0000846#include <pthread.h>
847], [
bart5e389f12008-04-05 12:53:15 +0000848 pthread_mutex_t m;
849 return m.__data.__kind;
bart56730cd2008-05-11 06:41:46 +0000850], [
bart5e389f12008-04-05 12:53:15 +0000851AC_MSG_RESULT([yes])
852AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], 1,
853 [Define to 1 if pthread_mutex_t has a member __data.__kind.])
854], [
855AC_MSG_RESULT([no])
856])
857
858
bart62c370e2008-05-12 18:50:51 +0000859# does this compiler support -maltivec and does it have the include file
860# <altivec.h> ?
861
862AC_MSG_CHECKING([for Altivec])
863
864safe_CFLAGS=$CFLAGS
865CFLAGS="-maltivec"
866
867AC_TRY_COMPILE(
868[
869#include <altivec.h>
870], [
871 vector unsigned int v;
872],
873[
874ac_have_altivec=yes
875AC_MSG_RESULT([yes])
876], [
877ac_have_altivec=no
878AC_MSG_RESULT([no])
879])
880CFLAGS=$safe_CFLAGS
881
882AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
883AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes])
884
885
bart36dd85a2009-04-26 07:11:48 +0000886# Check for pthread_create@GLIBC2.0
887AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])
888
bart16e1c5a2009-04-26 07:38:53 +0000889safe_CFLAGS=$CFLAGS
890CFLAGS="-lpthread"
bart36dd85a2009-04-26 07:11:48 +0000891AC_TRY_LINK(
892[
893extern int pthread_create_glibc_2_0(void*, const void*,
894 void *(*)(void*), void*);
895__asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
896], [
bart276ed3a2009-05-10 15:41:45 +0000897#ifdef __powerpc__
898/*
899 * Apparently on PowerPC linking this program succeeds and generates an
900 * executable with the undefined symbol pthread_create@GLIBC_2.0.
901 */
902#error This test does not work properly on PowerPC.
903#else
bart16e1c5a2009-04-26 07:38:53 +0000904 pthread_create_glibc_2_0(0, 0, 0, 0);
bart276ed3a2009-05-10 15:41:45 +0000905#endif
bart16e1c5a2009-04-26 07:38:53 +0000906 return 0;
bart36dd85a2009-04-26 07:11:48 +0000907],
908[
909ac_have_pthread_create_glibc_2_0=yes
910AC_MSG_RESULT([yes])
911AC_DEFINE([HAVE_PTHREAD_CREATE_GLIBC_2_0], 1,
912 [Define to 1 if you have the `pthread_create@glibc2.0' function.])
913], [
914ac_have_pthread_create_glibc_2_0=no
915AC_MSG_RESULT([no])
916])
bart16e1c5a2009-04-26 07:38:53 +0000917CFLAGS=$safe_CFLAGS
bart36dd85a2009-04-26 07:11:48 +0000918
919AM_CONDITIONAL(HAVE_PTHREAD_CREATE_GLIBC_2_0,
bart24f53902009-04-26 11:29:02 +0000920 test x$ac_have_pthread_create_glibc_2_0 = xyes)
bart36dd85a2009-04-26 07:11:48 +0000921
922
barta50aa8a2008-04-27 06:06:57 +0000923# Check for eventfd_t, eventfd() and eventfd_read()
924AC_MSG_CHECKING([for eventfd()])
925
926AC_TRY_LINK(
927[
928#include <sys/eventfd.h>
929], [
930 eventfd_t ev;
931 int fd;
932
933 fd = eventfd(5, 0);
934 eventfd_read(fd, &ev);
935 return 0;
936],
937[
938AC_MSG_RESULT([yes])
939AC_DEFINE([HAVE_EVENTFD], 1,
940 [Define to 1 if you have the `eventfd' function.])
941AC_DEFINE([HAVE_EVENTFD_READ], 1,
942 [Define to 1 if you have the `eventfd_read' function.])
943], [
944AC_MSG_RESULT([no])
945])
946
947
njn7fd6d382009-01-22 21:56:32 +0000948#----------------------------------------------------------------------------
949# Checking for supported compiler flags.
950#----------------------------------------------------------------------------
951
sewardj535c50f2005-06-04 23:14:53 +0000952# does this compiler support -m32 ?
953AC_MSG_CHECKING([if gcc accepts -m32])
954
955safe_CFLAGS=$CFLAGS
956CFLAGS="-m32"
957
958AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000959 return 0;
sewardj535c50f2005-06-04 23:14:53 +0000960],
961[
962FLAG_M32="-m32"
963AC_MSG_RESULT([yes])
964], [
965FLAG_M32=""
966AC_MSG_RESULT([no])
967])
968CFLAGS=$safe_CFLAGS
969
970AC_SUBST(FLAG_M32)
971
972
sewardj03d86f22006-10-17 00:57:24 +0000973# does this compiler support -maix32 ?
974AC_MSG_CHECKING([if gcc accepts -maix32])
975
976safe_CFLAGS=$CFLAGS
977CFLAGS="-maix32"
978
979AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000980 return 0;
sewardj03d86f22006-10-17 00:57:24 +0000981],
982[
983FLAG_MAIX32="-maix32"
984AC_MSG_RESULT([yes])
985], [
986FLAG_MAIX32=""
987AC_MSG_RESULT([no])
988])
989CFLAGS=$safe_CFLAGS
990
991AC_SUBST(FLAG_MAIX32)
992
993
sewardj01262142006-01-04 01:20:28 +0000994# does this compiler support -m64 ?
995AC_MSG_CHECKING([if gcc accepts -m64])
996
997safe_CFLAGS=$CFLAGS
998CFLAGS="-m64"
999
1000AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001001 return 0;
sewardj01262142006-01-04 01:20:28 +00001002],
1003[
1004FLAG_M64="-m64"
1005AC_MSG_RESULT([yes])
1006], [
1007FLAG_M64=""
1008AC_MSG_RESULT([no])
1009])
1010CFLAGS=$safe_CFLAGS
1011
1012AC_SUBST(FLAG_M64)
1013
1014
sewardj03d86f22006-10-17 00:57:24 +00001015# does this compiler support -maix64 ?
1016AC_MSG_CHECKING([if gcc accepts -maix64])
1017
1018safe_CFLAGS=$CFLAGS
1019CFLAGS="-maix64"
1020
1021AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001022 return 0;
sewardj03d86f22006-10-17 00:57:24 +00001023],
1024[
1025FLAG_MAIX64="-maix64"
1026AC_MSG_RESULT([yes])
1027], [
1028FLAG_MAIX64=""
1029AC_MSG_RESULT([no])
1030])
1031CFLAGS=$safe_CFLAGS
1032
1033AC_SUBST(FLAG_MAIX64)
1034
1035
sewardj67f1fcc2005-07-03 10:41:02 +00001036# does this compiler support -mmmx ?
1037AC_MSG_CHECKING([if gcc accepts -mmmx])
1038
1039safe_CFLAGS=$CFLAGS
1040CFLAGS="-mmmx"
1041
1042AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001043 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001044],
1045[
1046FLAG_MMMX="-mmmx"
1047AC_MSG_RESULT([yes])
1048], [
1049FLAG_MMMX=""
1050AC_MSG_RESULT([no])
1051])
1052CFLAGS=$safe_CFLAGS
1053
1054AC_SUBST(FLAG_MMMX)
1055
1056
1057# does this compiler support -msse ?
1058AC_MSG_CHECKING([if gcc accepts -msse])
1059
1060safe_CFLAGS=$CFLAGS
1061CFLAGS="-msse"
1062
1063AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001064 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001065],
1066[
1067FLAG_MSSE="-msse"
1068AC_MSG_RESULT([yes])
1069], [
1070FLAG_MSSE=""
1071AC_MSG_RESULT([no])
1072])
1073CFLAGS=$safe_CFLAGS
1074
1075AC_SUBST(FLAG_MSSE)
1076
1077
sewardj5b754b42002-06-03 22:53:35 +00001078# does this compiler support -mpreferred-stack-boundary=2 ?
1079AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
1080
daywalker3664f562003-10-17 13:43:46 +00001081safe_CFLAGS=$CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001082CFLAGS="-mpreferred-stack-boundary=2"
1083
1084AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001085 return 0;
sewardj5b754b42002-06-03 22:53:35 +00001086],
1087[
1088PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
daywalker3664f562003-10-17 13:43:46 +00001089AC_MSG_RESULT([yes])
sewardj5b754b42002-06-03 22:53:35 +00001090], [
1091PREFERRED_STACK_BOUNDARY=""
1092AC_MSG_RESULT([no])
1093])
daywalker3664f562003-10-17 13:43:46 +00001094CFLAGS=$safe_CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001095
1096AC_SUBST(PREFERRED_STACK_BOUNDARY)
1097
sewardj535c50f2005-06-04 23:14:53 +00001098
sewardjb5f6f512005-03-10 23:59:00 +00001099# does this compiler support -Wno-pointer-sign ?
bart56730cd2008-05-11 06:41:46 +00001100AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign])
sewardjb5f6f512005-03-10 23:59:00 +00001101
1102safe_CFLAGS=$CFLAGS
1103CFLAGS="-Wno-pointer-sign"
1104
1105AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001106 return 0;
sewardjb5f6f512005-03-10 23:59:00 +00001107],
1108[
1109no_pointer_sign=yes
1110AC_MSG_RESULT([yes])
1111], [
1112no_pointer_sign=no
1113AC_MSG_RESULT([no])
1114])
1115CFLAGS=$safe_CFLAGS
1116
1117if test x$no_pointer_sign = xyes; then
1118 CFLAGS="$CFLAGS -Wno-pointer-sign"
1119fi
1120
sewardj535c50f2005-06-04 23:14:53 +00001121
tom1e946682005-10-12 11:27:33 +00001122# does this compiler support -Wdeclaration-after-statement ?
bart56730cd2008-05-11 06:41:46 +00001123AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement])
tom1e946682005-10-12 11:27:33 +00001124
1125safe_CFLAGS=$CFLAGS
1126CFLAGS="-Wdeclaration-after-statement"
1127
1128AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001129 return 0;
tom1e946682005-10-12 11:27:33 +00001130],
1131[
tome9814c32005-10-12 11:30:43 +00001132declaration_after_statement=yes
sewardj72a547e2006-01-25 02:58:28 +00001133FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement"
tom1e946682005-10-12 11:27:33 +00001134AC_MSG_RESULT([yes])
1135], [
tome9814c32005-10-12 11:30:43 +00001136declaration_after_statement=no
sewardj72a547e2006-01-25 02:58:28 +00001137FLAG_WDECL_AFTER_STMT=""
tom1e946682005-10-12 11:27:33 +00001138AC_MSG_RESULT([no])
1139])
1140CFLAGS=$safe_CFLAGS
1141
sewardj72a547e2006-01-25 02:58:28 +00001142AC_SUBST(FLAG_WDECL_AFTER_STMT)
1143
tome9814c32005-10-12 11:30:43 +00001144if test x$declaration_after_statement = xyes; then
tom1e946682005-10-12 11:27:33 +00001145 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1146fi
1147
sewardj00f1e622006-03-12 16:47:10 +00001148
bart9d865fa2008-06-23 12:11:49 +00001149# does this compiler support -Wno-format-zero-length ?
1150
1151AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
1152
1153safe_CFLAGS=$CFLAGS
1154CFLAGS="-Wno-format-zero-length"
1155
1156AC_TRY_COMPILE(
1157[ ],
1158[
1159 return 0;
1160],
1161[
1162AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
1163AC_MSG_RESULT([yes])
1164],
1165[
1166AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
1167AC_MSG_RESULT([no])
1168])
1169CFLAGS=$safe_CFLAGS
1170
1171
bart56730cd2008-05-11 06:41:46 +00001172# does this compiler support -Wextra or the older -W ?
1173
1174AC_MSG_CHECKING([if gcc accepts -Wextra or -W])
1175
1176safe_CFLAGS=$CFLAGS
1177CFLAGS="-Wextra"
1178
1179AC_TRY_COMPILE(
1180[ ],
1181[
1182 return 0;
1183],
1184[
1185AC_SUBST([FLAG_W_EXTRA], [-Wextra])
1186AC_MSG_RESULT([-Wextra])
1187], [
1188 CFLAGS="-W"
1189 AC_TRY_COMPILE(
1190 [ ],
1191 [
1192 return 0;
1193 ],
1194 [
1195 AC_SUBST([FLAG_W_EXTRA], [-W])
1196 AC_MSG_RESULT([-W])
1197 ], [
1198 AC_SUBST([FLAG_W_EXTRA], [])
1199 AC_MSG_RESULT([not supported])
1200 ])
1201])
1202CFLAGS=$safe_CFLAGS
1203
1204
sewardja72c26d2007-05-01 13:44:08 +00001205# does this compiler support -fno-stack-protector ?
bart56730cd2008-05-11 06:41:46 +00001206AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
sewardja72c26d2007-05-01 13:44:08 +00001207
1208safe_CFLAGS=$CFLAGS
1209CFLAGS="-fno-stack-protector"
1210
1211AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001212 return 0;
sewardja72c26d2007-05-01 13:44:08 +00001213],
1214[
1215no_stack_protector=yes
1216FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
1217AC_MSG_RESULT([yes])
1218], [
1219no_stack_protector=no
1220FLAG_FNO_STACK_PROTECTOR=""
1221AC_MSG_RESULT([no])
1222])
1223CFLAGS=$safe_CFLAGS
1224
1225AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
1226
1227if test x$no_stack_protector = xyes; then
1228 CFLAGS="$CFLAGS -fno-stack-protector"
1229fi
1230
1231
bart56730cd2008-05-11 06:41:46 +00001232# does this compiler support --param inline-unit-growth=... ?
1233
1234AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth])
1235
1236safe_CFLAGS=$CFLAGS
1237CFLAGS="--param inline-unit-growth=900"
1238
1239AC_TRY_COMPILE(
1240[ ],
1241[
1242 return 0;
1243],
1244[
1245AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
1246 ["--param inline-unit-growth=900"])
1247AC_MSG_RESULT([yes])
1248], [
1249AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""])
1250AC_MSG_RESULT([no])
1251])
1252CFLAGS=$safe_CFLAGS
1253
1254
tomd55121e2005-12-19 12:40:13 +00001255# does this compiler support __builtin_expect?
1256AC_MSG_CHECKING([if gcc supports __builtin_expect])
bart56730cd2008-05-11 06:41:46 +00001257
tomd55121e2005-12-19 12:40:13 +00001258AC_TRY_LINK(, [
1259return __builtin_expect(1, 1) ? 1 : 0
1260],
1261[
1262ac_have_builtin_expect=yes
1263AC_MSG_RESULT([yes])
1264], [
1265ac_have_builtin_expect=no
1266AC_MSG_RESULT([no])
1267])
1268if test x$ac_have_builtin_expect = xyes ; then
1269 AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.])
1270fi
1271
tom1e946682005-10-12 11:27:33 +00001272
sewardj00f1e622006-03-12 16:47:10 +00001273# does the ppc assembler support "mtocrf" et al?
1274AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
1275
1276AC_TRY_COMPILE(, [
sewardjdd4cbe12006-03-12 17:27:44 +00001277__asm__ __volatile__("mtocrf 4,0");
1278__asm__ __volatile__("mfocrf 0,4");
sewardj00f1e622006-03-12 16:47:10 +00001279],
1280[
1281ac_have_as_ppc_mftocrf=yes
1282AC_MSG_RESULT([yes])
1283], [
1284ac_have_as_ppc_mftocrf=no
1285AC_MSG_RESULT([no])
1286])
1287if test x$ac_have_as_ppc_mftocrf = xyes ; then
1288 AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.])
1289fi
1290
1291
sewardjf0aabf82007-03-22 00:24:21 +00001292# does the x86/amd64 assembler understand SSE3 instructions?
sewardjfa18a262007-03-22 12:13:13 +00001293# Note, this doesn't generate a C-level symbol. It generates a
1294# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
sewardjf0aabf82007-03-22 00:24:21 +00001295AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
1296
1297AC_TRY_COMPILE(, [
1298 do { long long int x;
1299 __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
1300 while (0)
1301],
1302[
1303ac_have_as_sse3=yes
1304AC_MSG_RESULT([yes])
1305], [
1306ac_have_as_sse3=no
1307AC_MSG_RESULT([no])
1308])
sewardjfa18a262007-03-22 12:13:13 +00001309
1310AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
sewardjf0aabf82007-03-22 00:24:21 +00001311
1312
sewardj6d6da5b2008-02-09 12:07:40 +00001313# Ditto for SSSE3 instructions (note extra S)
1314# Note, this doesn't generate a C-level symbol. It generates a
1315# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
1316AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
1317
1318AC_TRY_COMPILE(, [
1319 do { long long int x;
1320 __asm__ __volatile__(
1321 "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
1322 while (0)
1323],
1324[
1325ac_have_as_ssse3=yes
1326AC_MSG_RESULT([yes])
1327], [
1328ac_have_as_ssse3=no
1329AC_MSG_RESULT([no])
1330])
1331
1332AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
1333
1334
sewardjb5f6f512005-03-10 23:59:00 +00001335# Check for TLS support in the compiler and linker
bartca9f2ad2008-06-02 07:14:20 +00001336if test "x${cross_compiling}" = "xno"; then
1337# Native compilation: check whether running a program using TLS succeeds.
1338# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
1339# succeeds but running programs using TLS fails.
1340AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1341 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1342 [vg_cv_tls=$enableval],
1343 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
1344 [[return foo;]])],
1345 [vg_cv_tls=yes],
1346 [vg_cv_tls=no])])])
1347else
1348# Cross-compiling: check whether linking a program using TLS succeeds.
sewardjb5f6f512005-03-10 23:59:00 +00001349AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1350 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1351 [vg_cv_tls=$enableval],
bartcddeaf52008-05-25 15:58:11 +00001352 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
sewardjb5f6f512005-03-10 23:59:00 +00001353 [[return foo;]])],
1354 [vg_cv_tls=yes],
1355 [vg_cv_tls=no])])])
bartca9f2ad2008-06-02 07:14:20 +00001356fi
sewardjb5f6f512005-03-10 23:59:00 +00001357
1358if test "$vg_cv_tls" = yes; then
1359AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
1360fi
sewardj5b754b42002-06-03 22:53:35 +00001361
sewardj535c50f2005-06-04 23:14:53 +00001362
njn7fd6d382009-01-22 21:56:32 +00001363#----------------------------------------------------------------------------
bart62f54e42008-07-28 11:35:10 +00001364# Checks for C header files.
njn7fd6d382009-01-22 21:56:32 +00001365#----------------------------------------------------------------------------
1366
sewardjde4a1d02002-03-22 01:27:54 +00001367AC_HEADER_STDC
bartf5ceec82008-04-26 07:45:10 +00001368AC_CHECK_HEADERS([ \
bart1f2b1432009-01-16 12:06:54 +00001369 asm/unistd.h \
bartf5ceec82008-04-26 07:45:10 +00001370 endian.h \
1371 mqueue.h \
1372 sys/endian.h \
1373 sys/epoll.h \
1374 sys/eventfd.h \
bartce48fa92008-04-26 10:59:46 +00001375 sys/klog.h \
bartf5ceec82008-04-26 07:45:10 +00001376 sys/poll.h \
bart71bad292008-04-27 11:43:23 +00001377 sys/signal.h \
bartf5ceec82008-04-26 07:45:10 +00001378 sys/signalfd.h \
bart71bad292008-04-27 11:43:23 +00001379 sys/syscall.h \
1380 sys/time.h \
1381 sys/types.h \
bartf5ceec82008-04-26 07:45:10 +00001382 ])
sewardjde4a1d02002-03-22 01:27:54 +00001383
njn7fd6d382009-01-22 21:56:32 +00001384#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001385# Checks for typedefs, structures, and compiler characteristics.
njn7fd6d382009-01-22 21:56:32 +00001386#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001387AC_TYPE_UID_T
1388AC_TYPE_OFF_T
1389AC_TYPE_SIZE_T
1390AC_HEADER_TIME
1391
sewardj535c50f2005-06-04 23:14:53 +00001392
njn7fd6d382009-01-22 21:56:32 +00001393#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001394# Checks for library functions.
njn7fd6d382009-01-22 21:56:32 +00001395#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001396AC_FUNC_MEMCMP
1397AC_FUNC_MMAP
1398AC_TYPE_SIGNAL
1399
bart71bad292008-04-27 11:43:23 +00001400AC_CHECK_LIB([rt], [clock_gettime])
bart41ac62a2008-07-07 16:58:03 +00001401
bartf5ceec82008-04-26 07:45:10 +00001402AC_CHECK_FUNCS([ \
bart71bad292008-04-27 11:43:23 +00001403 clock_gettime\
bartf5ceec82008-04-26 07:45:10 +00001404 epoll_create \
1405 epoll_pwait \
bartf5ceec82008-04-26 07:45:10 +00001406 floor \
bartce48fa92008-04-26 10:59:46 +00001407 klogctl \
bartf5ceec82008-04-26 07:45:10 +00001408 mallinfo \
1409 memchr \
1410 memset \
1411 mkdir \
1412 ppoll \
bart6d45e922009-01-20 13:45:38 +00001413 pthread_barrier_init \
1414 pthread_condattr_setclock \
1415 pthread_mutex_timedlock \
1416 pthread_rwlock_timedrdlock \
1417 pthread_rwlock_timedwrlock \
1418 pthread_spin_lock \
bartf5ceec82008-04-26 07:45:10 +00001419 semtimedop \
1420 signalfd \
njn6cc22472009-03-16 03:46:48 +00001421 sigwaitinfo \
bart71bad292008-04-27 11:43:23 +00001422 syscall \
bartf5ceec82008-04-26 07:45:10 +00001423 strchr \
1424 strdup \
1425 strpbrk \
1426 strrchr \
1427 strstr \
1428 timerfd \
1429 utimensat \
1430 ])
sewardjde4a1d02002-03-22 01:27:54 +00001431
bart623eec32008-07-29 17:54:49 +00001432# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
1433# libraries with any shared object and/or executable. This is NOT what we
1434# want for e.g. vgpreload_core-x86-linux.so
1435LIBS=""
sewardj80637752006-03-02 13:48:21 +00001436
bart6d45e922009-01-20 13:45:38 +00001437AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
1438 [test x$ac_cv_func_pthread_barrier_init = xyes])
bart2eaa8f22009-01-20 14:01:16 +00001439AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK],
1440 [test x$ac_cv_func_pthread_mutex_timedlock = xyes])
bart6d45e922009-01-20 13:45:38 +00001441AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
1442 [test x$ac_cv_func_pthread_spin_lock = xyes])
1443
njn7fd6d382009-01-22 21:56:32 +00001444
1445#----------------------------------------------------------------------------
1446# MPI checks
1447#----------------------------------------------------------------------------
sewardj03d86f22006-10-17 00:57:24 +00001448# Do we have a useable MPI setup on the primary and/or secondary targets?
1449# On Linux, by default, assumes mpicc and -m32/-m64
1450# On AIX, by default, assumes mpxlc and -q32/-q64
sewardje9fa5062006-03-12 18:29:18 +00001451# Note: this is a kludge in that it assumes the specified mpicc
sewardj03d86f22006-10-17 00:57:24 +00001452# understands -m32/-m64/-q32/-q64 regardless of what is specified using
1453# --with-mpicc=.
sewardj0ad46092006-03-02 17:09:16 +00001454MPI_CC="mpicc"
njn7fd6d382009-01-22 21:56:32 +00001455if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
1456 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001457 MPI_CC="mpxlc"
1458fi
1459
sewardje9fa5062006-03-12 18:29:18 +00001460mflag_primary=
njn7fd6d382009-01-22 21:56:32 +00001461if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
1462 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001463 mflag_primary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001464elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
1465 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001466 mflag_primary=$FLAG_M64
njn7fd6d382009-01-22 21:56:32 +00001467elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001468 mflag_primary=-q32
njn7fd6d382009-01-22 21:56:32 +00001469elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001470 mflag_primary=-q64
sewardje9fa5062006-03-12 18:29:18 +00001471fi
1472
sewardj03d86f22006-10-17 00:57:24 +00001473mflag_secondary=
njn7fd6d382009-01-22 21:56:32 +00001474if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
1475 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
sewardj03d86f22006-10-17 00:57:24 +00001476 mflag_secondary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001477elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001478 mflag_secondary=-q32
1479fi
1480
1481
sewardj0ad46092006-03-02 17:09:16 +00001482AC_ARG_WITH(mpicc,
sewardjb70a6132006-05-27 21:14:09 +00001483 [ --with-mpicc= Specify name of MPI2-ised C compiler],
sewardj0ad46092006-03-02 17:09:16 +00001484 MPI_CC=$withval
1485)
sewardj03d86f22006-10-17 00:57:24 +00001486AC_SUBST(MPI_CC)
1487
1488## See if MPI_CC works for the primary target
1489##
1490AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
sewardj0ad46092006-03-02 17:09:16 +00001491saved_CC=$CC
sewardjde4f3842006-03-09 02:41:41 +00001492saved_CFLAGS=$CFLAGS
sewardj0ad46092006-03-02 17:09:16 +00001493CC=$MPI_CC
sewardje9fa5062006-03-12 18:29:18 +00001494CFLAGS=$mflag_primary
sewardjd3fcc642006-03-09 02:49:56 +00001495AC_TRY_LINK([
sewardj1a85e602006-03-08 15:26:10 +00001496#include <mpi.h>
1497#include <stdio.h>
sewardjde4f3842006-03-09 02:41:41 +00001498],[
1499 int r = MPI_Init(NULL,NULL);
1500 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1501 return r;
1502], [
sewardj03d86f22006-10-17 00:57:24 +00001503ac_have_mpi2_pri=yes
sewardj1a85e602006-03-08 15:26:10 +00001504AC_MSG_RESULT([yes, $MPI_CC])
sewardj80637752006-03-02 13:48:21 +00001505], [
sewardj03d86f22006-10-17 00:57:24 +00001506ac_have_mpi2_pri=no
sewardj80637752006-03-02 13:48:21 +00001507AC_MSG_RESULT([no])
1508])
sewardj0ad46092006-03-02 17:09:16 +00001509CC=$saved_CC
sewardjde4f3842006-03-09 02:41:41 +00001510CFLAGS=$saved_CFLAGS
sewardj03d86f22006-10-17 00:57:24 +00001511AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
sewardj80637752006-03-02 13:48:21 +00001512
sewardj03d86f22006-10-17 00:57:24 +00001513## See if MPI_CC works for the secondary target. Complication: what if
1514## there is no secondary target? We need this to then fail.
1515## Kludge this by making MPI_CC something which will surely fail in
1516## such a case.
1517##
1518AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
1519saved_CC=$CC
1520saved_CFLAGS=$CFLAGS
njn7fd6d382009-01-22 21:56:32 +00001521if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
sewardj03d86f22006-10-17 00:57:24 +00001522 CC="$MPI_CC this will surely fail"
1523else
1524 CC=$MPI_CC
1525fi
1526CFLAGS=$mflag_secondary
1527AC_TRY_LINK([
1528#include <mpi.h>
1529#include <stdio.h>
1530],[
1531 int r = MPI_Init(NULL,NULL);
1532 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1533 return r;
1534], [
1535ac_have_mpi2_sec=yes
1536AC_MSG_RESULT([yes, $MPI_CC])
1537], [
1538ac_have_mpi2_sec=no
1539AC_MSG_RESULT([no])
1540])
1541CC=$saved_CC
1542CFLAGS=$saved_CFLAGS
1543AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
sewardj80637752006-03-02 13:48:21 +00001544
1545
njn7fd6d382009-01-22 21:56:32 +00001546#----------------------------------------------------------------------------
1547# Other library checks
1548#----------------------------------------------------------------------------
sewardj493c4ef2008-12-13 16:45:19 +00001549# There now follow some tests for QtCore, Boost, and OpenMP. These
1550# tests are present because Drd has some regression tests that use
1551# these packages. All regression test programs all compiled only
1552# for the primary target. And so it is important that the configure
1553# checks that follow, use the correct -m32 or -m64 flag for the
1554# primary target (called $mflag_primary). Otherwise, we can end up
1555# in a situation (eg) where, on amd64-linux, the test for Boost checks
1556# for usable 64-bit Boost facilities, but because we are doing a 32-bit
1557# only build (meaning, the primary target is x86-linux), the build
1558# of the regtest programs that use Boost fails, because they are
1559# build as 32-bit (IN THIS EXAMPLE).
1560#
1561# Hence: ALWAYS USE $mflag_primary FOR CONFIGURE TESTS FOR FACILITIES
1562# NEEDED BY THE REGRESSION TEST PROGRAMS.
1563
1564
bart21d3cfc2008-08-02 09:08:17 +00001565# The test below verifies whether the QtCore package been installed.
1566# This test works as follows:
1567# - If pkg-config was not installed at the time autogen.sh was run,
1568# the definition of the PKG_CHECK_EXISTS() macro will not be found by
1569# autogen.sh. Augogen.sh will generate a configure script that prints
1570# a warning about pkg-config and proceeds as if Qt4 has not been installed.
1571# - If pkg-config was installed at the time autogen.sh was run,
1572# the generated configure script will try to detect the presence of the
1573# Qt4 QtCore library by looking up compile and linker flags in the file
1574# called QtCore.pc.
1575# - pkg-config settings can be overridden via the configure variables
1576# QTCORE_CFLAGS and QTCORE_LIBS (added by the pkg-config m4 macro's to the
1577# configure script -- see also ./configure --help).
1578# - The QTCORE_CFLAGS and QTCORE_LIBS configure variables can be used even if
1579# the pkg-config executable is not present on the system on which the
1580# configure script is run.
bart41ac62a2008-07-07 16:58:03 +00001581
bart21d3cfc2008-08-02 09:08:17 +00001582ifdef(
1583 [PKG_CHECK_EXISTS],
1584 [PKG_CHECK_EXISTS(
1585 [QtCore],
1586 [
1587 PKG_CHECK_MODULES([QTCORE], [QtCore])
bart11fbd892008-09-21 15:00:58 +00001588 # Paranoia: don't trust the result reported by pkg-config, but when
1589 # pkg-config reports that QtCore has been found, verify whether linking
1590 # programs with QtCore succeeds.
1591 AC_LANG(C++)
1592 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001593 CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
bart11fbd892008-09-21 15:00:58 +00001594 AC_TRY_LINK(
1595 [#include <QMutex>],
1596 [QMutex Mutex;],
1597 [ac_have_qtcore=yes],
1598 [
1599 AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
1600 ac_have_qtcore=no
1601 ]
1602 )
1603 CXXFLAGS="${safe_CXXFLAGS}"
bart21d3cfc2008-08-02 09:08:17 +00001604 ],
1605 [
1606 ac_have_qtcore=no
1607 ]
1608 )
1609 ],
1610 AC_MSG_WARN([pkg-config has not been installed or is too old.])
1611 AC_MSG_WARN([Detection of Qt4 will be skipped.])
1612 [ac_have_qtcore=no]
1613)
bart41ac62a2008-07-07 16:58:03 +00001614
1615AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])
1616
1617
bart62f54e42008-07-28 11:35:10 +00001618# Test for QMutex::tryLock(int), which has been introduced in Qt 4.3.
1619# See also http://doc.trolltech.com/4.3/qmutex.html.
1620if test x$ac_have_qtcore = xyes; then
1621 AC_MSG_CHECKING([for Qt4 QMutex::tryLock(int)])
1622 AC_LANG(C++)
bart21d3cfc2008-08-02 09:08:17 +00001623 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001624 CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary"
bart62f54e42008-07-28 11:35:10 +00001625 AC_TRY_COMPILE([
1626 #include <QtCore/QMutex>
1627 ],
1628 [
1629 QMutex M;
1630 M.tryLock(1);
1631 M.unlock();
1632 return 0;
1633 ],
1634 [
1635 AC_MSG_RESULT([yes])
1636 AC_DEFINE([HAVE_QTCORE_QMUTEX_TRYLOCK_INT], [1], [Define to 1 if the installed version of Qt4 provides QMutex::tryLock(int).])
1637 ],
1638 [
1639 AC_MSG_RESULT([no])
1640 ])
bart21d3cfc2008-08-02 09:08:17 +00001641 CXXFLAGS="${safe_CXXFLAGS}"
bart62f54e42008-07-28 11:35:10 +00001642 AC_LANG(C)
1643fi
1644
1645
sewardj493c4ef2008-12-13 16:45:19 +00001646# Check whether the boost library 1.35 or later has been installed.
1647# The Boost.Threads library has undergone a major rewrite in version 1.35.0.
1648
1649AC_MSG_CHECKING([for boost])
1650
1651AC_LANG(C++)
1652safe_CXXFLAGS=$CXXFLAGS
1653CXXFLAGS="-lboost_thread-mt $mflag_primary"
1654
1655AC_LINK_IFELSE(
1656[
1657#include <boost/thread.hpp>
1658static void thread_func(void)
1659{ }
1660int main(int argc, char** argv)
1661{
1662 boost::thread t(thread_func);
1663 return 0;
1664}
1665],
1666[
1667ac_have_boost_1_35=yes
1668AC_SUBST([BOOST_CFLAGS], [])
1669AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"])
1670AC_MSG_RESULT([yes])
1671], [
1672ac_have_boost_1_35=no
1673AC_MSG_RESULT([no])
1674])
1675
1676CXXFLAGS=$safe_CXXFLAGS
1677AC_LANG(C)
1678
1679AM_CONDITIONAL([HAVE_BOOST_1_35], [test x$ac_have_boost_1_35 = xyes])
1680
1681
1682# does this compiler support -fopenmp, does it have the include file
1683# <omp.h> and does it have libgomp ?
1684
1685AC_MSG_CHECKING([for OpenMP])
1686
1687safe_CFLAGS=$CFLAGS
sewardjc876a2f2009-01-22 22:44:30 +00001688CFLAGS="-fopenmp $mflag_primary"
sewardj493c4ef2008-12-13 16:45:19 +00001689
1690AC_LINK_IFELSE(
1691[
1692#include <omp.h>
1693int main(int argc, char** argv)
1694{
1695 omp_set_dynamic(0);
1696 return 0;
1697}
1698],
1699[
1700ac_have_openmp=yes
1701AC_MSG_RESULT([yes])
1702], [
1703ac_have_openmp=no
1704AC_MSG_RESULT([no])
1705])
1706CFLAGS=$safe_CFLAGS
1707
1708AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
1709
1710
sewardjc876a2f2009-01-22 22:44:30 +00001711# does this compiler have built-in functions for atomic memory access ?
1712AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
1713
1714safe_CFLAGS=$CFLAGS
1715CFLAGS="$mflag_primary"
1716
1717AC_TRY_LINK(,
1718[
1719 int variable = 1;
1720 return (__sync_bool_compare_and_swap(&variable, 1, 2)
1721 && __sync_add_and_fetch(&variable, 1) ? 1 : 0)
1722],
1723[
1724 AC_MSG_RESULT([yes])
1725 AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
1726],
1727[
1728 AC_MSG_RESULT([no])
1729])
1730
1731CFLAGS=$safe_CFLAGS
1732
1733
njn7fd6d382009-01-22 21:56:32 +00001734#----------------------------------------------------------------------------
1735# Ok. We're done checking.
1736#----------------------------------------------------------------------------
sewardj80637752006-03-02 13:48:21 +00001737
gobrye721a522002-03-22 13:38:30 +00001738AC_OUTPUT(
sewardjde4a1d02002-03-22 01:27:54 +00001739 Makefile
njn25cac76cb2002-09-23 11:21:57 +00001740 valgrind.spec
muellerbddd6072003-11-19 21:50:07 +00001741 valgrind.pc
dirk07596a22008-04-25 11:33:30 +00001742 glibc-2.X.supp
njn254d542432002-09-23 16:09:39 +00001743 docs/Makefile
njn3e986b22004-11-30 10:43:45 +00001744 docs/lib/Makefile
1745 docs/images/Makefile
njnf7c00b12005-07-19 21:46:19 +00001746 docs/internals/Makefile
njn3e986b22004-11-30 10:43:45 +00001747 docs/xml/Makefile
njn254d542432002-09-23 16:09:39 +00001748 tests/Makefile
njnc2e7f482002-09-27 08:44:17 +00001749 tests/vg_regtest
njnec0c27a2005-12-10 23:11:28 +00001750 perf/Makefile
1751 perf/vg_perf
njn254d542432002-09-23 16:09:39 +00001752 include/Makefile
sewardj0f8881b2006-10-18 01:16:57 +00001753 include/vki/Makefile
njn7a6e7462002-11-09 17:53:30 +00001754 auxprogs/Makefile
njn25ab726032002-09-23 16:24:41 +00001755 coregrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001756 memcheck/Makefile
1757 memcheck/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001758 memcheck/tests/amd64/Makefile
njnc6168192004-11-29 13:54:10 +00001759 memcheck/tests/x86/Makefile
njn3b3b76d2009-01-19 03:44:19 +00001760 memcheck/tests/linux/Makefile
njna454ec02009-01-19 03:16:59 +00001761 memcheck/tests/x86-linux/Makefile
njn29a5c012009-05-06 06:15:55 +00001762 memcheck/perf/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001763 memcheck/docs/Makefile
1764 cachegrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001765 cachegrind/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001766 cachegrind/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001767 cachegrind/docs/Makefile
njnf2df9b52002-10-04 11:35:47 +00001768 cachegrind/cg_annotate
weidendoa17f2a32006-03-20 10:27:30 +00001769 callgrind/Makefile
1770 callgrind/callgrind_annotate
1771 callgrind/callgrind_control
1772 callgrind/tests/Makefile
1773 callgrind/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001774 helgrind/Makefile
njnf2df9b52002-10-04 11:35:47 +00001775 helgrind/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001776 helgrind/docs/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001777 massif/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001778 massif/tests/Makefile
njn734b8052007-11-01 04:40:37 +00001779 massif/perf/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001780 massif/docs/Makefile
njnd5a8d242007-11-02 20:44:57 +00001781 massif/ms_print
njn25cac76cb2002-09-23 11:21:57 +00001782 lackey/Makefile
njnf2df9b52002-10-04 11:35:47 +00001783 lackey/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001784 lackey/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001785 none/Makefile
1786 none/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001787 none/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001788 none/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001789 none/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001790 none/tests/x86/Makefile
njn0458a122009-02-13 06:23:46 +00001791 none/tests/linux/Makefile
njn06ca3322009-04-15 23:10:04 +00001792 none/tests/x86-linux/Makefile
njn9bc8c002002-10-02 13:49:13 +00001793 none/docs/Makefile
sewardj99a2ceb2007-11-09 12:30:36 +00001794 exp-omega/Makefile
1795 exp-omega/tests/Makefile
1796 exp-omega/docs/Makefile
sewardj9c606bd2008-09-18 18:12:50 +00001797 exp-ptrcheck/Makefile
1798 exp-ptrcheck/tests/Makefile
1799 exp-ptrcheck/docs/Makefile
bartccf17de2008-07-04 15:14:35 +00001800 drd/Makefile
1801 drd/docs/Makefile
1802 drd/scripts/download-and-build-splash2
1803 drd/tests/Makefile
bart0b2b4622008-06-17 19:19:16 +00001804)
gobry3b777892002-04-04 09:18:39 +00001805
1806cat<<EOF
1807
njn311303f2009-02-06 03:46:50 +00001808 Maximum build arch: ${ARCH_MAX}
1809 Primary build arch: ${VGCONF_ARCH_PRI}
1810 Build OS: ${VGCONF_OS}
njn7fd6d382009-01-22 21:56:32 +00001811 Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
1812 Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
sewardje95d94f2008-09-19 09:02:19 +00001813 Default supp files: ${DEFAULT_SUPP}
gobry3b777892002-04-04 09:18:39 +00001814
gobry3b777892002-04-04 09:18:39 +00001815EOF