diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-12-22 02:08:30 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-12-22 02:08:30 +0000 |
commit | 6697a748f2643acb6544fba00f5d358fa6852391 (patch) | |
tree | 973f3192d61f634614b1389f7a16157231035c0a /autoconf | |
parent | 156aa35eb57a25582b2a07501ed64cafb4a90e59 (diff) | |
download | llvm-6697a748f2643acb6544fba00f5d358fa6852391.tar.gz llvm-6697a748f2643acb6544fba00f5d358fa6852391.tar.bz2 llvm-6697a748f2643acb6544fba00f5d358fa6852391.tar.xz |
For 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/m4/sanity_check.m4 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/autoconf/m4/sanity_check.m4 b/autoconf/m4/sanity_check.m4 index 5c4d1904fc..4c9dce6cb1 100644 --- a/autoconf/m4/sanity_check.m4 +++ b/autoconf/m4/sanity_check.m4 @@ -5,6 +5,7 @@ dnl passes the sanity check. 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 @@ if test "$?" -eq 0 -a -x "$sanity_path" ; then 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 |