Better testing for Stackwalker (#18).  r=bryner
 - Test StackwalkerX86 and StackwalkerPPC on the current process, if built
   by a supported compiler (gcc) on a supported (walkable) CPU (x86, ppc).
 - This test is not enabled by default because of certain optimizations
   that interfere with it (stack frame reuse, frame pointer omission).  See
   the comments at the top of stackwalker_selftest.cc.  To enable this
   test in the standard "make check" suite, configure with --enable-selftest.

http://groups.google.com/group/airbag-dev/browse_thread/thread/2ca1c8e72c809bec


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@35 4c0a9323-5329-0410-9bdc-e9ce6186880e
diff --git a/configure.ac b/configure.ac
index b7153a9..f1c2cc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,5 +47,24 @@
 
 AC_HEADER_STDC
 
+AC_ARG_ENABLE(selftest,
+              AS_HELP_STRING([--enable-selftest],
+                             [Run extra tests with "make check" ]
+                             [(may conflict with optimizations) ]
+                             [(default is no)]),
+              [case "${enableval}" in
+                 yes)
+                   selftest=true
+                   ;;
+                 no)
+                   selftest=false
+                   ;;
+                 *)
+                   AC_MSG_ERROR(bad value ${enableval} for --enable-selftest)
+                   ;;
+               esac],
+              [selftest=false])
+AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue)
+
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT