title: Autoconf check for program and fail if not found
body: <p>I'm creating a project and using GNU Autoconf tools to do the configuring and making. I've set up all my library checking and header file checking but can't seem to figure out how to check if an executable exists on the system and fail if it doesn't exist.</p>
  
  <p>I've tried:</p>
  
  <pre><code>AC_CHECK_PROG(TEST,testprogram,testprogram,AC_MSG_ERROR(Cannot find testprogram.))
  </code></pre>
  
  <p>When I <code>configure</code> it runs and outputs:</p>
  
  <pre><code>Checking for testprogram... find: `testprogram. 15426 5 ': No such file or directory
  </code></pre>
  
  <p>but does not fail. </p>