Update copyright notices.
[platform/upstream/libtasn1.git] / m4 / valgrind.m4
1 # valgrind.m4 serial 1
2 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl From Simon Josefsson
8
9 # sj_VALGRIND()
10 # -------------
11 # Check if valgrind is available, and set VALGRIND to it if available.
12 AC_DEFUN([sj_VALGRIND],
13 [
14   # Run self-tests under valgrind?
15   if test "$cross_compiling" = no; then
16     AC_CHECK_PROGS(VALGRIND, valgrind)
17   fi
18   if test -n "$VALGRIND" && $VALGRIND true > /dev/null 2>&1; then
19     opt_valgrind_tests=yes
20   else
21     opt_valgrind_tests=no
22     VALGRIND=
23   fi
24   AC_MSG_CHECKING([whether self tests are run under valgrind])
25   AC_ARG_ENABLE(valgrind-tests,
26     AS_HELP_STRING([--enable-valgrind-tests],
27                    [run self tests under valgrind]),
28     opt_valgrind_tests=$enableval)
29   AC_MSG_RESULT($opt_valgrind_tests)
30 ])