sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | # Process this file with autoconf to produce a configure script. |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 2 | AC_INIT(coregrind/vg_main.c) # give me a source file, any source file... |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 3 | AM_CONFIG_HEADER(config.h) |
jseward | 684ac09 | 2004-07-18 11:47:55 +0000 | [diff] [blame] | 4 | AM_INIT_AUTOMAKE(valgrind, 2.1.3.CVS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 5 | |
gobry | b0ed467 | 2002-03-27 20:58:58 +0000 | [diff] [blame] | 6 | AM_MAINTAINER_MODE |
| 7 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 8 | # Checks for programs. |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 9 | CFLAGS="" |
| 10 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 11 | AC_PROG_LN_S |
| 12 | AC_PROG_CC |
| 13 | AC_PROG_CPP |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 14 | AC_PROG_CXX |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 15 | AC_PROG_RANLIB |
| 16 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 17 | # Check for the compiler support |
| 18 | if test "${GCC}" != "yes" ; then |
| 19 | AC_MSG_ERROR([Valgrind relies on GCC to be compiled]) |
| 20 | fi |
| 21 | |
sewardj | 2f68595 | 2002-12-22 19:32:23 +0000 | [diff] [blame] | 22 | # figure out where perl lives |
| 23 | AC_PATH_PROG(PERL, perl) |
| 24 | |
njn | 9315df3 | 2003-04-16 20:50:50 +0000 | [diff] [blame] | 25 | # figure out where gdb lives |
| 26 | AC_PATH_PROG(GDB, gdb) |
njn | 17b8535 | 2003-04-18 12:54:24 +0000 | [diff] [blame] | 27 | # autoheader tries to execute the 3rd string or something; I get warnings when |
| 28 | # it's defined. So just leave it undefined. --njn 2002-Apr-18 |
| 29 | AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", "") |
njn | 9315df3 | 2003-04-16 20:50:50 +0000 | [diff] [blame] | 30 | |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 31 | # some older automake's don't have it so try something on our own |
| 32 | ifdef([AM_PROG_AS],[AM_PROG_AS], |
| 33 | [ |
gobry | 1be1985 | 2002-03-26 20:44:55 +0000 | [diff] [blame] | 34 | AS="${CC}" |
| 35 | AC_SUBST(AS) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 36 | |
gobry | 1be1985 | 2002-03-26 20:44:55 +0000 | [diff] [blame] | 37 | ASFLAGS="" |
| 38 | AC_SUBST(ASFLAGS) |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 39 | ]) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 40 | |
| 41 | # This variable will collect the individual suppression files |
| 42 | # depending on the results of autoconf |
| 43 | |
| 44 | DEFAULT_SUPP="" |
| 45 | |
| 46 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 47 | # We don't want gcc 2.7 |
| 48 | AC_MSG_CHECKING([for a supported version of gcc]) |
| 49 | |
daywalker | 870ac4c | 2002-05-21 00:09:48 +0000 | [diff] [blame] | 50 | gcc_version=`${CC} --version | head -n 1` |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 51 | |
| 52 | case "${gcc_version}" in |
| 53 | gcc-2.7.*) |
| 54 | AC_MSG_RESULT([no (${gcc_version})]) |
| 55 | AC_MSG_ERROR([please use a recent (>= gcc-2.95) version of gcc]) |
| 56 | ;; |
| 57 | |
| 58 | *) |
| 59 | AC_MSG_RESULT([ok (${gcc_version})]) |
| 60 | ;; |
| 61 | esac |
| 62 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 63 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 64 | # Checks for the platform |
| 65 | AC_CANONICAL_HOST |
| 66 | |
| 67 | AC_MSG_CHECKING([for a supported CPU]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 68 | AC_SUBST(VG_ARCH) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 69 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 70 | case "${host_cpu}" in |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 71 | i?86) |
| 72 | AC_MSG_RESULT([ok (${host_cpu})]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 73 | VG_ARCH="x86" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 74 | ;; |
| 75 | |
| 76 | *) |
| 77 | AC_MSG_RESULT([no (${host_cpu})]) |
| 78 | AC_MSG_ERROR([Valgrind is ix86 specific. Sorry]) |
| 79 | ;; |
| 80 | esac |
| 81 | |
| 82 | AC_MSG_CHECKING([for a supported OS]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 83 | AC_SUBST(VG_OS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 84 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 85 | case "${host_os}" in |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 86 | *linux*) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 87 | AC_MSG_RESULT([ok (${host_os})]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 88 | VG_OS="linux" |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 89 | |
| 90 | # Ok, this is linux. Check the kernel version |
| 91 | AC_MSG_CHECKING([for the kernel version]) |
| 92 | |
| 93 | kernel=`uname -r` |
| 94 | |
| 95 | case "${kernel}" in |
| 96 | 2.6.*) |
| 97 | AC_MSG_RESULT([2.6 family (${kernel})]) |
| 98 | AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x]) |
| 99 | ;; |
| 100 | |
| 101 | 2.4.*) |
| 102 | AC_MSG_RESULT([2.4 family (${kernel})]) |
| 103 | AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x]) |
| 104 | ;; |
| 105 | |
| 106 | 2.2.*) |
| 107 | AC_MSG_RESULT([2.2 family (${kernel})]) |
| 108 | AC_DEFINE([KERNEL_2_2], 1, [Define to 1 if you're using Linux 2.2.x]) |
| 109 | ;; |
| 110 | |
| 111 | *) |
| 112 | AC_MSG_RESULT([unsupported (${kernel})]) |
| 113 | AC_MSG_ERROR([Valgrind works on kernels 2.2, 2.4, 2.6]) |
| 114 | ;; |
| 115 | esac |
| 116 | |
| 117 | ;; |
| 118 | |
| 119 | *freebsd*) |
| 120 | AC_MSG_RESULT([ok (${host_os})]) |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 121 | VG_OS="freebsd" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 122 | ;; |
| 123 | |
| 124 | *) |
| 125 | AC_MSG_RESULT([no (${host_os})]) |
mueller | 8c68e04 | 2004-01-03 15:21:14 +0000 | [diff] [blame] | 126 | AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 127 | ;; |
| 128 | esac |
| 129 | |
nethercote | 888ecb7 | 2004-08-23 14:54:40 +0000 | [diff] [blame] | 130 | AC_MSG_CHECKING([for a supported CPU/OS combination]) |
| 131 | AC_SUBST(VG_PLATFORM) |
| 132 | |
| 133 | VG_PLATFORM="$VG_ARCH-$VG_OS" |
| 134 | |
| 135 | case $VG_PLATFORM in |
| 136 | x86-linux) |
| 137 | AC_MSG_RESULT([ok (${host_cpu}-${host_os})]) |
| 138 | ;; |
| 139 | |
| 140 | *) |
| 141 | AC_MSG_RESULT([no (${host_cpu}-${host_os})]) |
| 142 | AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doin |
| 143 | g a port.]) |
| 144 | ;; |
| 145 | esac |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 146 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 147 | AC_SUBST(DEFAULT_SUPP) |
| 148 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 149 | glibc="" |
| 150 | |
| 151 | AC_EGREP_CPP([GLIBC_21], [ |
| 152 | #include <features.h> |
| 153 | #ifdef __GNU_LIBRARY__ |
| 154 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 1) |
| 155 | GLIBC_21 |
| 156 | #endif |
| 157 | #endif |
| 158 | ], |
| 159 | glibc="2.1") |
| 160 | |
| 161 | AC_EGREP_CPP([GLIBC_22], [ |
| 162 | #include <features.h> |
| 163 | #ifdef __GNU_LIBRARY__ |
| 164 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2) |
| 165 | GLIBC_22 |
| 166 | #endif |
| 167 | #endif |
| 168 | ], |
| 169 | glibc="2.2") |
| 170 | |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 171 | AC_EGREP_CPP([GLIBC_23], [ |
| 172 | #include <features.h> |
| 173 | #ifdef __GNU_LIBRARY__ |
| 174 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 3) |
| 175 | GLIBC_23 |
| 176 | #endif |
| 177 | #endif |
| 178 | ], |
| 179 | glibc="2.3") |
| 180 | |
daywalker | e9212b3 | 2003-06-15 22:39:15 +0000 | [diff] [blame] | 181 | # Ok, this is linux. Check the kernel version |
| 182 | AC_MSG_CHECKING([the glibc version]) |
| 183 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 184 | case "${glibc}" in |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 185 | 2.1) |
| 186 | AC_MSG_RESULT(2.1 family) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 187 | AC_DEFINE([GLIBC_2_1], 1, [Define to 1 if you're using glibc 2.1.x]) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 188 | DEFAULT_SUPP="${DEFAULT_SUPP} glibc-2.1.supp" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 189 | ;; |
| 190 | |
| 191 | 2.2) |
| 192 | AC_MSG_RESULT(2.2 family) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 193 | AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x]) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 194 | DEFAULT_SUPP="${DEFAULT_SUPP} glibc-2.2.supp" |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 195 | ;; |
| 196 | |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 197 | 2.3) |
| 198 | AC_MSG_RESULT(2.3 family) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 199 | AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x]) |
daywalker | 63f6f78 | 2003-05-27 00:19:52 +0000 | [diff] [blame] | 200 | DEFAULT_SUPP="${DEFAULT_SUPP} glibc-2.3.supp" |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 201 | ;; |
| 202 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 203 | *) |
| 204 | AC_MSG_RESULT(unsupported version) |
sewardj | 08c7f01 | 2002-10-07 23:56:55 +0000 | [diff] [blame] | 205 | AC_MSG_ERROR([Valgrind requires the glibc version 2.1, 2.2 or 2.3]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 206 | ;; |
| 207 | esac |
| 208 | |
sewardj | 3e909ce | 2002-06-03 13:27:15 +0000 | [diff] [blame] | 209 | # APIs introduced in recent glibc versions |
| 210 | |
| 211 | AC_MSG_CHECKING([whether sched_param has a sched_priority member]) |
| 212 | AC_CACHE_VAL(vg_have_sched_priority, |
| 213 | [ |
| 214 | AC_TRY_COMPILE([#include <pthread.h>],[ |
| 215 | struct sched_param p; p.sched_priority=1;], |
| 216 | vg_have_sched_priority=yes, |
| 217 | vg_have_sched_priority=no) |
| 218 | ]) |
| 219 | AC_MSG_RESULT($vg_have_sched_priority) |
| 220 | if test "$vg_have_sched_priority" = yes; then |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 221 | AC_DEFINE([HAVE_SCHED_PRIORITY], 1, [pthread / sched_priority exists]) |
sewardj | 3e909ce | 2002-06-03 13:27:15 +0000 | [diff] [blame] | 222 | fi |
| 223 | |
| 224 | AC_MSG_CHECKING([whether nfds_t is defined]) |
| 225 | AC_CACHE_VAL(vg_have_nfds_t, |
| 226 | [ |
| 227 | AC_TRY_COMPILE([#include <sys/poll.h>],[ |
| 228 | nfds_t i=0;], |
| 229 | vg_have_nfds_t=yes, |
| 230 | vg_have_nfds_t=no) |
| 231 | ]) |
| 232 | AC_MSG_RESULT($vg_have_nfds_t) |
| 233 | if test "$vg_have_nfds_t" = yes; then |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 234 | AC_DEFINE([HAVE_NFDS_T], 1, [nfds_t exists]) |
sewardj | 3e909ce | 2002-06-03 13:27:15 +0000 | [diff] [blame] | 235 | fi |
| 236 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 237 | # try to detect the XFree version |
sewardj | 8ce25cd | 2002-06-18 01:05:58 +0000 | [diff] [blame] | 238 | # JRS 2002-06-17: this is completely bogus because it |
| 239 | # detects the server version, whereas we need to know the |
| 240 | # client library version. So what follows is hacked to |
| 241 | # use all the X supp files regardless of what is detected. |
| 242 | # This is really stoooopid and should be fixed properly. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 243 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 244 | AC_PATH_X |
| 245 | |
| 246 | if test "${no_x}" != 'yes' ; then |
| 247 | |
| 248 | AC_MSG_CHECKING([XFree version]) |
| 249 | |
| 250 | cat<<EOF > conftest.c |
| 251 | #include <X11/Xlib.h> |
| 252 | |
| 253 | int main (int argc, char * argv []) |
| 254 | { |
| 255 | Display * display = XOpenDisplay (NULL); |
| 256 | |
| 257 | if (display) { |
| 258 | printf ("%s version=%d\n", ServerVendor (display), VendorRelease (display)); |
| 259 | } |
| 260 | |
| 261 | return 0; |
| 262 | } |
| 263 | EOF |
| 264 | |
| 265 | ${CC} -o conftest conftest.c -I${x_includes} -L${x_libraries} -lX11 >&5 2>&1 |
| 266 | |
| 267 | if test "$?" != 0 ; then |
| 268 | AC_MSG_RESULT([cannot compile test program]) |
| 269 | else |
| 270 | xfree=`./conftest` |
| 271 | |
| 272 | case "${xfree}" in |
| 273 | *XFree86*) |
| 274 | ;; |
| 275 | |
| 276 | *) AC_MSG_RESULT([not a XFree86 server]) |
| 277 | ;; |
| 278 | esac |
| 279 | |
| 280 | case "${xfree}" in |
| 281 | |
| 282 | *version=4*) |
| 283 | AC_MSG_RESULT([XFree 4.x family]) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 284 | AC_DEFINE([XFREE_4], 1, [Define to 1 if you're using XFree 4.x]) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 285 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp" |
sewardj | 8ce25cd | 2002-06-18 01:05:58 +0000 | [diff] [blame] | 286 | # haaaaaaack! |
| 287 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp" |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 288 | ;; |
| 289 | |
| 290 | *version=3*) |
| 291 | AC_MSG_RESULT([XFree 3.x family]) |
daywalker | 418c748 | 2002-10-16 13:09:26 +0000 | [diff] [blame] | 292 | AC_DEFINE([XFREE_3], 1, [Define to 1 if you're using XFree86 3.x]) |
sewardj | 19e6a4d | 2002-05-22 11:58:25 +0000 | [diff] [blame] | 293 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp" |
sewardj | 8ce25cd | 2002-06-18 01:05:58 +0000 | [diff] [blame] | 294 | # haaaaaaack! |
| 295 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp" |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 296 | ;; |
| 297 | |
| 298 | *) AC_MSG_RESULT([unknown XFree86 server (${xfree})]) |
sewardj | 8ce25cd | 2002-06-18 01:05:58 +0000 | [diff] [blame] | 299 | # haaaaaaack! |
| 300 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp" |
| 301 | DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp" |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 302 | ;; |
| 303 | esac |
| 304 | fi |
| 305 | |
| 306 | rm -f conftest conftest.c |
| 307 | fi |
| 308 | |
sewardj | 2e10a68 | 2003-04-07 19:36:41 +0000 | [diff] [blame] | 309 | |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 310 | # check if the GNU as supports CFI directives |
| 311 | AC_MSG_CHECKING([if gas accepts .cfi]) |
mueller | ece14bd | 2003-10-31 03:43:48 +0000 | [diff] [blame] | 312 | AC_TRY_LINK(, [ |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 313 | |
| 314 | __asm__ __volatile__ (".cfi_startproc\n" |
| 315 | ".cfi_adjust_cfa_offset 0x0\n" |
| 316 | ".cfi_endproc\n"); |
| 317 | ], |
| 318 | [ |
| 319 | AC_DEFINE_UNQUOTED([HAVE_GAS_CFI], 1, [Define if your GNU as supports .cfi]) |
| 320 | AC_MSG_RESULT(yes) |
| 321 | ], |
| 322 | AC_MSG_RESULT(no) |
| 323 | ) |
sewardj | 2e10a68 | 2003-04-07 19:36:41 +0000 | [diff] [blame] | 324 | |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 325 | # does this compiler support -mpreferred-stack-boundary=2 ? |
| 326 | AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary]) |
| 327 | |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 328 | safe_CFLAGS=$CFLAGS |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 329 | CFLAGS="-mpreferred-stack-boundary=2" |
| 330 | |
| 331 | AC_TRY_COMPILE(, [ |
| 332 | |
| 333 | int main () { return 0 ; } |
| 334 | |
| 335 | ], |
| 336 | [ |
| 337 | PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2" |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 338 | AC_MSG_RESULT([yes]) |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 339 | ], [ |
| 340 | PREFERRED_STACK_BOUNDARY="" |
| 341 | AC_MSG_RESULT([no]) |
| 342 | ]) |
daywalker | 3664f56 | 2003-10-17 13:43:46 +0000 | [diff] [blame] | 343 | CFLAGS=$safe_CFLAGS |
sewardj | 5b754b4 | 2002-06-03 22:53:35 +0000 | [diff] [blame] | 344 | |
| 345 | AC_SUBST(PREFERRED_STACK_BOUNDARY) |
| 346 | |
| 347 | |
| 348 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 349 | # Checks for header files. |
| 350 | AC_HEADER_STDC |
thughes | acec02f | 2004-08-18 08:11:34 +0000 | [diff] [blame] | 351 | AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h sys/endian.h endian.h termios.h unistd.h utime.h linux/fb.h linux/mii.h mqueue.h linux/compiler.h]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 352 | |
| 353 | # Checks for typedefs, structures, and compiler characteristics. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 354 | AC_TYPE_UID_T |
| 355 | AC_TYPE_OFF_T |
| 356 | AC_TYPE_SIZE_T |
| 357 | AC_HEADER_TIME |
thughes | ebed998 | 2004-06-12 17:25:25 +0000 | [diff] [blame] | 358 | AC_CHECK_TYPES(__pthread_unwind_buf_t,,,[#include <pthread.h>]) |
thughes | be81171 | 2004-06-17 23:04:58 +0000 | [diff] [blame] | 359 | AC_CHECK_TYPES(u16,,,[#include <linux/mii.h>]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 360 | |
| 361 | # Checks for library functions. |
| 362 | AC_FUNC_MEMCMP |
| 363 | AC_FUNC_MMAP |
| 364 | AC_TYPE_SIGNAL |
| 365 | |
thughes | beb6eb9 | 2004-06-14 12:33:43 +0000 | [diff] [blame] | 366 | AC_CHECK_FUNCS([floor memchr memset mkdir strchr strdup strpbrk strrchr strstr semtimedop]) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 367 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 368 | AC_OUTPUT( |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 369 | Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 370 | valgrind.spec |
mueller | bddd607 | 2003-11-19 21:50:07 +0000 | [diff] [blame] | 371 | valgrind.pc |
njn25 | 4d54243 | 2002-09-23 16:09:39 +0000 | [diff] [blame] | 372 | docs/Makefile |
| 373 | tests/Makefile |
njn | c2e7f48 | 2002-09-27 08:44:17 +0000 | [diff] [blame] | 374 | tests/vg_regtest |
njn25 | 1ffab94 | 2002-09-23 16:42:19 +0000 | [diff] [blame] | 375 | tests/unused/Makefile |
njn25 | 4d54243 | 2002-09-23 16:09:39 +0000 | [diff] [blame] | 376 | include/Makefile |
njn | 7a6e746 | 2002-11-09 17:53:30 +0000 | [diff] [blame] | 377 | auxprogs/Makefile |
njn25 | ab72603 | 2002-09-23 16:24:41 +0000 | [diff] [blame] | 378 | coregrind/Makefile |
| 379 | coregrind/demangle/Makefile |
| 380 | coregrind/docs/Makefile |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 381 | coregrind/x86/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 382 | addrcheck/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 383 | addrcheck/tests/Makefile |
njn | 7da8fa7 | 2002-10-03 10:38:40 +0000 | [diff] [blame] | 384 | addrcheck/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 385 | memcheck/Makefile |
| 386 | memcheck/tests/Makefile |
| 387 | memcheck/docs/Makefile |
| 388 | cachegrind/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 389 | cachegrind/tests/Makefile |
| 390 | cachegrind/docs/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 391 | cachegrind/cg_annotate |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 392 | helgrind/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 393 | helgrind/tests/Makefile |
njn | 83157fc | 2002-10-03 10:07:34 +0000 | [diff] [blame] | 394 | helgrind/docs/Makefile |
nethercote | c9f3692 | 2004-02-14 16:40:02 +0000 | [diff] [blame] | 395 | massif/Makefile |
| 396 | massif/hp2ps/Makefile |
| 397 | massif/tests/Makefile |
| 398 | massif/docs/Makefile |
| 399 | corecheck/Makefile |
| 400 | corecheck/tests/Makefile |
| 401 | corecheck/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 402 | lackey/Makefile |
njn | f2df9b5 | 2002-10-04 11:35:47 +0000 | [diff] [blame] | 403 | lackey/tests/Makefile |
njn | 83157fc | 2002-10-03 10:07:34 +0000 | [diff] [blame] | 404 | lackey/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 405 | none/Makefile |
| 406 | none/tests/Makefile |
njn | 9bc8c00 | 2002-10-02 13:49:13 +0000 | [diff] [blame] | 407 | none/docs/Makefile |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 408 | ) |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 409 | |
| 410 | cat<<EOF |
| 411 | |
| 412 | Using the following suppressions by default: |
| 413 | |
| 414 | ${DEFAULT_SUPP} |
| 415 | EOF |
| 416 | |
| 417 | cat<<EOF > default.supp |
| 418 | # This is a generated file, composed of the following suppression rules: |
| 419 | # |
| 420 | # ${DEFAULT_SUPP} |
| 421 | # |
| 422 | |
| 423 | EOF |
| 424 | |
| 425 | for file in ${DEFAULT_SUPP} ; do |
| 426 | cat ${srcdir}/$file >> default.supp |
| 427 | done |