[llvm-commits] CVS: llvm/autoconf/m4/sanity_check.m4
Reid Spencer
reid at x10sys.com
Wed Dec 21 18:08:42 PST 2005
Changes in directory llvm/autoconf/m4:
sanity_check.m4 updated: 1.1 -> 1.2
---
Log message:
For PR678: http://llvm.cs.uiuc.edu/PR678 :
* Make it possible to pass a fourth argument to the CHECK_PROGRAM_SANITY
macro that controls whether a non-sane program generates an error or
a warning.
---
Diffs of the changes: (+8 -2)
sanity_check.m4 | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: llvm/autoconf/m4/sanity_check.m4
diff -u llvm/autoconf/m4/sanity_check.m4:1.1 llvm/autoconf/m4/sanity_check.m4:1.2
--- llvm/autoconf/m4/sanity_check.m4:1.1 Sat Jul 16 19:50:40 2005
+++ llvm/autoconf/m4/sanity_check.m4 Wed Dec 21 20:08:30 2005
@@ -5,6 +5,7 @@
dnl $1 - Name or full path of the program to run
dnl $2 - Argument to pass to print out identification string
dnl $3 - grep RE to match identification string
+dnl $4 - set to 1 to make errors only a warning
AC_DEFUN([CHECK_PROGRAM_SANITY],
[
AC_MSG_CHECKING([sanity for program ]$1)
@@ -13,9 +14,14 @@
sanity=`$1 $2 2>&1 | grep "$3"`
if test -z "$sanity" ; then
AC_MSG_RESULT([no])
- AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.])
+ if test "$4" -eq 1 ; then
+ AC_MSG_WARN([Program ]$1[ failed to pass sanity check.])
+ else
+ AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.])
+ fi
+ else
+ AC_MSG_RESULT([yes])
fi
- AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([not found])
fi
More information about the llvm-commits
mailing list