When looking for executable extensions, ignore .dSYM, as that's the debug info direct...
[oota-llvm.git] / autoconf / m4 / sanity_check.m4
index 4c9dce6cb1449b63230a753e5771f8050f857b40..639fccca2464058e84c3b14cf9217731b2ce5e3d 100644 (file)
@@ -9,11 +9,13 @@ dnl   $4 - set to 1 to make errors only a warning
 AC_DEFUN([CHECK_PROGRAM_SANITY],
 [
 AC_MSG_CHECKING([sanity for program ]$1)
+sanity="0"
 sanity_path=`which $1 2>/dev/null`
 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])
+    sanity="0"
     if test "$4" -eq 1 ; then
       AC_MSG_WARN([Program ]$1[ failed to pass sanity check.])
     else
@@ -21,6 +23,7 @@ if test "$?" -eq 0 -a -x "$sanity_path" ; then
     fi
   else
     AC_MSG_RESULT([yes])
+    sanity="1"
   fi
 else
   AC_MSG_RESULT([not found])