blob: ce7f9fde647c6eefb282b754b30e59d36323a509 [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], [
bart16e1c5a2009-04-26 07:38:53 +0000897 pthread_create_glibc_2_0(0, 0, 0, 0);
898 return 0;
bart36dd85a2009-04-26 07:11:48 +0000899],
900[
901ac_have_pthread_create_glibc_2_0=yes
902AC_MSG_RESULT([yes])
903AC_DEFINE([HAVE_PTHREAD_CREATE_GLIBC_2_0], 1,
904 [Define to 1 if you have the `pthread_create@glibc2.0' function.])
905], [
906ac_have_pthread_create_glibc_2_0=no
907AC_MSG_RESULT([no])
908])
bart16e1c5a2009-04-26 07:38:53 +0000909CFLAGS=$safe_CFLAGS
bart36dd85a2009-04-26 07:11:48 +0000910
911AM_CONDITIONAL(HAVE_PTHREAD_CREATE_GLIBC_2_0,
bart24f53902009-04-26 11:29:02 +0000912 test x$ac_have_pthread_create_glibc_2_0 = xyes)
bart36dd85a2009-04-26 07:11:48 +0000913
914
barta50aa8a2008-04-27 06:06:57 +0000915# Check for eventfd_t, eventfd() and eventfd_read()
916AC_MSG_CHECKING([for eventfd()])
917
918AC_TRY_LINK(
919[
920#include <sys/eventfd.h>
921], [
922 eventfd_t ev;
923 int fd;
924
925 fd = eventfd(5, 0);
926 eventfd_read(fd, &ev);
927 return 0;
928],
929[
930AC_MSG_RESULT([yes])
931AC_DEFINE([HAVE_EVENTFD], 1,
932 [Define to 1 if you have the `eventfd' function.])
933AC_DEFINE([HAVE_EVENTFD_READ], 1,
934 [Define to 1 if you have the `eventfd_read' function.])
935], [
936AC_MSG_RESULT([no])
937])
938
939
njn7fd6d382009-01-22 21:56:32 +0000940#----------------------------------------------------------------------------
941# Checking for supported compiler flags.
942#----------------------------------------------------------------------------
943
sewardj535c50f2005-06-04 23:14:53 +0000944# does this compiler support -m32 ?
945AC_MSG_CHECKING([if gcc accepts -m32])
946
947safe_CFLAGS=$CFLAGS
948CFLAGS="-m32"
949
950AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000951 return 0;
sewardj535c50f2005-06-04 23:14:53 +0000952],
953[
954FLAG_M32="-m32"
955AC_MSG_RESULT([yes])
956], [
957FLAG_M32=""
958AC_MSG_RESULT([no])
959])
960CFLAGS=$safe_CFLAGS
961
962AC_SUBST(FLAG_M32)
963
964
sewardj03d86f22006-10-17 00:57:24 +0000965# does this compiler support -maix32 ?
966AC_MSG_CHECKING([if gcc accepts -maix32])
967
968safe_CFLAGS=$CFLAGS
969CFLAGS="-maix32"
970
971AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000972 return 0;
sewardj03d86f22006-10-17 00:57:24 +0000973],
974[
975FLAG_MAIX32="-maix32"
976AC_MSG_RESULT([yes])
977], [
978FLAG_MAIX32=""
979AC_MSG_RESULT([no])
980])
981CFLAGS=$safe_CFLAGS
982
983AC_SUBST(FLAG_MAIX32)
984
985
sewardj01262142006-01-04 01:20:28 +0000986# does this compiler support -m64 ?
987AC_MSG_CHECKING([if gcc accepts -m64])
988
989safe_CFLAGS=$CFLAGS
990CFLAGS="-m64"
991
992AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000993 return 0;
sewardj01262142006-01-04 01:20:28 +0000994],
995[
996FLAG_M64="-m64"
997AC_MSG_RESULT([yes])
998], [
999FLAG_M64=""
1000AC_MSG_RESULT([no])
1001])
1002CFLAGS=$safe_CFLAGS
1003
1004AC_SUBST(FLAG_M64)
1005
1006
sewardj03d86f22006-10-17 00:57:24 +00001007# does this compiler support -maix64 ?
1008AC_MSG_CHECKING([if gcc accepts -maix64])
1009
1010safe_CFLAGS=$CFLAGS
1011CFLAGS="-maix64"
1012
1013AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001014 return 0;
sewardj03d86f22006-10-17 00:57:24 +00001015],
1016[
1017FLAG_MAIX64="-maix64"
1018AC_MSG_RESULT([yes])
1019], [
1020FLAG_MAIX64=""
1021AC_MSG_RESULT([no])
1022])
1023CFLAGS=$safe_CFLAGS
1024
1025AC_SUBST(FLAG_MAIX64)
1026
1027
sewardj67f1fcc2005-07-03 10:41:02 +00001028# does this compiler support -mmmx ?
1029AC_MSG_CHECKING([if gcc accepts -mmmx])
1030
1031safe_CFLAGS=$CFLAGS
1032CFLAGS="-mmmx"
1033
1034AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001035 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001036],
1037[
1038FLAG_MMMX="-mmmx"
1039AC_MSG_RESULT([yes])
1040], [
1041FLAG_MMMX=""
1042AC_MSG_RESULT([no])
1043])
1044CFLAGS=$safe_CFLAGS
1045
1046AC_SUBST(FLAG_MMMX)
1047
1048
1049# does this compiler support -msse ?
1050AC_MSG_CHECKING([if gcc accepts -msse])
1051
1052safe_CFLAGS=$CFLAGS
1053CFLAGS="-msse"
1054
1055AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001056 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001057],
1058[
1059FLAG_MSSE="-msse"
1060AC_MSG_RESULT([yes])
1061], [
1062FLAG_MSSE=""
1063AC_MSG_RESULT([no])
1064])
1065CFLAGS=$safe_CFLAGS
1066
1067AC_SUBST(FLAG_MSSE)
1068
1069
sewardj5b754b42002-06-03 22:53:35 +00001070# does this compiler support -mpreferred-stack-boundary=2 ?
1071AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
1072
daywalker3664f562003-10-17 13:43:46 +00001073safe_CFLAGS=$CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001074CFLAGS="-mpreferred-stack-boundary=2"
1075
1076AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001077 return 0;
sewardj5b754b42002-06-03 22:53:35 +00001078],
1079[
1080PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
daywalker3664f562003-10-17 13:43:46 +00001081AC_MSG_RESULT([yes])
sewardj5b754b42002-06-03 22:53:35 +00001082], [
1083PREFERRED_STACK_BOUNDARY=""
1084AC_MSG_RESULT([no])
1085])
daywalker3664f562003-10-17 13:43:46 +00001086CFLAGS=$safe_CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001087
1088AC_SUBST(PREFERRED_STACK_BOUNDARY)
1089
sewardj535c50f2005-06-04 23:14:53 +00001090
sewardjb5f6f512005-03-10 23:59:00 +00001091# does this compiler support -Wno-pointer-sign ?
bart56730cd2008-05-11 06:41:46 +00001092AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign])
sewardjb5f6f512005-03-10 23:59:00 +00001093
1094safe_CFLAGS=$CFLAGS
1095CFLAGS="-Wno-pointer-sign"
1096
1097AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001098 return 0;
sewardjb5f6f512005-03-10 23:59:00 +00001099],
1100[
1101no_pointer_sign=yes
1102AC_MSG_RESULT([yes])
1103], [
1104no_pointer_sign=no
1105AC_MSG_RESULT([no])
1106])
1107CFLAGS=$safe_CFLAGS
1108
1109if test x$no_pointer_sign = xyes; then
1110 CFLAGS="$CFLAGS -Wno-pointer-sign"
1111fi
1112
sewardj535c50f2005-06-04 23:14:53 +00001113
tom1e946682005-10-12 11:27:33 +00001114# does this compiler support -Wdeclaration-after-statement ?
bart56730cd2008-05-11 06:41:46 +00001115AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement])
tom1e946682005-10-12 11:27:33 +00001116
1117safe_CFLAGS=$CFLAGS
1118CFLAGS="-Wdeclaration-after-statement"
1119
1120AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001121 return 0;
tom1e946682005-10-12 11:27:33 +00001122],
1123[
tome9814c32005-10-12 11:30:43 +00001124declaration_after_statement=yes
sewardj72a547e2006-01-25 02:58:28 +00001125FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement"
tom1e946682005-10-12 11:27:33 +00001126AC_MSG_RESULT([yes])
1127], [
tome9814c32005-10-12 11:30:43 +00001128declaration_after_statement=no
sewardj72a547e2006-01-25 02:58:28 +00001129FLAG_WDECL_AFTER_STMT=""
tom1e946682005-10-12 11:27:33 +00001130AC_MSG_RESULT([no])
1131])
1132CFLAGS=$safe_CFLAGS
1133
sewardj72a547e2006-01-25 02:58:28 +00001134AC_SUBST(FLAG_WDECL_AFTER_STMT)
1135
tome9814c32005-10-12 11:30:43 +00001136if test x$declaration_after_statement = xyes; then
tom1e946682005-10-12 11:27:33 +00001137 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1138fi
1139
sewardj00f1e622006-03-12 16:47:10 +00001140
bart9d865fa2008-06-23 12:11:49 +00001141# does this compiler support -Wno-format-zero-length ?
1142
1143AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
1144
1145safe_CFLAGS=$CFLAGS
1146CFLAGS="-Wno-format-zero-length"
1147
1148AC_TRY_COMPILE(
1149[ ],
1150[
1151 return 0;
1152],
1153[
1154AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
1155AC_MSG_RESULT([yes])
1156],
1157[
1158AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
1159AC_MSG_RESULT([no])
1160])
1161CFLAGS=$safe_CFLAGS
1162
1163
bart56730cd2008-05-11 06:41:46 +00001164# does this compiler support -Wextra or the older -W ?
1165
1166AC_MSG_CHECKING([if gcc accepts -Wextra or -W])
1167
1168safe_CFLAGS=$CFLAGS
1169CFLAGS="-Wextra"
1170
1171AC_TRY_COMPILE(
1172[ ],
1173[
1174 return 0;
1175],
1176[
1177AC_SUBST([FLAG_W_EXTRA], [-Wextra])
1178AC_MSG_RESULT([-Wextra])
1179], [
1180 CFLAGS="-W"
1181 AC_TRY_COMPILE(
1182 [ ],
1183 [
1184 return 0;
1185 ],
1186 [
1187 AC_SUBST([FLAG_W_EXTRA], [-W])
1188 AC_MSG_RESULT([-W])
1189 ], [
1190 AC_SUBST([FLAG_W_EXTRA], [])
1191 AC_MSG_RESULT([not supported])
1192 ])
1193])
1194CFLAGS=$safe_CFLAGS
1195
1196
sewardja72c26d2007-05-01 13:44:08 +00001197# does this compiler support -fno-stack-protector ?
bart56730cd2008-05-11 06:41:46 +00001198AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
sewardja72c26d2007-05-01 13:44:08 +00001199
1200safe_CFLAGS=$CFLAGS
1201CFLAGS="-fno-stack-protector"
1202
1203AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001204 return 0;
sewardja72c26d2007-05-01 13:44:08 +00001205],
1206[
1207no_stack_protector=yes
1208FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
1209AC_MSG_RESULT([yes])
1210], [
1211no_stack_protector=no
1212FLAG_FNO_STACK_PROTECTOR=""
1213AC_MSG_RESULT([no])
1214])
1215CFLAGS=$safe_CFLAGS
1216
1217AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
1218
1219if test x$no_stack_protector = xyes; then
1220 CFLAGS="$CFLAGS -fno-stack-protector"
1221fi
1222
1223
bart56730cd2008-05-11 06:41:46 +00001224# does this compiler support --param inline-unit-growth=... ?
1225
1226AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth])
1227
1228safe_CFLAGS=$CFLAGS
1229CFLAGS="--param inline-unit-growth=900"
1230
1231AC_TRY_COMPILE(
1232[ ],
1233[
1234 return 0;
1235],
1236[
1237AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
1238 ["--param inline-unit-growth=900"])
1239AC_MSG_RESULT([yes])
1240], [
1241AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""])
1242AC_MSG_RESULT([no])
1243])
1244CFLAGS=$safe_CFLAGS
1245
1246
tomd55121e2005-12-19 12:40:13 +00001247# does this compiler support __builtin_expect?
1248AC_MSG_CHECKING([if gcc supports __builtin_expect])
bart56730cd2008-05-11 06:41:46 +00001249
tomd55121e2005-12-19 12:40:13 +00001250AC_TRY_LINK(, [
1251return __builtin_expect(1, 1) ? 1 : 0
1252],
1253[
1254ac_have_builtin_expect=yes
1255AC_MSG_RESULT([yes])
1256], [
1257ac_have_builtin_expect=no
1258AC_MSG_RESULT([no])
1259])
1260if test x$ac_have_builtin_expect = xyes ; then
1261 AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.])
1262fi
1263
tom1e946682005-10-12 11:27:33 +00001264
sewardj00f1e622006-03-12 16:47:10 +00001265# does the ppc assembler support "mtocrf" et al?
1266AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
1267
1268AC_TRY_COMPILE(, [
sewardjdd4cbe12006-03-12 17:27:44 +00001269__asm__ __volatile__("mtocrf 4,0");
1270__asm__ __volatile__("mfocrf 0,4");
sewardj00f1e622006-03-12 16:47:10 +00001271],
1272[
1273ac_have_as_ppc_mftocrf=yes
1274AC_MSG_RESULT([yes])
1275], [
1276ac_have_as_ppc_mftocrf=no
1277AC_MSG_RESULT([no])
1278])
1279if test x$ac_have_as_ppc_mftocrf = xyes ; then
1280 AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.])
1281fi
1282
1283
sewardjf0aabf82007-03-22 00:24:21 +00001284# does the x86/amd64 assembler understand SSE3 instructions?
sewardjfa18a262007-03-22 12:13:13 +00001285# Note, this doesn't generate a C-level symbol. It generates a
1286# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
sewardjf0aabf82007-03-22 00:24:21 +00001287AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
1288
1289AC_TRY_COMPILE(, [
1290 do { long long int x;
1291 __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
1292 while (0)
1293],
1294[
1295ac_have_as_sse3=yes
1296AC_MSG_RESULT([yes])
1297], [
1298ac_have_as_sse3=no
1299AC_MSG_RESULT([no])
1300])
sewardjfa18a262007-03-22 12:13:13 +00001301
1302AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
sewardjf0aabf82007-03-22 00:24:21 +00001303
1304
sewardj6d6da5b2008-02-09 12:07:40 +00001305# Ditto for SSSE3 instructions (note extra S)
1306# Note, this doesn't generate a C-level symbol. It generates a
1307# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
1308AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
1309
1310AC_TRY_COMPILE(, [
1311 do { long long int x;
1312 __asm__ __volatile__(
1313 "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
1314 while (0)
1315],
1316[
1317ac_have_as_ssse3=yes
1318AC_MSG_RESULT([yes])
1319], [
1320ac_have_as_ssse3=no
1321AC_MSG_RESULT([no])
1322])
1323
1324AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
1325
1326
sewardjb5f6f512005-03-10 23:59:00 +00001327# Check for TLS support in the compiler and linker
bartca9f2ad2008-06-02 07:14:20 +00001328if test "x${cross_compiling}" = "xno"; then
1329# Native compilation: check whether running a program using TLS succeeds.
1330# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
1331# succeeds but running programs using TLS fails.
1332AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1333 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1334 [vg_cv_tls=$enableval],
1335 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
1336 [[return foo;]])],
1337 [vg_cv_tls=yes],
1338 [vg_cv_tls=no])])])
1339else
1340# Cross-compiling: check whether linking a program using TLS succeeds.
sewardjb5f6f512005-03-10 23:59:00 +00001341AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1342 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1343 [vg_cv_tls=$enableval],
bartcddeaf52008-05-25 15:58:11 +00001344 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
sewardjb5f6f512005-03-10 23:59:00 +00001345 [[return foo;]])],
1346 [vg_cv_tls=yes],
1347 [vg_cv_tls=no])])])
bartca9f2ad2008-06-02 07:14:20 +00001348fi
sewardjb5f6f512005-03-10 23:59:00 +00001349
1350if test "$vg_cv_tls" = yes; then
1351AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
1352fi
sewardj5b754b42002-06-03 22:53:35 +00001353
sewardj535c50f2005-06-04 23:14:53 +00001354
njn7fd6d382009-01-22 21:56:32 +00001355#----------------------------------------------------------------------------
bart62f54e42008-07-28 11:35:10 +00001356# Checks for C header files.
njn7fd6d382009-01-22 21:56:32 +00001357#----------------------------------------------------------------------------
1358
sewardjde4a1d02002-03-22 01:27:54 +00001359AC_HEADER_STDC
bartf5ceec82008-04-26 07:45:10 +00001360AC_CHECK_HEADERS([ \
bart1f2b1432009-01-16 12:06:54 +00001361 asm/unistd.h \
bartf5ceec82008-04-26 07:45:10 +00001362 endian.h \
1363 mqueue.h \
1364 sys/endian.h \
1365 sys/epoll.h \
1366 sys/eventfd.h \
bartce48fa92008-04-26 10:59:46 +00001367 sys/klog.h \
bartf5ceec82008-04-26 07:45:10 +00001368 sys/poll.h \
bart71bad292008-04-27 11:43:23 +00001369 sys/signal.h \
bartf5ceec82008-04-26 07:45:10 +00001370 sys/signalfd.h \
bart71bad292008-04-27 11:43:23 +00001371 sys/syscall.h \
1372 sys/time.h \
1373 sys/types.h \
bartf5ceec82008-04-26 07:45:10 +00001374 ])
sewardjde4a1d02002-03-22 01:27:54 +00001375
njn7fd6d382009-01-22 21:56:32 +00001376#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001377# Checks for typedefs, structures, and compiler characteristics.
njn7fd6d382009-01-22 21:56:32 +00001378#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001379AC_TYPE_UID_T
1380AC_TYPE_OFF_T
1381AC_TYPE_SIZE_T
1382AC_HEADER_TIME
1383
sewardj535c50f2005-06-04 23:14:53 +00001384
njn7fd6d382009-01-22 21:56:32 +00001385#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001386# Checks for library functions.
njn7fd6d382009-01-22 21:56:32 +00001387#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001388AC_FUNC_MEMCMP
1389AC_FUNC_MMAP
1390AC_TYPE_SIGNAL
1391
bart71bad292008-04-27 11:43:23 +00001392AC_CHECK_LIB([rt], [clock_gettime])
bart41ac62a2008-07-07 16:58:03 +00001393
bartf5ceec82008-04-26 07:45:10 +00001394AC_CHECK_FUNCS([ \
bart71bad292008-04-27 11:43:23 +00001395 clock_gettime\
bartf5ceec82008-04-26 07:45:10 +00001396 epoll_create \
1397 epoll_pwait \
bartf5ceec82008-04-26 07:45:10 +00001398 floor \
bartce48fa92008-04-26 10:59:46 +00001399 klogctl \
bartf5ceec82008-04-26 07:45:10 +00001400 mallinfo \
1401 memchr \
1402 memset \
1403 mkdir \
1404 ppoll \
bart6d45e922009-01-20 13:45:38 +00001405 pthread_barrier_init \
1406 pthread_condattr_setclock \
1407 pthread_mutex_timedlock \
1408 pthread_rwlock_timedrdlock \
1409 pthread_rwlock_timedwrlock \
1410 pthread_spin_lock \
bartf5ceec82008-04-26 07:45:10 +00001411 semtimedop \
1412 signalfd \
njn6cc22472009-03-16 03:46:48 +00001413 sigwaitinfo \
bart71bad292008-04-27 11:43:23 +00001414 syscall \
bartf5ceec82008-04-26 07:45:10 +00001415 strchr \
1416 strdup \
1417 strpbrk \
1418 strrchr \
1419 strstr \
1420 timerfd \
1421 utimensat \
1422 ])
sewardjde4a1d02002-03-22 01:27:54 +00001423
bart623eec32008-07-29 17:54:49 +00001424# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
1425# libraries with any shared object and/or executable. This is NOT what we
1426# want for e.g. vgpreload_core-x86-linux.so
1427LIBS=""
sewardj80637752006-03-02 13:48:21 +00001428
bart6d45e922009-01-20 13:45:38 +00001429AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
1430 [test x$ac_cv_func_pthread_barrier_init = xyes])
bart2eaa8f22009-01-20 14:01:16 +00001431AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK],
1432 [test x$ac_cv_func_pthread_mutex_timedlock = xyes])
bart6d45e922009-01-20 13:45:38 +00001433AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
1434 [test x$ac_cv_func_pthread_spin_lock = xyes])
1435
njn7fd6d382009-01-22 21:56:32 +00001436
1437#----------------------------------------------------------------------------
1438# MPI checks
1439#----------------------------------------------------------------------------
sewardj03d86f22006-10-17 00:57:24 +00001440# Do we have a useable MPI setup on the primary and/or secondary targets?
1441# On Linux, by default, assumes mpicc and -m32/-m64
1442# On AIX, by default, assumes mpxlc and -q32/-q64
sewardje9fa5062006-03-12 18:29:18 +00001443# Note: this is a kludge in that it assumes the specified mpicc
sewardj03d86f22006-10-17 00:57:24 +00001444# understands -m32/-m64/-q32/-q64 regardless of what is specified using
1445# --with-mpicc=.
sewardj0ad46092006-03-02 17:09:16 +00001446MPI_CC="mpicc"
njn7fd6d382009-01-22 21:56:32 +00001447if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
1448 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001449 MPI_CC="mpxlc"
1450fi
1451
sewardje9fa5062006-03-12 18:29:18 +00001452mflag_primary=
njn7fd6d382009-01-22 21:56:32 +00001453if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
1454 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001455 mflag_primary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001456elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
1457 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001458 mflag_primary=$FLAG_M64
njn7fd6d382009-01-22 21:56:32 +00001459elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001460 mflag_primary=-q32
njn7fd6d382009-01-22 21:56:32 +00001461elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001462 mflag_primary=-q64
sewardje9fa5062006-03-12 18:29:18 +00001463fi
1464
sewardj03d86f22006-10-17 00:57:24 +00001465mflag_secondary=
njn7fd6d382009-01-22 21:56:32 +00001466if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
1467 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
sewardj03d86f22006-10-17 00:57:24 +00001468 mflag_secondary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001469elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001470 mflag_secondary=-q32
1471fi
1472
1473
sewardj0ad46092006-03-02 17:09:16 +00001474AC_ARG_WITH(mpicc,
sewardjb70a6132006-05-27 21:14:09 +00001475 [ --with-mpicc= Specify name of MPI2-ised C compiler],
sewardj0ad46092006-03-02 17:09:16 +00001476 MPI_CC=$withval
1477)
sewardj03d86f22006-10-17 00:57:24 +00001478AC_SUBST(MPI_CC)
1479
1480## See if MPI_CC works for the primary target
1481##
1482AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
sewardj0ad46092006-03-02 17:09:16 +00001483saved_CC=$CC
sewardjde4f3842006-03-09 02:41:41 +00001484saved_CFLAGS=$CFLAGS
sewardj0ad46092006-03-02 17:09:16 +00001485CC=$MPI_CC
sewardje9fa5062006-03-12 18:29:18 +00001486CFLAGS=$mflag_primary
sewardjd3fcc642006-03-09 02:49:56 +00001487AC_TRY_LINK([
sewardj1a85e602006-03-08 15:26:10 +00001488#include <mpi.h>
1489#include <stdio.h>
sewardjde4f3842006-03-09 02:41:41 +00001490],[
1491 int r = MPI_Init(NULL,NULL);
1492 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1493 return r;
1494], [
sewardj03d86f22006-10-17 00:57:24 +00001495ac_have_mpi2_pri=yes
sewardj1a85e602006-03-08 15:26:10 +00001496AC_MSG_RESULT([yes, $MPI_CC])
sewardj80637752006-03-02 13:48:21 +00001497], [
sewardj03d86f22006-10-17 00:57:24 +00001498ac_have_mpi2_pri=no
sewardj80637752006-03-02 13:48:21 +00001499AC_MSG_RESULT([no])
1500])
sewardj0ad46092006-03-02 17:09:16 +00001501CC=$saved_CC
sewardjde4f3842006-03-09 02:41:41 +00001502CFLAGS=$saved_CFLAGS
sewardj03d86f22006-10-17 00:57:24 +00001503AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
sewardj80637752006-03-02 13:48:21 +00001504
sewardj03d86f22006-10-17 00:57:24 +00001505## See if MPI_CC works for the secondary target. Complication: what if
1506## there is no secondary target? We need this to then fail.
1507## Kludge this by making MPI_CC something which will surely fail in
1508## such a case.
1509##
1510AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
1511saved_CC=$CC
1512saved_CFLAGS=$CFLAGS
njn7fd6d382009-01-22 21:56:32 +00001513if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
sewardj03d86f22006-10-17 00:57:24 +00001514 CC="$MPI_CC this will surely fail"
1515else
1516 CC=$MPI_CC
1517fi
1518CFLAGS=$mflag_secondary
1519AC_TRY_LINK([
1520#include <mpi.h>
1521#include <stdio.h>
1522],[
1523 int r = MPI_Init(NULL,NULL);
1524 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1525 return r;
1526], [
1527ac_have_mpi2_sec=yes
1528AC_MSG_RESULT([yes, $MPI_CC])
1529], [
1530ac_have_mpi2_sec=no
1531AC_MSG_RESULT([no])
1532])
1533CC=$saved_CC
1534CFLAGS=$saved_CFLAGS
1535AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
sewardj80637752006-03-02 13:48:21 +00001536
1537
njn7fd6d382009-01-22 21:56:32 +00001538#----------------------------------------------------------------------------
1539# Other library checks
1540#----------------------------------------------------------------------------
sewardj493c4ef2008-12-13 16:45:19 +00001541# There now follow some tests for QtCore, Boost, and OpenMP. These
1542# tests are present because Drd has some regression tests that use
1543# these packages. All regression test programs all compiled only
1544# for the primary target. And so it is important that the configure
1545# checks that follow, use the correct -m32 or -m64 flag for the
1546# primary target (called $mflag_primary). Otherwise, we can end up
1547# in a situation (eg) where, on amd64-linux, the test for Boost checks
1548# for usable 64-bit Boost facilities, but because we are doing a 32-bit
1549# only build (meaning, the primary target is x86-linux), the build
1550# of the regtest programs that use Boost fails, because they are
1551# build as 32-bit (IN THIS EXAMPLE).
1552#
1553# Hence: ALWAYS USE $mflag_primary FOR CONFIGURE TESTS FOR FACILITIES
1554# NEEDED BY THE REGRESSION TEST PROGRAMS.
1555
1556
bart21d3cfc2008-08-02 09:08:17 +00001557# The test below verifies whether the QtCore package been installed.
1558# This test works as follows:
1559# - If pkg-config was not installed at the time autogen.sh was run,
1560# the definition of the PKG_CHECK_EXISTS() macro will not be found by
1561# autogen.sh. Augogen.sh will generate a configure script that prints
1562# a warning about pkg-config and proceeds as if Qt4 has not been installed.
1563# - If pkg-config was installed at the time autogen.sh was run,
1564# the generated configure script will try to detect the presence of the
1565# Qt4 QtCore library by looking up compile and linker flags in the file
1566# called QtCore.pc.
1567# - pkg-config settings can be overridden via the configure variables
1568# QTCORE_CFLAGS and QTCORE_LIBS (added by the pkg-config m4 macro's to the
1569# configure script -- see also ./configure --help).
1570# - The QTCORE_CFLAGS and QTCORE_LIBS configure variables can be used even if
1571# the pkg-config executable is not present on the system on which the
1572# configure script is run.
bart41ac62a2008-07-07 16:58:03 +00001573
bart21d3cfc2008-08-02 09:08:17 +00001574ifdef(
1575 [PKG_CHECK_EXISTS],
1576 [PKG_CHECK_EXISTS(
1577 [QtCore],
1578 [
1579 PKG_CHECK_MODULES([QTCORE], [QtCore])
bart11fbd892008-09-21 15:00:58 +00001580 # Paranoia: don't trust the result reported by pkg-config, but when
1581 # pkg-config reports that QtCore has been found, verify whether linking
1582 # programs with QtCore succeeds.
1583 AC_LANG(C++)
1584 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001585 CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
bart11fbd892008-09-21 15:00:58 +00001586 AC_TRY_LINK(
1587 [#include <QMutex>],
1588 [QMutex Mutex;],
1589 [ac_have_qtcore=yes],
1590 [
1591 AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
1592 ac_have_qtcore=no
1593 ]
1594 )
1595 CXXFLAGS="${safe_CXXFLAGS}"
bart21d3cfc2008-08-02 09:08:17 +00001596 ],
1597 [
1598 ac_have_qtcore=no
1599 ]
1600 )
1601 ],
1602 AC_MSG_WARN([pkg-config has not been installed or is too old.])
1603 AC_MSG_WARN([Detection of Qt4 will be skipped.])
1604 [ac_have_qtcore=no]
1605)
bart41ac62a2008-07-07 16:58:03 +00001606
1607AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])
1608
1609
bart62f54e42008-07-28 11:35:10 +00001610# Test for QMutex::tryLock(int), which has been introduced in Qt 4.3.
1611# See also http://doc.trolltech.com/4.3/qmutex.html.
1612if test x$ac_have_qtcore = xyes; then
1613 AC_MSG_CHECKING([for Qt4 QMutex::tryLock(int)])
1614 AC_LANG(C++)
bart21d3cfc2008-08-02 09:08:17 +00001615 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001616 CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary"
bart62f54e42008-07-28 11:35:10 +00001617 AC_TRY_COMPILE([
1618 #include <QtCore/QMutex>
1619 ],
1620 [
1621 QMutex M;
1622 M.tryLock(1);
1623 M.unlock();
1624 return 0;
1625 ],
1626 [
1627 AC_MSG_RESULT([yes])
1628 AC_DEFINE([HAVE_QTCORE_QMUTEX_TRYLOCK_INT], [1], [Define to 1 if the installed version of Qt4 provides QMutex::tryLock(int).])
1629 ],
1630 [
1631 AC_MSG_RESULT([no])
1632 ])
bart21d3cfc2008-08-02 09:08:17 +00001633 CXXFLAGS="${safe_CXXFLAGS}"
bart62f54e42008-07-28 11:35:10 +00001634 AC_LANG(C)
1635fi
1636
1637
sewardj493c4ef2008-12-13 16:45:19 +00001638# Check whether the boost library 1.35 or later has been installed.
1639# The Boost.Threads library has undergone a major rewrite in version 1.35.0.
1640
1641AC_MSG_CHECKING([for boost])
1642
1643AC_LANG(C++)
1644safe_CXXFLAGS=$CXXFLAGS
1645CXXFLAGS="-lboost_thread-mt $mflag_primary"
1646
1647AC_LINK_IFELSE(
1648[
1649#include <boost/thread.hpp>
1650static void thread_func(void)
1651{ }
1652int main(int argc, char** argv)
1653{
1654 boost::thread t(thread_func);
1655 return 0;
1656}
1657],
1658[
1659ac_have_boost_1_35=yes
1660AC_SUBST([BOOST_CFLAGS], [])
1661AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"])
1662AC_MSG_RESULT([yes])
1663], [
1664ac_have_boost_1_35=no
1665AC_MSG_RESULT([no])
1666])
1667
1668CXXFLAGS=$safe_CXXFLAGS
1669AC_LANG(C)
1670
1671AM_CONDITIONAL([HAVE_BOOST_1_35], [test x$ac_have_boost_1_35 = xyes])
1672
1673
1674# does this compiler support -fopenmp, does it have the include file
1675# <omp.h> and does it have libgomp ?
1676
1677AC_MSG_CHECKING([for OpenMP])
1678
1679safe_CFLAGS=$CFLAGS
sewardjc876a2f2009-01-22 22:44:30 +00001680CFLAGS="-fopenmp $mflag_primary"
sewardj493c4ef2008-12-13 16:45:19 +00001681
1682AC_LINK_IFELSE(
1683[
1684#include <omp.h>
1685int main(int argc, char** argv)
1686{
1687 omp_set_dynamic(0);
1688 return 0;
1689}
1690],
1691[
1692ac_have_openmp=yes
1693AC_MSG_RESULT([yes])
1694], [
1695ac_have_openmp=no
1696AC_MSG_RESULT([no])
1697])
1698CFLAGS=$safe_CFLAGS
1699
1700AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
1701
1702
sewardjc876a2f2009-01-22 22:44:30 +00001703# does this compiler have built-in functions for atomic memory access ?
1704AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
1705
1706safe_CFLAGS=$CFLAGS
1707CFLAGS="$mflag_primary"
1708
1709AC_TRY_LINK(,
1710[
1711 int variable = 1;
1712 return (__sync_bool_compare_and_swap(&variable, 1, 2)
1713 && __sync_add_and_fetch(&variable, 1) ? 1 : 0)
1714],
1715[
1716 AC_MSG_RESULT([yes])
1717 AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
1718],
1719[
1720 AC_MSG_RESULT([no])
1721])
1722
1723CFLAGS=$safe_CFLAGS
1724
1725
njn7fd6d382009-01-22 21:56:32 +00001726#----------------------------------------------------------------------------
1727# Ok. We're done checking.
1728#----------------------------------------------------------------------------
sewardj80637752006-03-02 13:48:21 +00001729
gobrye721a522002-03-22 13:38:30 +00001730AC_OUTPUT(
sewardjde4a1d02002-03-22 01:27:54 +00001731 Makefile
njn25cac76cb2002-09-23 11:21:57 +00001732 valgrind.spec
muellerbddd6072003-11-19 21:50:07 +00001733 valgrind.pc
dirk07596a22008-04-25 11:33:30 +00001734 glibc-2.X.supp
njn254d542432002-09-23 16:09:39 +00001735 docs/Makefile
njn3e986b22004-11-30 10:43:45 +00001736 docs/lib/Makefile
1737 docs/images/Makefile
njnf7c00b12005-07-19 21:46:19 +00001738 docs/internals/Makefile
njn3e986b22004-11-30 10:43:45 +00001739 docs/xml/Makefile
njn254d542432002-09-23 16:09:39 +00001740 tests/Makefile
njnc2e7f482002-09-27 08:44:17 +00001741 tests/vg_regtest
njnec0c27a2005-12-10 23:11:28 +00001742 perf/Makefile
1743 perf/vg_perf
njn254d542432002-09-23 16:09:39 +00001744 include/Makefile
sewardj0f8881b2006-10-18 01:16:57 +00001745 include/vki/Makefile
njn7a6e7462002-11-09 17:53:30 +00001746 auxprogs/Makefile
njn25ab726032002-09-23 16:24:41 +00001747 coregrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001748 memcheck/Makefile
1749 memcheck/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001750 memcheck/tests/amd64/Makefile
njnc6168192004-11-29 13:54:10 +00001751 memcheck/tests/x86/Makefile
njn3b3b76d2009-01-19 03:44:19 +00001752 memcheck/tests/linux/Makefile
njna454ec02009-01-19 03:16:59 +00001753 memcheck/tests/x86-linux/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001754 memcheck/docs/Makefile
1755 cachegrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001756 cachegrind/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001757 cachegrind/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001758 cachegrind/docs/Makefile
njnf2df9b52002-10-04 11:35:47 +00001759 cachegrind/cg_annotate
weidendoa17f2a32006-03-20 10:27:30 +00001760 callgrind/Makefile
1761 callgrind/callgrind_annotate
1762 callgrind/callgrind_control
1763 callgrind/tests/Makefile
1764 callgrind/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001765 helgrind/Makefile
njnf2df9b52002-10-04 11:35:47 +00001766 helgrind/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001767 helgrind/docs/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001768 massif/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001769 massif/tests/Makefile
njn734b8052007-11-01 04:40:37 +00001770 massif/perf/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001771 massif/docs/Makefile
njnd5a8d242007-11-02 20:44:57 +00001772 massif/ms_print
njn25cac76cb2002-09-23 11:21:57 +00001773 lackey/Makefile
njnf2df9b52002-10-04 11:35:47 +00001774 lackey/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001775 lackey/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001776 none/Makefile
1777 none/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001778 none/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001779 none/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001780 none/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001781 none/tests/x86/Makefile
njn0458a122009-02-13 06:23:46 +00001782 none/tests/linux/Makefile
njn06ca3322009-04-15 23:10:04 +00001783 none/tests/x86-linux/Makefile
njn9bc8c002002-10-02 13:49:13 +00001784 none/docs/Makefile
sewardj99a2ceb2007-11-09 12:30:36 +00001785 exp-omega/Makefile
1786 exp-omega/tests/Makefile
1787 exp-omega/docs/Makefile
sewardj9c606bd2008-09-18 18:12:50 +00001788 exp-ptrcheck/Makefile
1789 exp-ptrcheck/tests/Makefile
1790 exp-ptrcheck/docs/Makefile
bartccf17de2008-07-04 15:14:35 +00001791 drd/Makefile
1792 drd/docs/Makefile
1793 drd/scripts/download-and-build-splash2
1794 drd/tests/Makefile
bart0b2b4622008-06-17 19:19:16 +00001795)
gobry3b777892002-04-04 09:18:39 +00001796
1797cat<<EOF
1798
njn311303f2009-02-06 03:46:50 +00001799 Maximum build arch: ${ARCH_MAX}
1800 Primary build arch: ${VGCONF_ARCH_PRI}
1801 Build OS: ${VGCONF_OS}
njn7fd6d382009-01-22 21:56:32 +00001802 Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
1803 Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
sewardje95d94f2008-09-19 09:02:19 +00001804 Default supp files: ${DEFAULT_SUPP}
gobry3b777892002-04-04 09:18:39 +00001805
gobry3b777892002-04-04 09:18:39 +00001806EOF