title: Inconsistent results from AC_CHECK_FUNCS
body: <p>I am having a problem with a configure script verifying the presence of some basic functions, </p>
  
  <pre><code>AC_CHECK_FUNCS([floor gettimeofday memset pow sqrt sin exp])
  </code></pre>
  
  <p>Under certain criteria, the results are expected (<code>checking for x... yes</code>). Otherwise the math functions above are claimed to be not defined. The difference is a call to verify some lapack routines first. These are checked by, <code>AC_CHECK_LIB([lapack],[dsyev_],...</code>. If these checks are not done first, then the above math functions fail to check (final compilation works).</p>
  
  <p>I've reduced the configure script to the following that recreates the issue,</p>
  
  <pre><code>AC_INIT([TEST], [0.0], [none@none.com])
  #AC_CHECK_LIB([lapack],[dsyev_], , AC_MSG_FAILURE([Missing lapack]))
  AC_CHECK_FUNCS([floor gettimeofday memset pow sqrt sin exp])
  </code></pre>
  
  <p>Uncommenting the second line results in proper visual results. I imagine that the math library isn't included or checked for some reason. In fact, <code>AC_CHECK_LIB([m],[exp])</code> works fine.</p>
  
  <p>What's the cause of this, and what is the proper way to use this directive? What kind of x-platform considerations should I observe?</p>