blob: 59f4f2d930c25d93e11bffbc0196173604afcd76 [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
70 AC_PATH_PROGS([AR], ["${LD%ld}ar" "ar"], [ar])
71fi
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
barta50aa8a2008-04-27 06:06:57 +0000886# Check for eventfd_t, eventfd() and eventfd_read()
887AC_MSG_CHECKING([for eventfd()])
888
889AC_TRY_LINK(
890[
891#include <sys/eventfd.h>
892], [
893 eventfd_t ev;
894 int fd;
895
896 fd = eventfd(5, 0);
897 eventfd_read(fd, &ev);
898 return 0;
899],
900[
901AC_MSG_RESULT([yes])
902AC_DEFINE([HAVE_EVENTFD], 1,
903 [Define to 1 if you have the `eventfd' function.])
904AC_DEFINE([HAVE_EVENTFD_READ], 1,
905 [Define to 1 if you have the `eventfd_read' function.])
906], [
907AC_MSG_RESULT([no])
908])
909
910
njn7fd6d382009-01-22 21:56:32 +0000911#----------------------------------------------------------------------------
912# Checking for supported compiler flags.
913#----------------------------------------------------------------------------
914
sewardj535c50f2005-06-04 23:14:53 +0000915# does this compiler support -m32 ?
916AC_MSG_CHECKING([if gcc accepts -m32])
917
918safe_CFLAGS=$CFLAGS
919CFLAGS="-m32"
920
921AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000922 return 0;
sewardj535c50f2005-06-04 23:14:53 +0000923],
924[
925FLAG_M32="-m32"
926AC_MSG_RESULT([yes])
927], [
928FLAG_M32=""
929AC_MSG_RESULT([no])
930])
931CFLAGS=$safe_CFLAGS
932
933AC_SUBST(FLAG_M32)
934
935
sewardj03d86f22006-10-17 00:57:24 +0000936# does this compiler support -maix32 ?
937AC_MSG_CHECKING([if gcc accepts -maix32])
938
939safe_CFLAGS=$CFLAGS
940CFLAGS="-maix32"
941
942AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000943 return 0;
sewardj03d86f22006-10-17 00:57:24 +0000944],
945[
946FLAG_MAIX32="-maix32"
947AC_MSG_RESULT([yes])
948], [
949FLAG_MAIX32=""
950AC_MSG_RESULT([no])
951])
952CFLAGS=$safe_CFLAGS
953
954AC_SUBST(FLAG_MAIX32)
955
956
sewardj01262142006-01-04 01:20:28 +0000957# does this compiler support -m64 ?
958AC_MSG_CHECKING([if gcc accepts -m64])
959
960safe_CFLAGS=$CFLAGS
961CFLAGS="-m64"
962
963AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000964 return 0;
sewardj01262142006-01-04 01:20:28 +0000965],
966[
967FLAG_M64="-m64"
968AC_MSG_RESULT([yes])
969], [
970FLAG_M64=""
971AC_MSG_RESULT([no])
972])
973CFLAGS=$safe_CFLAGS
974
975AC_SUBST(FLAG_M64)
976
977
sewardj03d86f22006-10-17 00:57:24 +0000978# does this compiler support -maix64 ?
979AC_MSG_CHECKING([if gcc accepts -maix64])
980
981safe_CFLAGS=$CFLAGS
982CFLAGS="-maix64"
983
984AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +0000985 return 0;
sewardj03d86f22006-10-17 00:57:24 +0000986],
987[
988FLAG_MAIX64="-maix64"
989AC_MSG_RESULT([yes])
990], [
991FLAG_MAIX64=""
992AC_MSG_RESULT([no])
993])
994CFLAGS=$safe_CFLAGS
995
996AC_SUBST(FLAG_MAIX64)
997
998
sewardj67f1fcc2005-07-03 10:41:02 +0000999# does this compiler support -mmmx ?
1000AC_MSG_CHECKING([if gcc accepts -mmmx])
1001
1002safe_CFLAGS=$CFLAGS
1003CFLAGS="-mmmx"
1004
1005AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001006 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001007],
1008[
1009FLAG_MMMX="-mmmx"
1010AC_MSG_RESULT([yes])
1011], [
1012FLAG_MMMX=""
1013AC_MSG_RESULT([no])
1014])
1015CFLAGS=$safe_CFLAGS
1016
1017AC_SUBST(FLAG_MMMX)
1018
1019
1020# does this compiler support -msse ?
1021AC_MSG_CHECKING([if gcc accepts -msse])
1022
1023safe_CFLAGS=$CFLAGS
1024CFLAGS="-msse"
1025
1026AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001027 return 0;
sewardj67f1fcc2005-07-03 10:41:02 +00001028],
1029[
1030FLAG_MSSE="-msse"
1031AC_MSG_RESULT([yes])
1032], [
1033FLAG_MSSE=""
1034AC_MSG_RESULT([no])
1035])
1036CFLAGS=$safe_CFLAGS
1037
1038AC_SUBST(FLAG_MSSE)
1039
1040
sewardj5b754b42002-06-03 22:53:35 +00001041# does this compiler support -mpreferred-stack-boundary=2 ?
1042AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
1043
daywalker3664f562003-10-17 13:43:46 +00001044safe_CFLAGS=$CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001045CFLAGS="-mpreferred-stack-boundary=2"
1046
1047AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001048 return 0;
sewardj5b754b42002-06-03 22:53:35 +00001049],
1050[
1051PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
daywalker3664f562003-10-17 13:43:46 +00001052AC_MSG_RESULT([yes])
sewardj5b754b42002-06-03 22:53:35 +00001053], [
1054PREFERRED_STACK_BOUNDARY=""
1055AC_MSG_RESULT([no])
1056])
daywalker3664f562003-10-17 13:43:46 +00001057CFLAGS=$safe_CFLAGS
sewardj5b754b42002-06-03 22:53:35 +00001058
1059AC_SUBST(PREFERRED_STACK_BOUNDARY)
1060
sewardj535c50f2005-06-04 23:14:53 +00001061
sewardjb5f6f512005-03-10 23:59:00 +00001062# does this compiler support -Wno-pointer-sign ?
bart56730cd2008-05-11 06:41:46 +00001063AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign])
sewardjb5f6f512005-03-10 23:59:00 +00001064
1065safe_CFLAGS=$CFLAGS
1066CFLAGS="-Wno-pointer-sign"
1067
1068AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001069 return 0;
sewardjb5f6f512005-03-10 23:59:00 +00001070],
1071[
1072no_pointer_sign=yes
1073AC_MSG_RESULT([yes])
1074], [
1075no_pointer_sign=no
1076AC_MSG_RESULT([no])
1077])
1078CFLAGS=$safe_CFLAGS
1079
1080if test x$no_pointer_sign = xyes; then
1081 CFLAGS="$CFLAGS -Wno-pointer-sign"
1082fi
1083
sewardj535c50f2005-06-04 23:14:53 +00001084
tom1e946682005-10-12 11:27:33 +00001085# does this compiler support -Wdeclaration-after-statement ?
bart56730cd2008-05-11 06:41:46 +00001086AC_MSG_CHECKING([if gcc accepts -Wdeclaration-after-statement])
tom1e946682005-10-12 11:27:33 +00001087
1088safe_CFLAGS=$CFLAGS
1089CFLAGS="-Wdeclaration-after-statement"
1090
1091AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001092 return 0;
tom1e946682005-10-12 11:27:33 +00001093],
1094[
tome9814c32005-10-12 11:30:43 +00001095declaration_after_statement=yes
sewardj72a547e2006-01-25 02:58:28 +00001096FLAG_WDECL_AFTER_STMT="-Wdeclaration-after-statement"
tom1e946682005-10-12 11:27:33 +00001097AC_MSG_RESULT([yes])
1098], [
tome9814c32005-10-12 11:30:43 +00001099declaration_after_statement=no
sewardj72a547e2006-01-25 02:58:28 +00001100FLAG_WDECL_AFTER_STMT=""
tom1e946682005-10-12 11:27:33 +00001101AC_MSG_RESULT([no])
1102])
1103CFLAGS=$safe_CFLAGS
1104
sewardj72a547e2006-01-25 02:58:28 +00001105AC_SUBST(FLAG_WDECL_AFTER_STMT)
1106
tome9814c32005-10-12 11:30:43 +00001107if test x$declaration_after_statement = xyes; then
tom1e946682005-10-12 11:27:33 +00001108 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1109fi
1110
sewardj00f1e622006-03-12 16:47:10 +00001111
bart9d865fa2008-06-23 12:11:49 +00001112# does this compiler support -Wno-format-zero-length ?
1113
1114AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
1115
1116safe_CFLAGS=$CFLAGS
1117CFLAGS="-Wno-format-zero-length"
1118
1119AC_TRY_COMPILE(
1120[ ],
1121[
1122 return 0;
1123],
1124[
1125AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
1126AC_MSG_RESULT([yes])
1127],
1128[
1129AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
1130AC_MSG_RESULT([no])
1131])
1132CFLAGS=$safe_CFLAGS
1133
1134
bart56730cd2008-05-11 06:41:46 +00001135# does this compiler support -Wextra or the older -W ?
1136
1137AC_MSG_CHECKING([if gcc accepts -Wextra or -W])
1138
1139safe_CFLAGS=$CFLAGS
1140CFLAGS="-Wextra"
1141
1142AC_TRY_COMPILE(
1143[ ],
1144[
1145 return 0;
1146],
1147[
1148AC_SUBST([FLAG_W_EXTRA], [-Wextra])
1149AC_MSG_RESULT([-Wextra])
1150], [
1151 CFLAGS="-W"
1152 AC_TRY_COMPILE(
1153 [ ],
1154 [
1155 return 0;
1156 ],
1157 [
1158 AC_SUBST([FLAG_W_EXTRA], [-W])
1159 AC_MSG_RESULT([-W])
1160 ], [
1161 AC_SUBST([FLAG_W_EXTRA], [])
1162 AC_MSG_RESULT([not supported])
1163 ])
1164])
1165CFLAGS=$safe_CFLAGS
1166
1167
sewardja72c26d2007-05-01 13:44:08 +00001168# does this compiler support -fno-stack-protector ?
bart56730cd2008-05-11 06:41:46 +00001169AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
sewardja72c26d2007-05-01 13:44:08 +00001170
1171safe_CFLAGS=$CFLAGS
1172CFLAGS="-fno-stack-protector"
1173
1174AC_TRY_COMPILE(, [
njn9890ee12009-01-21 22:25:50 +00001175 return 0;
sewardja72c26d2007-05-01 13:44:08 +00001176],
1177[
1178no_stack_protector=yes
1179FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
1180AC_MSG_RESULT([yes])
1181], [
1182no_stack_protector=no
1183FLAG_FNO_STACK_PROTECTOR=""
1184AC_MSG_RESULT([no])
1185])
1186CFLAGS=$safe_CFLAGS
1187
1188AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
1189
1190if test x$no_stack_protector = xyes; then
1191 CFLAGS="$CFLAGS -fno-stack-protector"
1192fi
1193
1194
bart56730cd2008-05-11 06:41:46 +00001195# does this compiler support --param inline-unit-growth=... ?
1196
1197AC_MSG_CHECKING([if gcc accepts --param inline-unit-growth])
1198
1199safe_CFLAGS=$CFLAGS
1200CFLAGS="--param inline-unit-growth=900"
1201
1202AC_TRY_COMPILE(
1203[ ],
1204[
1205 return 0;
1206],
1207[
1208AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH],
1209 ["--param inline-unit-growth=900"])
1210AC_MSG_RESULT([yes])
1211], [
1212AC_SUBST([FLAG_UNLIMITED_INLINE_UNIT_GROWTH], [""])
1213AC_MSG_RESULT([no])
1214])
1215CFLAGS=$safe_CFLAGS
1216
1217
tomd55121e2005-12-19 12:40:13 +00001218# does this compiler support __builtin_expect?
1219AC_MSG_CHECKING([if gcc supports __builtin_expect])
bart56730cd2008-05-11 06:41:46 +00001220
tomd55121e2005-12-19 12:40:13 +00001221AC_TRY_LINK(, [
1222return __builtin_expect(1, 1) ? 1 : 0
1223],
1224[
1225ac_have_builtin_expect=yes
1226AC_MSG_RESULT([yes])
1227], [
1228ac_have_builtin_expect=no
1229AC_MSG_RESULT([no])
1230])
1231if test x$ac_have_builtin_expect = xyes ; then
1232 AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if gcc supports __builtin_expect.])
1233fi
1234
tom1e946682005-10-12 11:27:33 +00001235
sewardj00f1e622006-03-12 16:47:10 +00001236# does the ppc assembler support "mtocrf" et al?
1237AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
1238
1239AC_TRY_COMPILE(, [
sewardjdd4cbe12006-03-12 17:27:44 +00001240__asm__ __volatile__("mtocrf 4,0");
1241__asm__ __volatile__("mfocrf 0,4");
sewardj00f1e622006-03-12 16:47:10 +00001242],
1243[
1244ac_have_as_ppc_mftocrf=yes
1245AC_MSG_RESULT([yes])
1246], [
1247ac_have_as_ppc_mftocrf=no
1248AC_MSG_RESULT([no])
1249])
1250if test x$ac_have_as_ppc_mftocrf = xyes ; then
1251 AC_DEFINE(HAVE_AS_PPC_MFTOCRF, 1, [Define to 1 if as supports mtocrf/mfocrf.])
1252fi
1253
1254
sewardjf0aabf82007-03-22 00:24:21 +00001255# does the x86/amd64 assembler understand SSE3 instructions?
sewardjfa18a262007-03-22 12:13:13 +00001256# Note, this doesn't generate a C-level symbol. It generates a
1257# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
sewardjf0aabf82007-03-22 00:24:21 +00001258AC_MSG_CHECKING([if x86/amd64 assembler speaks SSE3])
1259
1260AC_TRY_COMPILE(, [
1261 do { long long int x;
1262 __asm__ __volatile__("fisttpq (%0)" : :"r"(&x) ); }
1263 while (0)
1264],
1265[
1266ac_have_as_sse3=yes
1267AC_MSG_RESULT([yes])
1268], [
1269ac_have_as_sse3=no
1270AC_MSG_RESULT([no])
1271])
sewardjfa18a262007-03-22 12:13:13 +00001272
1273AM_CONDITIONAL(BUILD_SSE3_TESTS, test x$ac_have_as_sse3 = xyes)
sewardjf0aabf82007-03-22 00:24:21 +00001274
1275
sewardj6d6da5b2008-02-09 12:07:40 +00001276# Ditto for SSSE3 instructions (note extra S)
1277# Note, this doesn't generate a C-level symbol. It generates a
1278# automake-level symbol (BUILD_SSSE3_TESTS), used in test Makefile.am's
1279AC_MSG_CHECKING([if x86/amd64 assembler speaks SSSE3])
1280
1281AC_TRY_COMPILE(, [
1282 do { long long int x;
1283 __asm__ __volatile__(
1284 "pabsb (%0),%%xmm7" : : "r"(&x) : "xmm7" ); }
1285 while (0)
1286],
1287[
1288ac_have_as_ssse3=yes
1289AC_MSG_RESULT([yes])
1290], [
1291ac_have_as_ssse3=no
1292AC_MSG_RESULT([no])
1293])
1294
1295AM_CONDITIONAL(BUILD_SSSE3_TESTS, test x$ac_have_as_ssse3 = xyes)
1296
1297
sewardjb5f6f512005-03-10 23:59:00 +00001298# Check for TLS support in the compiler and linker
bartca9f2ad2008-06-02 07:14:20 +00001299if test "x${cross_compiling}" = "xno"; then
1300# Native compilation: check whether running a program using TLS succeeds.
1301# Linking only is not sufficient -- e.g. on Red Hat 7.3 linking TLS programs
1302# succeeds but running programs using TLS fails.
1303AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1304 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1305 [vg_cv_tls=$enableval],
1306 [AC_RUN_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
1307 [[return foo;]])],
1308 [vg_cv_tls=yes],
1309 [vg_cv_tls=no])])])
1310else
1311# Cross-compiling: check whether linking a program using TLS succeeds.
sewardjb5f6f512005-03-10 23:59:00 +00001312AC_CACHE_CHECK([for TLS support], vg_cv_tls,
1313 [AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
1314 [vg_cv_tls=$enableval],
bartcddeaf52008-05-25 15:58:11 +00001315 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[static __thread int foo;]],
sewardjb5f6f512005-03-10 23:59:00 +00001316 [[return foo;]])],
1317 [vg_cv_tls=yes],
1318 [vg_cv_tls=no])])])
bartca9f2ad2008-06-02 07:14:20 +00001319fi
sewardjb5f6f512005-03-10 23:59:00 +00001320
1321if test "$vg_cv_tls" = yes; then
1322AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
1323fi
sewardj5b754b42002-06-03 22:53:35 +00001324
sewardj535c50f2005-06-04 23:14:53 +00001325
njn7fd6d382009-01-22 21:56:32 +00001326#----------------------------------------------------------------------------
bart62f54e42008-07-28 11:35:10 +00001327# Checks for C header files.
njn7fd6d382009-01-22 21:56:32 +00001328#----------------------------------------------------------------------------
1329
sewardjde4a1d02002-03-22 01:27:54 +00001330AC_HEADER_STDC
bartf5ceec82008-04-26 07:45:10 +00001331AC_CHECK_HEADERS([ \
bart1f2b1432009-01-16 12:06:54 +00001332 asm/unistd.h \
bartf5ceec82008-04-26 07:45:10 +00001333 endian.h \
1334 mqueue.h \
1335 sys/endian.h \
1336 sys/epoll.h \
1337 sys/eventfd.h \
bartce48fa92008-04-26 10:59:46 +00001338 sys/klog.h \
bartf5ceec82008-04-26 07:45:10 +00001339 sys/poll.h \
bart71bad292008-04-27 11:43:23 +00001340 sys/signal.h \
bartf5ceec82008-04-26 07:45:10 +00001341 sys/signalfd.h \
bart71bad292008-04-27 11:43:23 +00001342 sys/syscall.h \
1343 sys/time.h \
1344 sys/types.h \
bartf5ceec82008-04-26 07:45:10 +00001345 ])
sewardjde4a1d02002-03-22 01:27:54 +00001346
njn7fd6d382009-01-22 21:56:32 +00001347#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001348# Checks for typedefs, structures, and compiler characteristics.
njn7fd6d382009-01-22 21:56:32 +00001349#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001350AC_TYPE_UID_T
1351AC_TYPE_OFF_T
1352AC_TYPE_SIZE_T
1353AC_HEADER_TIME
1354
sewardj535c50f2005-06-04 23:14:53 +00001355
njn7fd6d382009-01-22 21:56:32 +00001356#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001357# Checks for library functions.
njn7fd6d382009-01-22 21:56:32 +00001358#----------------------------------------------------------------------------
sewardjde4a1d02002-03-22 01:27:54 +00001359AC_FUNC_MEMCMP
1360AC_FUNC_MMAP
1361AC_TYPE_SIGNAL
1362
bart71bad292008-04-27 11:43:23 +00001363AC_CHECK_LIB([rt], [clock_gettime])
bart41ac62a2008-07-07 16:58:03 +00001364
bartf5ceec82008-04-26 07:45:10 +00001365AC_CHECK_FUNCS([ \
bart71bad292008-04-27 11:43:23 +00001366 clock_gettime\
bartf5ceec82008-04-26 07:45:10 +00001367 epoll_create \
1368 epoll_pwait \
bartf5ceec82008-04-26 07:45:10 +00001369 floor \
bartce48fa92008-04-26 10:59:46 +00001370 klogctl \
bartf5ceec82008-04-26 07:45:10 +00001371 mallinfo \
1372 memchr \
1373 memset \
1374 mkdir \
1375 ppoll \
bart6d45e922009-01-20 13:45:38 +00001376 pthread_barrier_init \
1377 pthread_condattr_setclock \
1378 pthread_mutex_timedlock \
1379 pthread_rwlock_timedrdlock \
1380 pthread_rwlock_timedwrlock \
1381 pthread_spin_lock \
bartf5ceec82008-04-26 07:45:10 +00001382 semtimedop \
1383 signalfd \
njn6cc22472009-03-16 03:46:48 +00001384 sigwaitinfo \
bart71bad292008-04-27 11:43:23 +00001385 syscall \
bartf5ceec82008-04-26 07:45:10 +00001386 strchr \
1387 strdup \
1388 strpbrk \
1389 strrchr \
1390 strstr \
1391 timerfd \
1392 utimensat \
1393 ])
sewardjde4a1d02002-03-22 01:27:54 +00001394
bart623eec32008-07-29 17:54:49 +00001395# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
1396# libraries with any shared object and/or executable. This is NOT what we
1397# want for e.g. vgpreload_core-x86-linux.so
1398LIBS=""
sewardj80637752006-03-02 13:48:21 +00001399
bart6d45e922009-01-20 13:45:38 +00001400AM_CONDITIONAL([HAVE_PTHREAD_BARRIER],
1401 [test x$ac_cv_func_pthread_barrier_init = xyes])
bart2eaa8f22009-01-20 14:01:16 +00001402AM_CONDITIONAL([HAVE_PTHREAD_MUTEX_TIMEDLOCK],
1403 [test x$ac_cv_func_pthread_mutex_timedlock = xyes])
bart6d45e922009-01-20 13:45:38 +00001404AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
1405 [test x$ac_cv_func_pthread_spin_lock = xyes])
1406
njn7fd6d382009-01-22 21:56:32 +00001407
1408#----------------------------------------------------------------------------
1409# MPI checks
1410#----------------------------------------------------------------------------
sewardj03d86f22006-10-17 00:57:24 +00001411# Do we have a useable MPI setup on the primary and/or secondary targets?
1412# On Linux, by default, assumes mpicc and -m32/-m64
1413# On AIX, by default, assumes mpxlc and -q32/-q64
sewardje9fa5062006-03-12 18:29:18 +00001414# Note: this is a kludge in that it assumes the specified mpicc
sewardj03d86f22006-10-17 00:57:24 +00001415# understands -m32/-m64/-q32/-q64 regardless of what is specified using
1416# --with-mpicc=.
sewardj0ad46092006-03-02 17:09:16 +00001417MPI_CC="mpicc"
njn7fd6d382009-01-22 21:56:32 +00001418if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 \
1419 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001420 MPI_CC="mpxlc"
1421fi
1422
sewardje9fa5062006-03-12 18:29:18 +00001423mflag_primary=
njn7fd6d382009-01-22 21:56:32 +00001424if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_LINUX \
1425 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001426 mflag_primary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001427elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
1428 -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ; then
sewardje9fa5062006-03-12 18:29:18 +00001429 mflag_primary=$FLAG_M64
njn7fd6d382009-01-22 21:56:32 +00001430elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001431 mflag_primary=-q32
njn7fd6d382009-01-22 21:56:32 +00001432elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001433 mflag_primary=-q64
sewardje9fa5062006-03-12 18:29:18 +00001434fi
1435
sewardj03d86f22006-10-17 00:57:24 +00001436mflag_secondary=
njn7fd6d382009-01-22 21:56:32 +00001437if test x$VGCONF_PLATFORM_SEC_CAPS = xX86_LINUX \
1438 -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ; then
sewardj03d86f22006-10-17 00:57:24 +00001439 mflag_secondary=$FLAG_M32
njn7fd6d382009-01-22 21:56:32 +00001440elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
sewardj03d86f22006-10-17 00:57:24 +00001441 mflag_secondary=-q32
1442fi
1443
1444
sewardj0ad46092006-03-02 17:09:16 +00001445AC_ARG_WITH(mpicc,
sewardjb70a6132006-05-27 21:14:09 +00001446 [ --with-mpicc= Specify name of MPI2-ised C compiler],
sewardj0ad46092006-03-02 17:09:16 +00001447 MPI_CC=$withval
1448)
sewardj03d86f22006-10-17 00:57:24 +00001449AC_SUBST(MPI_CC)
1450
1451## See if MPI_CC works for the primary target
1452##
1453AC_MSG_CHECKING([primary target for usable MPI2-compliant C compiler and mpi.h])
sewardj0ad46092006-03-02 17:09:16 +00001454saved_CC=$CC
sewardjde4f3842006-03-09 02:41:41 +00001455saved_CFLAGS=$CFLAGS
sewardj0ad46092006-03-02 17:09:16 +00001456CC=$MPI_CC
sewardje9fa5062006-03-12 18:29:18 +00001457CFLAGS=$mflag_primary
sewardjd3fcc642006-03-09 02:49:56 +00001458AC_TRY_LINK([
sewardj1a85e602006-03-08 15:26:10 +00001459#include <mpi.h>
1460#include <stdio.h>
sewardjde4f3842006-03-09 02:41:41 +00001461],[
1462 int r = MPI_Init(NULL,NULL);
1463 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1464 return r;
1465], [
sewardj03d86f22006-10-17 00:57:24 +00001466ac_have_mpi2_pri=yes
sewardj1a85e602006-03-08 15:26:10 +00001467AC_MSG_RESULT([yes, $MPI_CC])
sewardj80637752006-03-02 13:48:21 +00001468], [
sewardj03d86f22006-10-17 00:57:24 +00001469ac_have_mpi2_pri=no
sewardj80637752006-03-02 13:48:21 +00001470AC_MSG_RESULT([no])
1471])
sewardj0ad46092006-03-02 17:09:16 +00001472CC=$saved_CC
sewardjde4f3842006-03-09 02:41:41 +00001473CFLAGS=$saved_CFLAGS
sewardj03d86f22006-10-17 00:57:24 +00001474AM_CONDITIONAL(BUILD_MPIWRAP_PRI, test x$ac_have_mpi2_pri = xyes)
sewardj80637752006-03-02 13:48:21 +00001475
sewardj03d86f22006-10-17 00:57:24 +00001476## See if MPI_CC works for the secondary target. Complication: what if
1477## there is no secondary target? We need this to then fail.
1478## Kludge this by making MPI_CC something which will surely fail in
1479## such a case.
1480##
1481AC_MSG_CHECKING([secondary target for usable MPI2-compliant C compiler and mpi.h])
1482saved_CC=$CC
1483saved_CFLAGS=$CFLAGS
njn7fd6d382009-01-22 21:56:32 +00001484if test x$VGCONF_PLATFORM_SEC_CAPS = x ; then
sewardj03d86f22006-10-17 00:57:24 +00001485 CC="$MPI_CC this will surely fail"
1486else
1487 CC=$MPI_CC
1488fi
1489CFLAGS=$mflag_secondary
1490AC_TRY_LINK([
1491#include <mpi.h>
1492#include <stdio.h>
1493],[
1494 int r = MPI_Init(NULL,NULL);
1495 r |= MPI_Type_get_contents( MPI_INT, 0,0,0, NULL,NULL,NULL );
1496 return r;
1497], [
1498ac_have_mpi2_sec=yes
1499AC_MSG_RESULT([yes, $MPI_CC])
1500], [
1501ac_have_mpi2_sec=no
1502AC_MSG_RESULT([no])
1503])
1504CC=$saved_CC
1505CFLAGS=$saved_CFLAGS
1506AM_CONDITIONAL(BUILD_MPIWRAP_SEC, test x$ac_have_mpi2_sec = xyes)
sewardj80637752006-03-02 13:48:21 +00001507
1508
njn7fd6d382009-01-22 21:56:32 +00001509#----------------------------------------------------------------------------
1510# Other library checks
1511#----------------------------------------------------------------------------
sewardj493c4ef2008-12-13 16:45:19 +00001512# There now follow some tests for QtCore, Boost, and OpenMP. These
1513# tests are present because Drd has some regression tests that use
1514# these packages. All regression test programs all compiled only
1515# for the primary target. And so it is important that the configure
1516# checks that follow, use the correct -m32 or -m64 flag for the
1517# primary target (called $mflag_primary). Otherwise, we can end up
1518# in a situation (eg) where, on amd64-linux, the test for Boost checks
1519# for usable 64-bit Boost facilities, but because we are doing a 32-bit
1520# only build (meaning, the primary target is x86-linux), the build
1521# of the regtest programs that use Boost fails, because they are
1522# build as 32-bit (IN THIS EXAMPLE).
1523#
1524# Hence: ALWAYS USE $mflag_primary FOR CONFIGURE TESTS FOR FACILITIES
1525# NEEDED BY THE REGRESSION TEST PROGRAMS.
1526
1527
bart21d3cfc2008-08-02 09:08:17 +00001528# The test below verifies whether the QtCore package been installed.
1529# This test works as follows:
1530# - If pkg-config was not installed at the time autogen.sh was run,
1531# the definition of the PKG_CHECK_EXISTS() macro will not be found by
1532# autogen.sh. Augogen.sh will generate a configure script that prints
1533# a warning about pkg-config and proceeds as if Qt4 has not been installed.
1534# - If pkg-config was installed at the time autogen.sh was run,
1535# the generated configure script will try to detect the presence of the
1536# Qt4 QtCore library by looking up compile and linker flags in the file
1537# called QtCore.pc.
1538# - pkg-config settings can be overridden via the configure variables
1539# QTCORE_CFLAGS and QTCORE_LIBS (added by the pkg-config m4 macro's to the
1540# configure script -- see also ./configure --help).
1541# - The QTCORE_CFLAGS and QTCORE_LIBS configure variables can be used even if
1542# the pkg-config executable is not present on the system on which the
1543# configure script is run.
bart41ac62a2008-07-07 16:58:03 +00001544
bart21d3cfc2008-08-02 09:08:17 +00001545ifdef(
1546 [PKG_CHECK_EXISTS],
1547 [PKG_CHECK_EXISTS(
1548 [QtCore],
1549 [
1550 PKG_CHECK_MODULES([QTCORE], [QtCore])
bart11fbd892008-09-21 15:00:58 +00001551 # Paranoia: don't trust the result reported by pkg-config, but when
1552 # pkg-config reports that QtCore has been found, verify whether linking
1553 # programs with QtCore succeeds.
1554 AC_LANG(C++)
1555 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001556 CXXFLAGS="${QTCORE_CFLAGS} ${QTCORE_LIBS} $mflag_primary"
bart11fbd892008-09-21 15:00:58 +00001557 AC_TRY_LINK(
1558 [#include <QMutex>],
1559 [QMutex Mutex;],
1560 [ac_have_qtcore=yes],
1561 [
1562 AC_MSG_WARN([Although pkg-config detected Qt4, linking Qt4 programs fails. Skipping Qt4.])
1563 ac_have_qtcore=no
1564 ]
1565 )
1566 CXXFLAGS="${safe_CXXFLAGS}"
bart21d3cfc2008-08-02 09:08:17 +00001567 ],
1568 [
1569 ac_have_qtcore=no
1570 ]
1571 )
1572 ],
1573 AC_MSG_WARN([pkg-config has not been installed or is too old.])
1574 AC_MSG_WARN([Detection of Qt4 will be skipped.])
1575 [ac_have_qtcore=no]
1576)
bart41ac62a2008-07-07 16:58:03 +00001577
1578AM_CONDITIONAL([HAVE_QTCORE], [test x$ac_have_qtcore = xyes])
1579
1580
bart62f54e42008-07-28 11:35:10 +00001581# Test for QMutex::tryLock(int), which has been introduced in Qt 4.3.
1582# See also http://doc.trolltech.com/4.3/qmutex.html.
1583if test x$ac_have_qtcore = xyes; then
1584 AC_MSG_CHECKING([for Qt4 QMutex::tryLock(int)])
1585 AC_LANG(C++)
bart21d3cfc2008-08-02 09:08:17 +00001586 safe_CXXFLAGS="${CXXFLAGS}"
sewardj493c4ef2008-12-13 16:45:19 +00001587 CXXFLAGS="${QTCORE_CFLAGS} $mflag_primary"
bart62f54e42008-07-28 11:35:10 +00001588 AC_TRY_COMPILE([
1589 #include <QtCore/QMutex>
1590 ],
1591 [
1592 QMutex M;
1593 M.tryLock(1);
1594 M.unlock();
1595 return 0;
1596 ],
1597 [
1598 AC_MSG_RESULT([yes])
1599 AC_DEFINE([HAVE_QTCORE_QMUTEX_TRYLOCK_INT], [1], [Define to 1 if the installed version of Qt4 provides QMutex::tryLock(int).])
1600 ],
1601 [
1602 AC_MSG_RESULT([no])
1603 ])
bart21d3cfc2008-08-02 09:08:17 +00001604 CXXFLAGS="${safe_CXXFLAGS}"
bart62f54e42008-07-28 11:35:10 +00001605 AC_LANG(C)
1606fi
1607
1608
sewardj493c4ef2008-12-13 16:45:19 +00001609# Check whether the boost library 1.35 or later has been installed.
1610# The Boost.Threads library has undergone a major rewrite in version 1.35.0.
1611
1612AC_MSG_CHECKING([for boost])
1613
1614AC_LANG(C++)
1615safe_CXXFLAGS=$CXXFLAGS
1616CXXFLAGS="-lboost_thread-mt $mflag_primary"
1617
1618AC_LINK_IFELSE(
1619[
1620#include <boost/thread.hpp>
1621static void thread_func(void)
1622{ }
1623int main(int argc, char** argv)
1624{
1625 boost::thread t(thread_func);
1626 return 0;
1627}
1628],
1629[
1630ac_have_boost_1_35=yes
1631AC_SUBST([BOOST_CFLAGS], [])
1632AC_SUBST([BOOST_LIBS], ["${CXXFLAGS}"])
1633AC_MSG_RESULT([yes])
1634], [
1635ac_have_boost_1_35=no
1636AC_MSG_RESULT([no])
1637])
1638
1639CXXFLAGS=$safe_CXXFLAGS
1640AC_LANG(C)
1641
1642AM_CONDITIONAL([HAVE_BOOST_1_35], [test x$ac_have_boost_1_35 = xyes])
1643
1644
1645# does this compiler support -fopenmp, does it have the include file
1646# <omp.h> and does it have libgomp ?
1647
1648AC_MSG_CHECKING([for OpenMP])
1649
1650safe_CFLAGS=$CFLAGS
sewardjc876a2f2009-01-22 22:44:30 +00001651CFLAGS="-fopenmp $mflag_primary"
sewardj493c4ef2008-12-13 16:45:19 +00001652
1653AC_LINK_IFELSE(
1654[
1655#include <omp.h>
1656int main(int argc, char** argv)
1657{
1658 omp_set_dynamic(0);
1659 return 0;
1660}
1661],
1662[
1663ac_have_openmp=yes
1664AC_MSG_RESULT([yes])
1665], [
1666ac_have_openmp=no
1667AC_MSG_RESULT([no])
1668])
1669CFLAGS=$safe_CFLAGS
1670
1671AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
1672
1673
sewardjc876a2f2009-01-22 22:44:30 +00001674# does this compiler have built-in functions for atomic memory access ?
1675AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
1676
1677safe_CFLAGS=$CFLAGS
1678CFLAGS="$mflag_primary"
1679
1680AC_TRY_LINK(,
1681[
1682 int variable = 1;
1683 return (__sync_bool_compare_and_swap(&variable, 1, 2)
1684 && __sync_add_and_fetch(&variable, 1) ? 1 : 0)
1685],
1686[
1687 AC_MSG_RESULT([yes])
1688 AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
1689],
1690[
1691 AC_MSG_RESULT([no])
1692])
1693
1694CFLAGS=$safe_CFLAGS
1695
1696
njn7fd6d382009-01-22 21:56:32 +00001697#----------------------------------------------------------------------------
1698# Ok. We're done checking.
1699#----------------------------------------------------------------------------
sewardj80637752006-03-02 13:48:21 +00001700
gobrye721a522002-03-22 13:38:30 +00001701AC_OUTPUT(
sewardjde4a1d02002-03-22 01:27:54 +00001702 Makefile
njn25cac76cb2002-09-23 11:21:57 +00001703 valgrind.spec
muellerbddd6072003-11-19 21:50:07 +00001704 valgrind.pc
dirk07596a22008-04-25 11:33:30 +00001705 glibc-2.X.supp
njn254d542432002-09-23 16:09:39 +00001706 docs/Makefile
njn3e986b22004-11-30 10:43:45 +00001707 docs/lib/Makefile
1708 docs/images/Makefile
njnf7c00b12005-07-19 21:46:19 +00001709 docs/internals/Makefile
njn3e986b22004-11-30 10:43:45 +00001710 docs/xml/Makefile
njn254d542432002-09-23 16:09:39 +00001711 tests/Makefile
njnc2e7f482002-09-27 08:44:17 +00001712 tests/vg_regtest
njnec0c27a2005-12-10 23:11:28 +00001713 perf/Makefile
1714 perf/vg_perf
njn254d542432002-09-23 16:09:39 +00001715 include/Makefile
sewardj0f8881b2006-10-18 01:16:57 +00001716 include/vki/Makefile
njn7a6e7462002-11-09 17:53:30 +00001717 auxprogs/Makefile
njn25ab726032002-09-23 16:24:41 +00001718 coregrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001719 memcheck/Makefile
1720 memcheck/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001721 memcheck/tests/amd64/Makefile
njnc6168192004-11-29 13:54:10 +00001722 memcheck/tests/x86/Makefile
njn3b3b76d2009-01-19 03:44:19 +00001723 memcheck/tests/linux/Makefile
njna454ec02009-01-19 03:16:59 +00001724 memcheck/tests/x86-linux/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001725 memcheck/docs/Makefile
1726 cachegrind/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001727 cachegrind/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001728 cachegrind/tests/x86/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001729 cachegrind/docs/Makefile
njnf2df9b52002-10-04 11:35:47 +00001730 cachegrind/cg_annotate
weidendoa17f2a32006-03-20 10:27:30 +00001731 callgrind/Makefile
1732 callgrind/callgrind_annotate
1733 callgrind/callgrind_control
1734 callgrind/tests/Makefile
1735 callgrind/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001736 helgrind/Makefile
njnf2df9b52002-10-04 11:35:47 +00001737 helgrind/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001738 helgrind/docs/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001739 massif/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001740 massif/tests/Makefile
njn734b8052007-11-01 04:40:37 +00001741 massif/perf/Makefile
nethercotec9f36922004-02-14 16:40:02 +00001742 massif/docs/Makefile
njnd5a8d242007-11-02 20:44:57 +00001743 massif/ms_print
njn25cac76cb2002-09-23 11:21:57 +00001744 lackey/Makefile
njnf2df9b52002-10-04 11:35:47 +00001745 lackey/tests/Makefile
njn83157fc2002-10-03 10:07:34 +00001746 lackey/docs/Makefile
njn25cac76cb2002-09-23 11:21:57 +00001747 none/Makefile
1748 none/tests/Makefile
njnc6168192004-11-29 13:54:10 +00001749 none/tests/amd64/Makefile
cerion85665ca2005-06-20 15:51:07 +00001750 none/tests/ppc32/Makefile
sewardj2c48c7b2005-11-29 13:05:56 +00001751 none/tests/ppc64/Makefile
njnc6168192004-11-29 13:54:10 +00001752 none/tests/x86/Makefile
njn0458a122009-02-13 06:23:46 +00001753 none/tests/linux/Makefile
njn9bc8c002002-10-02 13:49:13 +00001754 none/docs/Makefile
sewardj99a2ceb2007-11-09 12:30:36 +00001755 exp-omega/Makefile
1756 exp-omega/tests/Makefile
1757 exp-omega/docs/Makefile
sewardj9c606bd2008-09-18 18:12:50 +00001758 exp-ptrcheck/Makefile
1759 exp-ptrcheck/tests/Makefile
1760 exp-ptrcheck/docs/Makefile
bartccf17de2008-07-04 15:14:35 +00001761 drd/Makefile
1762 drd/docs/Makefile
1763 drd/scripts/download-and-build-splash2
1764 drd/tests/Makefile
bart0b2b4622008-06-17 19:19:16 +00001765)
gobry3b777892002-04-04 09:18:39 +00001766
1767cat<<EOF
1768
njn311303f2009-02-06 03:46:50 +00001769 Maximum build arch: ${ARCH_MAX}
1770 Primary build arch: ${VGCONF_ARCH_PRI}
1771 Build OS: ${VGCONF_OS}
njn7fd6d382009-01-22 21:56:32 +00001772 Primary build target: ${VGCONF_PLATFORM_PRI_CAPS}
1773 Secondary build target: ${VGCONF_PLATFORM_SEC_CAPS}
sewardje95d94f2008-09-19 09:02:19 +00001774 Default supp files: ${DEFAULT_SUPP}
gobry3b777892002-04-04 09:18:39 +00001775
gobry3b777892002-04-04 09:18:39 +00001776EOF